com.ca.jcs
Class DefaultConnectorManager

java.lang.Object
  extended by com.ca.jcs.DefaultConnectorManager
All Implemented Interfaces:
ConnectorManager

public class DefaultConnectorManager
extends Object
implements ConnectorManager

Default manager that persists metadata to the local file system, caches dependencies between ConnectorTypes and Connectors in memory and handles lazy activation of the ApachedDS partitions associated with each connector.


Field Summary
static String INITIAL_CONTEXT_CLASS
           
static String LDAP_VERSION_PROP
           
 
Constructor Summary
DefaultConnectorManager()
           
 
Method Summary
 Connector activateConnector(String connTypeName, String connNamingAttr, String connName)
          Called to activate connector by all other operations.
 Connector activateConnector(String connTypeName, String connNamingAttr, String connName, LdapDN suffix, Attributes attrs)
          Called by add() of new connector.
 ConnectorType activateConnectorType(Name connTypeDn, String connTypeName, Attributes attrs)
           
 PartitionConfiguration createConnectorConfiguration(Connector conn, Name suffix)
           
 void deactivateConnector(String connTypeName, String connName)
          Unmap any connectors (aka partitions) of this connector type.
 void deactivateConnector(String connTypeName, String connName, boolean keepState)
          Unmap any connectors (aka partitions) of this connector type, with the option to keep connector state.
 void deactivateConnectors(String connTypeName)
           
 void deactivateConnectorType(String connTypeName)
          Unmap any connectors (aka partitions) of this connector type.
 Connector findConnector(String connTypeName, String connName)
           
 ConnectorType findConnectorType(String connTypeName)
          Find type, return null if doesn't exist.
 String getConnectorClientCertStore()
           
 String getConnectorClientCertStorePassword()
           
 String getConnectorClientCertStoreType()
           
 ConnectorFactory getConnectorFactory()
           
 ConnectorPersister getConnectorPersister()
           
 boolean getConnectorSSLSimple()
           
 boolean getConnectorSSLTrace()
           
 boolean getConnectorSSLVerifyPeer()
           
 CryptoService getCryptoService()
           
 char[] getDecryptedValue(String cipherText)
           
 DNDetails getDNDetails(LdapDN name, String dnConnectorTypeKeyAttribute, Name dnManagedSuffixName)
          Cheaply classifies Distinguished Names (DNs) into groups to aid processing.
 HttpProxyConfiguration getHttpProxyConfiguration()
           
 String getLdapsCertificateFile()
           
 String getLdapsCertificatePassword()
           
 void init(DirectoryServiceConfiguration dsCfg)
          Link with ApacheDS itself, from which important information needs to be copied over.
 void refreshConnectors(String connTypeName)
          'Refresh' all live connectors on a connectorType: ie. tear down and reactivate
 void saveConnectorState(ConnectorType connType, Connector conn, Attributes ldapAttrs)
          Handles splitting attributes into sensitive and normal attributes in a State.
