com.ca.jcs.sdk
Class SDKMetaConnector
java.lang.Object
org.apache.directory.server.core.partition.AbstractPartition
com.ca.jcs.BaseConnector
com.ca.jcs.meta.MetaConnector
com.ca.jcs.sdk.SDKMetaConnector
- All Implemented Interfaces:
- Activatable, CachingConnector, Connector, PartitionOps, OpProcessorStyleFactory, QuoteStringHandler, Partition
public class SDKMetaConnector
- extends MetaConnector
This sample connector uses flat files as its target managed endpoint system.
All accounts and groups for the directory are stored as files under the
filesystem directory specified by ${eTSDKPath}\SDK\<SDK Directory Name>", where ${eTSDKPath}
is the value of this LDAP attribute and specifies a path local to the machine running the JCS. Account objects
are stored in files with the extension ".sdk", and group in files with the extension
".grp".
| Fields inherited from class com.ca.jcs.meta.MetaConnector |
ALIAS_ACCOUNT_OBJECT, ALIAS_GROUP_OBJECT, CONN_BASE_DN_ATTR, CONN_DESCRIPTION_ATTR, CONN_HOST_ATTR, CONN_LOG_SEVERITY_ATTR, CONN_NAME_ATTR, CONN_PASSWORD_ATTR, CONN_PORT_ATTR, CONN_REMOTE_VERSION_ATTR, CONN_SECURE_ATTR, CONN_URL_ATTR, CONN_USERNAME_ATTR, DYNAMIC_ATTR_INFO_ATTR, READ_ONLY_VALIDATOR, virtualContainers |
| Fields inherited from class com.ca.jcs.BaseConnector |
acceptedUnknownAttrIds, attributeStyleOpProcessor, CONN_ACTIVATION_TIMEOUT, CONN_DN, CONN_NAME, CONN_PASS_THROUGH_SUFFIX, CONN_PASS_THROUGH_SUFFIX_LEN, CONN_ROLLBACK_CONNECTION_ATTRS, CONN_SKIP_PERSISTER_DELETE_ATTR, CONN_SPEC, CONN_SPEC_INTERNAL, CONNECTOR_ATTR_INDEX, connectorBaseDn, EMPTY_DN, LDAP_ATTR_INDEX, LDAP_CONN_DN, ldapExceptionPrefix, log, SEARCH_RESULTS_STREAMING |
| Methods inherited from class com.ca.jcs.meta.MetaConnector |
add, convertAttributes, convertAttributesFromConnector, convertDNFromConnector, convertDNToConnector, convertDNToConnector, convertModificationItems, convertToException, delete, getAssocReverseConnectorAttrId, getAttributeStyleOpProcessorChain, getCacheableStatus, getClassMappingFromConnectorAttrs, getClassMappings, getConnectorAttributesProcessor, getConnectorClassMap, getConnectorObjectClass, getConnectorObjectClasses, getDefaultConnectorSearchAttrIds, getDefaultSearchLdapAttrIds, getFilterInfo, getFilterInfo, getFilterInfo, getFilterInfo, getFilterInfo, getFilterInfo, getFilterObjClass, getIncludedDnLdapAttrId, getMetaConnectorConfig, getMetaConnectorType, getObjectClassFromAmbiguousConnAttr, getObjectClassFromConnAttr, getObjectInfo, getObjectInfo, getObjectInfo, getObjectInfo, getObjectInfo, getOpProcessor, getRequestedConnAttrIds, getRootObjectInfo, getSearchBaseObjectInfo, getSearchBaseObjectInfo, getVirtualContainers, hasMetaOpBindingsProxy, isAcceptedUnknownAttrId, isAmibguousLdapDn, isRootDN, isRootDN, isSearchOutsideClassContainer, lookup, mapAttributeIdsToConnector, mapAttributeIdToConnector, mapAttributeIdToLdap, mapAttributesIdsToConnector, mapAttributesIdsToLdap, mapModificationItems, mapObjectClassAttributeIdsToConnector, modify, modifyRn, move, move, notifyMetaData, resolveObjectClass, search, search, searchImpl, searchObjectScopeAsLookup, searchOneClass, searchVirtualContainers, setAttributeStyleOpProcessor, setClassMappings, setConnectorAttributesProcessor, setMethodStyleOpProcessor, setScriptStyleOpProcessor, validateAttributes, validateAttributes, validateDNForSearchContainer |
| Methods inherited from class com.ca.jcs.BaseConnector |
addConnectorBaseDN, appQuoted, appQuoted, bind, convertConnectorDNFromNativeName, convertConnectorDNToNativeName, createConnectorDn, createConnectorDn, createMethodStyleOpProcessor, createObjectInfo, createScriptStyleOpProcessor, createTransactionManager, doInit, formatConnectorPassThroughAttrId, formatConnectorPassThroughValue, getAcceptedUnknownAttrIds, getAttributes, getAttributeStyleOpProcessor, getAttributeTypeRegistry, getAutoDirectAssocExlusions, getCacheManager, getConnectionManager, getConnectorBaseDn, getConnectorConfig, getConnectorDnRdn, getConnectorPassThroughValue, getLdapExceptionPrefix, getLdapNamingAttr, getLdapObjectClass, getLogger, getMethodStyleOpProcessor, getName, getPartition, getPassThroughAttrIdToConnector, getScriptStyleOpProcessor, getStateFlags, getStoredSuffix, getTransactionManager, getType, getUpSuffix, isActivated, isAutoDirectAssocRequired, isBehaviourCachingRequired, isBehaviourStrictConnectorDns, isCachingActive, isCachingPossible, isCachingRequired, isConnectorPassThrough, isHiddenLdapBaseDn, isIndirectAssociations, isObjectClassRequired, isSuffix, list, mapAttributeIdsToConnector, modifyAttributes, noQuote, passThroughAttrIdToConnector, postProcessLdapSearchResult, removeConnectorBaseDN, setAcceptedUnknownAttrIds, setActivated, setAttributes, setCacheManager, setCachingRequired, setConnectionManager, setConnectorBaseDn, setConnectorConfig, setLdapNamingAttr, setLdapObjectClass, setLogger, setName, setQuoteString, setStateFlags, setStoredSuffix, setTransactionManager, setType, splitConnectorPassThroughAttrId, toString, unbind, upName |
| Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition |
destroy, doDestroy, getConfiguration, getFactoryConfiguration, getSuffix, hasEntry, init, isInitialized, lookup, modify, sync |
BASE_OUT_DIRECTORY
public static final String BASE_OUT_DIRECTORY
- See Also:
- Constant Field Values
CONN_FILE_PREFIX
public static final String CONN_FILE_PREFIX
- See Also:
- Constant Field Values
SDKMetaConnector
public SDKMetaConnector(ConnectorType type,
String name,
Logger log,
ConnectorConfig config)
- have to implement this constructor signiture, otherwise JCS will fail to load.
ConnectorType is the Namesapce type; Name is the directory name.
isBehaviourSearchObjAsLookup
public boolean isBehaviourSearchObjAsLookup()
- Description copied from class:
BaseConnector
- 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.
- Overrides:
isBehaviourSearchObjAsLookup in class BaseConnector
- Returns:
- True if object-scope searches are to be implemented as lookups, false (the default) otherwise.
isBehaviourImperfectFilter
public boolean isBehaviourImperfectFilter()
isBehaviourSearchSingleClass
public boolean isBehaviourSearchSingleClass()
- Description copied from class:
BaseConnector
- 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, 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.
- Overrides:
isBehaviourSearchSingleClass in class BaseConnector
activate
public final void activate()
throws NamingException
- This sample creates the base output directory here. However, your connector might need to
create connection (or connection pool) for your target system here based on the connection
details passed as directory attributes. Call
BaseConnector.getAttributes() to get the directory
attributes. Note that there is no need to check that attributes marked as "isRequired" in the
metadata are defined here; they are guaranteed to be because the framework applies validation
and conversion before this method is called.
- Specified by:
activate in interface Activatable- Specified by:
activate in interface Connector- Overrides:
activate in class MetaConnector
- Throws:
NamingException
deactivate
public final void deactivate()
throws NamingException
- This sample does not need to do much here, noting that
super.deactivate()
handles cleaning up the connection pool.
- Specified by:
deactivate in interface Activatable- Specified by:
deactivate in interface Connector- Overrides:
deactivate in class MetaConnector
- Throws:
NamingException
createConnectionManager
public ConnectionManager createConnectionManager()
- Description copied from class:
BaseConnector
- Create a connection manager, which is a concept expected to be supported by
the vast majority of connectors. Some exceptional cases like JDBC in which many
APIs take a DataSource (like a connection manager / pool itself) rather then a
connection may throw a
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.
- Specified by:
createConnectionManager in interface Connector- Overrides:
createConnectionManager in class BaseConnector
- Returns:
- Connection manager instance.
createAttributeStyleOpProcessor
public AttributeStyleOpProcessor createAttributeStyleOpProcessor()
- Must implement this method to create a attribute style processor so JCS can delegate
LDAP operations to it.
Created 2009-10-09 16:43 EST