Skip navigation links

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

E10688-03


com.octetstring.vde.util
Class PluginUtil

java.lang.Object
  extended by com.octetstring.vde.util.PluginUtil

All Implemented Interfaces:
com.octetstring.vde.Singleton

public class PluginUtil
extends java.lang.Object
implements com.octetstring.vde.Singleton

Utility class containing tools for building plugins


Nested Class Summary
 class PluginUtil.MappingStatus
           

 

Field Summary
static java.lang.String CHANGE_CANDIDATE
           
static java.lang.String CHANGED
           
static java.lang.String NO_CHANGE
           

 

Method Summary
 void appendAdd(DirectoryString attrib1, DirectoryString attrib2, Entry entry)
          Facilitates an "append" durring an inbound ADD request or and outbound GET request by adding all instances of the appended attributes to
target attribute
 void appendAdd(java.util.Map<DirectoryString,DirectoryString> appends, Entry entry)
          Facilitates a bulk "append" during an inbound ADD or an outbound GET request by adding all instances of the appended attributes to
the request's entry changes
 boolean appendFilter(Filter currentFilter, java.util.Map<DirectoryString,DirectoryString> appends)
          Used to append one attribute's values to another in a filter.
 void appendGet(java.util.Map<DirectoryString,DirectoryString> appends, java.util.Vector<DirectoryString> attributes, Filter filter)
          Facilitates a bulk "append" during an inbound GET request by adding all instances of the appended attributes to the attribute request list and adjusting the filter.
 void appendModify(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<EntryChange> changes)
          Facilitates an "append" during an inbound MODIFY request by adding all instances of the appended attributes to the request's entry changes
 void appendModify(java.util.Map<DirectoryString,DirectoryString> appends, java.util.Vector<EntryChange> changeEntries)
          Facilitates a bulk "append" during an inbound MODIFY request by adding all instances of the appended attributes to the request's entry changes
 void converBaseEntry(Entry entry, DirectoryString attrib, DirectoryString oldBase, DirectoryString newBase)
          Converts the base of a DN to a new base
 void converBaseEntry(Entry entry, java.util.Set<DirectoryString> attribs, DirectoryString oldBase, DirectoryString newBase)
          Converts the base of a DN to a new base
 DirectoryString convertBase(DirectoryString base, DirectoryString origBase, DirectoryString newBase)
          Converts the base of a DN to a new base
 void convertBaseModify(java.util.Vector<EntryChange> changeEntries, DirectoryString attrib, DirectoryString oldBase, DirectoryString newBase)
          Converts the base of a DN to a new base
 void convertBaseModify(java.util.Vector<EntryChange> changeEntries, java.util.Set<DirectoryString> attribs, DirectoryString oldBase, DirectoryString newBase)
          Converts the base of a DN to a new base
 void convertFilterBase(Filter currentFilter, DirectoryString base, DirectoryString newBase, java.util.Set<DirectoryString> dnattrlist)
          Converts the base of a DN to a new base
 void copyAdd(DirectoryString attrib1, DirectoryString attrib2, Entry entry)
          Copies one attribute's values over another attributes values durring an inbound ADD operation
or an outbound GET operation
 void copyAdd(java.util.Map<DirectoryString,DirectoryString> copies, Entry entry)
          Copies one attribute's values over another attributes values during an inbound ADD operation or
an outbound GET operation
 boolean copyFilter(Filter currentFilter, java.util.Map<DirectoryString,DirectoryString> copies)
          Adjust the filter for copy.
 void copyGet(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<DirectoryString> attributes, Filter filter)
          Copies one attribute's values over another attributes values durring an inbound GET operation
 void copyGet(java.util.Map<DirectoryString,DirectoryString> copies, java.util.Vector<DirectoryString> attributes, Filter filter)
          Copies one attribute's values over another attributes values durring an inbound GET operation
 void copyModify(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<EntryChange> changeEntries)
          Copies one attribute's values over another attributes values during an inbound MODIFY operation
 void copyModify(java.util.Map<DirectoryString,DirectoryString> copies, java.util.Vector<EntryChange> changeEntries)
          Copies one attribute's values over another attributes values during an inbound MODIFY operation
 Filter createAndFilter(java.util.List<Filter> lparts)
          Creates an AND (&) filter from a list of filter parts
 Filter createFilter(java.lang.String target, java.lang.String op, java.lang.String value)
          Creates a new filter object
 Filter createOrFilter(java.util.List<Filter> lparts)
          Creates an OR (|) filter from a list of filter parts
 java.util.List<Filter> findFilters(DirectoryString target, Filter filter)
          Finds all instances of a given attribute in a filter
