public abstract class AbstractViewCommand extends AbstractECCommand implements ViewCommand
defaultCommandClassName
Constructor and Description |
---|
AbstractViewCommand()
This is the default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
fulfills(java.lang.Long member,
java.lang.String relationship)
This method determines whether a given member fulfills a given relationship with the resource.
|
java.lang.Long |
getForUserId()
This method gets the user id if the command is to be executed on behalf of a customer.
|
java.lang.Long |
getOwner()
This method gets the owner of the protectable resource.
|
TypedProperty |
getRequestProperties()
This method gets the request properties of this view command.
|
java.lang.Long[] |
getResourceOwners()
This method gets all the organization units that own the resources
accessed by this command.
|
TypedProperty |
getResponseProperties()
This method gets the response properties of this view command.
|
ViewCommandContext |
getViewCommandContext()
This method gets the view command context.
|
java.lang.String |
getViewName()
This method gets the view task name for this view command.
|
TypedProperty |
mergeProperties(TypedProperty reqProp,
TypedProperty resProp)
The method merges three sets of properties passed to this view command.
|
abstract void |
performExecute()
This method provides the business logic for this view command.
|
void |
setForUserId(java.lang.Long value)
This method sets the "for user id" for a customer agent command.
|
void |
setOwner(java.lang.Long value)
This method sets the owner for this command.
|
void |
setRequestProperties(TypedProperty viewParm)
This method sets the request properties for the view command.
|
void |
setViewCommandContext(ViewCommandContext aCommandContext)
This method sets the view command context.
|
void |
setViewName(java.lang.String value)
This method sets the view task name for this view command.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, setForUserId, setUserId, validateParameters
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accessControlCheck, getAccCheck, setAccCheck
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public AbstractViewCommand()
public java.lang.Long getForUserId()
getForUserId
in interface AccCommand
public java.lang.Long getOwner() throws java.lang.Exception
Protectable
interface.
This is required for command level access control where the command
is the protectable resource.getOwner
in interface Protectable
java.lang.Exception
public TypedProperty getRequestProperties()
getRequestProperties
in interface ViewCommand
public java.lang.Long[] getResourceOwners() throws ECException
getResourceOwners
in interface AccCommand
Long
objects containing all organization unit
reference numbers. A site owner is represented by an organization unit value of -1.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)
VIEWREG
.
As the default behaviour, this method first merges the request properties with the response properties.
It then merges the default properties with the response properties. Priority is given to the response
properties. The default properties in the URL
configuration have the lowest priority.
For performance reasons, the original ResponseProperties
object passed to this command
will not be preserved but will contain the merged data.
Individual view commands can overwrite this method if they need a different merging policy.mergeProperties
in interface ViewCommand
reqProp
- This is an object that represents the request properties passed to the controller command.resProp
- This is an object that represents the response properties returned by the controller command.public 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
- This is the value of the "for user id".public void setOwner(java.lang.Long value)
setOwner
in interface AccCommand
value
- This is the owner ID.public void setRequestProperties(TypedProperty viewParm) throws ECApplicationException
setRequestProperties
in interface ViewCommand
viewParm
- This is a TypedProperties
object that represents the request properties.ECApplicationException
public final void setViewName(java.lang.String value)
setViewName
in interface ViewCommand
value
- This is the view name as a String
object.public boolean fulfills(java.lang.Long member, java.lang.String relationship) throws java.lang.Exception
fulfills
in interface Protectable
member
- This is the member id of the member.relationship
- This is the relationship the member has with the resource.true
if the member fulfills the relationship with the resource
and false
otherwise.java.lang.Exception
RemoteException
public void setViewCommandContext(ViewCommandContext aCommandContext)
aCommandContext
- This is the view command context.public ViewCommandContext getViewCommandContext()