public abstract class AbstractECTargetableCommand extends com.ibm.commerce.command.MeasuredCacheableCommandImpl implements ECTargetableCommand
ECTargetableCommand objects.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName| Constructor and Description |
|---|
AbstractECTargetableCommand()
This is the default constructor for this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accessControlCheck()
This method performs a command level access control check for this command.
|
void |
checkIsAllowed(java.lang.Object resource,
java.lang.String action)
This method determines whether a user can perform a specified action on a certain resource.
|
void |
checkResourcePermission()
This method performs resource level access control checking.
|
void |
createCommandExecutionEvent(com.ibm.commerce.command.event.CommandExecutionTrigger trigger)
This method creates a command execution event.
|
void |
execute()
This method is part of the command framework.
|
boolean |
getAccCheck()
This method checks to see if an access control check is required for this command.
|
CommandContext |
getCommandContext()
This method gets the command context associated with this command.
|
java.lang.String |
getCommandIfName()
This method gets the command interface name.
|
java.lang.String |
getCommandName()
This method gets the name of the originating command.
|
java.lang.Integer |
getCommandStoreId()
This method gets the store id used to create this command.
|
TypedProperty |
getDefaultProperties()
This method gets the default properties associated with this command.
|
java.util.Map |
getExceptionInvokeParameters(java.lang.String event)
This method returns the attributes for a particular event type when the command executed throws an exception.
|
long |
getObjectSize()
Returns the estimated footprint size in bytes
of this object and the objects it contains.
|
java.util.Map |
getPostInvokeParameters(java.lang.String event)
This method returns the attributes for a particular event type after the command is executed.
|
java.util.Map |
getPreInvokeParameters(java.lang.String event)
This method returns the attributes for a particular event type before the command is executed.
|
AccessVector |
getResources()
This method gets the access vector accessed by this command.
|
java.lang.Integer |
getStoreId()
This method gets the store id associated with this command.
|
UserAccessBean |
getUser()
This method gets the
UserAccessBean object associated with the user. |
java.lang.Long |
getUserId()
This method 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 framework.
|
void |
performExecute()
This method performs the business logic for this command.
|
void |
reset()
This method is called after a command has been executed.
|
void |
setAccCheck(boolean newValue)
This method is set by the web controller to indicate whether an access control check is
required for this command.
|
void |
setCommandContext(CommandContext aCommandContext)
This method sets the command context associated with this command.
|
void |
setCommandIfName(java.lang.String name)
This method sets the command interface name.
|
void |
setCommandStoreId(java.lang.Integer storeId)
This method sets the store id used to create this command.
|
void |
setDefaultProperties(TypedProperty val)
This method sets default properties associated with this
ECCommand. |
void |
validateParameters()
This method performs server side parameter checking.
|
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachepublic static final java.lang.String COPYRIGHT
public AbstractECTargetableCommand()
public long getObjectSize()
getObjectSize in interface com.ibm.websphere.cache.SizeablegetObjectSize in class com.ibm.websphere.command.CacheableCommandImplpublic boolean accessControlCheck()
throws ECException
true if the user has authority and false otherwise.ECException - An ECApplicationException is thrown when an _ERR_USER_AUTHORITY error occurs.public void checkIsAllowed(java.lang.Object resource,
java.lang.String action)
throws ECException
getResources() method.checkIsAllowed in interface ECCommandresource - This is the resource to be acted on.action - This is the action to be performed on the resource.ECException - An ECApplicationException is thrown when an _ERR_USER_AUTHORITY error occurs.public void checkResourcePermission()
throws ECException
AccManager to perform
resource level access control checking based on the command interface name and the
AccessVector returned by the getResources() method.
This method will throw an ECApplicationException with message _ERR_USER_AUTHORITY
if the user has no authority to perform the operation on the resource.checkResourcePermission in interface ECCommandECException - This is thrown with the message _ERR_USER_AUTHORITY if user does not have permission to perform the operation on the resource.public final void execute()
throws ECException
ECException will be thrown if there are any errors detected during the
command execution.execute in interface ECCommandexecute in interface com.ibm.websphere.command.Commandexecute in class com.ibm.commerce.command.MeasuredCacheableCommandImplECException - This is thrown if there are any errors detected during the command execution.public boolean getAccCheck()
getAccCheck in interface ECCommandtrue if an access control check is required for this command
and false otherwise.public final CommandContext getCommandContext()
getCommandContext in interface ECCommandCommandContext object.public final java.lang.String getCommandIfName()
getCommandIfName in interface ECCommandpublic final java.lang.String getCommandName()
URL name defined in the URL configuration.getCommandName in interface ECCommandpublic final TypedProperty getDefaultProperties()
getDefaultProperties in interface ECCommandpublic AccessVector getResources() throws ECException
getResources in interface ECCommandAccessVector object of resource/action pairs.ECExceptionpublic java.lang.Integer getStoreId()
getStoreId in interface ECCommandpublic final java.lang.Integer getCommandStoreId()
getCommandStoreId in interface ECCommandpublic final void setCommandStoreId(java.lang.Integer storeId)
setCommandStoreId in interface ECCommandstoreId - This is the command store id.public final UserAccessBean getUser() throws ECSystemException
UserAccessBean object associated with the user.getUser in interface ECCommandECSystemExceptionpublic java.lang.Long getUserId()
public boolean isReadyToCallExecute()
true.isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class com.ibm.websphere.command.TargetableCommandImplboolean value; true if we can execute the
command and false otherwise. This default implementation will return true.public void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class com.ibm.websphere.command.TargetableCommandImplECExceptionpublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class com.ibm.websphere.command.CacheableCommandImplpublic void setAccCheck(boolean newValue)
JSP page associated with a command because access control has already
been performed on the controller command.setAccCheck in interface ECCommandnewValue - This is a boolean value; true if an access check is required
and false otherwise.public final void setCommandContext(CommandContext aCommandContext)
setCommandContext in interface ECCommandaCommandContext - This is a CommandContext object.public final void setCommandIfName(java.lang.String name)
setCommandIfName in interface ECCommandname - This is the command interface name.public final void setDefaultProperties(TypedProperty val)
ECCommand. Default properties are defined in the URL configuration.
This method is called by the CommandFactory object during command
creation to set the default properties for this command.setDefaultProperties in interface ECCommandval - This is a TypedProperty object.public void validateParameters()
throws ECException
checkParameters() method from version 5.1.
The default implementation of validateParameters() is a no op.
It is the responsibility of the command writers to implement this method if they want to perform
server side parameter checking.validateParameters in interface ECCommandECExceptionpublic void createCommandExecutionEvent(com.ibm.commerce.command.event.CommandExecutionTrigger trigger)
throws ECException
createCommandExecutionEvent in interface ECCommandtrigger - This is a command execution trigger.ECExceptionpublic java.util.Map getPreInvokeParameters(java.lang.String event)
getPreInvokeParameters in interface ECCommandevent - This is the event type.public java.util.Map getPostInvokeParameters(java.lang.String event)
getPostInvokeParameters in interface ECCommandevent - This is the event type.public java.util.Map getExceptionInvokeParameters(java.lang.String event)
getExceptionInvokeParameters in interface ECCommandevent - This is the event type.