static PluginUtil getInstance()
          Used to retrieve an instance of this singleton
 Syntax mapSyntax(Syntax value, java.lang.String syntax)
          Maps a given value to a new value of the given syntax
 boolean removeFilter(Filter currentFilter, java.util.Set<DirectoryString> removes)
          Removes an attribute from a a filter
 void renameAdd(DirectoryString attrib1, DirectoryString attrib2, Entry entry)
          Renames one attribute's values over another attributes values during an inbound ADD or outbound GET operation,
overwriting the target attribute if it exists
 void renameAdd(java.util.Map<DirectoryString,DirectoryString> renames, Entry entry)
          Renames one attribute to another, overwriting the target attribute if it exists on an inbound ADD or outbound GET operation
 PluginUtil.MappingStatus renameFilter(Filter currentFilter, java.util.Map<DirectoryString,DirectoryString> renames)
          Renames one attribute's values over another attributes values.
 void renameGet(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<DirectoryString> attributes)
          Renames one attribute to another, overwriting the target attribute if it exists on an inbound GET operation
 void renameGet(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<DirectoryString> attributes, Filter filter)
          Renames one attribute's values over another attributes values durring an inbound GET operation,
overwriting the target attribute if it exists
 void renameGet(java.util.Map<DirectoryString,DirectoryString> renames, java.util.Vector<DirectoryString> attributes, Filter filter)
          Renames one attribute to another, overwriting the target attribute if it exists on an inbound GET operation
 void renameModify(DirectoryString attrib1, DirectoryString attrib2, java.util.Vector<EntryChange> changeEntries)
          Renames one attribute's values over another attributes values durring an inbound MODIFY operation,
overwriting the target attribute if it exists
 void renameModify(java.util.Map<DirectoryString,DirectoryString> renames, java.util.Vector<EntryChange> changeEntries)
          Renames one attribute to another, overwriting the target attribute if it exists on an inbound MODIFY operation
 void revalueAdd(DirectoryString attrib, Syntax currValue, Syntax newValue, Entry entry)
          Revaules an attribute with a given value to a new value
 void revalueGet(DirectoryString attrib, Syntax currValue, Syntax newValue, Filter filter)
          Revaules an attribute with a given value to a new value
 void revalueModify(DirectoryString attrib, Syntax currValue, Syntax newValue, java.util.Vector<EntryChange> changes)
          Revaules an attribute with a given value to a new value
 void setRDNEntry(Entry entry, DirectoryString oldRDNAttrType, DirectoryString newRDNAttrType)
          Changes the attribute of the RDN for the given dn on the given entry
 void setRDNGet(Chain chain, DirectoryString currentName, DirectoryString old, DirectoryString name, Credentials creds)
          Changes the attribute of the RDN for the given dn
 void setRDNModify(Chain chain, DirectoryString currentName, DirectoryString old, DirectoryString name, Credentials creds)
          Changes the attribute of the RDN for the given dn on an inbound MODIFY operation
 void setRDNRename(Chain chain, DirectoryString currentName, DirectoryString old, DirectoryString name, Credentials creds, DirectoryString newEntryName)
          Changes the attribute of the RDN for the given dn on an inbound RENAME operation

 

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

 

Field Detail

NO_CHANGE

public static final java.lang.String NO_CHANGE
See Also:
Constant Field Values

CHANGED

public static final java.lang.String CHANGED
See Also:
Constant Field Values

CHANGE_CANDIDATE

public static final java.lang.String CHANGE_CANDIDATE
See Also:
Constant Field Values

Method Detail

getInstance

public static PluginUtil getInstance()
Used to retrieve an instance of this singleton
Returns:
the global instance of the PluginUtil singleton

appendGet

public void appendGet(java.util.Map<DirectoryString,DirectoryString> appends,
                      java.util.Vector<DirectoryString> attributes,
                      Filter filter)
Facilitates a bulk "append" during an inbound GET request by adding all instances of the appended attributes to the attribute request list and adjusting the filter.
Parameters:
appends - Name/Value pair of appended attribute/append target
attributes - The requested attributes on an inbound get operation
filter - The request filter

appendModify

public void appendModify(java.util.Map<DirectoryString,DirectoryString> appends,
                         java.util.Vector<EntryChange> changeEntries)
Facilitates a bulk "append" during an inbound MODIFY request by adding all instances of the appended attributes to the request's entry changes
Parameters:
appends - Name/Value pair of appended attribute/append target
changeEntries - Entry changes effected

