com.ca.jcs.processor
Class AbstractAttributeStyleOpProcessorAssocDirect

java.lang.Object
  extended by com.ca.jcs.processor.AbstractBaseProcessor
      extended by com.ca.jcs.processor.AbstractAttributeStyleOpProcessor
          extended by com.ca.jcs.processor.AbstractAttributeStyleOpProcessorAssocDirect
All Implemented Interfaces:
Activatable, AssocAttributeOpProcessor, AssocDirectAttributeOpProcessor, AttributeStyleOpProcessor, OpProcessor, PostQueryAttributesProcessor
Direct Known Subclasses:
DefaultAssocDirectAttributeOpProcessor

public abstract class AbstractAttributeStyleOpProcessorAssocDirect
extends AbstractAttributeStyleOpProcessor
implements AssocDirectAttributeOpProcessor

Base class for attribute-style processors which implement direct associations. Provides the service of automatically initializing its proxiedAssocSelf member, which should be used when OpBindings are supported, and may need to be triggered for calls that the attribute style processor makes to it's own methods. This member is automatically assigned to "this" when no such OpBindings are active due to the current metadata.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ca.jcs.processor.OpProcessor
OpProcessor.MethodName
 
Field Summary
protected  AssocDirectAttributeOpProcessor proxiedAssocSelf
          Set to "this" unless OpBindings are active in which case assigned to an OpBindings aware proxy.
 
Fields inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessor
proxiedSelf
 
Fields inherited from class com.ca.jcs.processor.AbstractBaseProcessor
ldapExceptionPrefix, log
 
Constructor Summary
AbstractAttributeStyleOpProcessorAssocDirect(BaseConnector connector)
          Hang on to some important contextual values.
 
Method Summary
 void activate()
          Sets proxiedSelf to OpBindings-aware proxy if any OpBindings are configured, otherwise left assigned to "this".
static String convertConnectorDNToKey(MetaConnector metaConnector, MetaObjectClassMapping classMap, String connDnStr, String assocRefKeyAttr)
          Provides utility service to key associations of translating connector DNs to the designated key value
protected static Attribute convertConnectorDNToKeys(MetaConnector metaConnector, MetaObjectClassMapping knownClassMap, String assocRefKeyAttrId, String connDnStr, boolean throwOnError)
          Provides utility service to key associations of translating connector DNs to the designated key value(s)
static String convertKeyToConnectorDN(MetaConnector metaConnector, MetaObjectClassMapping classMap, String assocRefKeyAttr, String assocRefKey)
          Provides utility service to key associations of locating connector DN from a unique key
 
Methods inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessor
deactivate, doLookupExpensiveStub, isPostQueryPocessingActive, processPostQueryAttributes, processPostQuerySearchResult, setPostQueryPocessingActive
 
Methods inherited from class com.ca.jcs.processor.AbstractBaseProcessor
getBaseConnector, makeNamingException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ca.jcs.assoc.AssocDirectAttributeOpProcessor
doAssocSearchForReferencesTo, doAssocUpdateReferencesTo, updateAttrAssocs
 
Methods inherited from interface com.ca.jcs.assoc.AssocAttributeOpProcessor
addAttrAssocs, doDeleteAssocs, doLookupAssocs, doModifyAssocs, doModifyRnAssocs, doMoveAssocs, doSearchAssocs, removeAttrAssocs
 
Methods inherited from interface com.ca.jcs.processor.AttributeStyleOpProcessor
deactivate, doLookupExpensiveStub, getMetaData, setMetaData
 
Methods inherited from interface com.ca.jcs.processor.OpProcessor
doAdd, doDelete, doLookUp, doModify, doModifyRn, doMove, doSearch
 

Field Detail

proxiedAssocSelf

protected AssocDirectAttributeOpProcessor proxiedAssocSelf
Set to "this" unless OpBindings are active in which case assigned to an OpBindings aware proxy.

Constructor Detail

AbstractAttributeStyleOpProcessorAssocDirect

public AbstractAttributeStyleOpProcessorAssocDirect(BaseConnector connector)
Hang on to some important contextual values.

Parameters:
connector - Parent baseConnector.
Method Detail

activate

public void activate()
              throws NamingException
Description copied from class: AbstractAttributeStyleOpProcessor
Sets proxiedSelf to OpBindings-aware proxy if any OpBindings are configured, otherwise left assigned to "this".

Specified by:
activate in interface Activatable
Specified by:
activate in interface AttributeStyleOpProcessor
Overrides:
activate in class AbstractAttributeStyleOpProcessor
Throws:
NamingException

convertKeyToConnectorDN

public static String convertKeyToConnectorDN(MetaConnector metaConnector,
                                             MetaObjectClassMapping classMap,
                                             String assocRefKeyAttr,
                                             String assocRefKey)
                                      throws NamingException
Provides utility service to key associations of locating connector DN from a unique key

Parameters:
metaConnector - Metaconnector instance
classMap - Classmap for the objects being matched
assocRefKeyAttr - Key attribute Id which contains the key value
assocRefKey - Key attribute value on which the comparison is made
Returns:
Connector speak DN which contains the key attribute with the matching value
Throws:
NamingException

convertConnectorDNToKey

public static String convertConnectorDNToKey(MetaConnector metaConnector,
                                             MetaObjectClassMapping classMap,
                                             String connDnStr,
                                             String assocRefKeyAttr)
                                      throws NamingException
Provides utility service to key associations of translating connector DNs to the designated key value

Parameters:
metaConnector - Connector instance
classMap - Class being referenced by DN
connDnStr - Connector speak DN to be translated
assocRefKeyAttr - Key attribute Id (unique/single valued)
Returns:
Key attribute value
Throws:
NamingException

convertConnectorDNToKeys

protected static Attribute convertConnectorDNToKeys(MetaConnector metaConnector,
                                                    MetaObjectClassMapping knownClassMap,
                                                    String assocRefKeyAttrId,
                                                    String connDnStr,
                                                    boolean throwOnError)
                                             throws NamingException
Provides utility service to key associations of translating connector DNs to the designated key value(s)

Parameters:
metaConnector - Metaconnector instance
classMap - Class DN refers to, or null if should be deduced from DN.
assocRefKeyAttr - Key attribute Id
connDnStr - Connector speak DN to be translated
throwOnError - Whether to treat the error as fatal
Returns:
Matching attribute values
Throws:
NamingException


Created 2011-07-14 13:27 EST