|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.ConnectorPersister
public abstract class ConnectorPersister
Abstract class containing common functionality for persisting ConnectorTypes and
Connectors configuration to persistent storage, so that the configuration can be loaded
after JCS restart.
Note: All concrete implementations should support notifying observers of state changes, regardless of how the state is persisted.
| Nested Class Summary | |
|---|---|
static class |
ConnectorPersister.State
Class representing the State of a ConnectorPersister.StateType. |
static class |
ConnectorPersister.StateType
An enum represeting the different types of state stored. |
| Field Summary | |
|---|---|
protected ConnectorManager |
connectorManager
Spring injected connector manager |
protected boolean |
enabled
Spring managed property for whether file persistence is enabled |
protected Set<ConnectorPersisterObserver> |
observers
Set of observers for state changes |
| Constructor Summary | |
|---|---|
ConnectorPersister()
|
|
| Method Summary | |
|---|---|
void |
addObserver(ConnectorPersisterObserver observer)
Add an observer to get notified of state changes. |
void |
deleteConnectorState(LdapDN stateName,
String connTypeName,
String connName)
Delete any state found for a given connector. |
void |
deleteConnectorTypeState(LdapDN stateName,
String connTypeName)
Delete any state found for a given connector type. |
abstract List<String> |
getConnectorList(String connTypeName)
Method to get the names of all persisted connectors for a given connector type. |
abstract List<String> |
getConnectorTypeList()
Method to get the names of all persisted connector types. |
boolean |
isEnabled()
|
boolean |
isObfuscatedSplitRequired()
|
abstract ConnectorPersister.State |
loadConnectorState(String connTypeName,
String connName)
Load a connector state from persistent storage. |
abstract ConnectorPersister.State |
loadConnectorTypeState(String connTypeName)
Load a connector type state from persistent storage. |
protected void |
notifyStateDeleted(ConnectorPersister.StateType type,
LdapDN stateName)
Internal method to notify all observers a sate was deleted. |
protected void |
notifyStateSaved(ConnectorPersister.State state)
Internal method to notify all observers a sate was saved. |
void |
removeObserver(ConnectorPersisterObserver observer)
Add an observer to get notified of state changes. |
void |
saveConnectorState(Connector conn,
ConnectorPersister.State state)
Save the provided state for a connector. |
void |
saveConnectorTypeState(ConnectorType connType,
ConnectorPersister.State state)
Save the provided state for a connector type. |
void |
setConnectorManager(ConnectorManager connectorManager)
|
void |
setEnabled(boolean enabled)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConnectorManager connectorManager
protected boolean enabled
protected Set<ConnectorPersisterObserver> observers
| Constructor Detail |
|---|
public ConnectorPersister()
| Method Detail |
|---|
public boolean isObfuscatedSplitRequired()
public void setConnectorManager(ConnectorManager connectorManager)
connectorManager - public void addObserver(ConnectorPersisterObserver observer)
observer - the observer instance.public void removeObserver(ConnectorPersisterObserver observer)
observer - the observer instance.
public void saveConnectorTypeState(ConnectorType connType,
ConnectorPersister.State state)
throws IOException
connType - the connector type to save.state - an initialised state instance.
IOException
public void saveConnectorState(Connector conn,
ConnectorPersister.State state)
throws IOException
isObfuscatedSplitRequired()
conn - the connector to save.state - an initialised state instance.
IOException
public void deleteConnectorTypeState(LdapDN stateName,
String connTypeName)
throws IOException
stateName - the state nameconnTypeName - the connector type name.
IOException
public void deleteConnectorState(LdapDN stateName,
String connTypeName,
String connName)
throws IOException
stateName - the state nameconnTypeName - the connector type name.connName - the connector name.
IOException
public abstract ConnectorPersister.State loadConnectorTypeState(String connTypeName)
throws IOException
connTypeName - the connector type name.
IOException
public abstract ConnectorPersister.State loadConnectorState(String connTypeName,
String connName)
throws IOException
connTypeName - the connector type name.connName - the connector name.
IOException
public abstract List<String> getConnectorTypeList()
throws IOException
IOException
public abstract List<String> getConnectorList(String connTypeName)
throws IOException
connTypeName - the connector type name
IOExceptionprotected void notifyStateSaved(ConnectorPersister.State state)
state - the state that was saved.
protected void notifyStateDeleted(ConnectorPersister.StateType type,
LdapDN stateName)
throws IOException
type - the type of state entry deleted.stateName - the name of the state deleted.
IOExceptionpublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - the enabled to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||