com.ca.jcs.assoc
Class NestedAssocDirectAttributeOpProcessor

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

public abstract class NestedAssocDirectAttributeOpProcessor
extends DefaultAssocDirectAttributeOpProcessor

A reverse association processor supporting nested associations where defining end of the association (class) can be nested. Specifically allows support for nested NIS netgroup objects in JNDI connector


Nested Class Summary
static class NestedAssocDirectAttributeOpProcessor.AssocNestedInfo
          Store nisNetgroup nesting information and the means to convert from nisNetgroup names to their respective DNs.
 
Nested classes/interfaces inherited from class com.ca.jcs.assoc.DefaultAssocDirectAttributeOpProcessor
DefaultAssocDirectAttributeOpProcessor.AssocAttrValue, DefaultAssocDirectAttributeOpProcessor.AssociationStyle
 
Nested classes/interfaces inherited from interface com.ca.jcs.processor.OpProcessor
OpProcessor.MethodName
 
Field Summary
 
Fields inherited from class com.ca.jcs.assoc.DefaultAssocDirectAttributeOpProcessor
metaConnector
 
Fields inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessorAssocDirect
proxiedAssocSelf
 
Fields inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessor
proxiedSelf
 
Fields inherited from class com.ca.jcs.processor.AbstractBaseProcessor
ldapExceptionPrefix, log
 
Constructor Summary
NestedAssocDirectAttributeOpProcessor(MetaConnector connector)
           
 
Method Summary
 void doAssocAddNestedReferences(String target, Association assoc, boolean targetDefinedAssoc, Attribute reverseLookupAttr)
          Calculate nested associations for target object and add the values to the reverse association attribute.
 void doAssocAddNestedReferences(String target, NestedAssocDirectAttributeOpProcessor.AssocNestedInfo nestedAssocs, Attribute reverseLookupAttr)
          Calculate nested associations for target object and add the values to the reverse association attribute.
 void doLookupAssocs(ObjectInfo objInfo, Association[] associations, Attributes attrs, Object opContext)
          Lookup all associations for the target object referred to be objInfo and add them as multi-valued associative attributes to attrs.
 NestedAssocDirectAttributeOpProcessor.AssocNestedInfo doLookupNestedAssociations(Association assoc, boolean targetDefinedAssoc)
          Provides a way for a connector choosing to implement this method, to enable endpoint specific computing of nested associative class info.
 
Methods inherited from class com.ca.jcs.assoc.DefaultAssocDirectAttributeOpProcessor
addAttrAssocs, doAssocSearchForReferencesTo, doAssocUpdateReferencesTo, doDeleteAssocs, doLookupExpensiveStub, doModifyAssocs, doModifyRnAssocs, doMoveAssocs, doSearchAssocs, expandTemplateValues, getAssocClassMap, getAssocConnAttrId, getAssocConnAttrIds, getAssocConnectorAttrIds, getAssocDataModelProp, getAssocLdapAttr, getAssocObjectClass, getAttrProc, getMetaConnector, getMetaData, removeAttrAssocs, updateAttrAssocs
 
Methods inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessorAssocDirect
activate, convertConnectorDNToKey, convertConnectorDNToKeys, convertKeyToConnectorDN
 
Methods inherited from class com.ca.jcs.processor.AbstractAttributeStyleOpProcessor
deactivate, 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.processor.AttributeStyleOpProcessor
deactivate, setMetaData
 
Methods inherited from interface com.ca.jcs.processor.OpProcessor
doAdd, doDelete, doLookUp, doModify, doModifyRn, doMove, doSearch
 

Constructor Detail

NestedAssocDirectAttributeOpProcessor

public NestedAssocDirectAttributeOpProcessor(MetaConnector connector)
Method Detail

doLookupAssocs

public void doLookupAssocs(ObjectInfo objInfo,
                           Association[] associations,
                           Attributes attrs,
                           Object opContext)
                    throws NamingException
Lookup all associations for the target object referred to be objInfo and add them as multi-valued associative attributes to attrs. This lets the base class processor DefaultAssocDirectAttributeOpProcessor.doLookupAssocs(com.ca.jcs.ObjectInfo, com.ca.jcs.assoc.Association[], javax.naming.directory.Attributes, java.lang.Object) compute the base/non nested value of the reverse virtual associative attribute and this method computes the additional values added due to nesting

Specified by:
doLookupAssocs in interface AssocAttributeOpProcessor
Overrides:
doLookupAssocs in class DefaultAssocDirectAttributeOpProcessor
Parameters:
objInfo - Target object for which associations need to be worked out.
associations - Associations declared against target's objectclass, all of which need to be checked.
attrs - Attributes to be returned for target object, multi-valued associative attribute settings may be added to them by this method.
opContext - Unused.
Throws:
NamingException

doAssocAddNestedReferences

public void doAssocAddNestedReferences(String target,
                                       NestedAssocDirectAttributeOpProcessor.AssocNestedInfo nestedAssocs,
                                       Attribute reverseLookupAttr)
                                throws LdapNamingException,
                                       NamingException
Calculate nested associations for target object and add the values to the reverse association attribute.

Parameters:
target - Target object
nestedAssocs - Nested association information object
reverseLookupAttr - Reverse association attribute to which the nested association values are added
Throws:
LdapNamingException
NamingException

doAssocAddNestedReferences

public void doAssocAddNestedReferences(String target,
                                       Association assoc,
                                       boolean targetDefinedAssoc,
                                       Attribute reverseLookupAttr)
                                throws LdapNamingException,
                                       NamingException
Calculate nested associations for target object and add the values to the reverse association attribute.

Parameters:
target - Target object
assoc - Association information
reverseLookupAttr - Reverse association attribute to which the nested association values are added
Throws:
LdapNamingException
NamingException

doLookupNestedAssociations

public NestedAssocDirectAttributeOpProcessor.AssocNestedInfo doLookupNestedAssociations(Association assoc,
                                                                                        boolean targetDefinedAssoc)
                                                                                 throws LdapNamingException,
                                                                                        NamingException
Provides a way for a connector choosing to implement this method, to enable endpoint specific computing of nested associative class info. That is, given a class used in an association which is nested we compute current state of nesting of object instances of this class on the target endpoint. JNDI NIS Netgroup is one example where this comes into play, LND could also make use of this if it were to support returning all nested groups an account belongs to. Note, possible to have a hypothetical scenario where multiple different nested associations would have to be supported.

Parameters:
assoc - Association details
Returns:
NestedGroupInfo instance containing nested association information on the endpoint as well as information about nisNetgroup->DN conversion.
Throws:
LdapNamingException
NamingException


Created 2011-07-14 13:27 EST