com.ibm.commerce.contract.commands
Class UpdateContractCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.contract.commands.UpdateContractCmdImpl
All Implemented Interfaces:
ECCommand, TaskCommand, UpdateContractCmd

public class UpdateContractCmdImpl
extends TaskCommandImpl
implements UpdateContractCmd

Update a contract based on the given Contract element (WebSphere Commerce Business Edition only). Calling commands: ContractSave, ContractUpdate


Field Summary
static java.lang.String CLASSNAME
           
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.contract.commands.UpdateContractCmd
defaultCommandClassName, NAME
 
Constructor Summary
UpdateContractCmdImpl()
          ContractCreateCommand constructor comment.
 
Method Summary
 java.lang.Long getContractId()
          Return id of the updated contract
 java.lang.Integer getContractState()
          Return state of the updated contract
 java.lang.String getContractTitle()
          Return title of the updated contract
 AccessVector getResources()
          Gets the access vector accessed by this command.
 void parseXMLDocument()
          parse the contract XML document
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setContractDescriptionElement(org.w3c.dom.Element newContractDescriptionElement)
          Set Contract Description Element
 void setContractElement(org.w3c.dom.Element contractElement)
          Set Contract Element
 void setContractId(java.lang.Long newContractId)
          Set the id of the contract to update
 void setContractName(java.lang.String newContractName)
          Set the name of the contract
 void setContractOrigin(java.lang.String origin)
          Set the origin of the contract
 void setContractOwner(java.lang.String owner)
          Set the owner of the contract
 void setContractState(java.lang.Integer anContractState)
          Set the state of the contract
 void setContractState(java.lang.String newContractState)
          Set the state of the contract
 void setContractTitle(java.lang.String newContractTitle)
          Set the title of the contract
 void setLanguageId(java.lang.Integer newLangId)
          Set the language id parameter
 void setTermConditionId(java.lang.Long newTcId)
          Set the id of the term and condition
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
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.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

UpdateContractCmdImpl

public UpdateContractCmdImpl()
ContractCreateCommand constructor comment.
Method Detail

getContractId

public java.lang.Long getContractId()
Return id of the updated contract
Specified by:
getContractId in interface UpdateContractCmd
Returns:
java.lang.Long

getContractState

public java.lang.Integer getContractState()
Return state of the updated contract
Returns:
java.lang.Integer

getContractTitle

public java.lang.String getContractTitle()
Return title of the updated contract
Returns:
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 AbstractECCommand
Returns:
AccessVector - a vector of resource action pairs

parseXMLDocument

public void parseXMLDocument()
parse the contract XML document

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 AbstractECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

setContractDescriptionElement

public void setContractDescriptionElement(org.w3c.dom.Element newContractDescriptionElement)
Set Contract Description Element
Parameters:
newContractDescriptionElement - org.w3c.dom.Element

setContractElement

public void setContractElement(org.w3c.dom.Element contractElement)
Set Contract Element
Specified by:
setContractElement in interface UpdateContractCmd
Parameters:
contractElement - org.w3c.dom.Element

setContractId

public void setContractId(java.lang.Long newContractId)
Description copied from interface: UpdateContractCmd
Set the id of the contract to update
Specified by:
setContractId in interface UpdateContractCmd
Following copied from interface: com.ibm.commerce.contract.commands.UpdateContractCmd
Parameters:
contractId - java.lang.Long

setContractName

public void setContractName(java.lang.String newContractName)
Set the name of the contract
Parameters:
newContractName - java.lang.String

setContractOrigin

public void setContractOrigin(java.lang.String origin)
Set the origin of the contract
Parameters:
origin - java.lang.String

setContractOwner

public void setContractOwner(java.lang.String owner)
Set the owner of the contract
Parameters:
owner - java.lang.String

setContractState

public void setContractState(java.lang.Integer anContractState)
Set the state of the contract
Parameters:
anContractState - java.lang.Integer

setContractState

public void setContractState(java.lang.String newContractState)
Set the state of the contract
Parameters:
newContractState - java.lang.String

setContractTitle

public void setContractTitle(java.lang.String newContractTitle)
Set the title of the contract
Parameters:
newContractTitle - java.lang.String

setLanguageId

public void setLanguageId(java.lang.Integer newLangId)
Set the language id parameter
Parameters:
newLangId - java.lang.Integer

setTermConditionId

public void setTermConditionId(java.lang.Long newTcId)
Description copied from interface: UpdateContractCmd
Set the id of the term and condition
Specified by:
setTermConditionId in interface UpdateContractCmd
Following copied from interface: com.ibm.commerce.contract.commands.UpdateContractCmd
Parameters:
tcId - java.lang.Long

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