appendAdd

public void appendAdd(java.util.Map<DirectoryString,DirectoryString> appends,
                      Entry entry)
Facilitates a bulk "append" during an inbound ADD or an outbound GET request by adding all instances of the appended attributes to
the request's entry changes
Parameters:
appends - Name/Value pair of appended attribute/append target
entry - The entry to be manipulated

appendModify

public void appendModify(DirectoryString attrib1,
                         DirectoryString attrib2,
                         java.util.Vector<EntryChange> changes)
Facilitates an "append" during an inbound MODIFY request by adding all instances of the appended attributes to the request's entry changes
Parameters:
attrib1 - The attribute being appended
attrib2 - The attribute being appended to
changes - The entry change list

appendAdd

public void appendAdd(DirectoryString attrib1,
                      DirectoryString attrib2,
                      Entry entry)
Facilitates an "append" durring an inbound ADD request or and outbound GET request by adding all instances of the appended attributes to
target attribute
Parameters:
attrib1 - The attribute who's values will be appended
attrib2 - The target attribute who will recieve the source attribute's values
entry - The entry to perform the append on

appendFilter

public boolean appendFilter(Filter currentFilter,
                            java.util.Map<DirectoryString,DirectoryString> appends)
Used to append one attribute's values to another in a filter. If appending sn to givenName the filter
(&(givenName=first)(sn=last)) will become (&(|(givenName=first)(givenName=last))(sn=last))
Called by appendGet

copyGet

public void copyGet(java.util.Map<DirectoryString,DirectoryString> copies,
                    java.util.Vector<DirectoryString> attributes,
                    Filter filter)
Copies one attribute's values over another attributes values durring an inbound GET operation
Parameters:
copies - Map of copy source/copy target pairs
attributes - The search attribute request list
filter - The search filter

copyModify

public void copyModify(java.util.Map<DirectoryString,DirectoryString> copies,
                       java.util.Vector<EntryChange> changeEntries)
Copies one attribute's values over another attributes values during an inbound MODIFY operation
Parameters:
copies - Map of copy source/copy target pairs
changeEntries - List of entry changes

copyAdd

public void copyAdd(java.util.Map<DirectoryString,DirectoryString> copies,
                    Entry entry)
Copies one attribute's values over another attributes values during an inbound ADD operation or
an outbound GET operation
Parameters:
copies - Map of copy source/copy target pairs
entry - The entry to perform the copy on

copyModify

public void copyModify(DirectoryString attrib1,
                       DirectoryString attrib2,
                       java.util.Vector<EntryChange> changeEntries)
Copies one attribute's values over another attributes values during an inbound MODIFY operation
Parameters:
attrib1 - The source attribute
attrib2 - The destination attribute
changeEntries - The entry change list

copyAdd

public void copyAdd(DirectoryString attrib1,
                    DirectoryString attrib2,
                    Entry entry)
Copies one attribute's values over another attributes values durring an inbound ADD operation
or an outbound GET operation
Parameters:
attrib1 - The source attribute
attrib2 - The destination attribute
entry - The entry to perform the copy on

copyFilter

public boolean copyFilter(Filter currentFilter,
                          java.util.Map<DirectoryString,DirectoryString> copies)
Adjust the filter for copy. If sn is coppied to givenName, the filter
(&(givenName=first)(sn=last)) becomes (|(sn=last)(givenName=last))
Called by copyGet
Parameters:
currentFilter - The filter to work on
copies - Map of copy source/copy target pairs
Returns:
true if currentFilter should be removed from the filter

copyGet

public void copyGet(DirectoryString attrib1,
                    DirectoryString attrib2,
                    java.util.Vector<DirectoryString> attributes,
                    Filter filter)
Copies one attribute's values over another attributes values durring an inbound GET operation
Parameters:
attrib1 - source attribute
attrib2 - target attribute
attributes - The search attribute request list
filter - The search filter

renameGet

public void renameGet(java.util.Map<DirectoryString,DirectoryString> renames,
                      java.util.Vector<DirectoryString> attributes,
                      Filter filter)
Renames one attribute to another, overwriting the target attribute if it exists on an inbound GET operation
Parameters:
renames - source/target pairs of attribute names
attributes - The list of requested attributes
filter - The search filter

renameModify

public void renameModify(java.util.Map<DirectoryString,DirectoryString> renames,
                         java.util.Vector<EntryChange> changeEntries)
