public class WOStatusHandler extends StatusHandler
Modifier and Type | Field and Description |
---|---|
static int |
AFTER |
static boolean |
alreadyAsked |
static int |
BEFORE |
static int |
EQUALS |
static int |
NO_USERINTERACTIVE |
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 |
---|
WOStatusHandler(StatefulMbo sm)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
alertPMStatus(java.lang.String currentStatus,
java.lang.String desiredStatus) |
void |
cancelYesNOMessage(java.lang.String message)
This method displays the appropriate message to be displayed to the user.
|
boolean |
canChangePFCStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier,
boolean throwExceptions) |
void |
canChangeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
Defines which status changes are legal.
|
void |
canChangeStatusCal(java.lang.String currentStatus,
java.lang.String desiredStatus,
long accessModifier)
Can change status for calibration.
|
void |
changeStatus(java.lang.String currentStatus,
java.lang.String desiredStatus,
java.util.Date asOfDate,
java.lang.String memo)
Change 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.
|
static int |
compareStatusPosition(java.lang.String status1,
java.lang.String status2,
Translate translator)
Compare the position of one work order status to
the position of another work order status in the status hierarchy.
|
static java.lang.String |
getOptionName(java.lang.String status)
Given a WO Status, return the optionName
Note the status passed in is the INTERNAL status code.
|
static java.util.Vector<java.lang.String> |
getStatusProgression()
Create the status progression vector when required.
|
boolean |
materialsReceiptsCompleted()
Verify whether materials receipts are completed or not.
|
void |
postStatusChange(java.lang.String currentStatus,
java.lang.String status,
java.util.Date asOfDate,
java.lang.String memo)
Process post status change logic.
|
void |
postStatusChangeCal(java.lang.String currentStatus,
java.lang.String status,
java.util.Date asOfDate,
java.lang.String memo)
Handle actions after the status change.
|
void |
resetUsingAssetWorkType()
Reset AssetMeter Settings Since Last Repair, Since Last Overhaul, Since Last Inspection
when completing a record.
|
void |
resetUsingLocationWorkType()
Reset LocationMeter Settings Since Last Repair, Since Last Overhaul, Since Last Inspection
when completing a record.
|
void |
timerIsActive()
This method is called while completing work orders with active labor transactions.
|
int |
toIncludeTaskLabTrans()
144438: Per David Havican, include a system property mxe.app.workorder.includeTaskLabTrans to determine if we should consider the
labtrans records from the task work orders when calculating the current wo's actual start time and actual finish time.
|
void |
updateMboForStatus(java.lang.String status)
Set the relevant fields to be read only based on the status
|
void |
validateAssignAMCrew() |
void |
validatePlannedLaborCraftRate()
Check to be sure all the planned labor records have valid contracts
|
preStatusChange
public static final int NO_USERINTERACTIVE
public static final int BEFORE
public static final int EQUALS
public static final int AFTER
public static boolean alreadyAsked
public WOStatusHandler(StatefulMbo sm)
sm
- public void checkStatusChangeAuthorization(java.lang.String desiredStatus) throws MXException, java.rmi.RemoteException
checkStatusChangeAuthorization
in class StatusHandler
desiredStatus
- The status to change the work order to. This is the synonym value.MXException
- Throws an access exception with group key "access" and
error key "notauthorized" if the user does not have security for a status change.java.rmi.RemoteException
The calling method.
public void canChangeStatus(java.lang.String currentStatus, java.lang.String desiredStatus, long accessModifier) throws MXException, java.rmi.RemoteException
canChangeStatus
in class StatusHandler
currentStatus
- The work order's current statusdesiredStatus
- The status to change the work order to. This is the synonym value.accessModifier
- If this flag is set to NOACCESSCHECK, a work flow controlled
work order may change status. This also allows internal processes to set the work order's
status to WSCH.MXException
- Throws a MXAccessException with a group key of "workorder". The error
key will be one of: "unappr", "wappr", "wmatl", "inprg", "comp", "close", "can", "wsch" depending on
the desired status parameter.java.rmi.RemoteException
public static java.util.Vector<java.lang.String> getStatusProgression()
public static java.lang.String getOptionName(java.lang.String status)
status
- The status to return the optionName of.public void changeStatus(java.lang.String currentStatus, java.lang.String desiredStatus, java.util.Date asOfDate, java.lang.String memo) throws MXException, java.rmi.RemoteException
changeStatus
in class StatusHandler
asOfDate
- The date as of the status change is to be
made. If null, set to the current date/time.currentStatus
- The parent WO's status now.memo
- Memo text.desiredStatus
- The status to change to.MXException
java.rmi.RemoteException
public boolean materialsReceiptsCompleted() 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
public void updateMboForStatus(java.lang.String status) throws MXException, java.rmi.RemoteException
updateMboForStatus
in class StatusHandler
status
- MXException
java.rmi.RemoteException
public void resetUsingAssetWorkType() throws MXException, java.rmi.RemoteException
type
- This variable represents the worktype synonymdomain (NONE,REPAIR,INSPECTION,OVERHAUL)metertype
- The type of meter (CONTINUOUS,GAUGE,CHARACTERISTIC), for the selected meter.MXException
java.rmi.RemoteException
public void resetUsingLocationWorkType() throws MXException, java.rmi.RemoteException
type
- This variable represents the worktype synonymdomain (NONE,REPAIR,INSPECTION,OVERHAUL)metertype
- The type of meter (CONTINUOUS,GAUGE,CHARACTERISTIC), for the selected meter.MXException
java.rmi.RemoteException
public void validatePlannedLaborCraftRate() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void validateAssignAMCrew() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean alertPMStatus(java.lang.String currentStatus, java.lang.String desiredStatus) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean canChangePFCStatus(java.lang.String currentStatus, java.lang.String desiredStatus, long accessModifier, boolean throwExceptions) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static int compareStatusPosition(java.lang.String status1, java.lang.String status2, Translate translator) throws MXException, java.rmi.RemoteException
String
- - External value of the first statusString
- - External value of the second statusTranslate
- - Translator to be used to convert from the external value to the internal valueMXException
java.rmi.RemoteException
public void canChangeStatusCal(java.lang.String currentStatus, java.lang.String desiredStatus, long accessModifier) throws MXException, java.rmi.RemoteException
currentStatus
- the current statusdesiredStatus
- the desired statusaccessModifier
- the access modifierMXException
- the mX exceptionjava.rmi.RemoteException
- the remote exceptionpublic void postStatusChangeCal(java.lang.String currentStatus, java.lang.String status, java.util.Date asOfDate, java.lang.String memo) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void cancelYesNOMessage(java.lang.String message) throws MXException, java.rmi.RemoteException
message
- - messagekey for message to be displayed to the user.MXException
java.rmi.RemoteException
public void timerIsActive() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public int toIncludeTaskLabTrans() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException