View Javadoc

1   /*
2    * Copyright 2009 FatWire Corporation. All Rights Reserved.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.fatwire.gst.foundation.test.event;
18  
19  import COM.FutureTense.Interfaces.ICS;
20  
21  import com.fatwire.assetapi.data.AssetId;
22  import com.openmarket.basic.event.AbstractAssetEventListener;
23  
24  import org.apache.commons.logging.Log;
25  import org.apache.commons.logging.LogFactory;
26  
27  /**
28   * This class is a trivial asset event listener that reports that an asset event
29   * has been heard. This is used to test the asset event system.
30   * 
31   * @author Tony Field
32   * @since 2011-03-28
33   */
34  public final class VerySimpleAssetEventListener extends AbstractAssetEventListener {
35  
36      private static final Log LOG = LogFactory.getLog("com.fatwire.gst.foundation.test.event");
37  
38      @Override
39      public void assetAdded(AssetId assetId) {
40          LOG.info("Heard assetAdded event for " + assetId);
41      }
42  
43      @Override
44      public void assetUpdated(AssetId assetId) {
45          LOG.info("Heard assetUpdated event for " + assetId);
46      }
47  
48      @Override
49      public void assetDeleted(AssetId assetId) {
50          LOG.info("Heard assetDeleted event for " + assetId);
51      }
52  
53      @Override
54      public void init(ICS arg0) {
55          LOG.info("init " + (arg0 == null ? " without ICS arg." : ""));
56  
57      }
58  }