oracle.ldap.util
Class LDIFSubstitute
java.lang.Object
|
+--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
Method Summary |
static void |
main(java.lang.String[] args)
Test Driver. |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LDIFSubstitute
public LDIFSubstitute()
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.
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.
main
public static void main(java.lang.String[] args)
- Test Driver.