Renames one attribute to another, overwriting the target attribute if it exists on an inbound MODIFY operation
Parameters:
renames - source/target pairs of attribute names
changeEntries - The list of entry changes

renameAdd

public void renameAdd(java.util.Map<DirectoryString,DirectoryString> renames,
                      Entry entry)
Renames one attribute to another, overwriting the target attribute if it exists on an inbound ADD or outbound GET operation
Parameters:
renames - source/target pairs of attribute names
entry - The entry to perform the rename on

renameGet

public void renameGet(DirectoryString attrib1,
                      DirectoryString attrib2,
                      java.util.Vector<DirectoryString> attributes)
Renames one attribute to another, overwriting the target attribute if it exists on an inbound GET operation
Parameters:
attrib1 - Attribute to be renamed
attrib2 - The name of the new attribute
attributes - The list of requested attributes

renameModify

public void renameModify(DirectoryString attrib1,
                         DirectoryString attrib2,
                         java.util.Vector<EntryChange> changeEntries)
Renames one attribute's values over another attributes values durring an inbound MODIFY operation,
overwriting the target attribute if it exists
Parameters:
attrib1 - The source attribute
attrib2 - The destination attribute
changeEntries - The entry change list

renameAdd

public void renameAdd(DirectoryString attrib1,
                      DirectoryString attrib2,
                      Entry entry)
Renames one attribute's values over another attributes values during an inbound ADD or outbound GET operation,
overwriting the target attribute if it exists
Parameters:
attrib1 - The source attribute
attrib2 - The destination attribute
entry - The entry to perform the rename on

renameFilter

public PluginUtil.MappingStatus renameFilter(Filter currentFilter,
                                             java.util.Map<DirectoryString,DirectoryString> renames)
Renames one attribute's values over another attributes values. If sn is renamed to givenName the filter,
(&(givenName=first)(sn=last)) becomes (sn=first)
Parameters:
currentFilter - The filter
renames - The source/target pairs to rename

renameGet

public void renameGet(DirectoryString attrib1,
                      DirectoryString attrib2,
                      java.util.Vector<DirectoryString> attributes,
                      Filter filter)
Renames one attribute's values over another attributes values durring an inbound GET operation,
overwriting the target attribute if it exists
Parameters:
attrib1 - The source attribute
attrib2 - The destination attribute
attributes - The requested search attributes
filter - The search filter

removeFilter

public boolean removeFilter(Filter currentFilter,
                            java.util.Set<DirectoryString> removes)
Removes an attribute from a a filter
Parameters:
currentFilter - The filter to remove the attribute from
removes - The list of attributes to remove
Returns:
true if all attributes have been removed

setRDNGet

public void setRDNGet(Chain chain,
                      DirectoryString currentName,
                      DirectoryString old,
                      DirectoryString name,
                      Credentials creds)
               throws DirectoryException,
                      ChainException,
                      InvalidDNException
Changes the attribute of the RDN for the given dn
Parameters:
chain - The current plugin chain
currentName - The current name
old - The old rdn attribute
name - The new rdn attribute
creds - The current credentials
Throws:
DirectoryException
ChainException
InvalidDNException

setRDNRename

public void setRDNRename(Chain chain,
                         DirectoryString currentName,
                         DirectoryString old,
                         DirectoryString name,
                         Credentials creds,
                         DirectoryString newEntryName)
                  throws ChainException,
                         InvalidDNException,
                         DirectoryException
Changes the attribute of the RDN for the given dn on an inbound RENAME operation
Parameters:
chain - The current plugin chain
currentName - The current name
old - The old rdn attribute
name - The new rdn attribute
creds - The current credentials
newEntryName - The new name of the entry
Throws:
ChainException
InvalidDNException
DirectoryException

setRDNModify

public void setRDNModify(Chain chain,
                         DirectoryString currentName,
                         DirectoryString old,
                         DirectoryString name,
                         Credentials creds)
                  throws DirectoryException,
                         ChainException,
                         InvalidDNException
Changes the attribute of the RDN for the given dn on an inbound MODIFY operation
Parameters:
chain - The current plugin chain
currentName - The current name
old - The old rdn attribute
name - The new rdn attribute
creds - The current credentials
Throws:
DirectoryException
ChainException
InvalidDNException

setRDNEntry

public void setRDNEntry(Entry entry,
                        DirectoryString oldRDNAttrType,
                        DirectoryString newRDNAttrType)
                 throws DirectoryException,
                        InvalidDNException
Changes the attribute of the RDN for the given dn on the given entry
Parameters:
entry - The entry to change
oldRDNAttrType - The old rdn attribute
newRDNAttrType - The new rdn attribute
Throws:
DirectoryException
InvalidDNException

