|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ldap.util.LDIFMigration
public class LDIFMigration
This class provides methods to migrate the user information present in the component specific repositories to OID. The input to this migration process is an intermediate LDIF file which contains the substitution variables that needs to be replaced. The output of this process is an LDIF file which could be used to upload the data using any one of the existing tools. Alternatively, the migration process itself could load the data to OiD transforming a entry that was read from an LDIF file
Constructor Summary | |
---|---|
LDIFMigration(java.io.File inpF, java.util.Vector subsVect, java.io.File outF) This method constructs an object to read the LDIF entry from the specified File object, do the substitution and write the LDIF entries to the specified File object. |
|
LDIFMigration(java.io.InputStream inpS, java.util.Vector subsVect, java.io.OutputStream outS) This method constructs an object to read the LDIF entries from the specified input stream, do the substitution and write the LDIF entries to the specified output stream. |
|
LDIFMigration(java.lang.String inputFile, java.util.Vector subsVect, java.lang.String outFile) This method constructs an object to read the LDIF file, do the substitution and write the LDIF entries to a file. |
Method Summary | |
---|---|
void |
cleanup() Closes the ldif reader and writer streams. |
static void |
main(java.lang.String[] args) LDIFMigrationTool. |
int |
migrate() Call this method to read the intermediate LDIF file and do the substitution and write a new LDIF output file. |
int |
migrate(Subscriber subscriber) Call this method to read the intermediate LDIF file and do the substitution and write a new LDIF output file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDIFMigration(java.lang.String inputFile, java.util.Vector subsVect, java.lang.String outFile) throws MigrationException
inputFile
- Name of the input filesubsVect
- The vector containing the substitution variables and the values alternatively.outFile
- Name of the output file.MigrationException
- A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.public LDIFMigration(java.io.File inpF, java.util.Vector subsVect, java.io.File outF) throws MigrationException
inpF
- The input File ObjectsubsVect
- The vector containing the substitution variables and the values alternatively.outF
- The output File ObjectMigrationException
- A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.public LDIFMigration(java.io.InputStream inpS, java.util.Vector subsVect, java.io.OutputStream outS) throws MigrationException
inpS
- The input stream from which provides the LDIF entriessubsVect
- The vector containing the substitution variables and the values alternatively.outS
- The output stream to which the LDIF entries are writtenMigrationException
- A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.Method Detail |
---|
public int migrate() throws MigrationException, java.io.IOException
MigrationException
- if an error occur while reading from or writing to an LDIF filejava.io.IOException
public int migrate(Subscriber subscriber) throws MigrationException, java.io.IOException
s_SubscriberDN s_UserContainerDN s_GroupContainerDN s_SubscriberOracleContextDN s_RootOracleContextDN s_UserNicknameAttribute s_UserNamingAttribute
subscriber
- the subscriber for which the substitution variables needs to be figured out.MigrationException
- if error occur while reading from or writing to an LDIF file or a NamingException occur while performing a directory operation.java.io.IOException
public void cleanup() throws MigrationException
MigrationException
- if an I/O error occurs while closing the reader or writer streams.public static void main(java.lang.String[] args)
java LDIFMigration "input_file=my_users.dat" "output_file=my_users.ldif" "s_UserContainerDN=dc=oracle,dc=com" "s_UserNicknameAttribute=uid" [-lookup] [-load] -[reconcile SAFE | SAFE_EXTENDED | NORMAL] ["host=directoryName"] ["port=portnumber"] ["dn=bindDn"] ["password=password"] [subscriber=subscribername]
Altenatively you may construct an object of this class and call migrate and cleanup methods. You can create an object of this class as
....... ....... LDIFMigration ldifMig = null; try { ldifMig = new LDIFMigration("InputFile.ldif",substituteVar, "OutputFile.ldif"); }catch(MigrationException me) { } the substituteVar is a vector object containing the substitution variables. for example the vector contains elements in this form. |------------------------| | s_subscriber_user_base | --- Substitution variable |------------------------| | dc=oracle,dc=com | --- Substitution value for the above value |------------------------| | s_nickname_attr | --- Substitution variable |------------------------| | uid | --- Substitution value |------------------------|
|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |