com.ca.jcs.assoc
Interface AssocAttributeOpProcessor

All Superinterfaces:
Activatable, AttributeStyleOpProcessor, OpProcessor
All Known Subinterfaces:
AssocDirectAttributeOpProcessor, AssocIndirectAttributeOpProcessor
All Known Implementing Classes:
AbstractAttributeStyleOpProcessorAssocDirect, AbstractAttributeStyleOpProcessorAssocIndirect, DefaultAssocAttributeOpProcessor, DefaultAssocDirectAttributeOpProcessor, JDBCAttributeStyleOpProcessor, JNDIAttributeStyleOpProcessor, NestedAssocDirectAttributeOpProcessor, ORAAttributeStyleOpProcessor, SDKAttributeStyleOpProcessor, SDKWSAttributeStyleOpProcessor, StubDirectAssocAttributeStyleOpProcessor

public interface AssocAttributeOpProcessor
extends AttributeStyleOpProcessor

Interface to be implemented by classes derived from AttributeStyleOpProcessor which need to deal with associative attributes (direct flavour where associative links are stored directly in an attribute on at least one of side of the association). Often the associative links are only persisted on one side of the association (leading to a cheap lookup), and the other direction is represented by a much more runtime costly computed virtual attribute. For instance, the list of member accounts for a group might be the data actually stored on the endpoint and accessed as an attribute called group.member, and arriving at the list of groups to which an account belongs may involve a computationally expensive search to populate values of a virtual account.memberOf attribute.

See Also:
AssocIndirectAttributeOpProcessor

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ca.jcs.processor.OpProcessor
OpProcessor.MethodName
 
Method Summary
 void addAttrAssocs(ObjectInfo objInfo, Association assoc, Attribute attr, Object opContext)
          Helper method called by doModifyAssocs(com.ca.jcs.ObjectInfo, AssocModificationItem[], Object) for each association that needs to be added to the object referenced by objInfo.
 void doDeleteAssocs(ObjectInfo objInfo, Object opContext)
          Handle updating associative links after the object referenced by objInfo is deleted.
 void doLookupAssocs(ObjectInfo objInfo, Association[] associations, Attributes attrs, Object opContext)
          Append any links to object referred to by objInfo to attrs via provided associations.
 void doModifyAssocs(ObjectInfo objInfo, AssocModificationItem[] items, Object opContext)
          Process a single 1:1 or 1:N associative relationship, handles associative processing required for OpProcessor.doAdd(com.ca.jcs.ObjectInfo, javax.naming.directory.Attributes) and OpProcessor.doModify(com.ca.jcs.ObjectInfo, javax.naming.directory.ModificationItem[]).
 void doModifyRnAssocs(ObjectInfo objInfo, Rdn newRnValue, Object opContext)
          Handle updating associative links after the object referenced by objInfo is renamed.
 void doMoveAssocs(ObjectInfo objInfo, Name newName, Object opContext)
          Handle updating associative links after object referenced by objInfo is moved.
 NamingEnumeration<SearchResult> doSearchAssocs(MetaObjectClassMappings classMapppings, Association[] associations, NamingEnumeration<SearchResult> searchResults, String filterExpr, Object opContext)
          Decorate each search result read from queryEnum with any links to other objects via provided associations.
 void removeAttrAssocs(ObjectInfo objInfo, Association assoc, Attribute attr, Object opContext)
          Helper method called by doModifyAssocs(com.ca.jcs.ObjectInfo, AssocModificationItem[], Object) for each association that needs to be removed to the object referenced by objInfo.
 
Methods inherited from interface com.ca.jcs.processor.AttributeStyleOpProcessor
activate, deactivate, doLookupExpensiveStub, getMetaData, setMetaData
 
Methods inherited from interface com.ca.jcs.processor.OpProcessor
doAdd, doDelete, doLookUp, doModify, doModifyRn, doMove, doSearch
 

Method Detail

doModifyAssocs

@OpBindingMethod(operation=MODIFY_ASSOCS)
void doModifyAssocs(ObjectInfo objInfo,
                                                          AssocModificationItem[] items,
                                                          Object opContext)
                    throws NamingException
Process a single 1:1 or 1:N associative relationship, handles associative processing required for OpProcessor.doAdd(com.ca.jcs.ObjectInfo, javax.naming.directory.Attributes) and OpProcessor.doModify(com.ca.jcs.ObjectInfo, javax.naming.directory.ModificationItem[]).

Parameters:
objInfo - Information about target object whose associations are to be updated.
items - Modifications to associative relationships, which can be additions, deletions or replacements.
opContext - Optional field which can be provided additional context for the requested updates, eg transactional connectors may want the updates of the associative relationships to occur within a larger transaction.
Throws:
NamingException

