public class MRStatusHandler extends StatusHandler
MR Attribute tableMRLine Attribute table.| 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 |
|---|
MRStatusHandler(MR sm)
Constructor to construct the Status Handler object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAddInvReserve(MboRemote mrlineMbo)
Returns false if the difference between the quantities on the MRLine and the MATUSETRANS
for the mrnum, mrlinenum is zero.
|
void |
canApprove(java.lang.String currentInternalStatus)
Can this MR be approved ?
The MR can be approved only if the current status of the MR is "Waiting for Approval".
|
void |
canCancel(java.lang.String currentInternalStatus)
Can an MR be cancelled ?
If there are any transactions in matusetrans and/or matrectrans against an mr or mrline, the MR cannot be cancelled. |
void |
canChangeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
Can a certain status change be performed ?
Checks to see if the specified status change can be performed.
|
void |
canClose(java.lang.String currentInternalStatus)
Can the MR be closed?
An MR can be closed only if all the lines have been completed. |
void |
canUnapprove(java.lang.String currentInternalStatus)
Can this MR be unapproved ?
The MR cannot be unapproved if there is any associated PO. |
void |
changeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
java.util.Date date,
java.lang.String memo)
Change the status from the specified 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 |
checkUserSecurity(java.lang.String desiredMaxStatus)
Check out the users security rights to call the specified status.
|
void |
updateMboForStatus(java.lang.String status)
Called to set the state of the Mbo for the specified status.
|
postStatusChange, preStatusChangepublic static boolean[][] statusChangeMatrix
| Status |   WAPPR  |  APPR  |   CLOSE  |   CANCEL  |   DRAFT  |
|---|---|---|---|---|---|
| WAPPR | false | true | false | true | true |
| APPR | true | false | true | true | true |
| CLOSE | false | false | false | false | false |
| CANCEL | false | false | false | false | false |
| DRAFT | false | false | false | false | false |
public MRStatusHandler(MR sm)
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 StatusHandlercurrentStatus - The Current external status of the MRdesiredStatus - The desired external status of the MRdate - The effective date of the status changememo - Optional memo string for the status changeMXException - Thrown if the status change is not allowedjava.rmi.RemoteExceptioncanChangeStatus(java.lang.String, java.lang.String, long)public void canChangeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
throws MXException,
java.rmi.RemoteException
canChangeStatus in class StatusHandlercurrentStatus - The current external status of this mrdesiredStatus - The desired external status of this mraccessModifier - If this flag is set to NOACCESSCHECK, signature security is not checkedMXException - thrown when the status change cannot be performed.java.rmi.RemoteExceptionMRLine.validateCombination(),
approveMR(java.lang.String, java.util.Date)public void canUnapprove(java.lang.String currentInternalStatus)
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic void canApprove(java.lang.String currentInternalStatus)
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionMRLine.validateCombination()public void canClose(java.lang.String currentInternalStatus)
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic void canCancel(java.lang.String currentInternalStatus)
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic void checkStatusChangeAuthorization(java.lang.String desiredExternalStatus)
throws MXException,
java.rmi.RemoteException
checkStatusChangeAuthorization in class StatusHandlercurrentExternalStatus - The current external status of the MR.desiredExternalStatus - The desired external status of the MR.MXExceptionjava.rmi.RemoteExceptioncheckUserSecurity,
possibleStatusChangepublic void checkUserSecurity(java.lang.String desiredMaxStatus)
throws MXException,
java.rmi.RemoteException
status - The status to check if we can change to.MXAccessException - Throws an access exception "notauthorized" if the
check fails.MXExceptionjava.rmi.RemoteExceptionpublic void updateMboForStatus(java.lang.String status)
throws MXException,
java.rmi.RemoteException
updateMboForStatus in class StatusHandlerstatus - current status of the mrMXExceptionjava.rmi.RemoteExceptionpublic boolean canAddInvReserve(MboRemote mrlineMbo) throws MXException, java.rmi.RemoteException
MXExceptionjava.rmi.RemoteException