public class PRStatusHandler extends StatusHandler
Modifier and Type | Field and Description |
---|---|
static boolean[][] |
statusChangeMatrix
A statusChangeMatrix for the legal status changes that can be made.
|
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 |
---|
PRStatusHandler(StatefulMbo sm)
Constructor
|
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 desiredExternalStatus)
Checks to see if the user is authorised to make a status changes.
|
void |
deletePRReferencesFromWO()
Gets all the WPItem records that contains the PRNUM.
|
static java.lang.String |
getOptionName(java.lang.String status)
Given a PR Status, return the optionName
Note the status passed in is the INTERNAL status code.
|
void |
postStatusChange(java.lang.String currentStatus,
java.lang.String status,
java.util.Date asOfDate,
java.lang.String memo)
This method is called by the framework's changestatus method.
|
void |
updateMboForStatus(java.lang.String status)
Set the relevant fields to be read-only based on the status.
|
preStatusChange
public static boolean[][] statusChangeMatrix
Status |   WAPPR  |  APPR  |   COMP  |   CANCEL  |
---|---|---|---|---|
WAPPR | false | true | true | true |
APPR | true | false | true | true |
COMP | false | true | false | false |
CANCEL | false | false | false | false |
public PRStatusHandler(StatefulMbo sm)
public void checkStatusChangeAuthorization(java.lang.String desiredExternalStatus) throws MXException, java.rmi.RemoteException
checkStatusChangeAuthorization
in class StatusHandler
currentExternalStatus
- The current external status of the PO.desiredExternalStatus
- The desired external status of the PO.MXException
java.rmi.RemoteException
checkUserSecurity
,
possibleStatusChange
public static java.lang.String getOptionName(java.lang.String status)
status
- The status to return the optionName of.public void canChangeStatus(java.lang.String currentStatus, java.lang.String desiredStatus, long accessModifier) throws MXException, java.rmi.RemoteException
canChangeStatus
in class StatusHandler
currentMaxStatus
- the PR's current statusdesiredStatus
- the status to change toaccessModifier
- If this flag is set to NOACCESSCHECK, a work flow controlled
purchase requisition may change status.MXApplicationException
- (pr, invalidstatus) is thrown if the desired status
is not legal.MXException
java.rmi.RemoteException
public 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 StatusHandler
currentMaxStatus
- the PR's current statusdesiredStatus
- the status to change todate
- the date as of the status change is to be madememo
- memo textMXException
java.rmi.RemoteException
public void updateMboForStatus(java.lang.String status) throws MXException, java.rmi.RemoteException
updateMboForStatus
in class StatusHandler
status
- any PR statusMXException
java.rmi.RemoteException
public void deletePRReferencesFromWO() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void postStatusChange(java.lang.String currentStatus, java.lang.String status, java.util.Date asOfDate, java.lang.String memo) throws MXException, java.rmi.RemoteException
postStatusChange
in class StatusHandler
MXException
java.rmi.RemoteException