doModifyRnAssocs

@OpBindingMethod(operation=MODIFY_RN_ASSOCS)
void doModifyRnAssocs(ObjectInfo objInfo,
                                                               Rdn newRnValue,
                                                               Object opContext)
                      throws NamingException
Handle updating associative links after the object referenced by objInfo is renamed. In the case of indirect associations this involves two passes: firstly updating all associative links from this object to other objects (outbound) and another updating all associative links from other objects to this one (inbound). In the case of direct associations, only inbound links need to be remapped for the objectclass (eg user/account) that owning the virtual attribute (eg memberOf) calculated from the possesive multi-valued attribute stored on the containing objectclass (eg group).

Parameters:
objInfo - Object to be modified, contains "old" name.
newRnValue - New relative name (RN) for object, eg "namingAttr=newName".
opContext - Optional field which can be provided additional context for the requested updates, eg transactional connectors
Throws:
NamingException

doMoveAssocs

@OpBindingMethod(operation=MOVE_ASSOCS)
void doMoveAssocs(ObjectInfo objInfo,
                                                      Name newName,
                                                      Object opContext)
                  throws NamingException
Handle updating associative links after object referenced by objInfo is moved. See comments for doModifyRnAssocs(com.ca.jcs.ObjectInfo,javax.naming.ldap.Rdn,Object).

Parameters:
objInfo - Object to be modified, contains "old" name.
newName - New DN (distinguished name) for object, where parent folder and RN may have changed.
opContext - Optional field which can be provided additional context for the requested updates, eg transactional connectors may want the updates of the associative relationships to occur within a larger transaction.
Throws:
NamingException

doDeleteAssocs

@OpBindingMethod(operation=DELETE_ASSOCS)
void doDeleteAssocs(ObjectInfo objInfo,
                                                          Object opContext)
                    throws NamingException
Handle updating associative links after the object referenced by objInfo is deleted.

Parameters:
objInfo - Object to be deleted.
opContext - Optional field which can be provided additional context for the requested updates, eg transactional connectors may want the updates of the associative relationships to occur within a larger transaction.
Throws:
NamingException

doLookupAssocs

@OpBindingMethod(operation=LOOKUP_ASSOCS)
void doLookupAssocs(ObjectInfo objInfo,
                                                          Association[] associations,
                                                          Attributes attrs,
                                                          Object opContext)
                    throws NamingException
Append any links to object referred to by objInfo to attrs via provided associations.

Throws:
NamingException

doSearchAssocs

@OpBindingMethod(operation=SEARCH_ASSOCS)
NamingEnumeration<SearchResult> doSearchAssocs(MetaObjectClassMappings classMapppings,
                                                                                     Association[] associations,
                                                                                     NamingEnumeration<SearchResult> searchResults,
                                                                                     @Nullable
                                                                                     String filterExpr,
                                                                                     Object opContext)
                                               throws NamingException
Decorate each search result read from queryEnum with any links to other objects via provided associations.

Throws:
NamingException

addAttrAssocs

@OpBindingMethod(operation=ADD_ATTR_ASSOCS)
void addAttrAssocs(ObjectInfo objInfo,
                                                           Association assoc,
                                                           Attribute attr,
                                                           Object opContext)
                   throws NamingException
Helper method called by doModifyAssocs(com.ca.jcs.ObjectInfo, AssocModificationItem[], Object) for each association that needs to be added to the object referenced by objInfo.

Parameters:
objInfo - Object referenced.
assoc - Association through which object is referenced.
attr - Attribute containing new references to object which are to be stored.
opContext - Context if relevant to connector implementation (eg transaction, if supported).
Throws:
NamingException

removeAttrAssocs

@OpBindingMethod(operation=REMOVE_ATTR_ASSOCS)
void removeAttrAssocs(ObjectInfo objInfo,
                                                                 Association assoc,
                                                                 Attribute attr,
                                                                 Object opContext)
                      throws NamingException
Helper method called by doModifyAssocs(com.ca.jcs.ObjectInfo, AssocModificationItem[], Object) for each association that needs to be removed to the object referenced by objInfo.

Parameters:
objInfo - Object referenced.
assoc - Association through which object is referenced.
attr - Attribute containing references to object, if null means "remove all references" (only supported by internal agreement within connector implementation, eg JDBC which uses indirect associations can remove all references without wasting time determining all currently existing links).
opContext - Context if relevant to connector implementation (eg transaction, if supported).
Throws:
NamingException


Created 2011-07-14 13:27 EST