de.janrufmonitor.repository
Class AbstractReadWriteCallerManager

java.lang.Object
  extended by de.janrufmonitor.repository.AbstractConfigurableCallerManager
      extended by de.janrufmonitor.repository.AbstractReadWriteCallerManager
All Implemented Interfaces:
IConfigurable, IManager, IRepositoryManager, ICallerManager, IIdentifyCallerRepository, IReadCallerRepository, IWriteCallerRepository
Direct Known Subclasses:
AbstractDatabaseCallerManager

public abstract class AbstractReadWriteCallerManager
extends AbstractConfigurableCallerManager
implements IIdentifyCallerRepository, IReadCallerRepository, IWriteCallerRepository

This abstract class can be used as base class for a new caller manager implementation which is supporting configuration.

Author:
Thilo Brandt

Field Summary
 
Fields inherited from class de.janrufmonitor.repository.AbstractConfigurableCallerManager
CFG_ENABLED, CFG_PRIO, m_configuration, m_externalID, m_logger
 
Constructor Summary
AbstractReadWriteCallerManager()
           
 
Method Summary
protected  void addCreationAttributes(ICaller c)
           
protected  void addSystemAttributes(ICaller c)
           
 ICallerList getCallers(IFilter[] filters)
          Gets a list with all callers of a repository filtered by the specified filter array.
 boolean isSupported(Class c)
          Returns wether a repository type (de.janrufmonitor.repository.types.*) is suppored by a repository manager implementation.
 void removeCaller(ICallerList callerList)
          Removes a list of caller objects from a repository.
 void setCaller(ICallerList callerList)
          Sets a list of caller objects to a repository.
 void updateCaller(ICaller caller)
          Updates a caller with the new data.
 
Methods inherited from class de.janrufmonitor.repository.AbstractConfigurableCallerManager
getConfigurableID, getID, getManagerID, getNamespace, getPriority, getRuntime, isActive, isInternalNumber, restart, setConfiguration, setManagerID, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.janrufmonitor.repository.types.IIdentifyCallerRepository
getCaller
 
Methods inherited from interface de.janrufmonitor.repository.types.IReadCallerRepository
getCallers
 
Methods inherited from interface de.janrufmonitor.repository.types.IWriteCallerRepository
removeCaller, setCaller
 

Constructor Detail

AbstractReadWriteCallerManager

public AbstractReadWriteCallerManager()
Method Detail

getCallers

public ICallerList getCallers(IFilter[] filters)
Description copied from interface: IReadCallerRepository
Gets a list with all callers of a repository filtered by the specified filter array. The order of the filtering is done by the order of the array object.

Specified by:
getCallers in interface IReadCallerRepository
Returns:
list with calls

updateCaller

public void updateCaller(ICaller caller)
Updates a caller with the new data. The caller to be updated has to be detremined through its UUID. In this abstract implementation the updateCaller() method calls the setCaller() method.

Specified by:
updateCaller in interface IWriteCallerRepository
Parameters:
caller - caller to be updated

isSupported

public boolean isSupported(Class c)
Description copied from interface: IRepositoryManager
Returns wether a repository type (de.janrufmonitor.repository.types.*) is suppored by a repository manager implementation.

Specified by:
isSupported in interface IRepositoryManager
Parameters:
c - Interface to be supported.
Returns:
true is interface is supported, otherwise false.

setCaller

public void setCaller(ICallerList callerList)
Description copied from interface: IWriteCallerRepository
Sets a list of caller objects to a repository.

Specified by:
setCaller in interface IWriteCallerRepository
Parameters:
callerList - list of caller objects

removeCaller

public void removeCaller(ICallerList callerList)
Description copied from interface: IWriteCallerRepository
Removes a list of caller objects from a repository.

Specified by:
removeCaller in interface IWriteCallerRepository
Parameters:
callerList - list of callers to be removed.

addCreationAttributes

protected void addCreationAttributes(ICaller c)
Overrides:
addCreationAttributes in class AbstractConfigurableCallerManager

addSystemAttributes

protected void addSystemAttributes(ICaller c)
Overrides:
addSystemAttributes in class AbstractConfigurableCallerManager


Copyright © 2010 by Thilo Brandt. All Rights Reserved.