Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


oracle.ldap.util
Class LDIFSubstitute

java.lang.Object
  extended by oracle.ldap.util.LDIFSubstitute


public class LDIFSubstitute
extends java.lang.Object

This class provides some general methods to do the substitution in an LDIF entry. The LDIF entry is represented in a Vector object. The substitution variables(Name,value) pairs can be provided as a Vector

for example consider an LDIF entry represented in a Vector object

    Sample LDIF entry in a vector object.
    -------------------------------
    | dn: uid=Heman,%domain_Name% |  --- Note the Substitution variable
    -------------------------------
    | ojectClass: top             |
    -------------------------------
    | %Atr_Typ%: HEMAN            |  --- Note the Substitution variable
    -------------------------------
    |                             |
    -------------------------------
    |        .......              |
    -------------------------------    

    A vector containing the substitution variables(Name,value) pairs;

    -------------------------------
    | domain Name                 |  --- the Substitution variable Name
    -------------------------------
    | dc=oracle,dc=com            |  --- the Substitution variable value
    -------------------------------
    | Atr_Typ                     |
    -------------------------------
    | uid                         |
    -------------------------------

 Use the Escape character '\', if your data contains a '%' symbol followed
 by the Substitution variable
 
See Also:
LDIFReader, LDIFWriter

Constructor Summary
LDIFSubstitute()
           

 

Method Summary
static void main(java.lang.String[] args)
           
static LDIFRecord substitute(LDIFRecord ldifRecord, java.util.Vector sAndRep)
          Search and replace the substitution variables in an LDIFRecord
static java.util.Vector substitute(java.util.Vector ldifEntry, java.util.Vector sAndRep)
          Search and replace the substitution variables in an LDIF entry contained in a Vector.
static java.util.Vector substitute(java.util.Vector ldifEntry, java.util.Vector sAndRep, boolean isUtf)
          Search and replace the substitution variables in an LDIF entry contained in a Vector.

 

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

 

Constructor Detail

LDIFSubstitute

public LDIFSubstitute()

Method Detail

substitute

public static java.util.Vector substitute(java.util.Vector ldifEntry,
                                          java.util.Vector sAndRep,
                                          boolean isUtf)
Search and replace the substitution variables in an LDIF entry contained in a Vector.
Parameters:
ldifEntry - the LDIF entry with elements as the attributes.
sAndRep - the vector containing substitution variables name-value pairs
isUtf - - TRUE Treat the Base 64 Encoded str as UTF8 str FALSE Treat the Base 64 Encoded str as platform's default encoded string.
Returns:
Vector LDIF Entry after applying the substitution. When ldifEntry is null or ldifEntry vector does not contain any attributes then null is returned. If sAndRep is null or there are no substitution variables then the ldifEntry is returned as is.

substitute

public static java.util.Vector substitute(java.util.Vector ldifEntry,
                                          java.util.Vector sAndRep)
Search and replace the substitution variables in an LDIF entry contained in a Vector.
Parameters:
ldifEntry - the LDIF entry with elements as the attributes.
sAndRep - the vector containing substitution variables name-value pairs
Returns:
Vector LDIF Entry after applying the substitution. When ldifEntry is null or ldifEntry vector does not contain any attributes then null is returned. If sAndRep is null or there are no substitution variables then the ldifEntry is returned as is.

substitute

public static LDIFRecord substitute(LDIFRecord ldifRecord,
                                    java.util.Vector sAndRep)
Search and replace the substitution variables in an LDIFRecord
Parameters:
ldifRecord - a LDIFRecord
sAndRep - the vector containing substitution variables name-value pairs
Returns:
LDIFRecord an object of LDIFRecord after applying the substitution. When ldifRecord is null then null is returned and when sAdnRep is null or does not contain any substitution variables the ldifRecord is returned as is.

main

public static void main(java.lang.String[] args)

Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.