public abstract class StatefulMbo extends Mbo implements StatefulMboRemote
This class provides the standard features of maintaining a status history and providing statndard methods for changing the status of the object.
The actual implementation of the status change functionality, which is application specific, is implemented in a class derived from StatusHandler.
In order to make use of this class, the following assumptions are made about the Mbo.
STATUS
and STATUSDATE
.
getStatusHandler()
,
getStatusListName()
and getStatusHistory()
methods.
MEMO
.
Modifier and Type | Field and Description |
---|---|
boolean |
onListTab
This is the indicator on List tab
|
java.lang.String |
statusChangeButtonSigoption
This is the status change button sigoption
|
java.lang.String |
targetStatusOption
This is the status we are planning to change to
|
MULTILANGCOPY, phantomList, phantomQueue
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 |
---|
StatefulMbo(MboSet ms)
Construct the Mbo
|
Modifier and Type | Method and Description |
---|---|
void |
canChangeMaxStatus(java.lang.String internalStatus)
Calls the canChangeStatus method with the flag set to NONE.
|
void |
canChangeStatus(java.lang.String status)
Calls the canChangeStatus method with the flag set to NONE.
|
void |
canChangeStatus(java.lang.String changeToStatus,
long accessModifier)
Identifies whether the status of this object be changed to the specified value.
|
void |
canChangeStatus(java.lang.String changeToStatus,
java.lang.String progressStatus,
long accessModifier)
Identifies whether the status of this object be changed to the specified value.
|
void |
canDeleteAttachedDocs()
Check if the attached document can be deleted.
|
void |
changeMaxStatus(java.lang.String internalStatus,
java.util.Date date,
java.lang.String memo)
Changes the status with an internal maximo status value.
|
void |
changeMaxStatus(java.lang.String internalStatus,
java.util.Date date,
java.lang.String memo,
long accessModifier)
Changes the status with an internal maximo status value.
|
void |
changeStatus(java.lang.String status,
java.util.Date date,
java.lang.String memo)
Calls the changeStatus method with an accessModifier of NONE.
|
void |
changeStatus(java.lang.String status,
java.util.Date asOfDate,
java.lang.String memo,
long accessModifier)
Changes the status of the object.
|
void |
changeStatus(java.lang.String status,
java.lang.String progressStatus,
java.util.Date asOfDate,
java.lang.String memo,
long accessModifier)
Changes the status of the object.
|
void |
checkForOpenStatus()
Checks to see if it is a History record.
|
void |
checkStatusChangeAuthorization(java.lang.String changeToStatus,
boolean single)
Determines if it is possible for this work order to change to this status.
|
void |
fireEvent(java.lang.String type)
fires events for the different types of events for all status changes.
|
java.lang.String |
getInternalStatus()
Returns the Internal value for the current status of the object.
|
boolean |
getOnListTab()
get the onListTab.
|
boolean |
getOverridePVStatusException()
get the overridePVStatusException.
|
java.lang.String |
getStatusChangeButtonSigoption()
get the targetStatusOption.
|
MboSetRemote |
getStatusList()
Returns a remote reference to a ValueList MboSet representing the possibly
valid status codes that the logged-in user is permitted to use.
|
abstract java.lang.String |
getStatusListName()
Return the name of the value list which contains the list of status's.
|
java.lang.String |
getTargetStatusOption()
get the targetStatusOption.
|
MboSetRemote |
getValidStatusList()
Get the list of those statuses that the current record is allowed to changed to from the current
status.
|
void |
setOnListTab(boolean onListTab)
set the onListTab.
|
void |
setOverridePVStatusException(boolean overridePVStatusException)
get the overridePVStatusException.
|
void |
setStatusChangeButtonSigoption(java.lang.String statusChangeButtonSigoption)
set the targetStatusOption.
|
void |
setTargetStatusOption(java.lang.String targetStatusOption)
set the targetStatusOption.
|
add, addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, appValidate, blindCopy, canDelete, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, determineRequiredFieldsFromERM, duplicate, enableMethod, evaluateCondition, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, evaluateRestriction, excludeObjectForPropagate, findAllNullRequiredFields, generateAutoKey, generateContentUID, getAlwaysFlags, getAttrRestrictionFlag, getAttrRestrictions, getBoolean, getByte, getBytes, getCheckpoint, getClientLocale, getClientTimeZone, getCommLogOwnerNameAndUniqueId, getCondition, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainFilterWhere, getDomainIDs, getDouble, getExistingMboSet, getFetchIndex, getFieldExceptions, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInstanciatedMboSet, getInstanciatedMboValue, getInt, getIntegrationService, getKeyValue, getLanguageRecordRowStamp, getLinesRelationship, getList, getLockedByDisplayName, getLockedByUserID, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboForAttribute, getMboForAttributeStatic, getMboInitialValue, getMboList, getMboLogger, getMboRecordData, getMboServer, getMboSet, getMboSet, getMboSet, getMboSetInfo, getMboValue, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getProfile, getPropagateKeyFlag, getProxy, getRecordIdentifer, getRecordMboName, getRelatedWhere, getRelatedWhere, getRelationshipNameToLangTable, getRowRestrictionFlag, getRowStamp, getSecurityLogger, getSiteOrg, getSqlLogger, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getSynonymValueWhere, getTenantId, getThisMboSet, getTranslator, getUniqueIdentifer, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, getValidateOrder, hasFieldAccess, hasHierarchyLink, hasLockSaveRights, hasRelatedQbe, hasUniqueID, init, initFieldFlagsOnMbo, initRelationship, isAutoKeyed, isBasedOn, isChangeByUserWhenSetFromLookup, isEAuditFieldModified, isESigFieldModified, isFlagSet, isForDM, isLocked, isLocked, isLockedByMe, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isSkipCopyField, isValid, isZombie, lock, modify, moveFieldFlagsToMboValue, needCallInitFieldFlag, orEvaluateConditions, propagateKeyValue, removeRelatedSet, rollbackToCheckpoint, select, setAppDefaultValue, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDefaultValue, setDefaultValues, setDeleted, setEAuditFieldModified, setESigFieldModified, setFetchIndex, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setHierarchyLink, setIgnoreRecordLockCheck, setLangCodeDefault, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setProxy, setReadonlyWhenParentIsReadonly, setReferencedMbo, setReferencedMbo, setUniqueIDValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromSequence, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, useDataSecurity, validate, validateAttributes, validateKeyUniqueness, valueChanged
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, addMboSetForRequiredCheck, addToDeleteForInsertList, blindCopy, checkMethodAccess, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, duplicate, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, excludeObjectForPropagate, generateAutoKey, getBoolean, getByte, getBytes, getCommLogOwnerNameAndUniqueId, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainIDs, getDouble, getExistingMboSet, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInt, getKeyValue, getLinesRelationship, getList, getLockedByDisplayName, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboInitialValue, getMboList, getMboSet, getMboSet, getMboSet, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getPropagateKeyFlag, getRecordIdentifer, getSiteOrg, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getThisMboSet, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, hasHierarchyLink, hasLockSaveRights, isAutoKeyed, isBasedOn, isFlagSet, isForDM, isLocked, isLocked, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isZombie, lock, propagateKeyValue, rollbackToCheckpoint, select, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDeleted, setESigFieldModified, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setIgnoreRecordLockCheck, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setReferencedMbo, setReferencedMbo, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, validate, validateAttributes
public java.lang.String targetStatusOption
public boolean onListTab
public java.lang.String statusChangeButtonSigoption
public StatefulMbo(MboSet ms) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.String getInternalStatus() throws MXException, java.rmi.RemoteException
getInternalStatus
in interface StatefulMboRemote
MXException
java.rmi.RemoteException
public void changeMaxStatus(java.lang.String internalStatus, java.util.Date date, java.lang.String memo, long accessModifier) throws MXException, java.rmi.RemoteException
changeMaxStatus
in interface StatefulMboRemote
status
- The new desired status. This is the non-translated status,
the internal status value (valuelist.maxvalue
).date
- The effective date of the new status (java.util.Date
).memo
- A string briefly describing the circumstances of the change. The
memo can be null.MXException
- Thrown if there is a problem, or the status cannot be changed,
as determined by canChangeStatus(String)
.java.rmi.RemoteException
changeStatus(String,java.util.Date,String,long)
public void changeMaxStatus(java.lang.String internalStatus, java.util.Date date, java.lang.String memo) throws MXException, java.rmi.RemoteException
changeMaxStatus
in interface StatefulMboRemote
status
- The new desired status. This is the non-translated status,
the internal status value (valuelist.maxvalue
).date
- The effective date of the new status (java.util.Date
).memo
- A string briefly describing the circumstances of the change. The
memo can be null.MXException
- Thrown if there is a problem, or the status cannot be changed,
as determined by canChangeStatus(String)
.java.rmi.RemoteException
changeStatus(String,java.util.Date,String,long)
public void changeStatus(java.lang.String status, java.util.Date date, java.lang.String memo) throws MXException, java.rmi.RemoteException
changeStatus
in interface StatefulMboRemote
status
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).date
- The effective date of the new status (java.util.Date
).memo
- A string briefly describing the circumstances of the change. The
memo can be null.MXException
- Thrown if there is a problem, or the status cannot be changed,
as determined by canChangeStatus(String)
.java.rmi.RemoteException
changeStatus(String,java.util.Date,String,long)
public void changeStatus(java.lang.String status, java.util.Date asOfDate, java.lang.String memo, long accessModifier) throws MXException, java.rmi.RemoteException
canChangeStatus
before the change is performed. If the status change
is allowed, the status change is performed and a status history record is written.
If the status change is not allowed, an exception is thrown.If the new status has the same MaxValue as the current status, then only the status and statusDate attributes are updated, and the StatusHandler is not used.
changeStatus
in interface StatefulMboRemote
status
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).asOfDate
- The effective date of the new status (java.util.Date
).
If this value is null, the current date/time of the server will be used.memo
- A string briefly describing the circumstances of the change. The
memo can be null.accessModifier
- A value of NOACCESSCHECK will cause the method not to call canChangeStatus.
Callers using this flag are responsible for ensuring that they are attempting a valid status change.MXException
- Thrown if there is a problem, or the status cannot be changed,
as determined by canChangeStatus(String)
.java.rmi.RemoteException
canChangeStatus(String)
public void changeStatus(java.lang.String status, java.lang.String progressStatus, java.util.Date asOfDate, java.lang.String memo, long accessModifier) throws MXException, java.rmi.RemoteException
changeStatus
in interface StatefulMboRemote
status
- Target statusprogressStatus
- Just a new status string in status tableasOfDate
- The effective date of the new statusThe effective date of the new statusmemo
- A string briefly describing the circumstances of the changeaccessModifier
- he bitwise flags such as NOACCESSCHECK,
NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.MXException
java.rmi.RemoteException
* @param status
public void canChangeStatus(java.lang.String changeToStatus, java.lang.String progressStatus, long accessModifier) throws MXException, java.rmi.RemoteException
canChangeStatus
in interface StatefulMboRemote
changeToStatus
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).progressStatus
- sub status progressStatus for a statusaccessModifier
- If set to NOACCESSCHECK, allows status changes when not normally allowed.MXException
- Thrown if the status cannot be changed.java.rmi.RemoteException
canChangeStatus(String changeToStatus,String progressStatus, long accessModifier)
public void checkStatusChangeAuthorization(java.lang.String changeToStatus, boolean single) throws MXException, java.rmi.RemoteException
changeToStatus
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).Can
- throw access exception with key "samestatus" or "UnrecogStatus".MXException
java.rmi.RemoteException
This method is called to create the list returned by getStatusList.
public void canChangeMaxStatus(java.lang.String internalStatus) throws MXException, java.rmi.RemoteException
canChangeMaxStatus
in interface StatefulMboRemote
status
- The new desired status. This is the
the internal status value (valuelist.maxvalue
).MXException
java.rmi.RemoteException
canChangeStatus(String, long)
public void canChangeStatus(java.lang.String status) throws MXException, java.rmi.RemoteException
canChangeStatus
in interface StatefulMboRemote
status
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).MXException
java.rmi.RemoteException
canChangeStatus(String, long)
public void canChangeStatus(java.lang.String changeToStatus, long accessModifier) throws MXException, java.rmi.RemoteException
changeToStatus
- The new desired status. This is the translated status
(that is, the status code as it would have been entered by a user, or
valuelist.value
), not
the internal status value (valuelist.maxvalue
).accessModifier
- If set to NOACCESSCHECK, allows status changes when not normally allowed.MXException
- Thrown if the status cannot be changed.java.rmi.RemoteException
public abstract java.lang.String getStatusListName()
getStatusListName
in interface StatefulMboRemote
public MboSetRemote getStatusList() throws MXException, java.rmi.RemoteException
checkStatusChangeAuthorization
in order
to be included in the set.getStatusList
in interface StatefulMboRemote
MXException
java.rmi.RemoteException
Used to create the list. This method only
checks user privileges and rules not involving details of the object changing status.
The method canChangeStatus
can reject some of the members of this list.
public MboSetRemote getValidStatusList() throws MXException, java.rmi.RemoteException
getValidStatusList
in interface StatefulMboRemote
MXException
java.rmi.RemoteException
public void fireEvent(java.lang.String type) throws MXException, java.rmi.RemoteException
fireEvent
in class Mbo
MXException
java.rmi.RemoteException
public void checkForOpenStatus() throws MXException, java.rmi.RemoteException
checkForOpenStatus
in interface StatefulMboRemote
MXApplicationException
- (system, ishistory) is thrown if the record is historyMXException
java.rmi.RemoteException
checkForOpenStatus()
public boolean getOverridePVStatusException() throws java.rmi.RemoteException
getOverridePVStatusException
in interface StatefulMboRemote
java.rmi.RemoteException
getOverridePVStatusException()
public void setOverridePVStatusException(boolean overridePVStatusException) throws java.rmi.RemoteException
setOverridePVStatusException
in interface StatefulMboRemote
java.rmi.RemoteException
setOverridePVStatusException(boolean)
public void canDeleteAttachedDocs() throws MXException, java.rmi.RemoteException
canDeleteAttachedDocs
in interface StatefulMboRemote
MXException
java.rmi.RemoteException
canDeleteAttachedDocs()
public void setTargetStatusOption(java.lang.String targetStatusOption) throws java.rmi.RemoteException
setTargetStatusOption
in interface StatefulMboRemote
java.rmi.RemoteException
setTargetStatusOption(String targetStatusOption)
public java.lang.String getTargetStatusOption() throws java.rmi.RemoteException
getTargetStatusOption
in interface StatefulMboRemote
java.rmi.RemoteException
getTargetStatusOption()
public void setOnListTab(boolean onListTab) throws java.rmi.RemoteException
setOnListTab
in interface StatefulMboRemote
java.rmi.RemoteException
setOnListTab(boolean onListTab)
public boolean getOnListTab() throws java.rmi.RemoteException
getOnListTab
in interface StatefulMboRemote
java.rmi.RemoteException
getOnListTab()
public void setStatusChangeButtonSigoption(java.lang.String statusChangeButtonSigoption) throws java.rmi.RemoteException
setStatusChangeButtonSigoption
in interface StatefulMboRemote
java.rmi.RemoteException
setStatusChangeButtonSigoption(String statusChangeButtonSigoption)
public java.lang.String getStatusChangeButtonSigoption() throws java.rmi.RemoteException
getStatusChangeButtonSigoption
in interface StatefulMboRemote
java.rmi.RemoteException
getStatusChangeButtonSigoption()