public class PolicyAddCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements PolicyAddCmd
PolicyAddCmd
controller command.
Name | Description |
---|---|
BusinessPolicyName |
The name of the business policy. Mandatory. |
BusinessPolicyType |
The type of the business policy. Mandatory. |
commands |
A Hashtable object contains all the commands process the business policy. The keys of this Hashtable are Integer objects which start with 0 to number of the commands. The values of the Hashtable are String objects which represent the commands. Optional. |
CommonProperty |
The common property string which business policy commands need. Mandatory. |
StartDate |
The start date of the business policy. Mandatory. |
EndDate |
The end date of the business policy. Mandatory. |
StoreEntityId |
The store entity Id to which the business policy belongs. Mandatory. |
Properties |
The specific properties of the business policy commands need. Optional. |
RequestProperties |
The request properties.Possible values include: type,name,plcyStoreId,cmd,props,commonProps,startDate,endDate. Optional. |
Name | Description |
---|---|
EndDate |
The end date of the business policy. |
PolicyId |
The new policy ID. |
StartDate |
The start date of the business policy. |
Resources |
The access vector accessed by this command. |
StoreEntityAccessBean
BusinessPolicyAccessBean
PolicyCommandAccessBean
com.ibm.commerce.contract.objects.ContractJDBCHelperAccessBean#findAllBusinessPolicyType()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
PolicyAddCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.sql.Timestamp |
getEndDate()
Gets the end date of the business policy.
|
java.lang.Long |
getPolicyId()
Gets the new policy ID.
|
com.ibm.commerce.accesscontrol.AccessVector |
getResources()
Gets the access vector accessed by this command.
|
java.sql.Timestamp |
getStartDate()
Gets the start date of the business policy.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setBusinessPolicyName(java.lang.String name)
Sets 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 |
setEndDate(java.lang.Long anEndDate)
Sets 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 business policy.
|
void |
setProperties(java.util.Hashtable props)
Sets the specific properties of the business policy commands need.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Retrieves input parameters from the request properties.
|
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 startDate)
Sets the start date of the business policy.
|
void |
setStoreEntityId(java.lang.Integer storeEntId)
Sets the store entity Id to which the business policy belongs.
|
void |
validateParameters()
Checks the input parameters.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public java.sql.Timestamp getEndDate()
public java.lang.Long getPolicyId()
getPolicyId
in interface PolicyAddCmd
public com.ibm.commerce.accesscontrol.AccessVector getResources() throws com.ibm.commerce.exception.ECException
getResources
in interface com.ibm.commerce.command.ECCommand
getResources
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
AbstractECTargetableCommand.getResources()
public java.sql.Timestamp getStartDate()
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_DUPLICATED_POLICY_NAME if a business policy with the same name and type for
the same store already exists.
Raised with message _ERR_DUPLICATED_BUSINESS_CMD_NAME if a business policy command with the same already exists
for this business policy.AbstractECTargetableCommand.performExecute()
public void setBusinessPolicyName(java.lang.String name)
setBusinessPolicyName
in interface PolicyAddCmd
name
- the name of the business policy.public void setBusinessPolicyType(java.lang.String type)
setBusinessPolicyType
in interface PolicyAddCmd
type
- the business policy typepublic void setCommands(java.util.Hashtable commands)
setCommands
in interface PolicyAddCmd
commands
- all the commands to process the business policypublic void setCommonProperty(java.lang.String commonProp)
setCommonProperty
in interface PolicyAddCmd
commonProp
- the common property which business policy commands need to process the policypublic void setEndDate(java.lang.Long anEndDate)
anEndDate
- the end date of the business policy in Long objectpublic void setEndDate(java.lang.String endDate)
setEndDate
in interface PolicyAddCmd
endDate
- A string object in yyyy-mm-dd hh:mm:ss.fffffffff format represents the end date of the business policypublic void setEndDate(java.sql.Timestamp newEndDate)
newEndDate
- The end date of the business policy.public void setProperties(java.util.Hashtable props)
setProperties
in interface PolicyAddCmd
props
- a hashtable contains the business properties for a business commandpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties) throws com.ibm.commerce.exception.ECApplicationException
setRequestProperties
in interface com.ibm.commerce.command.ControllerCommand
setRequestProperties
in class com.ibm.commerce.command.ControllerCommandImpl
aRequestProperties
- An TypedProperty object contains the input parameters.
For this default implementation, the following parameter are required parameters: name, type, plcyStoreId.
optional parameters are cmd, commonProps, props, endDate, startDate.com.ibm.commerce.exception.ECApplicationException
- Raised with message _ERR_MISSING_CMD_PARAMETER if one of the these required parameters are missing.
Raised with message _ERR_WRONG_GMT_TIMESTAMP_FORMAT if the startDate or endDate parameter is not in "yyyy-mm-dd hh:mm:ss.fffffffff"
format.ControllerCommandImpl.setRequestProperties(TypedProperty)
public void setStartDate(java.lang.Long anStartDate)
anStartDate
- the start date of the business policy in Long objectpublic void setStartDate(java.lang.String startDate)
setStartDate
in interface PolicyAddCmd
startDate
- a string object in yyyy-mm-dd hh:mm:ss.fffffffff format for the business policy's start datepublic void setStartDate(java.sql.Timestamp startDate)
startDate
- the start date of the business policy in Timestamp objectpublic void setStoreEntityId(java.lang.Integer storeEntId)
setStoreEntityId
in interface PolicyAddCmd
storeEntId
- the store entity id.public void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_UNSUPPORTED_BIZ_POLICY_TYPE if the given business policy type is an
unsupported business policy type.AbstractECTargetableCommand.validateParameters()