com.ibm.commerce.command
Interface AccCommand

All Known Subinterfaces:
ControllerCommand
All Known Implementing Classes:
ControllerCommandImpl

public interface AccCommand

AccCommand defines the interface that is required by a command that implements command level access control.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Method Summary
 boolean accessControlCheck()
          Performs command level access control check for this command.
 boolean getAccCheck()
          Gets the access control check flag.
 java.lang.Long getForUserId()
          Returns the forUserId for a shopper command.
 java.lang.Long[] getResourceOwners()
          Deprecated. Replaced by ECCommand#getResources()
 void setAccCheck(boolean newValue)
          Sets the access control check flag for this command.
 void setForUserId(java.lang.Long value)
          Sets the forUserId value for this command.
 void setOwner(java.lang.Long owner)           Sets the owner for this command.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
Method Detail

accessControlCheck

public boolean accessControlCheck()
                           throws ECException
Performs command level access control check for this command.
Returns:
true if user has authority false if user has no authority
ECException

getAccCheck

public boolean getAccCheck()
Gets the access control check flag. This method is called by the Access Control Manager to see if access control check is required for this command.
Returns:
true if access check is required false if access check is not required

getForUserId

public java.lang.Long getForUserId()
Returns the forUserId for a shopper command. This method is for internal use by the command framework only.
Returns:
the user id

getResourceOwners

public java.lang.Long[] getResourceOwners()
                                   throws ECException
Deprecated. Replaced by ECCommand#getResources()
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. This method was used in previous version for command level access control check. It is no longer required. It is kept for backward compatibility. The default implementation returns null.
Returns:
an array of all organization unit reference numbers a site owner is representated by an organization unit value of -1
Throws:
ECException

setAccCheck

public void setAccCheck(boolean newValue)
Sets the access control check flag for this command. This method is set by the web controller to indicate whether access control check is required for this command. For example, no access control check is required when we display a jsp page associated with a command because access control has already been performed on the controller command already.
Parameters:
newValue - true if access check is required and false if access check is not required

setForUserId

public void setForUserId(java.lang.Long value)
Sets the forUserId value for this command. This method is for internal use by the command framework.
Parameters:
value - the for user ID

setOwner

public void setOwner(java.lang.Long owner)
Sets the owner for this command. This method is for internal use by the command framework only.
Parameters:
owner - the owner ID