Skip navigation links


oracle.idm.provisioning.tools
Class BulkProvision

java.lang.Object
  extended by oracle.idm.util.progress.ProgressReporter
      extended by oracle.idm.util.progress.ProgressProcessor
          extended by oracle.idm.provisioning.tools.BulkProvision

All Implemented Interfaces:
java.lang.Runnable

public class BulkProvision
extends ProgressProcessor

This class provides necessary API to provision users read from a Input stream as LDIF content into OID

Since:
OCS 2.1

Nested Class Summary
static class BulkProvision.ProgressInfo
           

 

Field Summary
static Transitions TRANSITIONS
          State transitions supported by BulkProvision.

 

Fields inherited from class oracle.idm.util.progress.ProgressProcessor
ABORTED, CANCELED, FINISHED, progressEventDurationInfo, progressEventLocalizedMessage, progressEventMessage, progressEventName, progressEventPercentInfo, progressEventProgressInfo, progressEventStateInfo, progressEventStatusInfo, progressEventStepInfo, progressEventThrowable, RESTORED, RESUMED, STARTED, STOPPED, SUSPENDED, TIMEDOUT, transitions

 

Constructor Summary
BulkProvision(javax.naming.ldap.LdapContext ldapCtx, java.lang.String realmName, java.io.InputStream inputStream, java.io.OutputStream failedStream, java.io.PrintStream logStream)
          Constructor
BulkProvision(javax.naming.ldap.LdapContext ldapCtx, java.lang.String realmName, java.io.InputStream inputStream, java.lang.String inEnc, java.io.OutputStream failedStream, java.io.PrintStream logStream)
           
BulkProvision(javax.naming.ldap.LdapContext ldapCtx, java.lang.String realmName, java.lang.String inputFile, java.lang.String failedFile, java.lang.String logFile)
          Constructor
BulkProvision(javax.naming.ldap.LdapContext ldapCtx, java.lang.String realmName, java.lang.String inputFile, java.lang.String failedFile, java.lang.String logFile, java.util.Locale l)
           
BulkProvision(javax.naming.ldap.LdapContext ldapCtx, java.lang.String realmName, java.lang.String inputFile, java.lang.String inEnc, java.lang.String failedFile, java.lang.String logFile)
           

 

Method Summary
 boolean getContinueOnFailure()
          Getter for the continueOnFailure property.
 int getFailureCount()
          Getter for the failureCount property.
protected  java.lang.String getProgressEventMessage()
          Creates progress event message.
protected  PercentInfo getProgressEventPercentInfo()
          Creates progress event percent info.
protected  java.lang.Object getProgressEventProgressInfo()
          Creates progress event progress info.
protected  StepInfo getProgressEventStepInfo()
          Creates progress event step info.
 int getSuccessCount()
          Getter for the successCount property.
 int getTotalCount()
          Getter for the totalCount property.
static void main(java.lang.String[] args)
          Unit Test Driver program
protected  void process(boolean quiet)
          The main driver method that does the bulk provisioning
 void resume()
          Resume processing
 void setContinueOnFailure(boolean continueOnFailure)
          Setter for the continueOnFailure property.
 void start()
          Start processing, calls process();
 void stop()
          Stop processing
 void suspend()
          Suspend processing

 

Methods inherited from class oracle.idm.util.progress.ProgressProcessor
abort, block, block, block, canAbort, canCancel, cancel, cancel, canFinish, canReset, canRestore, canResume, canStart, canStop, canSuspend, canTimeout, canTransition, finish, getProgressEvent, getProgressEventDurationInfo, getProgressEventLocalizedMessage, getProgressEventName, getProgressEventStateInfo, getProgressEventStatusInfo, getProgressEventThrowable, getTransitions, isAborted, isCanceled, isFinal, isFinished, isInitial, isIntermediate, isNext, isPrevious, isReachable, isReset, isRestored, isResumed, isStarted, isStopped, isSuspended, isTimedout, isUnreachable, ping, reset, restore, resume, run, sendProgressEvent, setTransitions, start, stop, suspend, timeout, transition

 

Methods inherited from class oracle.idm.util.progress.ProgressReporter
clearTransient, continuing, getDuration, getErrorTotal, getException, getLocalizedMessage, getLocalizedMessages, getMessage, getMessages, getProgressManager, getRuntimeException, getStateCurrent, getStateTimeStamp, getTimeout, getTransient, getWarningTotal, hasTimedout, isStateCurrent, isTransient, markTransient, resetDuration, sendProgressEvent, setErrorTotal, setProgressManager, setStateCurrent, setStateTimeStamp, setTimeout, setWarningTotal, throwErrorOrException, throwErrorOrRuntimeException, throwException, throwRuntimeException, unmarkTransient

 

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

 

Field Detail

TRANSITIONS

