Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-01


com.octetstring.vde.join
Class Joiner

java.lang.Object
  extended by com.octetstring.vde.join.Joiner


public abstract class Joiner
extends java.lang.Object

This abstract class defines the basic operations and methods required for any Joiner object. It defines pre-action operations to allow manipulation of data prior to any ldap operation. A Joiner always works in the context of the primary adapter and a designated target adapter.


Field Summary
static DirectoryString ATTR_ANY
           
static DirectoryString ATTR_DN
           
static DirectoryString ATTR_JOINDN
           
static DirectoryString ATTR_OBJECTCLASS
           
static DirectoryString EMPTY_DS
           

 

Constructor Summary
Joiner(java.lang.String targetAdapterNum, java.lang.String configSpecification, java.lang.String parentLogger)
          This constructor forms a new Joiner object.

 

Method Summary
 Filter createJoinFilter(Chain chain, Credentials creds, Entry entry)
          Creates a join search filter based on the entry provided.
 java.lang.String getAdapterStr()
          This method returns the String adapter number for the target adapter.
 DirectoryString getBindTarget(Chain chain, Credentials creds, Entry entry)
          This method returns the target binddn based on the Entry provided.
 java.lang.String getConfigSpec()
          Method getConfigSpec, returns the configuration specification used to instantiate this joiner.
 ChainEntrySet getJoinCandidatesByFilter(Chain chain, Credentials creds, DirectoryString binddn, Filter filter)
          This method returns all the possible DNs (as Entry's) found in the target adapter for a particular search filter.
 ChainEntrySet getJoinCandidatesBySearch(Chain chain, Credentials creds, DirectoryString binddn, DirectoryString base, int scope, Filter filter)
          This method returns all the possible DNs (as Entry's) found in the target adapter for a particular search filter and base/scope specification.
 java.util.Vector<DirectoryString> getPrimaryJoinAttrs()
          This method returns a Vector of DirectoryStrings representing the primary adapter attributes to join with the target adapter.
 java.util.Vector<DirectoryString> getRetrieveAttrs()
          This method returns a Vector of attributes (DirectoryString) that the target adapter is capable of returning.
 com.octetstring.vde.router.RoutingRule getRoutingRule()
           
 java.util.Vector<DirectoryString> getStoreAttrs()
          This method returns a Vector of attributes(DirectoryString) that the target adapter will allow modification to.
 java.lang.String getTargetAdapterNumber()
           
 java.util.Vector<DirectoryString> getTargetJoinAttrs()
          This method returns a Vector of DirectoryStrings representing the target adapter attributes to join with the primary adapter.
 DirectoryString getTargetSuffix()
          This method returns the base suffix of the target adapter.
abstract  boolean isOneToMany()
          Marks a join rule for one-to-many treatment.
 boolean isPreFetchEntryRequired()
          Method isPreFetchEntryRequired(NOT IMPLEMENTED), returns whether the joiner will need the entry to be fetched (as a join entry) before processing modifies.
 Entry joinByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry, java.util.Vector<DirectoryString> srchattrs)
          This method takes the Entry of primary adapter and maps it to a target Entry in a joined adapter for a get operation.
 DirectoryString mapAddTargetDNByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an add operation.
 DirectoryString mapDeleteTargetDNByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an delete operation.
 DirectoryString mapModifyTargetDNByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an modify operation.
 java.util.List<DirectoryString> mapModifyTargetDNsByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry, java.util.Vector<DirectoryString> attribs)
          This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an modify operation.
 DirectoryString mapRenameTargetDNByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for a rename operation.
 DirectoryString mapRenameTargetDNByEntry(Chain chain, Credentials creds, DirectoryString binddn, Entry entry, Entry oldentry)
          This method takes the Entry of primary adapter and maps it to a target DN in a * joined adapter for a rename operation.
 Entry preAddOperation(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes an inbound entry and maps for insertion into joined adapter.
 Entry preDeleteOperation(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes an inbound entry and performs any secondary manipulations.
 java.util.Vector<EntryChange> preModifyOperation(Chain chain, Credentials creds, DirectoryString binddn, Entry entry, java.util.Vector<EntryChange> changeEntries)
          This method takes an inbound entry and change request and performs all necessary manipulations in the context of the joined adapter.
 Entry preRenameOperation(Chain chain, Credentials creds, DirectoryString binddn, Entry entry)
          This method takes an inbound entry and performs any secondary manipulations.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

EMPTY_DS

public static final DirectoryString EMPTY_DS

ATTR_DN

public static final DirectoryString ATTR_DN

ATTR_ANY

public static final DirectoryString ATTR_ANY

ATTR_OBJECTCLASS

public static final DirectoryString ATTR_OBJECTCLASS

ATTR_JOINDN

public static final DirectoryString ATTR_JOINDN

Constructor Detail

Joiner

public Joiner(java.lang.String targetAdapterNum,
              java.lang.String configSpecification,
              java.lang.String parentLogger)
This constructor forms a new Joiner object. This object will be used to assist the JoinView adapter in carrying out various operations.
Parameters:
targetAdapterNum - A String specifying the adapter which is the target of this join
configSpecification - A String providing join configuration parameters from the adapter configuration file.

Method Detail

isPreFetchEntryRequired

public boolean isPreFetchEntryRequired()
Method isPreFetchEntryRequired(NOT IMPLEMENTED), returns whether the joiner will need the entry to be fetched (as a join entry) before processing modifies. (true by default)

getConfigSpec

public java.lang.String getConfigSpec()
Method getConfigSpec, returns the configuration specification used to instantiate this joiner.

getTargetAdapterNumber

public java.lang.String getTargetAdapterNumber()

getRoutingRule

public com.octetstring.vde.router.RoutingRule getRoutingRule()

getRetrieveAttrs

public java.util.Vector<DirectoryString> getRetrieveAttrs()
This method returns a Vector of attributes (DirectoryString) that the target adapter is capable of returning. Null implies no restrictions.

getStoreAttrs

public java.util.Vector<DirectoryString> getStoreAttrs()
This method returns a Vector of attributes(DirectoryString) that the target adapter will allow modification to. Null implies no restrictions.

getAdapterStr

public java.lang.String getAdapterStr()
This method returns the String adapter number for the target adapter. This method often used in conjunction with calling the AdapterServiceInterface.
Returns:
String representing the backend target adapter

getTargetSuffix

public DirectoryString getTargetSuffix()
This method returns the base suffix of the target adapter. Often used in base conversions.

getPrimaryJoinAttrs

public java.util.Vector<DirectoryString> getPrimaryJoinAttrs()
This method returns a Vector of DirectoryStrings representing the primary adapter attributes to join with the target adapter.

getTargetJoinAttrs

public java.util.Vector<DirectoryString> getTargetJoinAttrs()
This method returns a Vector of DirectoryStrings representing the target adapter attributes to join with the primary adapter.

preAddOperation

public Entry preAddOperation(Chain chain,
                             Credentials creds,
                             DirectoryString binddn,
                             Entry entry)
This method takes an inbound entry and maps for insertion into joined adapter.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation.
entry - a com.octetstring.vde.Entry object containing the entry to be added from the ldap client.
Returns:
Entry The object to be added in the target directory.

mapAddTargetDNByEntry

public DirectoryString mapAddTargetDNByEntry(Chain chain,
                                             Credentials creds,
                                             DirectoryString binddn,
                                             Entry entry)
                                      throws DirectoryException,
                                             ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an add operation. If the add operation is not to add an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

preDeleteOperation

public Entry preDeleteOperation(Chain chain,
                                Credentials creds,
                                DirectoryString binddn,
                                Entry entry)
This method takes an inbound entry and performs any secondary manipulations.
Parameters:
binddn - a DirectoryString value containing the bind dn of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the entry to be added from the ldap client.
Returns:
Entry The entry returned will be passed in sequence to other subsequent join relationships in this overall delete operation.

mapDeleteTargetDNByEntry

public DirectoryString mapDeleteTargetDNByEntry(Chain chain,
                                                Credentials creds,
                                                DirectoryString binddn,
                                                Entry entry)
                                         throws DirectoryException,
                                                ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an delete operation. If the delete operation is not to delete an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

preModifyOperation

public java.util.Vector<EntryChange> preModifyOperation(Chain chain,
                                                        Credentials creds,
                                                        DirectoryString binddn,
                                                        Entry entry,
                                                        java.util.Vector<EntryChange> changeEntries)
This method takes an inbound entry and change request and performs all necessary manipulations in the context of the joined adapter.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the entry from the primary adapter.
changeEntries - a Vector containing the modify operations requested by the client
Returns:
changeEntries a Vector containing the changes to be passed to the target.

mapModifyTargetDNByEntry

public DirectoryString mapModifyTargetDNByEntry(Chain chain,
                                                Credentials creds,
                                                DirectoryString binddn,
                                                Entry entry)
                                         throws DirectoryException,
                                                ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an modify operation. If the delete operation is not to delete an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

mapModifyTargetDNsByEntry

public java.util.List<DirectoryString> mapModifyTargetDNsByEntry(Chain chain,
                                                                 Credentials creds,
                                                                 DirectoryString binddn,
                                                                 Entry entry,
                                                                 java.util.Vector<DirectoryString> attribs)
                                                          throws DirectoryException,
                                                                 ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for an modify operation. If the delete operation is not to delete an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

preRenameOperation

public Entry preRenameOperation(Chain chain,
                                Credentials creds,
                                DirectoryString binddn,
                                Entry entry)
This method takes an inbound entry and performs any secondary manipulations.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the entry to be added from the ldap client.
Returns:
Entry The entry returned will be used to create the new entry (the target of the rename). delete operation.

mapRenameTargetDNByEntry

public DirectoryString mapRenameTargetDNByEntry(Chain chain,
                                                Credentials creds,
                                                DirectoryString binddn,
                                                Entry entry)
                                         throws DirectoryException,
                                                ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a joined adapter for a rename operation. If the rename operation is to modify/add an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

mapRenameTargetDNByEntry

public DirectoryString mapRenameTargetDNByEntry(Chain chain,
                                                Credentials creds,
                                                DirectoryString binddn,
                                                Entry entry,
                                                Entry oldentry)
                                         throws DirectoryException,
                                                ChainException
This method takes the Entry of primary adapter and maps it to a target DN in a * joined adapter for a rename operation. If the rename operation is to modify/add an entry in the joined adapter, the method should return a null.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
oldentry - a com.octetstring.vde.Entry object containing the old entry to be renamed
Returns:
DirectoryString The mapped target DN.
Throws:
DirectoryException
ChainException

joinByEntry

public Entry joinByEntry(Chain chain,
                         Credentials creds,
                         DirectoryString binddn,
                         Entry entry,
                         java.util.Vector<DirectoryString> srchattrs)
                  throws DirectoryException,
                         ChainException
This method takes the Entry of primary adapter and maps it to a target Entry in a joined adapter for a get operation. Once located, the combined entry is returned. If no entry is found, a null is returned. This method is triggered typically by a Search operation.
Parameters:
binddn - a DirectoryString value containing the bind DN of the ldap client performing the operation
entry - a com.octetstring.vde.Entry object containing the main entry to be joined with.
Returns:
Entry The joined and merged entry.
Throws:
DirectoryException
ChainException

getBindTarget

public DirectoryString getBindTarget(Chain chain,
                                     Credentials creds,
                                     Entry entry)
                              throws DirectoryException,
                                     ChainException
This method returns the target binddn based on the Entry provided.
Parameters:
entry - an Entry typically from the primary adapter that is used by the joiner to locate the joined entry target.
Returns:
DirectoryString the first match of any entries located.
Throws:
DirectoryException
ChainException

createJoinFilter

public Filter createJoinFilter(Chain chain,
                               Credentials creds,
                               Entry entry)
Creates a join search filter based on the entry provided. Typically this method is overridden. If no match is possible, return NULL to indicate unmatchable!

getJoinCandidatesByFilter

public ChainEntrySet getJoinCandidatesByFilter(Chain chain,
                                               Credentials creds,
                                               DirectoryString binddn,
                                               Filter filter)
                                        throws DirectoryException
This method returns all the possible DNs (as Entry's) found in the target adapter for a particular search filter. This method will search for candidates in the entire subtree of the target adapter
Parameters:
binddn - a DirectoryString containing the dn of the ldap client executing the query (or null)
filter - a Filter specifying the search criteria supplied by the ldap client
Returns:
ChainEntrySet a set of entries found by the search system of possible matches for the supplied filter
Throws:
DirectoryException

getJoinCandidatesBySearch

public ChainEntrySet getJoinCandidatesBySearch(Chain chain,
                                               Credentials creds,
                                               DirectoryString binddn,
                                               DirectoryString base,
                                               int scope,
                                               Filter filter)
                                        throws DirectoryException
This method returns all the possible DNs (as Entry's) found in the target adapter for a particular search filter and base/scope specification.
Parameters:
binddn - a DirectoryString containing the dn of the ldap client executing the query (or null)
base - a DirectoryString specifying the base of the target adapter
scope - a int specifying the scope of the search.
filter - a Filter specifying the search criteria supplied by the ldap client
Returns:
ChainEntrySet ChainEntrySet a set of entries found by the search system of possible matches for the supplied filter
Throws:
DirectoryException

isOneToMany

public abstract boolean isOneToMany()
Marks a join rule for one-to-many treatment. If this method returns true then the multi-dn versions of mapXXXTargetDNByEntry will be used.

Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-01


Copyright © 2009 Oracle. All Rights Reserved.