java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.AbstractViewCommand
The abstract base implementation of a view command. All view commands should extend from this class.
Field Summary | |
---|---|
protected
TypedProperty |
requestProperties |
protected
TypedProperty |
responseProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.command. ViewCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
AbstractViewCommand() Constructor for AbstractViewCommand |
Method Summary | |
---|---|
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 if command is to be executed by on behalf of a customer This method is for internal use only. |
java.lang.Long |
getOwner() Returns the owner of the protectable resource. |
TypedProperty |
getRequestProperties() Gets the request properties to this view command. |
java.lang.Long[] |
getResourceOwners() This method returns all the organization unit that owns the resources accessed by this command.It will return null if no resource is being accessed by this command. |
TypedProperty |
getResponseProperties() Returns the response properties returned by this view command. |
java.lang.String |
getViewName() Gets the view task name for this view command. |
TypedProperty |
mergeProperties(
TypedProperty reqProp,
TypedProperty resProp) The method merges 3 sets of properties passed to this view command: the resquest properties, the response properties and the default properties set in the VIEWREG For the default behaviour, this method first merges the request properties to the response properties. |
abstract
void |
performExecute() The business logic for this view command |
void |
setForUserId(java.lang.Long value) Sets the forUserId for a customer agent command. |
void |
setOwner(java.lang.Long value) Sets the owner for this command. |
void |
setRequestProperties(
TypedProperty viewParm) Sets request properties for for view command. |
protected
void |
setResponseProperties(
TypedProperty responseParm) Sets response properties for for view command. |
void |
setViewName(java.lang.String value) Sets the view task name for this view command. |
Methods inherited from class com.ibm.commerce.command. AbstractECCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
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. AccCommand |
accessControlCheck,
getAccCheck,
setAccCheck |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
execute,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Field Detail |
---|
protected TypedProperty responseProperties
protected TypedProperty requestProperties
Constructor Detail |
---|
public AbstractViewCommand()
Method Detail |
---|
public java.lang.Long getForUserId()
getForUserId
in interface
AccCommand
public java.lang.Long getOwner() throws java.rmi.RemoteException, java.lang.Exception
Exception.
java.rmi.RemoteException.
java.rmi.RemoteException
java.lang.Exception
public TypedProperty getRequestProperties()
getRequestProperties
in interface
ViewCommand
public java.lang.Long[] getResourceOwners() throws ECException
getResourceOwners
in interface
AccCommand
ECException
public TypedProperty getResponseProperties()
getResponseProperties
in interface
ViewCommand
public final java.lang.String getViewName()
getViewName
in interface
ViewCommand
public TypedProperty mergeProperties(TypedProperty reqProp, TypedProperty resProp)
mergeProperties
in interface
ViewCommand
reqProp
- request properties passed to the controller
commandresProp
- response properties returned by the controller
commandpublic abstract void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECCommand
ECException
public void setForUserId(java.lang.Long value)
setForUserId
in interface
AccCommand
value
- for user IDpublic void setOwner(java.lang.Long value)
setOwner
in interface
AccCommand
value
- the owner IDpublic void setRequestProperties(TypedProperty viewParm) throws ECApplicationException
setRequestProperties
in interface
ViewCommand
viewParm
- typed properties
ECApplicationException
protected void setResponseProperties(TypedProperty responseParm) throws ECApplicationException
ECApplicationException
public final void setViewName(java.lang.String value)
setViewName
in interface
ViewCommand
value
- String - view namepublic boolean fulfills(java.lang.Long member, java.lang.String relationship) throws java.rmi.RemoteException, java.lang.Exception
member
- member id of the memberrelationship
- relationship the member has with respect to the
resourcejava.lang.Exception
RemoteException