java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand
This is the abstract base class for all commerce ECCommands
Field Summary | |
---|---|
protected
CommandContext |
commandContext |
Constructor Summary | |
---|---|
AbstractECCommand() Constructor of AbstractECCommand |
Method Summary | |
---|---|
boolean |
accessControlCheck() Performs command level access control check for this command. |
void |
checkIsAllowed(java.lang.Object resource,
java.lang.String action) Checks if user can perform action on a resource. |
protected
void |
checkParameters() Deprecated. Replaced by validateParameters() |
void |
checkResourcePermission() Performs resource level access control check. |
void |
createCommandExecutionEvent(CommandExecutionTrigger trigger) Creates a command execution event. |
void |
execute() This method is part of the command framework. |
void |
finalize() Final clean up of resources. |
boolean |
getAccCheck() Gets the access control flag. |
CommandContext |
getCommandContext() Gets the command context associated with this command. |
java.lang.String |
getCommandIfName() Gets the command interface name. |
java.lang.String |
getCommandName() Gets the name of the originating command. |
java.lang.Integer |
getCommandStoreId() Gets the store Id used to create this command. |
TypedProperty |
getDefaultProperties() Gets the default properties associated with this command. |
AccessVector |
getResources() Gets the access vector accessed by this command. |
java.lang.Integer |
getStoreId() Gets the store Id associated with this command. |
UserAccessBean |
getUser() Gets the userAccessBean associated with the user. |
java.lang.Long |
getUserId() Gets the user Id for the user associated with this command from the command context. |
boolean |
isReadyToCallExecute() This method is called by the Targetable Command frame work This is where client side parameter checking is performed before the execution of the command. |
void |
performExecute() Performs the business logic for this command. |
void |
reset() This method is called after a command has been executed to reset its states variables. |
void |
setAccCheck(boolean newValue) Set the access control flag for this command. |
void |
setCommandContext(
CommandContext aCommandContext) Sets the command context associated with this command. |
void |
setCommandIfName(java.lang.String name) Sets the command interface name. |
void |
setCommandStoreId(java.lang.Integer storeId) Sets the store Id used to create this command. |
void |
setDefaultProperties(com.ibm.commerce.datatype.TypedProperty value) Sets default properties associated with this ECCommand. |
void |
validateParameters() Performs server side parameter checking. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
protected CommandContext commandContext
Constructor Detail |
public AbstractECCommand()
Method Detail |
public boolean accessControlCheck() throws ECException
ECException
- - ECApplicationException indicating an
_ERR_USER_AUTHORITY errorpublic void checkIsAllowed(java.lang.Object resource, java.lang.String action) throws ECException
resource
- resource to be acted onaction
- action to be performed on the resourceECException
- - ECApplicationException indicating an
_ERR_USER_AUTHORITY errorprotected void checkParameters() throws ECException
validateParameters()
ECException.
ECException
public void checkResourcePermission() throws ECException
ECException
- - _ERR_USER_AUTHORITY if user has no permission
to perform the operation on the resource.public void execute() throws ECException
ECException
public boolean getAccCheck()
public final CommandContext getCommandContext()
public final java.lang.String getCommandIfName()
public final java.lang.String getCommandName()
public final TypedProperty getDefaultProperties()
public AccessVector getResources() throws ECException
ECException
public final java.lang.Integer getStoreId()
public final java.lang.Integer getCommandStoreId()
public final void setCommandStoreId(java.lang.Integer storeId)
storeId
- the command store Id.public final UserAccessBean getUser() throws com.ibm.commerce.exception.ECSystemException
com.ibm.commerce.exception.ECSystemException
public final java.lang.Long getUserId()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
ECException.
ECException
public void reset()
public void setAccCheck(boolean newValue)
newValue
- boolean - true if access check is required - false
if access check is not requiredpublic final void setCommandContext(CommandContext aCommandContext)
public final void setCommandIfName(java.lang.String name)
name
- the command interface name.public final void setDefaultProperties(com.ibm.commerce.datatype.TypedProperty value)
value
- properties valuepublic void validateParameters() throws ECException
ECException.
ECException
public void finalize()
finalize
in class
java.lang.Object
public void createCommandExecutionEvent(CommandExecutionTrigger trigger) throws ECException
trigger
- command execution triggerECException