createFilter

public Filter createFilter(java.lang.String target,
                           java.lang.String op,
                           java.lang.String value)
                    throws DirectoryException
Creates a new filter object
Parameters:
target - The attribute begin filtered
op - The comparator
value - The value being compared
Returns:
Returns a new filter object
Throws:
DirectoryException

createAndFilter

public Filter createAndFilter(java.util.List<Filter> lparts)
Creates an AND (&) filter from a list of filter parts
Parameters:
lparts - List of filter parts
Returns:
Returns a new AND filter

createOrFilter

public Filter createOrFilter(java.util.List<Filter> lparts)
Creates an OR (|) filter from a list of filter parts
Parameters:
lparts - List of filter parts
Returns:
Returns a new OR filter

findFilters

public java.util.List<Filter> findFilters(DirectoryString target,
                                          Filter filter)
Finds all instances of a given attribute in a filter
Parameters:
target - The attribute being sought
filter - The filter to search
Returns:
List of filter objects

revalueAdd

public void revalueAdd(DirectoryString attrib,
                       Syntax currValue,
                       Syntax newValue,
                       Entry entry)
Revaules an attribute with a given value to a new value
Parameters:
attrib - The attribute to revalue
currValue - The sought value
newValue - The new value
entry - The entry to perform on

revalueModify

public void revalueModify(DirectoryString attrib,
                          Syntax currValue,
                          Syntax newValue,
                          java.util.Vector<EntryChange> changes)
Revaules an attribute with a given value to a new value
Parameters:
attrib - The attribute to revalue
currValue - The sought value
newValue - The new value
changes - List of entry changes

revalueGet

public void revalueGet(DirectoryString attrib,
                       Syntax currValue,
                       Syntax newValue,
                       Filter filter)
Revaules an attribute with a given value to a new value
Parameters:
attrib - The attribute to revalue
currValue - The sought value
newValue - The new value
filter - The filter to perform on

mapSyntax

public Syntax mapSyntax(Syntax value,
                        java.lang.String syntax)
                 throws ChainException
Maps a given value to a new value of the given syntax
Parameters:
value - The value to map
syntax - One of the allowed syntaxs: BinarySyntax,DirectoryString,IA5String,InegerSyntax
Returns:
The mapped value
Throws:
ChainException

convertBase

public DirectoryString convertBase(DirectoryString base,
                                   DirectoryString origBase,
                                   DirectoryString newBase)
Converts the base of a DN to a new base
Parameters:
base - The value to convert
origBase - The original base
newBase - The new base
Returns:
The converted name

converBaseEntry

public void converBaseEntry(Entry entry,
                            java.util.Set<DirectoryString> attribs,
                            DirectoryString oldBase,
                            DirectoryString newBase)
Converts the base of a DN to a new base
Parameters:
entry - Entry to perform on
attribs - Attributes to convert
oldBase - The original base
newBase - The new base

converBaseEntry

public void converBaseEntry(Entry entry,
                            DirectoryString attrib,
                            DirectoryString oldBase,
                            DirectoryString newBase)
Converts the base of a DN to a new base
Parameters:
entry - Entry to perform on
attrib - Attribute to convert
oldBase - The original base
newBase - The new base

convertBaseModify

public void convertBaseModify(java.util.Vector<EntryChange> changeEntries,
                              java.util.Set<DirectoryString> attribs,
                              DirectoryString oldBase,
                              DirectoryString newBase)
Converts the base of a DN to a new base
Parameters:
changeEntries - List of entry changes
attribs - Attributes to convert
oldBase - The original base
newBase - The new base

convertBaseModify

public void convertBaseModify(java.util.Vector<EntryChange> changeEntries,
                              DirectoryString attrib,
                              DirectoryString oldBase,
                              DirectoryString newBase)
Converts the base of a DN to a new base
Parameters:
changeEntries - List of entry changes
attrib - Attribute to convert
oldBase - The original base
newBase - The new base

convertFilterBase

public void convertFilterBase(Filter currentFilter,
                              DirectoryString base,
                              DirectoryString newBase,
                              java.util.Set<DirectoryString> dnattrlist)
Converts the base of a DN to a new base
Parameters:
currentFilter - filter to convert
base - Base to be converted
newBase - The new base
dnattrlist - Set of attributes to be converted

Skip navigation links

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

E10688-03


Copyright © 2000-2010 Oracle and/or its affiliates. All Rights Reserved.