|
||||||||||
| 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
com.ca.jcs.meta.MetaConnector
com.ca.jcs.jndi.JNDIMetaConnector
public class JNDIMetaConnector
Base class for connectors using the JNDI (Java Naming and Directory Interface) API to communicate with their target managed systems.
| Nested Class Summary | |
|---|---|
static class |
JNDIMetaConnector.PagedSearchSupport
|
static class |
JNDIMetaConnector.Vendor
Vendor's know apriori - there is no reason this list has to be complete but some vendors have been found to be problematic in which case identifying them becomes important so that work-arounds can be put into effect. |
| Nested classes/interfaces inherited from class com.ca.jcs.meta.MetaConnector |
|---|
MetaConnector.FilterAware, MetaConnector.SearchFinishedException |
| 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 | |
|---|---|
JNDIMetaConnector(ConnectorType type,
String name,
Logger log,
ConnectorConfig config)
|
|
| Method Summary | |
|---|---|
void |
activate()
Calls super.activate() which creates and registers the connection manager, as well as notifying this connector instance
of its metadata. |
Attributes |
convertAttributesFromConnector(Name connDn,
String ldapDnStr,
MetaObjectClassMapping classMap,
Set<String> requestedConnAttrIds,
Attributes connAttrs,
boolean strict)
Need to implement this method because we have to return a single structural objectclass for each object in lookup / search results or the IMPS will always see such objects as out of sync with their templates. |
static int |
countSupportedLdapControlsWithBaseOID(String vendorName,
String baseOID,
Map<String,String> controls,
Logger log)
Returns count of supported controls for the endpoint which starts with baseOID. |
AttributeStyleOpProcessor |
createAttributeStyleOpProcessor()
|
ConnectionManager |
createConnectionManager()
Create a connection manager, which is a concept expected to be supported by the vast majority of connectors. |
protected static JNDIMetaConnector.Vendor |
detectVendor(DirContext connection,
Logger log)
Attempt to detect vendor using any exact vendor matching techniques |
static JNDIMetaConnector.Vendor |
determineVendor(DirContext connection,
Map<String,String> controls,
Logger log)
|
JNDIMetaConnectorConfig |
getConnectorConfig()
Return the configuration for this connector, usually initialized from /conf/connector.xml using Spring XML. |
JNDIExceptionToLdapMapper |
getExceptionMapper()
|
Collection<? extends MetaConnector.FilterAware> |
getFilterAwareness()
Identify supported search filter types |
protected Properties |
getJndiEnv(Attributes attrs)
Called as part of activate(). |
JNDIMetaConnector.PagedSearchSupport |
getPagedSearchSupport()
|
JNDIAttributeStyleOpProcessor |
getRealAttrProcessor()
Needed so we can hang on to the real processor (ignoring any Java proxies that might be interposed around it) as proxies can't be coerced to a concrete implementation class like JNDIAttributeStyleOpProcessor. |
HashMap<String,String> |
getSupportLdapControls()
|
JNDIMetaConnector.Vendor |
getVendor()
Determine vendor (possibly unknown) based on supported LDAP control OIDs reported by the endpoint. |
Properties |
getVendorFlags()
Returns special vendor flags provided by MetaDataDefs.MD_VENDOR_FLAGS on namespace. |
boolean |
isAutoDirectAssocRequired()
Defaults to BaseConnector.isIndirectAssociations()==Boolean.FALSE. |
boolean |
isBehaviourCachingRequired()
Caching does make sense for JNDI based connectors in general, but is only actually activated for a particular connector instance based on whether its metadata settings dictate that it makes sense. |
boolean |
isBehaviourStrictConnectorDns()
Connector-speak DNs conform to RFC 2253 so that LdapName can be used to pass them in or parse names
passed back in search results. |
boolean |
isHiddenLdapBaseDn()
|
Boolean |
isIndirectAssociations()
|
MetaObjectClassMapping |
resolveObjectClass(String ldapAttributeId,
Name connDN,
Collection<MetaObjectClassMapping> classMaps)
A DN resolver implementation for JNDI based on lookup of the entry being resolved |
protected void |
setRealAttrProcessor(JNDIAttributeStyleOpProcessor realAttrProcessor)
|
| Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition |
|---|
destroy, doDestroy, getConfiguration, getFactoryConfiguration, getSuffix, hasEntry, init, isInitialized, lookup, modify, 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 |
|---|
lookup, modify, sync |
| Methods inherited from interface org.apache.directory.server.core.partition.Partition |
|---|
destroy, getSuffix, hasEntry, init, isInitialized, lookup, modify, sync |
| Field Detail |
|---|
public static final String INITIAL_CONTEXT_CLASS_PROP
public static final String JNDIKEY_LDAPSOCKETFACTORY_PROP
public static final String LDAP_VERSION_PROP
public static final String CONN_BIND_DN_ATTR
connectorMapTo= values expected in Connector class' metadata,
see MetaConnector.CONN_HOST_ATTR etc.
todo Should baseDN be mandatory ? .
public static String CA_BASE_OID
public static String IBM_BASE_OID
public static String MICROSOFT_BASE_OID
public static String MICROSOFT_BASE_ADAM_OID
public static String MICROSOFT_BASE_AD_2000_OID
public static String MICROSOFT_BASE_AD_2003_OID
public static String MICROSOFT_BASE_AD_2008_OID
public static String MICROSOFT_ADS_DIRSYNC_CONTROL_OID
public static String MICROSOFT_ADS_SHOW_DELETED_CONTROL_OID
public static String NOVELL_BASE_OID
public static String ORACLE_DIRECTORY_OBJECTS_BASE_OID
public static String SUN_BASE_OID
public static String NETSCAPE_LDAP_V3_CONTROLS
public static String SUN_IPLANET_REPLICATION
public static final String[][] BASE_OID_TO_VENDOR
public static final String CONN_KRB_USE_KERBEROS
public static final String CONN_KRB_KERBEROS_REALM
public static final String CONN_KRB_KDC_HOST
| Constructor Detail |
|---|
public JNDIMetaConnector(ConnectorType type,
String name,
Logger log,
ConnectorConfig config)
| Method Detail |
|---|
public boolean isBehaviourStrictConnectorDns()
LdapName can be used to pass them in or parse names
passed back in search results.
isBehaviourStrictConnectorDns in class BaseConnectorpublic boolean isBehaviourCachingRequired()
isBehaviourCachingRequired in class BaseConnectorpublic Boolean isIndirectAssociations()
isIndirectAssociations in class BaseConnectorAssociationpublic boolean isAutoDirectAssocRequired()
BaseConnectorBaseConnector.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.
isAutoDirectAssocRequired in class BaseConnectorAssocAttributeOpProcessorProxy.BaseConnector.getAutoDirectAssocExlusions()
protected Properties getJndiEnv(Attributes attrs)
throws NamingException
activate(). Note that "required" validator ensures
all mandatory values are present before this method is called.
NamingExceptionpublic JNDIMetaConnectorConfig getConnectorConfig()
BaseConnector/conf/connector.xml using Spring XML.
getConnectorConfig in interface ConnectorgetConnectorConfig in class BaseConnector@NotNull public JNDIMetaConnector.PagedSearchSupport getPagedSearchSupport()
public void activate()
throws NamingException
MetaConnectorsuper.activate() which creates and registers the connection manager, as well as notifying this connector instance
of its metadata.
activate in interface Activatableactivate in interface Connectoractivate in class MetaConnectorNamingExceptionpublic JNDIExceptionToLdapMapper getExceptionMapper()
public HashMap<String,String> getSupportLdapControls()
throws NamingException
NamingException
public static int countSupportedLdapControlsWithBaseOID(String vendorName,
String baseOID,
Map<String,String> controls,
Logger log)
throws NamingException
PagedResultsControl.OID has the Microsoft base but is implemented by other vendors (including
NDS).
NamingExceptionpublic JNDIMetaConnector.Vendor getVendor()
MetaDataDefs.MD_VENDOR on namespace.
public Properties getVendorFlags()
MetaDataDefs.MD_VENDOR_FLAGS on namespace.
public static JNDIMetaConnector.Vendor determineVendor(DirContext connection,
Map<String,String> controls,
Logger log)
throws NamingException
NamingException
protected static JNDIMetaConnector.Vendor detectVendor(DirContext connection,
Logger log)
throws NamingException
NamingException
public ConnectionManager createConnectionManager()
throws NamingException
BaseConnectorLdapOperationNotSupportedException 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 ConnectorcreateConnectionManager in class BaseConnectorNamingExceptionpublic boolean isHiddenLdapBaseDn()
isHiddenLdapBaseDn in class BaseConnectorMetaConnector.CONN_BASE_DN_ATTR, where the connector
base DN is added to all DNs passed to the managed system (so that they are valid
if stored persistently and later accessed with a different base DN) but the
LDAP equivalent of the base DN is hidden from clients.protected void setRealAttrProcessor(JNDIAttributeStyleOpProcessor realAttrProcessor)
public JNDIAttributeStyleOpProcessor getRealAttrProcessor()
JNDIAttributeStyleOpProcessor.
public AttributeStyleOpProcessor createAttributeStyleOpProcessor()
public MetaObjectClassMapping resolveObjectClass(String ldapAttributeId,
Name connDN,
Collection<MetaObjectClassMapping> classMaps)
throws NamingException
resolveObjectClass in class MetaConnectorldapAttributeId - Name of the attribute requiring resolution to be performed, which is not sufficient to be any kind of key as it's
parent classMap is not know but is useful for log messages and establishing context
nonetheless (note that this method's task is logically independent of which attribute requires
the provided classMaps to be disambiguated).connDN - Connector-speak DN for which objectclass needs to be resolved.classMaps - Possible class maps from which objectclass needs to be resolved (as specified in metadata).
NamingException
public Attributes convertAttributesFromConnector(Name connDn,
String ldapDnStr,
MetaObjectClassMapping classMap,
Set<String> requestedConnAttrIds,
Attributes connAttrs,
boolean strict)
throws NamingException
convertAttributesFromConnector in interface ConnectorconvertAttributesFromConnector in class MetaConnectorconnDn - Connector-speak DN for this object.ldapDnStr - LDAP equivalent to connDn.classMap - Details about object's objectClass mappings.requestedConnAttrIds - Connector-speak attribute ids originally requested by the client.connAttrs - Connector-speak attributes to be converted.strict - should it return error when empty attribute values are found?
NamingExceptionpublic Collection<? extends MetaConnector.FilterAware> getFilterAwareness()
getFilterAwareness in class MetaConnector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||