public static final Transitions TRANSITIONS
State transitions supported by BulkProvision.
 null -> STARTED
 STARTED -> [ STOPPED | SUSPENDED | FINISHED | ABORTED | TIMEDOUT ]
 SUSPENDED -> [ STOPPED | RESUMED | FINISHED | ABORTED | TIMEDOUT ]
 RESUMED -> [ STOPPED | SUSPENDED | FINISHED | ABORTED | TIMEDOUT ]
 

Constructor Detail

BulkProvision

public BulkProvision(javax.naming.ldap.LdapContext ldapCtx,
                     java.lang.String realmName,
                     java.io.InputStream inputStream,
                     java.io.OutputStream failedStream,
                     java.io.PrintStream logStream)
Constructor
Parameters:
ldapCtx - the OID to which the entries must be loaded
realmName - The realm into which the bulk provisioning needs to be done.
inputStream - an input stream supplying the LDIF data
failedStream - an output stream to which failed LDIF entries are written
logStream - an output stream to which log messaes are written

BulkProvision

public BulkProvision(javax.naming.ldap.LdapContext ldapCtx,
                     java.lang.String realmName,
                     java.io.InputStream inputStream,
                     java.lang.String inEnc,
                     java.io.OutputStream failedStream,
                     java.io.PrintStream logStream)

BulkProvision

public BulkProvision(javax.naming.ldap.LdapContext ldapCtx,
                     java.lang.String realmName,
                     java.lang.String inputFile,
                     java.lang.String failedFile,
                     java.lang.String logFile)
              throws java.io.IOException
Constructor
Parameters:
ldapCtx - the OID to which the entries must be loaded
realmName - The realm into which the bulk provisioning needs to be done.
inputFile - an input filename supplying the LDIF data
failedFile - an output filename to which failed LDIF entries are written
logFile - an output filename to which log messaes are written
Throws:
java.io.IOException - when an I/O error occurrs

BulkProvision

public BulkProvision(javax.naming.ldap.LdapContext ldapCtx,
                     java.lang.String realmName,
                     java.lang.String inputFile,
                     java.lang.String failedFile,
                     java.lang.String logFile,
                     java.util.Locale l)
              throws java.io.IOException
Throws:
java.io.IOException

BulkProvision

public BulkProvision(javax.naming.ldap.LdapContext ldapCtx,
                     java.lang.String realmName,
                     java.lang.String inputFile,
                     java.lang.String inEnc,
                     java.lang.String failedFile,
                     java.lang.String logFile)
              throws java.io.IOException
Throws:
java.io.IOException

Method Detail

getContinueOnFailure

public boolean getContinueOnFailure()
Getter for the continueOnFailure property.

setContinueOnFailure

public void setContinueOnFailure(boolean continueOnFailure)
Setter for the continueOnFailure property. Default value is true.
Parameters:
continueOnFailure - true continue with the next user on failure

getTotalCount

public int getTotalCount()
Getter for the totalCount property.

getSuccessCount

public int getSuccessCount()
Getter for the successCount property.

getFailureCount

public int getFailureCount()
Getter for the failureCount property.

start

public void start()
           throws java.io.IOException,
                  ProvisioningException,
                  java.lang.Exception
Start processing, calls process();
Overrides:
start in class ProgressProcessor
Throws:
java.io.IOException
ProvisioningException
java.lang.Exception

stop

public void stop()
Stop processing
Overrides:
stop in class ProgressProcessor

suspend

public void suspend()
Suspend processing
Overrides:
suspend in class ProgressProcessor

resume

public void resume()
Resume processing
Overrides:
resume in class ProgressProcessor

process

protected void process(boolean quiet)
                throws java.io.IOException,
                       ProvisioningException,
                       java.lang.Exception
The main driver method that does the bulk provisioning
Specified by:
process in class ProgressProcessor
Parameters:
quiet - if quiet is true, this method does not throw transition exceptions
Throws:
java.io.IOException - when and I/O erroor occurs i.e while reading the LDIF input stream or writing the bad entries to the output stream.
ProvisioningException - when user creation/provisioning fails
java.lang.Exception

getProgressEventMessage

protected java.lang.String getProgressEventMessage()
Creates progress event message.
Overrides:
getProgressEventMessage in class ProgressProcessor

getProgressEventStepInfo

protected StepInfo getProgressEventStepInfo()
Creates progress event step info.
Overrides:
getProgressEventStepInfo in class ProgressProcessor

getProgressEventPercentInfo

protected PercentInfo getProgressEventPercentInfo()
Creates progress event percent info.
Overrides:
getProgressEventPercentInfo in class ProgressProcessor

getProgressEventProgressInfo

protected java.lang.Object getProgressEventProgressInfo()
Creates progress event progress info.
Overrides:
getProgressEventProgressInfo in class ProgressProcessor

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Unit Test Driver program
Throws:
java.lang.Exception

Skip navigation links