|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.standalone.StandaloneServerManager
public class StandaloneServerManager
Manager for functionality of the JCS when in "standalone" mode (no provisioning server).
When in standalone mode the JCS uses a searchable JDBM partition that provide configuration information about active and inactive connector types and connectors at all times.
| Field Summary | |
|---|---|
static String |
ATTR_CONFIG_CONTAINER_NAME
Attribute name for a configuration container name |
static String |
ATTR_CONFIG_PARAM_NAME
Attribute name for a configuration param name |
static String |
ATTR_CONFIG_PARAM_VALUE
Attribute name for a configuration param value |
static String |
ATTR_DOMAIN_COMPONENT
Attribute name for a domain component |
static String |
ATTR_NAMESPACE_FAMILY
Attribute name for a namespace family (used by ConnXp to determine dynamic connectors) |
static String |
ATTR_NAMESPACE_NAME
Attribute name for a namespace name |
static String |
ATTR_OBJECT_CLASS
Attribute name for the object class |
protected CustomJdbmPartition |
configurationPartition
JDBM partition used to provide SA JCS configuration |
protected ConnectorManager |
connectorManager
Spring injected connector manager |
protected CustomJdbmPartition |
connectorPartition
JDBM partition used to provide connector configuration information to ConnXp |
protected ConnectorPersister |
connectorPersister
Spring injected connection config persister used to observe config changes |
protected LdapDN |
domainDn
The DN of the standalone domain |
protected DirectoryServiceConfiguration |
dsCfg
ApacheDS configuration |
static String |
FILE_EXTENSION_JAR
The file extension, including '.' for a JAR file |
protected String |
propertyOverrideFile
Spring injected property override filename |
protected StandaloneServerConfiguration |
standaloneConfiguration
Spring injected configuration for standalone mode |
static String |
STARS
80 stars, for use in logger |
static String |
URL_PROTOCOL_FILE
The URL protocol for a file contained on the filesystem |
static String |
URL_PROTOCOL_JAR
The URL protocol for a file contained within a JAR |
static String |
VALUE_CONFIG_PARAM_DOMAIN
Configuration param name value for the standalone domain |
static String |
VALUE_CONFIG_PARAM_ENABLED
Configuration param name value for whether standalone mode is enabled |
static String |
VALUE_NAMESPACE_COMMON_OBJECTS
Namespace name value for IM common objects |
static String |
VALUE_NAMESPACE_FAMILY_DYNAMIC
Namespace family value for dynamic connector types |
static String |
VALUE_OBJECT_CLASS_CONFIG_CONT
Object class value for a configuration container |
static String |
VALUE_OBJECT_CLASS_CONFIG_PARAM
Object class value for a configuration param |
static String |
VALUE_OBJECT_CLASS_DC
Object class value for a domain component |
static String |
VALUE_OBJECT_CLASS_DYN_NAMESPACE
Object class value for a dynamic namespace |
static String |
VALUE_OBJECT_CLASS_NAMESPACE
Object class value for a namespace |
| Constructor Summary | |
|---|---|
StandaloneServerManager()
|
|
| Method Summary | |
|---|---|
protected void |
addConnectorTypeToConnectorPartition(String configBase,
String connTypeName,
ConnectorPersister.State connTypeState)
Method to add all configuration for a connector type to the connector configuration partition. |
protected void |
addEntryToConnectorPartition(LdapDN entryDn,
ConnectorPersister.StateType type,
Attributes attrs,
Attributes obfuscatedAttrs)
Add an entry to the connector configuration partition. |
void |
beforeModify(LdapDN name,
ModificationItem[] items)
CustomJdbmPartition callback method made before a configuration entry is modified. |
void |
cleanup()
Deinitialise and remove any active partitions in ApacheDS. |
protected void |
createConfigurationPartition(DirectoryServiceConfiguration dsCfg)
Method to create a JDBM partition that provides read/write access to SA JCS configuration. |
protected void |
createConnectorPartition(Rdn baseRdn,
String domain,
DirectoryServiceConfiguration dsCfg)
Method to create a JDBM partition that provides read/write access to connector configuration. |
protected CustomJdbmPartition |
createCustomPartition(LdapDN suffix,
Attributes attrs,
DirectoryServiceConfiguration dsCfg)
Method to create a new custom JDBM partition and add it to ApacheDS. |
protected void |
disableStandaloneMode()
Internal method to disable the standalone mode of the JCS. |
protected void |
enableStandaloneMode()
Internal method to enable the standalone mode of the JCS. |
protected List<String> |
getPartitionConnectorTypes()
Internal method to get a list of connector types in the JDBM partition. |
void |
init(DirectoryServiceConfiguration dsCfg)
Initialise method that takes ApacheDS configuration. |
protected boolean |
isMetadataOutdated(ImplBundle implBundle,
ConnectorPersister.State connTypeState)
Check whether the metadata used in a persisted connector type state has become outdated from the connector. |
boolean |
isStandaloneManagedDN(LdapDN dn)
Return whether a DN is managed by the standalone server manager. |
boolean |
isStandaloneMode()
|
protected void |
persistStandaloneConfiguration()
Method to persist the current standalone configuration in the JCS properties override file. |
protected void |
populateConnectorPartition(String configBase)
Method to populate the JDBM partition with static and dynamic connector configurations. |
protected void |
removeEntryFromConnectorPartition(LdapDN entryDn)
Remove an entry from the JDBM partition, including any child nodes. |
NamingEnumeration<SearchResult> |
searchConnectorConfig(LdapDN baseName,
Map<String,String> environment,
ExprNode filter,
SearchControls searchControls)
Perform a search on the connector configuration partition. |
void |
setConnectorManager(ConnectorManager connectorManager)
|
void |
setPropertyOverrideConfigurer(ListAwarePropertyOverrideConfigurer propertyOverrideConfigurer)
|
void |
setStandaloneConfiguration(StandaloneServerConfiguration standaloneConfiguration)
|
void |
stateDeleted(ConnectorPersister.StateType type,
LdapDN stateName)
ConnectorPersisterObserver callback method. |
void |
stateSaved(ConnectorPersister.State state)
ConnectorPersisterObserver callback method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String URL_PROTOCOL_JAR
public static final String URL_PROTOCOL_FILE
public static final String FILE_EXTENSION_JAR
protected StandaloneServerConfiguration standaloneConfiguration
protected ConnectorPersister connectorPersister
protected ConnectorManager connectorManager
protected String propertyOverrideFile
protected CustomJdbmPartition connectorPartition
protected CustomJdbmPartition configurationPartition
protected LdapDN domainDn
protected DirectoryServiceConfiguration dsCfg
public static final String ATTR_OBJECT_CLASS
public static final String ATTR_NAMESPACE_FAMILY
public static final String VALUE_OBJECT_CLASS_DYN_NAMESPACE
public static final String VALUE_NAMESPACE_FAMILY_DYNAMIC
public static final String ATTR_NAMESPACE_NAME
public static final String ATTR_DOMAIN_COMPONENT
public static final String ATTR_CONFIG_CONTAINER_NAME
public static final String ATTR_CONFIG_PARAM_NAME
public static final String ATTR_CONFIG_PARAM_VALUE
public static final String VALUE_OBJECT_CLASS_NAMESPACE
public static final String VALUE_OBJECT_CLASS_DC
public static final String VALUE_OBJECT_CLASS_CONFIG_CONT
public static final String VALUE_OBJECT_CLASS_CONFIG_PARAM
public static final String VALUE_NAMESPACE_COMMON_OBJECTS
public static final String VALUE_CONFIG_PARAM_ENABLED
public static final String VALUE_CONFIG_PARAM_DOMAIN
public static final String STARS
| Constructor Detail |
|---|
public StandaloneServerManager()
| Method Detail |
|---|
public void init(DirectoryServiceConfiguration dsCfg)
dsCfg - Directory service configuration.
public void cleanup()
throws NamingException
NamingExceptionpublic boolean isStandaloneManagedDN(LdapDN dn)
dn - the dn to check.
protected List<String> getPartitionConnectorTypes()
throws NamingException
NamingException
public NamingEnumeration<SearchResult> searchConnectorConfig(LdapDN baseName,
Map<String,String> environment,
ExprNode filter,
SearchControls searchControls)
throws NamingException
baseName - the LDAP base name to use in the search.environment - the LDAP environment.filter - the filter to use in the search.searchControls - the controls for the search. eg scope.
NamingException
protected void enableStandaloneMode()
throws NamingException
NamingException
protected void disableStandaloneMode()
throws NamingException
NamingException
protected CustomJdbmPartition createCustomPartition(LdapDN suffix,
Attributes attrs,
DirectoryServiceConfiguration dsCfg)
throws NamingException
suffix - the DN of the partition suffix.attrs - the attributes of the root entry.dsCfg - directory configuration.
NamingException
protected void createConfigurationPartition(DirectoryServiceConfiguration dsCfg)
throws NamingException
dsCfg - directory configuration.
NamingException
protected void createConnectorPartition(Rdn baseRdn,
String domain,
DirectoryServiceConfiguration dsCfg)
throws NamingException
baseRdn - the domain component rdn to use for the partition.domain - the name of the IMPS compatible domain.dsCfg - directory configuration.
NamingException
protected void populateConnectorPartition(String configBase)
throws NamingException
configBase - the base DN of configuration information.
NamingException
protected void addConnectorTypeToConnectorPartition(String configBase,
String connTypeName,
ConnectorPersister.State connTypeState)
throws NamingException
configBase - the base DN of configuration information.connTypeName - the connector type name.connTypeState - the connector type persisted state, or null.
NamingException
protected boolean isMetadataOutdated(ImplBundle implBundle,
ConnectorPersister.State connTypeState)
implBundle - the ImplBundle for the connector type.connTypeState - the connector type state.
protected void addEntryToConnectorPartition(LdapDN entryDn,
ConnectorPersister.StateType type,
Attributes attrs,
Attributes obfuscatedAttrs)
throws NamingException
entryDn - the DN of the new entry.type - the type of entry.attrs - the attributes to use for the new entry.obfuscatedAttrs - the obfuscated attributes, or null.
NamingException
protected void removeEntryFromConnectorPartition(LdapDN entryDn)
throws NamingException
entryDn - the DN of the entry.
NamingExceptionpublic void stateSaved(ConnectorPersister.State state)
ConnectorPersisterObserver callback method.
stateSaved in interface ConnectorPersisterObserverstate - the state that was saved.
public void stateDeleted(ConnectorPersister.StateType type,
LdapDN stateName)
ConnectorPersisterObserver callback method.
stateDeleted in interface ConnectorPersisterObservertype - the type of state entry deleted.stateName - the name of the state deleted.
public void beforeModify(LdapDN name,
ModificationItem[] items)
throws NamingException
CustomJdbmPartition callback method made before a configuration entry is modified.
beforeModify in interface CustomJdbmPartitionObservername - the distinguished name of the entry to modify.items - the ModificationItems used to affect the modification with
NamingException - to be thrown if the modify should not occur.
protected void persistStandaloneConfiguration()
throws NamingException
NamingExceptionpublic boolean isStandaloneMode()
public void setStandaloneConfiguration(StandaloneServerConfiguration standaloneConfiguration)
standaloneConfiguration - the standaloneConfiguration to setpublic void setConnectorManager(ConnectorManager connectorManager)
connectorManager - the connectorManager to set
public void setPropertyOverrideConfigurer(ListAwarePropertyOverrideConfigurer propertyOverrideConfigurer)
throws IOException
propertyOverrideConfigurer - the propertyOverrideConfigurer to set
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||