public class AutoScriptStateHandler extends StatusHandler
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 |
|---|
AutoScriptStateHandler(StatefulMbo sm)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
canChangeStatus(java.lang.String currentState,
java.lang.String desiredState,
long accessModifier)
Defines which State changes are legal.
|
void |
changeStatus(java.lang.String currentState,
java.lang.String desiredState,
java.util.Date date,
java.lang.String memo)
Changes the State from the current state to a desired state.
|
void |
checkStatusChangeAuthorization(java.lang.String desiredExternalState)
Checks to see if the user is authorized to make a state changes.
|
void |
checkUserSecurity(java.lang.String desiredMaxState)
Check out the users security rights to call the specified State.
|
void |
postStatusChange(java.lang.String currentState,
java.lang.String State,
java.util.Date asOfDate,
java.lang.String memo)
This method is called by the framework's changeState method.
|
preStatusChange, statusToOptionName, updateMboForStatuspublic AutoScriptStateHandler(StatefulMbo sm)
public void checkStatusChangeAuthorization(java.lang.String desiredExternalState)
throws MXException,
java.rmi.RemoteException
checkStatusChangeAuthorization in class StatusHandlercurrentExternalState - The current external State of the scriptdesiredExternalState - The desired external State of the scriptMXExceptionjava.rmi.RemoteExceptioncheckUserSecurity,
possibleStateChangepublic void checkUserSecurity(java.lang.String desiredMaxState)
throws MXException,
java.rmi.RemoteException
State - The State to check if we can change to.MXAccessException - Throws an access exception "notauthorized"
if the check fails.MXExceptionjava.rmi.RemoteExceptionpublic void canChangeStatus(java.lang.String currentState,
java.lang.String desiredState,
long accessModifier)
throws MXException,
java.rmi.RemoteException
canChangeStatus in class StatusHandlercurrentState - the script's current StatedesiredState - the State to change toaccessModifier - If this flag is set to NOACCESSCHECK, a work flow
controlled purchase requisition may change State.MXApplicationException - (autoscr, invalidState) is thrown if the
desired State is not legal.MXExceptionjava.rmi.RemoteExceptionpublic void changeStatus(java.lang.String currentState,
java.lang.String desiredState,
java.util.Date date,
java.lang.String memo)
throws MXException,
java.rmi.RemoteException
changeStatus in class StatusHandlercurrentState - the script's current StatedesiredState - the State to change todate - the date as of the State change is to be madememo - memo textMXExceptionjava.rmi.RemoteExceptionpublic void postStatusChange(java.lang.String currentState,
java.lang.String State,
java.util.Date asOfDate,
java.lang.String memo)
throws MXException,
java.rmi.RemoteException
postStatusChange in class StatusHandlerMXExceptionjava.rmi.RemoteException