it.geosolutions.geobatch.catalog.impl
Class BaseCatalog

java.lang.Object
  extended by it.geosolutions.geobatch.catalog.impl.BaseIdentifiable
      extended by it.geosolutions.geobatch.catalog.impl.BaseResource
          extended by it.geosolutions.geobatch.catalog.impl.BasePersistentResource<CatalogConfiguration>
              extended by it.geosolutions.geobatch.catalog.impl.BaseCatalog
All Implemented Interfaces:
Catalog, Identifiable, PersistentResource<CatalogConfiguration>, Resource, java.lang.Cloneable

public class BaseCatalog
extends BasePersistentResource<CatalogConfiguration>
implements Catalog

Author:
Alessio Fabiani, GeoSolutions, Simone Giannecchini, GeoSolutions

Constructor Summary
BaseCatalog(java.lang.String id, java.lang.String name, java.lang.String description)
           
 
Method Summary
<EO extends java.util.EventObject,FC extends FlowConfiguration>
void
add(FlowManager<EO,FC> resource)
          Adds a new resource.
<T extends Resource>
void
add(T resource)
           
protected
<T> void
added(T object)
           
 void addListener(CatalogListener listener)
          Adds a listener to the catalog.
 void dispose()
          Disposes the catalog, freeing up any resources.
protected
<T> void
event(CatalogEvent<T> event)
           
protected
<T> void
fireAdded(T object)
           
protected
<T> void
fireModified(T object, java.util.List<java.lang.String> propertyNames, java.util.List<T> oldValues, java.util.List<T> newValues)
           
<EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>>
FM
getFlowManager(java.lang.String id, java.lang.Class<FM> clazz)
           
<EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>>
FM
getFlowManagerByName(java.lang.String name, java.lang.Class<FM> clazz)
           
<EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>>
java.util.List<FM>
getFlowManagers(java.lang.Class<FM> clazz)
           
 java.util.Collection<CatalogListener> getListeners()
          catalog listeners.
<R extends Resource>
R
getResource(java.lang.String id, java.lang.Class<R> clazz)
           
<R extends Resource>
R
getResourceByName(java.lang.String name, java.lang.Class<R> clazz)
           
<R extends Resource>
java.util.List<R>
getResources(java.lang.Class<R> clazz)
           
<EO extends java.util.EventObject,FC extends FlowConfiguration>
void
remove(FlowManager<EO,FC> resource)
          Removes an existing resource.
protected
<T> void
removed(T object)
           
 void removeListener(CatalogListener listener)
          Removes a listener from the catalog.
<EO extends java.util.EventObject,FC extends FlowConfiguration>
void
save(FlowManager<EO,FC> resource)
          Saves a resource which has been modified.
 
Methods inherited from class it.geosolutions.geobatch.catalog.impl.BasePersistentResource
getConfiguration, getDAO, load, persist, remove, setConfiguration, setDAO
 
Methods inherited from class it.geosolutions.geobatch.catalog.impl.BaseIdentifiable
clone, getDescription, getId, getName, setDescription, setId, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.geosolutions.geobatch.catalog.Catalog
getDAO, setDAO
 
Methods inherited from interface it.geosolutions.geobatch.catalog.PersistentResource
getConfiguration, load, persist, remove, setConfiguration
 
Methods inherited from interface it.geosolutions.geobatch.catalog.Identifiable
getDescription, getId, getName, setDescription, setId, setName
 

Constructor Detail

BaseCatalog

public BaseCatalog(java.lang.String id,
                   java.lang.String name,
                   java.lang.String description)
Method Detail

add

public <EO extends java.util.EventObject,FC extends FlowConfiguration> void add(FlowManager<EO,FC> resource)
Description copied from interface: Catalog
Adds a new resource.

Specified by:
add in interface Catalog

dispose

public void dispose()
Description copied from interface: Catalog
Disposes the catalog, freeing up any resources.

Specified by:
dispose in interface Catalog
Specified by:
dispose in interface Resource
Overrides:
dispose in class BaseResource

getFlowManager

public <EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>> FM getFlowManager(java.lang.String id,
                                                                                                                       java.lang.Class<FM> clazz)
Specified by:
getFlowManager in interface Catalog

getFlowManagerByName

public <EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>> FM getFlowManagerByName(java.lang.String name,
                                                                                                                             java.lang.Class<FM> clazz)
Specified by:
getFlowManagerByName in interface Catalog

getFlowManagers

public <EO extends java.util.EventObject,FC extends FlowConfiguration,FM extends FlowManager<EO,FC>> java.util.List<FM> getFlowManagers(java.lang.Class<FM> clazz)
Specified by:
getFlowManagers in interface Catalog

getResource

public <R extends Resource> R getResource(java.lang.String id,
                                          java.lang.Class<R> clazz)
Specified by:
getResource in interface Catalog

getResourceByName

public <R extends Resource> R getResourceByName(java.lang.String name,
                                                java.lang.Class<R> clazz)
Specified by:
getResourceByName in interface Catalog

getResources

public <R extends Resource> java.util.List<R> getResources(java.lang.Class<R> clazz)
Specified by:
getResources in interface Catalog

remove

public <EO extends java.util.EventObject,FC extends FlowConfiguration> void remove(FlowManager<EO,FC> resource)
Description copied from interface: Catalog
Removes an existing resource.

Specified by:
remove in interface Catalog

save

public <EO extends java.util.EventObject,FC extends FlowConfiguration> void save(FlowManager<EO,FC> resource)
Description copied from interface: Catalog
Saves a resource which has been modified.

Specified by:
save in interface Catalog

getListeners

public java.util.Collection<CatalogListener> getListeners()
Description copied from interface: Catalog
catalog listeners.

Specified by:
getListeners in interface Catalog

addListener

public void addListener(CatalogListener listener)
Description copied from interface: Catalog
Adds a listener to the catalog.

Specified by:
addListener in interface Catalog

removeListener

public void removeListener(CatalogListener listener)
Description copied from interface: Catalog
Removes a listener from the catalog.

Specified by:
removeListener in interface Catalog

added

protected <T> void added(T object)

fireAdded

protected <T> void fireAdded(T object)

fireModified

protected <T> void fireModified(T object,
                                java.util.List<java.lang.String> propertyNames,
                                java.util.List<T> oldValues,
                                java.util.List<T> newValues)

removed

protected <T> void removed(T object)

event

protected <T> void event(CatalogEvent<T> event)

add

public <T extends Resource> void add(T resource)
Specified by:
add in interface Catalog


Copyright © 2008-2012 GeoSolutions. All Rights Reserved.