Previous Topic: How You Move the ObjectNext Topic: Example: Calling doMoveAssocs() inside doMove()


Example: Implementing doMoveAssocs

The following shows an example of implementing doMoveAssocs:

    public void doMoveAssocs(final ObjectInfo objInfo, final Name newName, final Object context) throws NamingException
    {
        doAssocUpdateReferencesTo(objInfo, newName, null);
    }

This code contains the following parameters:

objInfo

Specifies the object to be modified or deleted.

newName

Specifies the new full DN for the target object.

context

(Optional) Provides additional context for the requested updates, for example, transactional connectors can require the updates of the associative relationships to occur within a larger transaction.

com.ca.jcs.assoc.DefaultAssocDirectAttributeOpProcessor.doAssocUpdateReferencesTo() constructs the search filter and invokes the doSearch method of this connector’s attribute-style processor to retrieve the all objects referencing the target object, which is moved, through associations (for example, Groups referencing an Account which is being moved). It then constructs a modification item for each and invokes the doModify() method to update the associative attributes on any impacted referencing objects (for example, the member attribute on each Group that references the moved Account).