java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl
An abstract base implemention for any controller command. At a minimum, a command writer has to implement its own performExecute method and set up the proper response data.
Field Summary | |
---|---|
protected
TypedProperty |
requestProperties |
protected
TypedProperty |
responseProperties |
protected
boolean |
retriable |
protected
TypedProperty |
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.command. ControllerCommand |
COPYRIGHT |
Constructor Summary | |
---|---|
ControllerCommandImpl() Constructor for ControllerCommandImpl. |
Method Summary | |
---|---|
boolean |
checkPermission() Deprecated. Replaced by AbstractECTargetableCommand.getResources() |
boolean |
fulfills(java.lang.Long member,
java.lang.String relationship) Determines if a given member fulfills a given relationship with the resource. |
java.lang.Long |
getForUserId() Gets the user Id for a customer agent command. |
boolean |
getGeneric() Gets the generic property for this command. |
java.lang.Long |
getOwner() Returns the owner of this command. |
TypedProperty |
getRequestProperties() Retrieves the request properties associated with a command. |
TypedProperty |
getResolvedRequestProperties() Gets the resolved request properties associated with this command. |
java.lang.Long[] |
getResourceOwners() Deprecated. Replaced by AbstractECTargetableCommand.getResources() |
TypedProperty |
getResponseProperties() Gets the response properties after a controller command has been executed successfully. |
boolean |
getRetriable() Gets the retriable property for this command. |
TypedProperty |
getViewInputProperties() Gets the input properties that will be passed onto the view command. |
boolean |
isGeneric() Checks if this is a generic command. |
boolean |
isRetriable() Checks if this command is retriable on transaction rollback exception. |
com.ibm.commerce.datatype.TypedProperty |
mergeProperties(TypedProperty reqProp) Merges the properties passedto the request with the default properties. |
void |
setForUserId(java.lang.Long value) Sets the forUserId for a customer agent command. |
void |
setGeneric(boolean value) Sets the generic property of this command. |
void |
setOwner(java.lang.Long value) Sets owner for this command for the purpose of command level access control |
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqProperties) Sets the requestProperties for the command. |
void |
setResponseProperties(TypedProperty respProperties) Sets the response properties. |
void |
setRetriable(boolean value) Sets the retriable properties for this command. |
void |
setViewInputProperties(com.ibm.commerce.datatype.TypedProperty reqProperties) Sets the input properties to be passed to the for the view command. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
performExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
execute,
mergeProperties,
setRequestProperties,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
setAccCheck |
Field Detail |
protected TypedProperty requestProperties
protected TypedProperty responseProperties
protected TypedProperty viewReqProperties
protected boolean retriable
Constructor Detail |
public ControllerCommandImpl()
Method Detail |
public boolean checkPermission() throws ECException
AbstractECTargetableCommand.getResources()
checkPermission
in interface
ControllerCommand
ECException
public java.lang.Long getForUserId()
getForUserId
in interface
AccCommand
public boolean getGeneric()
getGeneric
in interface
ControllerCommand
public java.lang.Long getOwner() throws java.rmi.RemoteException, java.lang.Exception
java.rmi.RemoteException
java.lang.Exception
public TypedProperty getRequestProperties()
getRequestProperties
in interface
ControllerCommand
public TypedProperty getResolvedRequestProperties()
getResolvedRequestProperties
in interface
ControllerCommand
public java.lang.Long[] getResourceOwners() throws ECException
AbstractECTargetableCommand.getResources()
getResourceOwners
in interface
AccCommand
ECException
public TypedProperty getResponseProperties()
getResponseProperties
in interface
ControllerCommand
public boolean getRetriable()
getRetriable
in interface
ControllerCommand
public TypedProperty getViewInputProperties()
getViewInputProperties
in interface
ControllerCommand
public boolean isGeneric()
isGeneric
in interface
ControllerCommand
public boolean isRetriable()
isRetriable
in interface
ControllerCommand
public com.ibm.commerce.datatype.TypedProperty mergeProperties(TypedProperty reqProp)
public void setForUserId(java.lang.Long value)
setForUserId
in interface
AccCommand
value
- userIDpublic final void setGeneric(boolean value)
setGeneric
in interface
ControllerCommand
value
- true if the command is a generic command false if this
command is not a generic commandpublic void setOwner(java.lang.Long value)
setOwner
in interface
AccCommand
value
- owner Idpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqProperties) throws com.ibm.commerce.exception.ECException
com.ibm.commerce.exception.ECException.
com.ibm.commerce.exception.ECException
public void setResponseProperties(TypedProperty respProperties)
respProperties
- response propertiespublic final void setRetriable(boolean value)
setRetriable
in interface
ControllerCommand
value
- true if retriable; false otherwisepublic void setViewInputProperties(com.ibm.commerce.datatype.TypedProperty reqProperties) throws com.ibm.commerce.exception.ECException
com.ibm.commerce.exception.ECException.
com.ibm.commerce.exception.ECException
public boolean fulfills(java.lang.Long member, java.lang.String relationship) throws java.rmi.RemoteException, java.lang.Exception
member
- Member id of the memberrelationship
- The relationship the member has with respect to
the resourceRemoteException
java.lang.Exception