|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.retek.component.rcombatch.RcomAbstractBatchProgram
Base class for all RCOM batch programs providing:
Field Summary | |
---|---|
static int |
DEFAULT_FILE_WORK_UNIT_SIZE
The default size of file work unit. |
static int |
DEFAULT_WORK_UNIT_SIZE
The default size of work unit. |
static java.lang.String |
DIRECTORY_PATH_ARGUMENT_KEY
Batch argument for directory path. |
static java.lang.String |
FILE_WORK_UNIT_SIZE_ARGUMENT_KEY
Batch argument for file work unit size (optional). |
static java.lang.String |
USER_ID_ARGUMENT_KEY
Batch argument for user identifier. |
static java.lang.String |
WORK_UNIT_SIZE_ARGUMENT_KEY
Batch argument for work unit size (optional). |
Constructor Summary | |
---|---|
RcomAbstractBatchProgram()
|
Method Summary | |
---|---|
static void |
addFileWorkUnitArgument(org.apache.commons.cli.Options options)
Adds an optional file work unit size batch argument template to the given set. |
static void |
addRequiredDirectoryPathArgument(org.apache.commons.cli.Options options)
Adds a directory-path batch argument template to the given set. |
static void |
addRequiredUserArgument(org.apache.commons.cli.Options options)
Adds a user id argument template to the given set. |
static void |
addWorkUnitArgument(org.apache.commons.cli.Options options)
Adds an optional work unit size batch argument template to the given set. |
abstract void |
doBatchProcess(java.util.Map args)
Placeholder for the implementation's batch process. |
BatchResult |
getBatchResult()
Returns batch result (SUCCESS, PARTIAL_FAILURE, or COMPLETE_FAILURE). |
User |
getBatchUser(DistributedContext context,
java.lang.String userId)
Provides user id lookup/authentication. |
int |
getExitValue()
Returns the exit value of the batch result (0 = SUCCESS, 1 = PARTIAL_FAILURE, or -1 = COMPLETE_FAILURE). |
int |
getFileWorkUnitSize(java.util.Map args)
|
protected abstract RetekLogger |
getLogger()
Placeholder for the implementation's logger initialization. |
int |
getWorkUnitSize(java.util.Map args)
Gets the size of the work unit. |
void |
promoteToCompleteFailure()
Set status of the batch program to "complete failure". |
void |
promoteToPartialFailure()
Set status of the batch program to "partial failure", unless already promoted to complete failure. |
protected void |
runBatchProcessCalledFromMain(java.util.Map args)
Invoke the implementation's batch process and consistently handle exceptions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String USER_ID_ARGUMENT_KEY
public static final java.lang.String DIRECTORY_PATH_ARGUMENT_KEY
public static final java.lang.String WORK_UNIT_SIZE_ARGUMENT_KEY
public static final int DEFAULT_WORK_UNIT_SIZE
public static final java.lang.String FILE_WORK_UNIT_SIZE_ARGUMENT_KEY
public static final int DEFAULT_FILE_WORK_UNIT_SIZE
Constructor Detail |
public RcomAbstractBatchProgram()
Method Detail |
public final void promoteToPartialFailure()
protected abstract RetekLogger getLogger()
public final void promoteToCompleteFailure()
public int getExitValue()
public BatchResult getBatchResult()
public abstract void doBatchProcess(java.util.Map args)
args
- map of (String to String) batch execution argumentsprotected void runBatchProcessCalledFromMain(java.util.Map args)
args
- map of (String to String) batch execution argumentspublic static void addRequiredUserArgument(org.apache.commons.cli.Options options)
options
- set of options to which the user id argument will be addedpublic static void addRequiredDirectoryPathArgument(org.apache.commons.cli.Options options)
options
- set of options to which the directory argument will be addedpublic static void addWorkUnitArgument(org.apache.commons.cli.Options options)
options
- set of options to which the directory argument will be addedpublic static void addFileWorkUnitArgument(org.apache.commons.cli.Options options)
options
- set of options to which the directory argument will be addedpublic final User getBatchUser(DistributedContext context, java.lang.String userId) throws SystemException
context
- distributed context provided by the batch environmentuserId
- system-known name identifying a user
SystemException
public final int getWorkUnitSize(java.util.Map args)
args
- the arguments from which the size of work unit will be looked up.public final int getFileWorkUnitSize(java.util.Map args)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |