com.ibm.commerce.productset.commands
Class ProductSetPolicyAddCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.productset.commands.ProductSetPolicyAddCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ProductSetPolicyAddCmd, Protectable

public class ProductSetPolicyAddCmdImpl
extends ControllerCommandImpl
implements ProductSetPolicyAddCmd

Add a product set policy.

Input parameters:
NameTypeRequirementDescription
productSetXmlStringoptionalThe XML string of the product set definition.
productSetDescriptionStringoptionalThe description of the product set.
nameStringoptionalThe name of the product set policy.
policyDescriptionStringoptionalThe description of the product set policy.
languageIdIntegeroptionalThe language of the description.
catalogIdLongoptionalThe catalog ID.
categoryIdLongoptionalThe category ID.

Output parameters:
NameTypeDescription
productSetIdIntegerThe newly created product set's ID.
productSetNameStringThe newly created product set's name.
policyIdLongThe newly created product set policy's ID.
policyNameStringThe newly created product set policy's name.

Behavior:

Exception:


Field Summary
 java.lang.Long catalogId
          The Catalog ID.
 java.lang.Long catChildGroupId
          The Child Catalog Group ID.
static java.lang.String CLASSNAME
          The fully qualified name of this class.
static java.lang.String COPYRIGHT
          The internal copyright field.
 java.lang.String productSetXml
          The XML definition of the product set.
 
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.productset.commands.ProductSetPolicyAddCmd
defaultCommandClassName, NAME
 
Constructor Summary
ProductSetPolicyAddCmdImpl()
          No value constructor.
 
Method Summary
 void createCatGroupProductSetRel()
          Creates an association between the catalog group and the product set.
 java.lang.Long getCatalogId()
          Returns the CatalogId that represents the primary key of the catalog.
 java.lang.Long getCatGroupId()
          Returns the CatalogGroupId (CategoryId) that represents the primary key of the category.
 java.lang.Integer getLanguageId()
          Returns the LanguageId that represents the primary key of language of the description.
 java.lang.Long getMemberId()
          Returns the MemberId that represents the primary key of the product set's owner.
 java.lang.String getPolicyDescription()
          Returns the description of the policy.
 java.lang.Long getPolicyId()
          Returns the PolicyId that represents the primary key of the policy.
 java.lang.String getPolicyName()
          Returns the name of the policy.
 java.lang.String getProductSetDescription()
          Returns the description of the product set.
 java.lang.Integer getProductSetId()
          Returns the ProductSetId that represents the primary key of the product set.
 java.lang.String getProductSetName()
          Returns the name of the product set.
 java.lang.String getProductSetXml()
          Returns the XML definition of the product set.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setCatalogId(java.lang.Long newCatalogId)
          Sets the CatalogId that represents the primary key of the catalog.
 void setCatGroupId(java.lang.Long newCatChildGroupId)
          Sets the CatalogGroupId (CategoryId) that represents the primary key of the category.
 void setLanguageId(java.lang.Integer newLanguageId)
          Sets the LanguageId that represents the primary key of language of the description.
 void setMemberId(java.lang.Long newMemberId)
          Sets the MemberId that represents the primary key of the product set's owner.
 void setPolicyDescription(java.lang.String newPolicyDescription)
           
 void setPolicyId(java.lang.Long newPolicyId)
          Sets the ID of the policy.
 void setPolicyName(java.lang.String newPolicyName)
          Sets the name of the policy.
 void setProductSetDescription(java.lang.String newProductSetDescription)
          Sets the description of the product set.
 void setProductSetId(java.lang.Integer newPsId)
          Sets the ProductSetId that represents the primary key of the product set.
 void setProductSetName(java.lang.String newPsName)
          Sets the name of the product set.
 void setProductSetXml(java.lang.String newProductSetXml)
          Sets the XML definition of the product set.
 void setRequestProperties(TypedProperty reqParms)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, 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, getResources, 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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

catalogId

public java.lang.Long catalogId
The Catalog ID.

catChildGroupId

public java.lang.Long catChildGroupId
The Child Catalog Group ID.

CLASSNAME

public static final java.lang.String CLASSNAME
The fully qualified name of this class.

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.

productSetXml

public java.lang.String productSetXml
The XML definition of the product set.
Constructor Detail

ProductSetPolicyAddCmdImpl

public ProductSetPolicyAddCmdImpl()
No value constructor.
Method Detail

createCatGroupProductSetRel

public void createCatGroupProductSetRel()
                                 throws ECException
Creates an association between the catalog group and the product set.
Throws:
ECException -  

getCatalogId

public java.lang.Long getCatalogId()
Returns the CatalogId that represents the primary key of the catalog.
Returns:
java.lang.Long

getCatGroupId

public java.lang.Long getCatGroupId()
Returns the CatalogGroupId (CategoryId) that represents the primary key of the category.
Returns:
java.lang.Long

getLanguageId

public java.lang.Integer getLanguageId()
Returns the LanguageId that represents the primary key of language of the description.
Returns:
java.lang.Integer

getMemberId

public java.lang.Long getMemberId()
Returns the MemberId that represents the primary key of the product set's owner.
Returns:
java.lang.Long

getPolicyDescription

public java.lang.String getPolicyDescription()
Returns the description of the policy.
Returns:
java.lang.String

getPolicyId

public java.lang.Long getPolicyId()
Description copied from interface: ProductSetPolicyAddCmd
Returns the PolicyId that represents the primary key of the policy.
Specified by:
getPolicyId in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Returns:
java.lang.Long

getPolicyName

public java.lang.String getPolicyName()
Description copied from interface: ProductSetPolicyAddCmd
Returns the name of the policy.
Specified by:
getPolicyName in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Returns:
java.lang.String

getProductSetDescription

public java.lang.String getProductSetDescription()
Returns the description of the product set.
Returns:
java.lang.String

getProductSetId

public java.lang.Integer getProductSetId()
Description copied from interface: ProductSetPolicyAddCmd
Returns the ProductSetId that represents the primary key of the product set.
Specified by:
getProductSetId in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Returns:
java.lang.Integer

getProductSetName

public java.lang.String getProductSetName()
Description copied from interface: ProductSetPolicyAddCmd
Returns the name of the product set.
Specified by:
getProductSetName in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Returns:
java.lang.String

getProductSetXml

public java.lang.String getProductSetXml()
Returns the XML definition of the product set.
Returns:
java.lang.String

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.

setCatalogId

public void setCatalogId(java.lang.Long newCatalogId)
Description copied from interface: ProductSetPolicyAddCmd
Sets the CatalogId that represents the primary key of the catalog.
Specified by:
setCatalogId in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newCatalogId - java.lang.Long

setCatGroupId

public void setCatGroupId(java.lang.Long newCatChildGroupId)
Description copied from interface: ProductSetPolicyAddCmd
Sets the CatalogGroupId (CategoryId) that represents the primary key of the category.
Specified by:
setCatGroupId in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newCatGroupId - java.lang.Long

setLanguageId

public void setLanguageId(java.lang.Integer newLanguageId)
Description copied from interface: ProductSetPolicyAddCmd
Sets the LanguageId that represents the primary key of language of the description.
Specified by:
setLanguageId in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newLanguageId - java.lang.Integer

setMemberId

public void setMemberId(java.lang.Long newMemberId)
Sets the MemberId that represents the primary key of the product set's owner.
Parameters:
newMemberId - java.lang.Long

setPolicyDescription

public void setPolicyDescription(java.lang.String newPolicyDescription)

setPolicyId

public void setPolicyId(java.lang.Long newPolicyId)
Sets the ID of the policy.
Parameters:
newPolicyId - java.lang.Long

setPolicyName

public void setPolicyName(java.lang.String newPolicyName)
Description copied from interface: ProductSetPolicyAddCmd
Sets the name of the policy.
Specified by:
setPolicyName in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newPolicyName - java.lang.String

setProductSetDescription

public void setProductSetDescription(java.lang.String newProductSetDescription)
Description copied from interface: ProductSetPolicyAddCmd
Sets the description of the product set.
Specified by:
setProductSetDescription in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newProductSetDescription - java.lang.String

setProductSetId

public void setProductSetId(java.lang.Integer newPsId)
Sets the ProductSetId that represents the primary key of the product set.
Parameters:
newPsId - java.lang.Integer

setProductSetName

public void setProductSetName(java.lang.String newPsName)
Sets the name of the product set.
Parameters:
newPsName - java.lang.String

setProductSetXml

public void setProductSetXml(java.lang.String newProductSetXml)
Description copied from interface: ProductSetPolicyAddCmd
Sets the XML definition of the product set.
Specified by:
setProductSetXml in interface ProductSetPolicyAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPolicyAddCmd
Parameters:
newProductSetXml - java.lang.String

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
Description copied from interface: ControllerCommand
The WebController calls this method before invoking the execute method in this command to set the request properties for this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

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
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -