com.ibm.commerce.contract.commands
Class CreateContractCmdImpl

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

public class CreateContractCmdImpl
extends TaskCommandImpl
implements CreateContractCmd

Create a contract based on the given Contract element (WebSphere Commerce Business Edition only). Calling commands: ContractSave, ContractCreate, ContractImportApprovedVersion, ContractImportDraftVersion.


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.CreateContractCmd
defaultCommandClassName, NAME
 
Constructor Summary
CreateContractCmdImpl()
          ContractCreateCommand constructor comment.
 
Method Summary
 java.lang.Long getContractId()
          Return id of the new contract
 java.lang.Integer getContractState()
          Return state of the new contract
 java.lang.String getContractTitle()
          Return title of the new 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 setContractDescription(java.lang.String description)
          Set the description of the contract.
 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.
 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 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

CreateContractCmdImpl

public CreateContractCmdImpl()
ContractCreateCommand constructor comment.
Method Detail

getContractId

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

getContractState

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

getContractTitle

public java.lang.String getContractTitle()
Return title of the new 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.

setContractDescription

public void setContractDescription(java.lang.String description)
Set the description of the contract.
Parameters:
description - java.lang.String

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 CreateContractCmd
Parameters:
contractElement - org.w3c.dom.Element

setContractId

public void setContractId(java.lang.Long newContractId)
Set the id of the contract.
Parameters:
newContractId - java.lang.Long

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

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