java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand
This is the abstract base class for all commerce ECTargetableCommands
Field Summary | |
---|---|
protected
CommandContext |
commandContext |
Constructor Summary | |
---|---|
AbstractECTargetableCommand() AbstractECTargetableCommand constructor. |
Method Summary | |
---|---|
boolean |
accessControlCheck() Performs command level access control check. |
void |
checkIsAllowed(java.lang.Object resource,
java.lang.String action) Check to see if user can perform action on 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 for execution of a command. |
void |
finalize() Final cleans up of resources. |
boolean |
getAccCheck() Check to see if access control check is required for this command. |
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 from the command context. |
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 Targettable Command frame work before the execution of the command. |
void |
performExecute() The business logic for this command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setAccCheck(boolean newValue) This method is set by the web controller to indicate whether access control check is required 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 associated with this command. |
void |
setDefaultProperties(com.ibm.commerce.datatype.TypedProperty val) Sets default properties associated with this ECCommand. |
void |
validateParameters() Performs 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 AbstractECTargetableCommand()
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
- the 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 final void execute() throws ECException
com.ibm.commerce.exception.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 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
- The exception
description.public java.lang.Long getUserId()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
ECException.
ECException
public void reset()
public void setAccCheck(boolean newValue)
newValue
- true if access check is required and 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 val)
val
- TypedPropertiespublic void validateParameters() throws ECException
ECException.
ECException
public void finalize()
public void createCommandExecutionEvent(CommandExecutionTrigger trigger) throws ECException
trigger
- command execution triggerECException