Class BaseCommand
java.lang.Object
com.echothree.util.server.control.BaseCommand
- All Implemented Interfaces:
ExecutionErrorAccumulator
,ExecutionWarningAccumulator
,SecurityMessageAccumulator
- Direct Known Subclasses:
BaseEditCommand
,BaseSimpleCommand
public abstract class BaseCommand
extends Object
implements ExecutionWarningAccumulator, ExecutionErrorAccumulator, SecurityMessageAccumulator
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseCommand
(UserVisitPK userVisitPK, CommandSecurityDefinition commandSecurityDefinition) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExecutionError
(Message message) void
addExecutionError
(String key, Object... values) void
addExecutionWarning
(Message message) void
addExecutionWarning
(String key, Object... values) void
addSecurityMessage
(Message message) void
addSecurityMessage
(String key, Object... values) protected boolean
protected boolean
protected boolean
protected abstract BaseResult
execute()
protected BaseResult
boolean
protected CommandSecurityDefinition
protected CoreControl
protected EntityInstance
protected SecurityResult
protected final org.apache.commons.logging.Log
getLog()
boolean
getParty()
getPreferredCurrency
(Party party) getPreferredDateTimeFormat
(Party party) getPreferredLanguage
(Party party) getPreferredTimeZone
(Party party) boolean
boolean
boolean
boolean
protected void
protected void
removeFilteredTransferProperty
(Class clazz, String property) This should only be called an override of setupSession().protected void
removeOption
(String option) This should only be called an override of setupSession().final CommandResult
run()
final Future<CommandResult>
runAsync()
protected SecurityResult
security()
protected SecurityResult
protected Event
sendEvent
(EntityInstance entityInstance, EventTypes eventType, EntityInstance relatedEntityInstance, EventTypes relatedEventType, BasePK createdByBasePK) protected Event
sendEvent
(EntityInstance entityInstance, EventTypes eventType, BasePK relatedBasePK, EventTypes relatedEventType, BasePK createdByBasePK) protected Event
sendEvent
(BasePK basePK, EventTypes eventType, BasePK relatedBasePK, EventTypes relatedEventType, BasePK createdByBasePK) void
setCheckIdentityVerifiedTime
(boolean checkIdentityVerifiedTime) void
setLogCommand
(boolean logCommand) void
setUpdateLastCommandTime
(boolean updateLastCommandTime) protected void
void
setUserVisitPK
(UserVisitPK userVisitPK) protected void
protected ValidationResult
validate()
-
Field Details
-
session
-
-
Constructor Details
-
BaseCommand
-
-
Method Details
-
getLog
-
getComponentVendorName
-
getCommandName
-
getCompanyParty
-
getPartyPK
-
getParty
-
getPartyType
-
getPartyTypeName
-
getUserVisitPK
-
setUserVisitPK
-
getUserVisit
-
getUserVisitForUpdate
-
getUserSession
-
getSession
-
getUserControl
-
getPreferredLanguage
-
getPreferredLanguage
-
getPreferredCurrency
-
getPreferredCurrency
-
getPreferredTimeZone
-
getPreferredTimeZone
-
getPreferredDateTimeFormat
-
getPreferredDateTimeFormat
-
getCheckIdentityVerifiedTime
-
setCheckIdentityVerifiedTime
-
getUpdateLastCommandTime
-
setUpdateLastCommandTime
-
getLogCommand
-
setLogCommand
-
getCommandSecurityDefinition
-
checkCommandSecurityDefinition
-
checkOptionalSecurityRoles
-
security
-
addSecurityMessage
- Specified by:
addSecurityMessage
in interfaceSecurityMessageAccumulator
-
addSecurityMessage
- Specified by:
addSecurityMessage
in interfaceSecurityMessageAccumulator
-
getSecurityMessages
- Specified by:
getSecurityMessages
in interfaceSecurityMessageAccumulator
-
hasSecurityMessages
- Specified by:
hasSecurityMessages
in interfaceSecurityMessageAccumulator
-
validate
-
execute
-
addExecutionWarning
- Specified by:
addExecutionWarning
in interfaceExecutionWarningAccumulator
-
addExecutionWarning
- Specified by:
addExecutionWarning
in interfaceExecutionWarningAccumulator
-
getExecutionWarnings
- Specified by:
getExecutionWarnings
in interfaceExecutionWarningAccumulator
-
hasExecutionWarnings
- Specified by:
hasExecutionWarnings
in interfaceExecutionWarningAccumulator
-
addExecutionError
- Specified by:
addExecutionError
in interfaceExecutionErrorAccumulator
-
addExecutionError
- Specified by:
addExecutionError
in interfaceExecutionErrorAccumulator
-
getExecutionErrors
- Specified by:
getExecutionErrors
in interfaceExecutionErrorAccumulator
-
hasExecutionErrors
- Specified by:
hasExecutionErrors
in interfaceExecutionErrorAccumulator
-
getBaseResultAfterErrors
-
runAsync
-
setupSession
-
initSession
-
teardownSession
-
run
- Throws:
BaseException
-
canSpecifyParty
-
selfOnly
-
getInsufficientSecurityResult
-
getCoreControl
-
getEntityInstanceByBasePK
-
sendEvent
protected Event sendEvent(BasePK basePK, EventTypes eventType, BasePK relatedBasePK, EventTypes relatedEventType, BasePK createdByBasePK) -
sendEvent
protected Event sendEvent(EntityInstance entityInstance, EventTypes eventType, BasePK relatedBasePK, EventTypes relatedEventType, BasePK createdByBasePK) -
sendEvent
protected Event sendEvent(EntityInstance entityInstance, EventTypes eventType, EntityInstance relatedEntityInstance, EventTypes relatedEventType, BasePK createdByBasePK) -
removeOption
This should only be called an override of setupSession(). After that, TransferCaches may have cached knowledge that specific options were set.- Parameters:
option
- The option to remove.
-
removeFilteredTransferProperty
This should only be called an override of setupSession(). After that, TransferCaches may have cached knowledge that specific properties were filtered.- Parameters:
clazz
- The Class whose properties should be examined.property
- The property to remove.
-