|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.partition.AbstractPartition
com.ca.jcs.BaseConnector
public abstract class BaseConnector
Represents an LDAP view onto an external remote managed endpoint system, whilst acting as an ApacheDS partition to which LDAP operations can be routed. Does its work by delegating LDAP requests to one of its processors (attribute-style, method-style or script-style) according to availability of implementation and metadata configuration.
Note that any checked or unchecked exceptions thrown by
derived classes are caught and logged in PartitionLoaderService.
| Field Summary | |
|---|---|
protected List<String> |
acceptedUnknownAttrIds
|
protected AttributeStyleOpProcessor |
attributeStyleOpProcessor
Protected so that proxying done in set method can be skipped. |
static String |
CONN_ACTIVATION_TIMEOUT
Configures DefaultConnectorManager how many seconds to wait for an activation of an existing connector which is not yet activated. |
static String |
CONN_DN
If an attribute has a connectorMapTo= value matching this value in metadata and is named in the return attributes for a search, then its value will be set to the connector-speak DN relative to the managed system's root (ie ignoring any connectorBaseDn which may be configured) for each search result. |
static String |
CONN_NAME
Refer to CONN_DN, except allows for just the flat name rather then the connector-speak DN to be returned from a search. |
static String |
CONN_NAME_ID
Refer to CONN_NAME, allows any attribute mapped to this value to be set with the naming attribute like eTDYNNamingAttribute does
when used with an ambiguous naming attribute, except this time it's unconditional and can always be used to look at the naming id. |
static String |
CONN_PASS_THROUGH_SUFFIX
Used when passing expensive to compute connector-speak values through filter expressions, to save re-evaluating them. |
static int |
CONN_PASS_THROUGH_SUFFIX_LEN
|
static String |
CONN_ROLLBACK_CONNECTION_ATTRS
Defines if ConnectorAttributesProcessor will rollback connection attributes after their unsuccessful modification,
to go back to last working connection details for a given connector instance. |
static String |
CONN_SKIP_PERSISTER_DELETE_ATTR
Int attribute, which if present on Connector Type or Connector causes the persister to be skipped if set to "0" (or never deleted if "1") to allow testing of state saved by the persister. |
static String |
CONN_SPEC
Used to surround virtual attributes used as connectorMapTo values, which control and / or query JCS / connector behaviour rather than being sent on to the endpoint. |
static String |
CONN_SPEC_INTERNAL
Used to surround strings needing special treatment internally in JCS, these never pass out to the client of the JCS. |
static int |
CONNECTOR_ATTR_INDEX
Used to index array returned by splitConnectorPassThroughAttrId(String). |
protected Name |
connectorBaseDn
Root DN in connector-speak, specifying root of subtree on endpoint system managed by this connector. |
static LdapDN |
EMPTY_DN
Empty DN signifying the connector's level in the DIT. |
static int |
LDAP_ATTR_INDEX
Used to index array returned by splitConnectorPassThroughAttrId(String). |
static String |
LDAP_CONN_DN
Special virtual LDAP attribute that can be presented to search() and lookup() and will return an object's connector DN. |
protected String |
ldapExceptionPrefix
|
protected Logger |
log
|
static String |
SEARCH_RESULTS_STREAMING
Allows optional configuration of streaming behaviour for a connector, where an attribute is mapped to it in metadata. |
| Fields inherited from interface com.ca.jcs.Connector |
|---|
STATE_DELETING |
| Fields inherited from interface org.apache.directory.server.core.partition.Partition |
|---|
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
| Constructor Summary | |
|---|---|
BaseConnector()
|
|
BaseConnector(ConnectorType type,
String name,
Logger log)
|
|
BaseConnector(ConnectorType type,
String name,
Logger log,
ConnectorConfig config)
|
|
| Method Summary | |
|---|---|
void |
activate()
Activate connector, and hence allow it to start processing incoming LDAP requests. |
Name |
addConnectorBaseDN(Name name)
Add base DN for this connector (in connector-speak) to provided name. |
String |
appQuoted(String str)
Return str, ensuring it is quoted with quoteString if one has been configured. |
StringBuilder |
appQuoted(StringBuilder sb,
String str)
Appends str to sb, ensuring it is quoted with quoteString if one has been configured. |
void |
bind(LdapDN bindDn,
byte[] credentials,
List mechanisms,
String saslAuthId)
Just stubs as connector does bind using stored credentials. |
String |
convertConnectorDNFromNativeName(String name)
Some connectors like LND use a non-DN string syntax to represent their hierarchical names. |
String |
convertConnectorDNToNativeName(Name name)
Some connectors like LND use a non-DN string syntax to represent their hierarchical names. |
ConnectionManager |
createConnectionManager()
Create a connection manager, which is a concept expected to be supported by the vast majority of connectors. |
Name |
createConnectorDn(Name name)
Create a concrete name matching name based on the value returned by isBehaviourStrictConnectorDns(). |
Name |
createConnectorDn(String dnStr)
Create a concrete name matching dnStr based on the value returned by isBehaviourStrictConnectorDns(). |
MethodStyleOpProcessor |
createMethodStyleOpProcessor()
Must be overridden by connectors that support the concept of method-style op processing, return null unless overridden. |
ObjectInfo |
createObjectInfo()
Can be overridden by derived classes that need custom ObjectInfo implementations. |
ScriptStyleOpProcessor |
createScriptStyleOpProcessor()
Must be overridden by connectors that support the concept of script-style op processing, return null unless overridden. |
TransactionManager |
createTransactionManager()
Must be overridden by connectors that support the concept of a transaction manager, return null unless overridden. |
void |
deactivate()
Deactivates this connector's connection manager if one exists. |
protected void |
doInit()
Override this method to put your initialization code. |
static String |
formatConnectorPassThroughAttrId(String ldapAttrId,
String connAttrId)
Used by concrete connector when resolving LDAP attributes with ambiguous connector mappings, to allow a chosen mapping to be explicitly chosen using specialised logic. |
static String |
formatConnectorPassThroughValue(String value)
Used by concrete connector when resolving LDAP attributes with ambiguous connector mappings, to allow a chosen mapping to be explicitly chosen using specialised logic. |
List<String> |
getAcceptedUnknownAttrIds()
|
Attributes |
getAttributes()
|
AttributeStyleOpProcessor |
getAttributeStyleOpProcessor()
Allows for interposing opbindings proxy if needed - all concrete connector methods should consequently be called via it. |
AttributeTypeRegistry |
getAttributeTypeRegistry()
Return the registry used by ApacheDS for this connector. |
HashSet<OpProcessor.MethodName> |
getAutoDirectAssocExlusions()
Used by connectors for which isAutoDirectAssocRequired()
returns true, where updates of associations after Delete / Rename or other
operations are not required due to clean-up performed by the native system
or because of special processing needs. |
CacheableStatus |
getCacheableStatus(ObjectInfo objInfo)
Is the provided object potentially cacheable and if so, what should be cached?. |
CacheManager |
getCacheManager()
|
ConnectionManager |
getConnectionManager()
|
Name |
getConnectorBaseDn()
Return base DN for this connector in connector-speak. |
ConnectorConfig |
getConnectorConfig()
Return the configuration for this connector, usually initialized from /conf/connector.xml using Spring XML. |
Rdn |
getConnectorDnRdn(Name connDn,
int i)
Return the i-th Rdn from the provided connDn. |
static String |
getConnectorPassThroughValue(String passThroughValue)
|
String |
getLdapExceptionPrefix()
Used by the framework and concrete connectors to distinguish exceptions orginating from within the JCS from those of the host container (ApacheDS). |
String |
getLdapNamingAttr()
Return the LDAP naming attribute for this connector. |
String |
getLdapObjectClass()
Return the LDAP object class matching this connector. |
Logger |
getLogger()
Return the logger allocated by the JCS framework specifically for this connector instance. |
MethodStyleOpProcessor |
getMethodStyleOpProcessor()
|
String |
getName()
Return this connector's name. |
Partition |
getPartition()
Get the ApacheDS partition associated with this connector. |
static Attribute |
getPassThroughAttrIdToConnector(Attribute attr,
String connAttrId)
|
ScriptStyleOpProcessor |
getScriptStyleOpProcessor()
|
int |
getStateFlags()
|
LdapDN |
getStoredSuffix()
Returns the DN matching this connector's suffix. |
TransactionManager |
getTransactionManager()
Return transaction manager, which defaults to null but should be overridden by derived classes as appropriate. |
ConnectorType |
getType()
Return the parent ConnectorType for this connector. |
LdapDN |
getUpSuffix()
|
boolean |
isActivated()
Returns true if the connector has been fully activated. |
boolean |
isAutoDirectAssocRequired()
Defaults to isIndirectAssociations()==Boolean.FALSE. |
boolean |
isBehaviourCachingRequired()
Does caching ever make sense for this connector's implementation (by default is false)? |
boolean |
isBehaviourSearchObjAsLookup()
Behavioural method which should be overridden by derived classes if they want object-scope searches to be treated as lookup()s on the object referred to
by the baseName. |
boolean |
isBehaviourSearchSingleClass()
If a derived connector's implementational approach requires that it's OpProcessor.doSearch(com.ca.jcs.ObjectInfo, com.ca.jcs.filter.FilterInfo, java.util.Map
method is called is only called for a single objectclass at a time, then they should
override this method to return true. |
boolean |
isBehaviourStrictConnectorDns()
Does this connector implementation require extra strictly conformant connector-speak DNs to be a) passed to it from the framework and b) passed back from it to the framework in search results (i.e. |
boolean |
isCachingActive()
Returns true if caching was both requested and activated successfully. |
boolean |
isCachingPossible()
Returns true if connector's configuration and coding permits caching. |
boolean |
isCachingRequired()
Is LdapDN => {ConnectorDN, [objectclass]} caching required for this connector ? |
boolean |
isCheckObjectExistenceForDeletion()
before deleting an object, is the check for its' existence necessary? |
static boolean |
isConnectorPassThrough(String value)
Return true if provided value should be passed through filter processing without further modification. |
boolean |
isHiddenLdapBaseDn()
|
Boolean |
isIndirectAssociations()
|
boolean |
isObjectClassRequired()
True if connector need the "objectClass" attribute passed through to them when a) updating a child object or b) in search filters, otherwise false if this information is known contextually and this attribute should not be passed through. |
boolean |
isSuffix(LdapDN name)
Returns true if the provided name matches the DN suffix for the Partition associated with this connector. |
NamingEnumeration<NameClassPair> |
list(LdapDN baseName)
Must be defined due to requirements of the Partition interface, but is never called. |
protected abstract String[] |
mapAttributeIdsToConnector(Collection<MetaObjectClassMapping> classMaps,
String[] ldapAttrIds,
boolean singleObject)
Map ldapAttrIds belonging to the LDAP object class
matching objectInfo to their connector-speak equivalents,
where the naming attribute is always forced to be present in the first
position. |
String[] |
mapAttributeIdsToConnector(MetaObjectClassMapping classMap,
String[] ldapAttrIds,
boolean nullMeansAll)
Helper method when only have a single classMap. |
void |
modifyAttributes(ModificationItem[] items)
Apply modification items to the set of attributes currently recorded for this connector. |
boolean |
noQuote(String str)
Returns true if either no quoteString has been configured for this connector, or if the provided str
doesn't start and end with the configured quoteString. |
protected void |
passThroughAttrIdToConnector(Attributes attrs,
String ldapAttrId,
String connAttrId)
|
void |
postProcessLdapSearchResult(Name connDn,
MetaObjectClassMapping classMap,
Set<String> requestedConnAttrIds,
Attributes connAttrs,
SearchResult sr)
Plug-in point for connectors that must customize search result representation after DN and attributes have been fully mapped to LDAP, for instance to handle of connector-specific DN manipulation such as that required to handle "Unique OU" for LND connector. |
protected Name |
removeConnectorBaseDN(Name name)
Remove base DN for this connector (in connector-speak) from provided name, if it is present. |
void |
setAcceptedUnknownAttrIds(List<String> acceptedUnknownAttrIds)
When ConnectorConfig.isFailOnUnknownAttrIds() is true then this list can be used to define
global attribute ids which aren't mapped, but shouldn't cause an add() or modify() operation
to fail when they are mentioned (individual connector configs can add their own ones too if they
wish). |
void |
setActivated(boolean activated)
|
void |
setAttributes(Attributes attrs)
Store the provided connector-speak attributes on this connector instance. |
void |
setAttributeStyleOpProcessor(AttributeStyleOpProcessor proc)
|
void |
setCacheManager(CacheManager cacheManager)
|
void |
setCachingRequired(boolean cachingRequired)
Set cachingRequired, unless trying to activate it and connector and / or connector's configuration disallow it in which case cachingRequired is set to false. |
void |
setConnectionManager(ConnectionManager mgr)
|
void |
setConnectorBaseDn(Name connectorBaseDn)
|
void |
setConnectorConfig(ConnectorConfig cfg)
|
void |
setLdapNamingAttr(String ldapNamingAttr)
|
void |
setLdapObjectClass(String ldapObjectClass)
|
void |
setLogger(Logger log)
|
void |
setMethodStyleOpProcessor(MethodStyleOpProcessor proc)
Should be called by connectors that implement operation bindings, eg JDBC stored procedures. |
void |
setName(String name)
|
void |
setQuoteString(String quoteString)
Return string needed to quote strings output to the endpoint system, defaults to null but can be overridden by derived connectors or set using MetaDataDefs.MD_QUOTE_STRING. |
void |
setScriptStyleOpProcessor(ScriptStyleOpProcessor proc)
|
void |
setStateFlags(int stateFlags)
Refer to STATE_* constants which can be ORed together, for instance Connector.STATE_DELETING. |
void |
setStoredSuffix(LdapDN storedSuffix)
|
void |
setTransactionManager(TransactionManager mgr)
|
void |
setType(ConnectorType type)
|
static String[] |
splitConnectorPassThroughAttrId(String ldapAttrId)
|
String |
toString()
Returns a string of the form "class:name [suffix]". |
void |
unbind(LdapDN bindDn)
Just stubs as connector does bind using stored credentials. |
static LdapDN |
upName(LdapDN name)
Returns the human friendly equiavlent to the provided name (any OIDs are replaced with textual attribute names). |
| Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition |
|---|
destroy, doDestroy, getConfiguration, getFactoryConfiguration, getSuffix, hasEntry, init, isInitialized, lookup, modify, move, move, sync |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ca.jcs.PartitionOps |
|---|
add, delete, lookup, lookup, modify, modify, modifyRn, move, move, search, sync |
| Methods inherited from interface com.ca.jcs.Connector |
|---|
convertAttributesFromConnector, convertDNFromConnector, convertDNToConnector, convertDNToConnector |
| Methods inherited from interface org.apache.directory.server.core.partition.Partition |
|---|
add, delete, destroy, getSuffix, hasEntry, init, isInitialized, lookup, lookup, modify, modify, modifyRn, move, move, search, sync |
| Methods inherited from interface com.ca.jcs.processor.OpProcessorStyleFactory |
|---|
createAttributeStyleOpProcessor |
| Field Detail |
|---|
protected Logger log
protected List<String> acceptedUnknownAttrIds
protected AttributeStyleOpProcessor attributeStyleOpProcessor
protected Name connectorBaseDn
protected final String ldapExceptionPrefix
public static final String CONN_SPEC
public static final String CONN_SPEC_INTERNAL
public static final String CONN_DN
public static final String CONN_NAME
CONN_DN, except allows for just the flat name rather then the connector-speak DN to be returned from a search.
public static final String CONN_NAME_ID
CONN_NAME, allows any attribute mapped to this value to be set with the naming attribute like eTDYNNamingAttribute does
when used with an ambiguous naming attribute, except this time it's unconditional and can always be used to look at the naming id.
public static final String CONN_ROLLBACK_CONNECTION_ATTRS
ConnectorAttributesProcessor will rollback connection attributes after their unsuccessful modification,
to go back to last working connection details for a given connector instance.
public static final String SEARCH_RESULTS_STREAMING
public static final String CONN_SKIP_PERSISTER_DELETE_ATTR
public static final String CONN_ACTIVATION_TIMEOUT
DefaultConnectorManager how many seconds to wait for an activation of an existing connector which is not yet activated.
public static final String LDAP_CONN_DN
public static final String CONN_PASS_THROUGH_SUFFIX
public static final int CONN_PASS_THROUGH_SUFFIX_LEN
public static final int LDAP_ATTR_INDEX
splitConnectorPassThroughAttrId(String).
public static final int CONNECTOR_ATTR_INDEX
splitConnectorPassThroughAttrId(String).
public static final LdapDN EMPTY_DN
| Constructor Detail |
|---|
public BaseConnector()
public BaseConnector(ConnectorType type,
String name,
Logger log)
public BaseConnector(ConnectorType type,
String name,
Logger log,
ConnectorConfig config)
| Method Detail |
|---|
public ObjectInfo createObjectInfo()
createObjectInfo in interface Connectorpublic String convertConnectorDNToNativeName(Name name)
ObjectInfo.getConnectorNativeName().
public String convertConnectorDNFromNativeName(String name)
ObjectInfo.getConnectorNativeName().
public String getLdapExceptionPrefix()
Connector
getLdapExceptionPrefix in interface Connectorpublic CacheManager getCacheManager()
getCacheManager in interface CachingConnectorpublic void setCacheManager(CacheManager cacheManager)
setCacheManager in interface CachingConnectorpublic CacheableStatus getCacheableStatus(ObjectInfo objInfo)
getCacheableStatus in interface CachingConnectorpublic boolean isBehaviourStrictConnectorDns()
LdapName
can be used. Defaults to false so that connector-speak naming attributes can have characters
like underscore etc in them in which case SimpleLdapName is used.
public Name createConnectorDn(String dnStr)
throws InvalidNameException
dnStr based on the value returned by isBehaviourStrictConnectorDns().
If true then an LdapName is returned, otherwise a SimpleLdapName is returned.
InvalidNameException
public Name createConnectorDn(Name name)
throws InvalidNameException
name based on the value returned by isBehaviourStrictConnectorDns().
If true then an LdapName is returned, otherwise a SimpleLdapName is returned.
InvalidNameException
public Rdn getConnectorDnRdn(Name connDn,
int i)
throws InvalidNameException
connDn.
InvalidNameExceptionpublic boolean isBehaviourCachingRequired()
public boolean isCheckObjectExistenceForDeletion()
public boolean isCachingRequired()
isCachingRequired in interface CachingConnectorpublic void setCachingRequired(boolean cachingRequired)
setCachingRequired in interface CachingConnectorcachingRequired - Desired state for caching.public boolean isCachingPossible()
public boolean isCachingActive()
isCachingActive in interface CachingConnector
protected void doInit()
throws NamingException
doInit in class AbstractPartitionNamingExceptionpublic AttributeTypeRegistry getAttributeTypeRegistry()
public boolean isSuffix(LdapDN name)
throws NamingException
name matches the DN suffix for the Partition associated with this connector. LDAP
requests referencing this suffix or DNs below this suffix will be routed to this connector for processing.
isSuffix in interface PartitionisSuffix in class AbstractPartitionNamingException
public static LdapDN upName(LdapDN name)
throws InvalidNameException
name (any OIDs are replaced with textual attribute names).
InvalidNameExceptionpublic Logger getLogger()
getLogger in interface Connectorpublic void setLogger(Logger log)
public ConnectorConfig getConnectorConfig()
/conf/connector.xml using Spring XML.
getConnectorConfig in interface Connectorpublic void setConnectorConfig(ConnectorConfig cfg)
setConnectorConfig in interface Connectorpublic List<String> getAcceptedUnknownAttrIds()
public void setAcceptedUnknownAttrIds(List<String> acceptedUnknownAttrIds)
ConnectorConfig.isFailOnUnknownAttrIds() is true then this list can be used to define
global attribute ids which aren't mapped, but shouldn't cause an add() or modify() operation
to fail when they are mentioned (individual connector configs can add their own ones too if they
wish).
acceptedUnknownAttrIds - List of legal, but never-the-less unmapped, LDAP attribute ids.public Attributes getAttributes()
getAttributes in interface Connector
public void setAttributes(Attributes attrs)
throws NamingException
setAttributes in interface Connectorattrs - Attributes passed to add() or
NamingException
public void modifyAttributes(ModificationItem[] items)
throws NamingException
items to the set of attributes currently recorded for this connector.
modifyAttributes in interface ConnectorNamingExceptionpublic String getName()
getName in interface Connectorpublic void setName(String name)
setName in interface Connectorpublic ConnectorType getType()
getType in interface Connectorpublic void setType(ConnectorType type)
setType in interface Connectorpublic boolean isActivated()
isActivated in interface Connectorpublic void setActivated(boolean activated)
public int getStateFlags()
getStateFlags in interface Connectorpublic void setStateFlags(int stateFlags)
STATE_* constants which can be ORed together, for instance Connector.STATE_DELETING.
setStateFlags in interface Connector
public void activate()
throws NamingException
MetaConnector.CONN_BASE_DN_ATTR, which will be prepended
to every connector DN before looking up the managed directory, and hence provides a
restricted view onto a potentially larger managed directory. Note the actual
activated field is managed by ConnectorAttributesProcessor so that the entire
stack of activate() calls at all levels of derivation complete execution before the
connector is considered "activated".
isLazyConnect() returns false.
activate in interface Activatableactivate in interface ConnectorNamingException
public void deactivate()
throws NamingException
deactivate in interface Activatabledeactivate in interface ConnectorNamingExceptionpublic TransactionManager getTransactionManager()
getTransactionManager in interface ConnectorNullTransactionManagerpublic void setTransactionManager(TransactionManager mgr)
setTransactionManager in interface Connectorpublic void setQuoteString(String quoteString)
MetaDataDefs.MD_QUOTE_STRING.
setQuoteString in interface QuoteStringHandlerpublic boolean noQuote(String str)
str
doesn't start and end with the configured quoteString.
public StringBuilder appQuoted(StringBuilder sb,
String str)
str to sb, ensuring it is quoted with quoteString if one has been configured.
appQuoted in interface QuoteStringHandlerpublic String appQuoted(String str)
str, ensuring it is quoted with quoteString if one has been configured.
appQuoted in interface QuoteStringHandlerpublic String getLdapObjectClass()
getLdapObjectClass in interface Connectorpublic void setLdapObjectClass(String ldapObjectClass)
setLdapObjectClass in interface Connectorpublic String getLdapNamingAttr()
getLdapNamingAttr in interface Connectorpublic void setLdapNamingAttr(String ldapNamingAttr)
setLdapNamingAttr in interface Connectorpublic Partition getPartition()
getPartition in interface Connectorpublic LdapDN getStoredSuffix()
getStoredSuffix in interface Connectorpublic void setStoredSuffix(LdapDN storedSuffix)
setStoredSuffix in interface Connectorpublic String toString()
toString in class Object
public NamingEnumeration<NameClassPair> list(LdapDN baseName)
throws NamingException
Partition interface, but is never called.
list in interface PartitionNamingException
protected abstract String[] mapAttributeIdsToConnector(Collection<MetaObjectClassMapping> classMaps,
String[] ldapAttrIds,
boolean singleObject)
ldapAttrIds belonging to the LDAP object class
matching objectInfo to their connector-speak equivalents,
where the naming attribute is always forced to be present in the first
position.
classMaps - List of MetaObjectClassMappings for all objectclasses that
may be returned by a query.ldapAttrIds - Ldap attributes ids requested by the client.singleObject - Is only a single query result expected, in which case a null
ldapAttrIds list is interpreted as meaning "all attributes". If false
a null ldapAttrIds list is interpreted as meaning "all cheap attributes".
ldapAttrIds mapped to connector speak, where the special attribute
CONN_DN will be deleted if it is mapped to.
public String[] mapAttributeIdsToConnector(MetaObjectClassMapping classMap,
String[] ldapAttrIds,
boolean nullMeansAll)
mapAttributeIdsToConnector(java.util.Collection, String[], boolean)
public void postProcessLdapSearchResult(Name connDn,
MetaObjectClassMapping classMap,
Set<String> requestedConnAttrIds,
Attributes connAttrs,
SearchResult sr)
throws NamingException
postProcessLdapSearchResult in interface ConnectorconnDn - Connector-speak DN for target object whose attributes have been converted to LDAP in sr.classMap - Information about the class for the target object.requestedConnAttrIds - Set containing all attribute names requested by the client, attribute names will have the
exact case as specified for their connectorMapTo values in the metadata.connAttrs - Original connector-speak attributes prior to being converted to LDAP and placed in sr.sr - Search result, with LDAP DN and LDAP-speak attributes.
NamingExceptionpublic AttributeStyleOpProcessor getAttributeStyleOpProcessor()
getAttributeStyleOpProcessor in interface Connectorpublic void setAttributeStyleOpProcessor(AttributeStyleOpProcessor proc)
setAttributeStyleOpProcessor in interface Connectorpublic MethodStyleOpProcessor getMethodStyleOpProcessor()
getMethodStyleOpProcessor in interface Connectorpublic void setMethodStyleOpProcessor(MethodStyleOpProcessor proc)
setMethodStyleOpProcessor in interface Connectorproc - Processor to be called after guard conditions have been
checked against an operation to determine relevance.public ScriptStyleOpProcessor getScriptStyleOpProcessor()
getScriptStyleOpProcessor in interface Connectorpublic void setScriptStyleOpProcessor(ScriptStyleOpProcessor proc)
setScriptStyleOpProcessor in interface Connector
public ConnectionManager createConnectionManager()
throws NamingException
LdapOperationNotSupportedException exception when called.Note that this method is defined to make the contract explicit for connector developers and for internal use with in the connector and its op processors, rather then to be called by components external to the connector. Default 'base' implementation below uses 'connectionManagerClass' spring property from connector.xml to locate the nominated connection manager (pooling) class and load/instantiate it for subsequent use. Specific connector implementations can override this and perform their own connection manager creation.
createConnectionManager in interface ConnectorNamingExceptionpublic ConnectionManager getConnectionManager()
getConnectionManager in interface Connectorpublic void setConnectionManager(ConnectionManager mgr)
setConnectionManager in interface Connectorpublic TransactionManager createTransactionManager()
createTransactionManager in interface Connectorpublic MethodStyleOpProcessor createMethodStyleOpProcessor()
createMethodStyleOpProcessor in interface OpProcessorStyleFactorypublic ScriptStyleOpProcessor createScriptStyleOpProcessor()
createScriptStyleOpProcessor in interface OpProcessorStyleFactory
public LdapDN getUpSuffix()
throws NamingException
getUpSuffix in interface PartitionNamingException
public void bind(LdapDN bindDn,
byte[] credentials,
List mechanisms,
String saslAuthId)
throws NamingException
bind in interface PartitionNamingException
public void unbind(LdapDN bindDn)
throws NamingException
unbind in interface PartitionNamingExceptionpublic boolean isBehaviourSearchObjAsLookup()
lookup()s on the object referred to
by the baseName.
public boolean isBehaviourSearchSingleClass()
OpProcessor.doSearch(com.ca.jcs.ObjectInfo, com.ca.jcs.filter.FilterInfo, java.util.Map, javax.naming.directory.SearchControls)
method is called is only called for a single objectclass at a time, then they should
override this method to return true. This will cause the framework, for example, to decompose a
subtree search with a filter like (objectclass=*) into a separate
doSearch() call for each defined objectclass.
public boolean isObjectClassRequired()
!isBehaviourSearchSingleClass().
public boolean isHiddenLdapBaseDn()
MetaConnector.CONN_BASE_DN_ATTR should be hidden in DNs (distinguished
names) returned by the managed system, and not expected to be present in LDAP
DNs passed in. By default it is false so that LDAP DNs can be persistently stored
and then later used against the same managed system, even if a different connector
base DN is used to access it.public Boolean isIndirectAssociations()
Associationpublic boolean isAutoDirectAssocRequired()
isIndirectAssociations()==Boolean.FALSE.
Derived connectors for which this condition is true, but which
want to handle reverse virtual associations
directly rather then relying on generic logic in
AssocAttributeOpProcessorProxy
should override to return false.
AssocAttributeOpProcessorProxy.getAutoDirectAssocExlusions()public HashSet<OpProcessor.MethodName> getAutoDirectAssocExlusions()
isAutoDirectAssocRequired()
returns true, where updates of associations after Delete / Rename or other
operations are not required due to clean-up performed by the native system
or because of special processing needs. When exclusions are put into effect due
to this method's return value, the concrete connector itself needs to take over responsibility
for any splitting and processing of association values required.
Some example exclusions are the AS4 endpoint which looks after the membership association
itself when accounts or groups are deleted, as does the LND endpoint which cleans up
natively after deletes and renames (the latter of which take an unknowable
amount of time to be approved).
isAutoDirectAssocRequired()public Name getConnectorBaseDn()
public void setConnectorBaseDn(Name connectorBaseDn)
throws InvalidNameException
InvalidNameException
public Name addConnectorBaseDN(Name name)
throws NamingException
name.
NamingException
protected Name removeConnectorBaseDN(Name name)
throws NamingException
name, if it is present.
NamingExceptionpublic static boolean isConnectorPassThrough(String value)
public static String formatConnectorPassThroughAttrId(String ldapAttrId,
String connAttrId)
public static String formatConnectorPassThroughValue(String value)
public static String getConnectorPassThroughValue(String passThroughValue)
public static String[] splitConnectorPassThroughAttrId(String ldapAttrId)
public static Attribute getPassThroughAttrIdToConnector(Attribute attr,
String connAttrId)
protected void passThroughAttrIdToConnector(Attributes attrs,
String ldapAttrId,
String connAttrId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||