protected  void saveConnectorTypeState(ConnectorType connectorType)
          save the connector type state.
 void setConnectorClientCertStore(String connectorClientCertStore)
           
 void setConnectorClientCertStorePassword(String pwd)
           
 void setConnectorClientCertStoreType(String connectorClientCertStoreType)
           
 void setConnectorFactory(ConnectorFactory factory)
           
 void setConnectorSSLSimple(boolean connectorSSLSimple)
           
 void setConnectorSSLTrace(boolean connectorSSLTrace)
           
 void setConnectorSSLVerifyPeer(boolean connectorSSLVerifyPeer)
           
 void setCryptoService(CryptoService cryptoService)
           
 void setHttpProxyConfiguration(HttpProxyConfiguration httpProxyConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_CONTEXT_CLASS

public static final String INITIAL_CONTEXT_CLASS
See Also:
Constant Field Values

LDAP_VERSION_PROP

public static final String LDAP_VERSION_PROP
See Also:
Constant Field Values
Constructor Detail

DefaultConnectorManager

public DefaultConnectorManager()
Method Detail

getConnectorFactory

public ConnectorFactory getConnectorFactory()
Specified by:
getConnectorFactory in interface ConnectorManager

setConnectorFactory

public void setConnectorFactory(ConnectorFactory factory)
Specified by:
setConnectorFactory in interface ConnectorManager

getConnectorPersister

public ConnectorPersister getConnectorPersister()
Specified by:
getConnectorPersister in interface ConnectorManager

getLdapsCertificateFile

public String getLdapsCertificateFile()
Specified by:
getLdapsCertificateFile in interface ConnectorManager

getLdapsCertificatePassword

public String getLdapsCertificatePassword()
Specified by:
getLdapsCertificatePassword in interface ConnectorManager

getConnectorClientCertStore

public String getConnectorClientCertStore()
Specified by:
getConnectorClientCertStore in interface ConnectorManager

setConnectorClientCertStore

public void setConnectorClientCertStore(String connectorClientCertStore)

getConnectorClientCertStoreType

public String getConnectorClientCertStoreType()
Specified by:
getConnectorClientCertStoreType in interface ConnectorManager

setConnectorClientCertStoreType

public void setConnectorClientCertStoreType(String connectorClientCertStoreType)

getConnectorClientCertStorePassword

public String getConnectorClientCertStorePassword()
Specified by:
getConnectorClientCertStorePassword in interface ConnectorManager

setConnectorClientCertStorePassword

public void setConnectorClientCertStorePassword(String pwd)

getConnectorSSLSimple

public boolean getConnectorSSLSimple()
Specified by:
getConnectorSSLSimple in interface ConnectorManager

setConnectorSSLSimple

public void setConnectorSSLSimple(boolean connectorSSLSimple)

getConnectorSSLVerifyPeer

public boolean getConnectorSSLVerifyPeer()
Specified by:
getConnectorSSLVerifyPeer in interface ConnectorManager

setConnectorSSLVerifyPeer

public void setConnectorSSLVerifyPeer(boolean connectorSSLVerifyPeer)

getConnectorSSLTrace

public boolean getConnectorSSLTrace()
Specified by:
getConnectorSSLTrace in interface ConnectorManager

setConnectorSSLTrace

public void setConnectorSSLTrace(boolean connectorSSLTrace)

getCryptoService

public CryptoService getCryptoService()
Specified by:
getCryptoService in interface ConnectorManager

setCryptoService

public void setCryptoService(CryptoService cryptoService)
Specified by:
setCryptoService in interface ConnectorManager

getHttpProxyConfiguration

public HttpProxyConfiguration getHttpProxyConfiguration()
Specified by:
getHttpProxyConfiguration in interface ConnectorManager

setHttpProxyConfiguration

public void setHttpProxyConfiguration(HttpProxyConfiguration httpProxyConfiguration)
Specified by:
setHttpProxyConfiguration in interface ConnectorManager

init

public void init(DirectoryServiceConfiguration dsCfg)
Description copied from interface: ConnectorManager
Link with ApacheDS itself, from which important information needs to be copied over.

Specified by:
init in interface ConnectorManager

findConnectorType

public ConnectorType findConnectorType(String connTypeName)
Description copied from interface: ConnectorManager
Find type, return null if doesn't exist.

Specified by:
findConnectorType in interface ConnectorManager

findConnector

public Connector findConnector(String connTypeName,
                               String connName)
Specified by:
findConnector in interface ConnectorManager

getDNDetails

public DNDetails getDNDetails(LdapDN name,
                              String dnConnectorTypeKeyAttribute,
                              Name dnManagedSuffixName)
                       throws NamingException
Description copied from interface: ConnectorManager
Cheaply classifies Distinguished Names (DNs) into groups to aid processing.

Specified by:
getDNDetails in interface ConnectorManager
Throws:
NamingException

saveConnectorTypeState

protected void saveConnectorTypeState(ConnectorType connectorType)
                               throws NamingException
save the connector type state.

Parameters:
connectorType - the connector type.
Throws:
NamingException

saveConnectorState

public void saveConnectorState(ConnectorType connType,
                               Connector conn,
                               Attributes ldapAttrs)
                        throws NamingException
Handles splitting attributes into sensitive and normal attributes in a State.

Throws:
NamingException

activateConnector

public Connector activateConnector(String connTypeName,
                                   String connNamingAttr,
                                   String connName,
                                   LdapDN suffix,
                                   Attributes attrs)
                            throws NamingException
Description copied from interface: ConnectorManager
Called by add() of new connector.

Specified by:
activateConnector in interface ConnectorManager
Throws:
NamingException

activateConnector

public Connector activateConnector(String connTypeName,
                                   String connNamingAttr,
                                   String connName)
                            throws NamingException
Description copied from interface: ConnectorManager
Called to activate connector by all other operations.

Specified by:
activateConnector in interface ConnectorManager
Throws:
NamingException

activateConnectorType

public ConnectorType activateConnectorType(Name connTypeDn,
                                           String connTypeName,
                                           Attributes attrs)
                                    throws NamingException
Specified by:
activateConnectorType in interface ConnectorManager
Throws:
NamingException

createConnectorConfiguration

public PartitionConfiguration createConnectorConfiguration(Connector conn,
                                                           Name suffix)

refreshConnectors

public void refreshConnectors(String connTypeName)
                       throws NamingException
'Refresh' all live connectors on a connectorType: ie. tear down and reactivate

Specified by:
refreshConnectors in interface ConnectorManager
Throws:
NamingException

deactivateConnectors

public void deactivateConnectors(String connTypeName)
                          throws NamingException
Throws:
NamingException

deactivateConnectorType

public void deactivateConnectorType(String connTypeName)
                             throws NamingException
Unmap any connectors (aka partitions) of this connector type.

Specified by:
deactivateConnectorType in interface ConnectorManager
Throws:
NamingException

deactivateConnector

public void deactivateConnector(String connTypeName,
                                String connName)
                         throws NamingException
Unmap any connectors (aka partitions) of this connector type.

Specified by:
deactivateConnector in interface ConnectorManager
Throws:
NamingException

deactivateConnector

public void deactivateConnector(String connTypeName,
                                String connName,
                                boolean keepState)
                         throws NamingException
Unmap any connectors (aka partitions) of this connector type, with the option to keep connector state.

Throws:
NamingException

getDecryptedValue

public char[] getDecryptedValue(String cipherText)
Specified by:
getDecryptedValue in interface ConnectorManager
Returns:
unobfuscated value or null on failure


Created 2011-07-14 13:27 EST