com.ibm.commerce.productset.commands
Class ProductSetPublishCmdImpl

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

public class ProductSetPublishCmdImpl
extends ControllerCommandImpl
implements ProductSetPublishCmd

Publish a product set based on the existing product set definition.

Input parameters:
NameTypeRequirementDescription
productSetIDIntegermandatoryThe product set ID.

Output parameters:
NameTypeDescription

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.
 
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.ProductSetPublishCmd
defaultCommandClassName, NAME
 
Constructor Summary
ProductSetPublishCmdImpl()
          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.
protected  java.lang.Integer getProductSetId()
          Returns the ProductSetId that represents the primary key of the product set.
protected  boolean getPublishAll()
          Returns the publish all flag.
 AccessVector getResources()
          Gets the access vector accessed by this command.
 boolean isExclusion()
          Returns true if the exclusion flag has been set.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void reset()
          This method should be called after a command has been executed to reset its states variables.
 void setExclusion(boolean abExclusion)
          Sets the exclusion flag.
 void setProductSetId(java.lang.Integer anProductSetId)
          Sets the ProductSetId that represents the primary key of the product set.
 void setPublishAll(boolean aPublishAll)
          Sets the publish all flag.
 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, getStoreId, getUser, getUserId, isReadyToCallExecute, 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.
Constructor Detail

ProductSetPublishCmdImpl

public ProductSetPublishCmdImpl()
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

getProductSetId

protected java.lang.Integer getProductSetId()
Returns the ProductSetId that represents the primary key of the product set.
Parameters:
java.lang.Integer -  

getPublishAll

protected boolean getPublishAll()
Returns the publish all flag.
Returns:
boolean

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 on the resource.

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

isExclusion

public boolean isExclusion()
Description copied from interface: ProductSetPublishCmd
Returns true if the exclusion flag has been set.
Specified by:
isExclusion in interface ProductSetPublishCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPublishCmd
Returns:
boolean

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.

reset

public void reset()
Description copied from class: AbstractECTargetableCommand
This method should be called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
Overrides:
reset in class AbstractECTargetableCommand

setExclusion

public void setExclusion(boolean abExclusion)
Description copied from interface: ProductSetPublishCmd
Sets the exclusion flag.
Specified by:
setExclusion in interface ProductSetPublishCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPublishCmd
Parameters:
abExclusion - boolean

setProductSetId

public void setProductSetId(java.lang.Integer anProductSetId)
Description copied from interface: ProductSetPublishCmd
Sets the ProductSetId that represents the primary key of the product set.
Specified by:
setProductSetId in interface ProductSetPublishCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPublishCmd
Parameters:
new - ProductsetId java.lang.Integer

setPublishAll

public void setPublishAll(boolean aPublishAll)
Description copied from interface: ProductSetPublishCmd
Sets the publish all flag.
Specified by:
setPublishAll in interface ProductSetPublishCmd
Following copied from interface: com.ibm.commerce.productset.commands.ProductSetPublishCmd
Parameters:
aPublishAll - boolean

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