com.ibm.commerce.ruleservice.admin.commands
Class RuleServiceAdministrationCommandBase

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
              |
              +--com.ibm.commerce.ruleservice.admin.commands.RuleServiceAdministrationCommandBase
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RuleServiceAdminCommand, ToolsControllerCommand
Direct Known Subclasses:
DisableRuleServiceCommandImpl, EnableRuleServiceCommandImpl, RefreshRuleServiceCommandImpl, RemoveRuleServiceCommandImpl, RuleServiceDetailsCommandBase, UpdateRuleServiceStatusCommandImpl

public abstract class RuleServiceAdministrationCommandBase
extends ToolsControllerCommandImpl
implements RuleServiceAdminCommand

A base for all rule service administration commands. Ensures consistent handling of URL parameters and exceptions.


Field Summary
static java.lang.String COPYRIGHT
           
protected static java.lang.String METHODsetRequestProperties
           
protected  RuleServiceResourceProxy resourceProxy
           
static java.lang.String RULE_SERVICE_URL_PARAM_NAME
           
protected  java.lang.String ruleServiceName
           
 
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.command.ToolsControllerCommand
NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
RuleServiceAdministrationCommandBase()
          This constructor is called by the WCS command framework.
RuleServiceAdministrationCommandBase(RuleServiceResourceProxy aRuleServiceResourceProxy)
          Clients can use this constructor to substitute collaborating objects.
 
Method Summary
protected abstract  void doPerformExecute()
          Subclasses do their "real work" here and can assume both that parameters are valid and that redirection will be done afterward.
protected  void doRedirect()
          Redirects to the appropriate view task, as set in the request properties.
protected  RuleServiceResourceProxy getResourceProxy()
           
 AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getRuleServiceName()
           
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setRequestProperties(TypedProperty reqProps)
          The framework calls this method, providing information about the request.
 void setRuleServiceName(java.lang.String newRuleServiceName)
           
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.tools.command.ToolsControllerCommandImpl
getViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

METHODsetRequestProperties

protected static final java.lang.String METHODsetRequestProperties

resourceProxy

protected RuleServiceResourceProxy resourceProxy

RULE_SERVICE_URL_PARAM_NAME

public static final java.lang.String RULE_SERVICE_URL_PARAM_NAME

ruleServiceName

protected java.lang.String ruleServiceName
Constructor Detail

RuleServiceAdministrationCommandBase

public RuleServiceAdministrationCommandBase()
This constructor is called by the WCS command framework.

RuleServiceAdministrationCommandBase

public RuleServiceAdministrationCommandBase(RuleServiceResourceProxy aRuleServiceResourceProxy)
Clients can use this constructor to substitute collaborating objects. Used mainly for testing and diagnostics.
Method Detail

doPerformExecute

protected abstract void doPerformExecute()
                                  throws ECException
Subclasses do their "real work" here and can assume both that parameters are valid and that redirection will be done afterward.

doRedirect

protected void doRedirect()
Redirects to the appropriate view task, as set in the request properties.

getResourceProxy

protected RuleServiceResourceProxy getResourceProxy()

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs

getRuleServiceName

public java.lang.String getRuleServiceName()

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

setRequestProperties

public void setRequestProperties(TypedProperty reqProps)
                          throws ECApplicationException
The framework calls this method, providing information about the request. This implementation stores the properties needed by all rule service administration commands.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ToolsControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

setRuleServiceName

public void setRuleServiceName(java.lang.String newRuleServiceName)

validateParameters

public void validateParameters()
                        throws ECException
Description copied from interface: ECCommand
Performs server side parameter checking. This method replaces the checkParameters() method in a previous version of the code.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException -