com.ibm.commerce.contract.commands
Class PolicyUpdateCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.contract.commands.PolicyUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PolicyUpdateCmd

public class PolicyUpdateCmdImpl
extends ControllerCommandImpl
implements PolicyUpdateCmd

Updates a business policy in the POLICY database table (WebSphere Commerce Business Edition only).

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The default implementation class is "com.ibm.commerce.contract.commands.PolicyUpdateCmdImpl".
static java.lang.String COPYRIGHT
          The internal copyright field.
 
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.contract.commands. PolicyUpdateCmd
defaultCommandClassName, NAME
 
Constructor Summary
PolicyUpdateCmdImpl()
           
 
Method Summary
 java.sql.Timestamp getEndDate()
          Return the end date of the business policy.
  AccessVector getResources()
          Gets the access vector accessed by this command.
 java.sql.Timestamp getStartDate()
          Return the start date of the business policy.
 void performExecute()
          Update a business policy in the policy table.
 void setBusinessPolicyName(java.lang.String name)
          set the name of the business policy.
 void setBusinessPolicyType(java.lang.String type)
          Sets the type of the business policy.
 void setCommands(java.util.Hashtable commands)
          Sets the commands which process the business policy.
 void setCommonProperty(java.lang.String commonProp)
          Sets the common property string which business policy commands need.
 void setCommonSingleProperty(java.lang.String commonSingleProp)
          Sets a single common property string which business policy commands need.
 void setEndDate(java.lang.Long anEndDate)
          Set the end date of the business policy.
 void setEndDate(java.lang.String endDate)
          Sets the end date of the business policy.
 void setEndDate(java.sql.Timestamp newEndDate)
          Sets the end date of the buisness policy.
 void setProperties(java.util.Hashtable props)
          Sets the specific properties of the business policy commands need.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties
 void setSingleProperties(java.util.Hashtable props)
          Sets the single specific properties of the business policy commands need.
 void setStartDate(java.lang.Long anStartDate)
          Sets the start date of the business policy.
 void setStartDate(java.lang.String startDate)
          Sets the starting date of the business policy.
 void setStartDate(java.sql.Timestamp newStartDate)
          Sets the start date of the business policy.
 void setStoreEntityId(java.lang.Integer storeEntId)
          Sets the store entity id which the business policy belongs to.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, 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. ControllerCommand
checkPermission, 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, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 

Field Detail
public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
The default implementation class is "com.ibm.commerce.contract.commands.PolicyUpdateCmdImpl".
See Also:
Constant Field Values
Constructor Detail

PolicyUpdateCmdImpl

public PolicyUpdateCmdImpl()
Method Detail

getEndDate

public java.sql.Timestamp getEndDate()
Return the end date of the business policy.
Returns:
The end date of the business policy.

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
Throws:
ECException

getStartDate

public java.sql.Timestamp getStartDate()
Return the start date of the business policy.
Returns:
The start date of the business policy.

performExecute

public void performExecute()
                    throws ECException
Update a business policy in the policy table.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setBusinessPolicyName

public void setBusinessPolicyName(java.lang.String name)
set the name of the business policy.
Specified by:
setBusinessPolicyName in interface PolicyUpdateCmd
Parameters:
name - The name of the business policy.

setBusinessPolicyType

public void setBusinessPolicyType(java.lang.String type)
Sets the type of the business policy.
Specified by:
setBusinessPolicyType in interface PolicyUpdateCmd
Parameters:
type - the business policy type

setCommands

public void setCommands(java.util.Hashtable commands)
Sets the commands which process the business policy. A Hashtable object contains all the commands process the business policy. The keys of this Hashtable are Integer objects which start with 0 to the number of the commands. The values of the Hashtable are String objects which represent the the commands. For example, if there are three commands. the keys of the Hashtable object will be 0, 1, 2.
Specified by:
setCommands in interface PolicyUpdateCmd
Parameters:
commands - All the commands to process the business policy.

setCommonProperty

public void setCommonProperty(java.lang.String commonProp)
Sets the common property string which business policy commands need.
Specified by:
setCommonProperty in interface PolicyUpdateCmd
Parameters:
commonProp - The common property which business policy commands need to process the policy.

setCommonSingleProperty

public void setCommonSingleProperty(java.lang.String commonSingleProp)
Sets a single common property string which business policy commands need.
Specified by:
setCommonSingleProperty in interface PolicyUpdateCmd
Parameters:
commonSingleProp - The common property which business policy commands need to process the policy.

setEndDate

public void setEndDate(java.lang.Long anEndDate)
Set the end date of the business policy.
Parameters:
anEndDate - The end date of the business policy.

setEndDate

public void setEndDate(java.lang.String endDate)
Sets the end date of the business policy.
Specified by:
setEndDate in interface PolicyUpdateCmd
Parameters:
endDate - A string object in yyyy-mm-dd hh:mm:ss.fffffffff format.

setEndDate

public void setEndDate(java.sql.Timestamp newEndDate)
Sets the end date of the buisness policy.
Parameters:
newEndDate - The end date of the business policy.

setProperties

public void setProperties(java.util.Hashtable props)
Sets the specific properties of the business policy commands need. The keys of this Hashtable are Integer objects. The values of the Hashtable are String objects which represent the properties. The keys of this Hashtable are depended on which command the proerty is for. For example, if you have three commands in commands Hashtable, the first one and the third one have the commmon property, and the second command needs a specific porperty, then you set the key to Integer 2.
Specified by:
setProperties in interface PolicyUpdateCmd
Parameters:
props - A hashtable contains the business properties for a business command

setSingleProperties

public void setSingleProperties(java.util.Hashtable props)
Sets the single specific properties of the business policy commands need. The keys of this Hashtable are Integer objects. The values of the Hashtable are String objects which represent the properties. The keys of this Hashtable are depended on which command the proerty is for. For example, if you have three commands in commands Hashtable, the first one and the third one have the commmon property, and the second command needs a specific porperty, then you set the key to Integer 2.
Specified by:
setSingleProperties in interface PolicyUpdateCmd
Parameters:
props - A hashtable contains the business properties for a business command

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Sets the request properties
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - the request properties
Throws:
ECApplicationException

setStartDate

public void setStartDate(java.lang.Long anStartDate)
Sets the start date of the business policy.
Parameters:
anStartDate - The start date of the business policy.

setStartDate

public void setStartDate(java.lang.String startDate)
Sets the starting date of the business policy.
Specified by:
setStartDate in interface PolicyUpdateCmd
Parameters:
startDate - java.lang.String

setStartDate

public void setStartDate(java.sql.Timestamp newStartDate)
Sets the start date of the business policy.
Parameters:
newStartDate - The start date of the business policy.

setStoreEntityId

public void setStoreEntityId(java.lang.Integer storeEntId)
Sets the store entity id which the business policy belongs to.
Specified by:
setStoreEntityId in interface PolicyUpdateCmd
Parameters:
storeEntId - The store entity id.