ECCommand is the interface that defines the base contract between any command that runs in the WebSphere Commerce Application server and the web controller code that invokes the command.
All commands will extend from this command interface.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
static java.lang.String |
defaultCommandClassName |
Method Summary | |
---|---|
void |
checkIsAllowed(java.lang.Object resource,
java.lang.String action) Checks if user can perform action on resource. |
void |
checkResourcePermission() Performs resource level access check. |
void |
createCommandExecutionEvent(CommandExecutionTrigger trigger) Creates a command execution event. |
void |
execute() This method is part of the command framework. |
boolean |
getAccCheck() Gets the access control flag. |
CommandContext |
getCommandContext() Gets the command context associated with this command. |
java.lang.String |
getCommandIfName() Gets the interface name of the command. |
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 ECCommand. |
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 a user access bean for the user who invokes this command. |
java.lang.Long |
getUserId() Gets the user Id for the user who invokes this command from the command context. |
void |
performExecute() Contains the actual business logic of the command It should be implemented by all the command writer. |
void |
setAccCheck(boolean newValue) Set the access control flag for this command. |
void |
setCommandContext(
CommandContext CommandContext) Sets the command context associated with this command. |
void |
setCommandIfName(java.lang.String name) Sets the interface name of the command. |
void |
setCommandStoreId(java.lang.Integer storeId) Sets the store Id used to create this command. |
void |
setDefaultProperties(
TypedProperty val) Sets the default properties associated with this ECCommand. |
void |
validateParameters()
Performs server side parameter checking. |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String defaultCommandClassName
Method Detail |
---|
public 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
public void execute() throws ECException
ECException
public boolean getAccCheck()
public CommandContext getCommandContext()
public java.lang.String getCommandIfName()
public java.lang.String getCommandName()
public TypedProperty getDefaultProperties()
public AccessVector getResources() throws ECException
ECException
public java.lang.Integer getStoreId()
public void setCommandStoreId(java.lang.Integer storeId)
storeId
- the store Idpublic java.lang.Integer getCommandStoreId()
public UserAccessBean getUser() throws ECSystemException
ECSystemException
public java.lang.Long getUserId()
public void performExecute() throws CommandException
CommandException
- the superclass for all
ECExceptionspublic void setAccCheck(boolean newValue)
newValue
- true if access check is required false if access
check is not requiredpublic void setCommandContext(CommandContext CommandContext)
public void setCommandIfName(java.lang.String name)
name
- command interface name.public void setDefaultProperties(TypedProperty val)
val
- default propertiespublic void validateParameters() throws ECException
ECException.
ECException
public void checkResourcePermission() throws ECException
ECException
public void createCommandExecutionEvent(CommandExecutionTrigger trigger) throws ECException
ECException