public class JPStatusHandler extends StatusHandler
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
options
Map status names to their corresponding option names
|
static boolean[][] |
statusChangeMatrix
A statusChangeMatrix for the legal status changes that can be made when Job Plan Revision is enabled.
|
static boolean[][] |
statusChangeMatrixNoRev
A statusChangeMatrixNoRev for the legal status changes that can be made when Job Plan Revision is disabled.
|
protected java.util.Map |
statusIndexes
Map status names to their indexes in the change matrix
|
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER| Constructor and Description |
|---|
JPStatusHandler(StatefulMbo sm) |
| Modifier and Type | Method and Description |
|---|---|
void |
canChangeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
Defines which status changes are legal.
|
void |
changeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
java.util.Date date,
java.lang.String memo)
Changes the status from the current state to a desired state.
|
void |
checkStatusChangeAuthorization(java.lang.String desiredStatus)
Determines which statuses to show in the list returned by the Mbo's getStatusList method.
|
void |
checkUserSecurity(java.lang.String desiredMaxStatus)
Check out the users security rights to call the specified status.
|
postStatusChange, preStatusChange, statusToOptionName, updateMboForStatuspublic static boolean[][] statusChangeMatrix
public static boolean[][] statusChangeMatrixNoRev
protected java.util.Map statusIndexes
protected java.util.Map options
public JPStatusHandler(StatefulMbo sm)
sm - public void canChangeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
throws MXException,
java.rmi.RemoteException
canChangeStatus in class StatusHandlercurrentStatus - The work order's current statusdesiredStatus - The status to change the job plan to. This is the synonym value.accessModifier - IgnoredMXException - Throws an MXAccessException with a group key of "jobplan".
The error key will be : "JPInUse" if the status is being changed from an
ACTIVE status and the Job Plan is used on any Ticket Template Activity, Route Stop, PMSequence, MasterPMSeq,
MeasurePoint or CharPointAction.java.rmi.RemoteExceptionisJPInUsepublic void checkStatusChangeAuthorization(java.lang.String desiredStatus)
throws MXException,
java.rmi.RemoteException
checkStatusChangeAuthorization in class StatusHandlerdesiredStatus - The status to change the work order to. This is the synonym value.MXExceptionjava.rmi.RemoteExceptionThe calling method.,
isJPInUsepublic void checkUserSecurity(java.lang.String desiredMaxStatus)
throws MXException,
java.rmi.RemoteException
desiredMaxStatus - The status to check if we can change to.MXAccessException - Throws an access exception "notauthorized"
if the check fails.MXExceptionjava.rmi.RemoteExceptionpublic void changeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
java.util.Date date,
java.lang.String memo)
throws MXException,
java.rmi.RemoteException
changeStatus in class StatusHandlercurrentStatus - the PR's current statusdesiredStatus - the status to change todate - the date as of the status change is to be madememo - memo textMXExceptionjava.rmi.RemoteException