|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ldap.util.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.
Constructor Summary | |
LDIFMigration()
Creats an instance of LDIFMigration with the log initialized. |
|
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. |
Subscriber |
processCmdLineInput(java.lang.String[] args)
Use this method to specify the input to the migration process. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LDIFMigration() throws MigrationException
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 Subscriber processCmdLineInput(java.lang.String[] args) throws MigrationException
args[]
- command line parameter args[] - a string array
with values of the form paramName=valueMigrationException
- if an error occurrs while parsing input
parameters.public int migrate() throws MigrationException
MigrationException
- if an error occur while reading from
or writing to an LDIF filepublic int migrate(Subscriber subscriber) throws MigrationException
s_SubscriberDN s_UserContainerDN s_GroupContainerDN s_SubscriberOracleContextDN s_RootOracleContextDN s_UserNicknameAttribute
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.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.txt" "output_file=my_users.ldif" "s_UserContainerDN=dc=oracle,dc=com" "s_UserNicknameAttribute=uid" [-lookup "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 |------------------------|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |