com.ibm.commerce.productset.commands
Class ProductSetAddCmdImpl

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

public class ProductSetAddCmdImpl
extends ControllerCommandImpl
implements ProductSetAddCmd

Add a product set definition based on the input XML input.

Input parameters:
NameTypeRequirementDescription
productSetXmlStringmandatoryThe XML string of the product set definition.
productSetDescriptionStringoptionalThe description of the product set.
languageIdIntegeroptionalThe language of the description.

Output parameters:
NameTypeDescription
productSetIdIntegerThe newly created product set's ID.
productSetNameStringThe newly created product set's name.
memberIdLongThe newly created product set's member ID.

Behavior:

Exception:


Field Summary
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 product set XML definition.
 
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.ProductSetAddCmd
defaultCommandClassName, NAME
 
Constructor Summary
ProductSetAddCmdImpl()
          No value constructor.
 
Method Summary
 org.w3c.dom.Element getElementByTag(org.w3c.dom.Element aElement, java.lang.String tag)
          Returns the first DOM element specified by the given tag.
 java.lang.Integer getLanguageId()
          Returns the LanguageId that represents the primary key of language of the product set description.
 java.lang.Long getMemberId()
          Returns the MemberId that represents the primary key of the owner of the product set.
 java.lang.String getProductSetDescription()
          Returns the product set description.
 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.
 AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getStatic()
          Returns the static value of the product set.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setLanguageId(java.lang.Integer newLanguageId)
          Sets the LanguageId that represents the primary key of language of the product set description.
 void setMemberId(java.lang.Long newMemberId)
          Sets the MemberId that represents the primary key of the owner of the product set.
 void setProductSetDescription(java.lang.String newProductSetDescription)
          Sets the product set description.
 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 setStatic(java.lang.String newStatic)
          Sets the static value of the product set.
 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, 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

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 product set XML definition.
Constructor Detail

ProductSetAddCmdImpl

public ProductSetAddCmdImpl()
No value constructor.
Method Detail

getElementByTag

public org.w3c.dom.Element getElementByTag(org.w3c.dom.Element aElement,
                                           java.lang.String tag)
Returns the first DOM element specified by the given tag.
Parameters:
aElement - org.w3c.dom.Element
tag - java.lang.String
Returns:
org.w3c.dom.Element

getLanguageId

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

getMemberId

public java.lang.Long getMemberId()
Description copied from interface: ProductSetAddCmd
Returns the MemberId that represents the primary key of the owner of the product set.
Specified by:
getMemberId in interface ProductSetAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetAddCmd
Returns:
java.lang.Long

getProductSetDescription

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

getProductSetId

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

getProductSetName

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

getProductSetXml

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

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

getStatic

public java.lang.String getStatic()
Returns the static value of the product set. A static value of "1" indicates that this product set should not be re-published.
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.

setLanguageId

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

setMemberId

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

setProductSetDescription

public void setProductSetDescription(java.lang.String newProductSetDescription)
Description copied from interface: ProductSetAddCmd
Sets the product set description.
Specified by:
setProductSetDescription in interface ProductSetAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetAddCmd
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: ProductSetAddCmd
Sets the XML definition of the product set.
Specified by:
setProductSetXml in interface ProductSetAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetAddCmd
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. -  

setStatic

public void setStatic(java.lang.String newStatic)
Description copied from interface: ProductSetAddCmd
Sets the static value of the product set. A static value of "1" indicates that this product set should not be re-published.
Specified by:
setStatic in interface ProductSetAddCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetAddCmd
Parameters:
newProductSetXml - java.lang.String

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. -