com.ibm.commerce.utf.commands
Class CreateRFQBasicInfoCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.utf.commands.CreateRFQBasicInfoCmdImpl
All Implemented Interfaces:
CreateRFQBasicInfoCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CreateRFQBasicInfoCmdImpl
extends TaskCommandImpl
implements CreateRFQBasicInfoCmd

Creates basic RFQ information.

Behaviour

  1. Verifies that the mandatory parameters name , endTime, ownerId and languageId are present.
  2. Verifies that another RFQ with the same name does not exist in the system.
  3. Creates the RFQ object using the values provided for its various fields.

Exception conditions

This is the default implementation of the CreateRFQBasicInfoCmd. This command uses the following AccessBeans:
See Also:
Serialized Form

Field Summary
 java.lang.Integer accessType
          Access Type.
 java.lang.Long accountId
          Account Id.
 java.sql.Timestamp duration
          Duration.
 java.lang.Integer endResult
          End Result.
 java.sql.Timestamp endTime
          End Time.
 java.lang.Integer languageId
          Language Id.
 java.lang.String longdesc
          Long Descritpion.
 java.lang.Integer majorVersion
          Major Version.
 java.lang.Integer markForDelete
          Markfordelete.
 java.lang.Integer minorVersion
          Minor Version.
 java.lang.String name
          RFQ Name.
 java.lang.Long nextOffering
          Next Offering.
 java.lang.Integer nextOfferingType
          Next Offering Type.
 java.lang.Integer numResponses
          Number of Responses.
 java.lang.Long offeringId
          Offering Id.
 java.lang.Long ownerId
          Owner Id.
 java.lang.Long previousOffering
          Previous Offering.
 java.lang.Integer previousOfferingType
          Previous Offering Type.
 java.lang.Integer roundNumber
          Round Number.
 java.lang.Integer ruleType
          Rule Type.
 java.lang.String shortdesc
          Short Descritpion.
 java.lang.Integer stageNumber
          Stage Number.
 java.sql.Timestamp startTime
          Start Time.
 java.lang.Integer state
          RFQ State.
 java.lang.Long tradingEngine
          Trading Engine.
 java.lang.Integer versionflags
          Version Flag.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.utf.commands. CreateRFQBasicInfoCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CreateRFQBasicInfoCmdImpl()
          Default Constructor.
 
Method Summary
 java.lang.Integer getAccessType()
          Retrieves the accesstype of the RFQ.
 java.lang.Long getAccountId()
          Retrieves the account Id.
 java.sql.Timestamp getDuration()
          Retrieves the duration limit between successive responses.
 java.lang.Integer getEndResult()
          Retrieves an integer representing the expected outcome of this RFQ.
 java.sql.Timestamp getEndTime()
          Retrieves RFQ closing time.
 java.lang.Integer getLanguageId()
          Retrieves the identifier of the language in which the RFQ descriptions are being created.
 java.lang.String getLongdesc()
          Retrieves the long description for the RFQ.
 java.lang.Integer getMajorVersion()
          Retrieves the major version number of the RFQ.
 java.lang.Integer getMarkForDelete()
          Retrieves the value of the MarkForDelete flag.
 java.lang.Integer getMinorVersion()
          Retrieves the minor version number of the RFQ.
 java.lang.String getName()
          Retrieves the name of the RFQ.
 java.lang.Long getNextOffering()
          Retrieves the ID of the next offering in the chain, if the RFQ is a part of a multistage business process.
 java.lang.Integer getNextOfferingType()
          Retrieves the type of the next offering in the chain, if the RFQ is a part of a multistage business process.
 java.lang.Integer getNumResponses()
          Retrieves the limit for the number of responses.
 java.lang.Long getOfferingId()
          Retrieves the ID of the created RFQ.
 java.lang.Long getOwnerId()
          Retrieves the ID of the RFQ owner.
 java.lang.Long getPreviousOffering()
          Retrieves the ID of the previous offering in the chain, if the RFQ is a part of a multistage business process.
 java.lang.Integer getPreviousOfferingType()
          Retrieves the type of the previous offering in the chain, if the RFQ is a part of a multistage business process.
  AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.Integer getRoundNumber()
          Retrieves the current round number of the RFQ.
 java.lang.Integer getRuleType()
          Gets the ruleType
 java.lang.String getShortdesc()
          Retrieves a brief description of the RFQ
 java.lang.Integer getStageNumber()
          Retrieves the stage number.
 java.sql.Timestamp getStartTime()
          Retrieves the effective date and time for this RFQ.
 java.lang.Integer getState()
          Retrieves an integer representing the RFQ state.
 java.lang.Long getTradingEngine()
          Retrieves the ID of the trading engine that manages the RFQ.
 java.lang.Integer getVersionflags()
          Gets the versionflags
 void performExecute()           Creates the RFQ object. This method does the following: Creates a new RFQ object. Creates a trading agreement description for this RFQ.
 void reset()
          Reset the command.
 void setAccessType(java.lang.Integer newAccessType)
          Stores the accesstype of the RFQ.
 void setAccountId(java.lang.Long newAccountId)
          Stores the incoming account Id .
 void setDuration(java.sql.Timestamp newDuration)
          Stores the duration limit between successive responses.
 void setEndResult(java.lang.Integer newEndResult)
          Stores an integer representing the expected outcome of this RFQ.
 void setEndTime(java.sql.Timestamp newEndTime)
          Stores the supplied value for the RFQ closing time.
 void setLanguageId(java.lang.Integer newLanguageId)
          Stores the language identifier.
 void setLongdesc(java.lang.String newLongdesc)
          Stores the long description for the RFQ.
 void setMajorVersion(java.lang.Integer newMajorVersion)
          Stores the major version number of the RFQ.
 void setMarkForDelete(java.lang.Integer newMarkForDelete)
          Stores the incoming value for the MarkForDelete flag.
 void setMinorVersion(java.lang.Integer newMinorVersion)
          Stores the minor version number of the RFQ.
 void setName(java.lang.String newName)
          Stores the name of the RFQ.
 void setNextOffering(java.lang.Long newNextOffering)
          Stores the ID of the next offering in the chain, if the RFQ is a part of a multistage business process.
 void setNextOfferingType(java.lang.Integer newNextOfferingType)
          Stores the type of the next offering in the chain, if the RFQ is a part of a multistage business process.
 void setNumResponses(java.lang.Integer newNumResponses)
          Stores the limit for the number of responses.
 void setOfferingId(java.lang.Long newOfferingId)
          Stores the trading agreement ID, which is the RFQ ID.
 void setOwnerId(java.lang.Long newOwnerId)
          Stores the RFQ Owner ID.
 void setPreviousOffering(java.lang.Long newPreviousOffering)
          Stores the ID of the previous offering in the chain, if the RFQ is a part of a multistage business process.
 void setPreviousOfferingType(java.lang.Integer newPreviousOfferingType)
          Stores the type of the previous offering in the chain, if the RFQ is a part of a multistage business process.
 void setRoundNumber(java.lang.Integer newRoundNumber)
          Stores the current round number of the RFQ.
 void setRuleType(java.lang.Integer newRuleType)
          Sets the ruleType
 void setShortdesc(java.lang.String newShortdesc)
          Stores a brief description of the RFQ.
 void setStageNumber(java.lang.Integer newStageNumber)
          Stores the stage number.
 void setStartTime(java.sql.Timestamp newStartTime)
          Stores the effective date and time for this RFQ.
 void setState(java.lang.Integer newState)
          Stores an integer representing the RFQ state.
 void setTradingEngine(java.lang.Long newTradingEngine)
          Stores the ID of the trading engine that manages the RFQ.
 void setVersionflags(java.lang.Integer versionflags)
          Sets the versionflags
 void validateParameters()           Checks for the validity of the incoming parameters. This method does the following: Verifies that a name has been provided for the RFQ. Verifies that the closing date and time has been specified. Verifies that ID of the RFQ owner has been provided. Verifies that a language identifier has been provided.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

public java.lang.Integer state
RFQ State.

markForDelete

public java.lang.Integer markForDelete
Markfordelete.

endTime

public java.sql.Timestamp endTime
End Time.

startTime

public java.sql.Timestamp startTime
Start Time.

languageId

public java.lang.Integer languageId
Language Id.

longdesc

public java.lang.String longdesc
Long Descritpion.

shortdesc

public java.lang.String shortdesc
Short Descritpion.

majorVersion

public java.lang.Integer majorVersion
Major Version.

minorVersion

public java.lang.Integer minorVersion
Minor Version.

name

public java.lang.String name
RFQ Name.

offeringId

public java.lang.Long offeringId
Offering Id.

ownerId

public java.lang.Long ownerId
Owner Id.

roundNumber

public java.lang.Integer roundNumber
Round Number.

stageNumber

public java.lang.Integer stageNumber
Stage Number.

tradingEngine

public java.lang.Long tradingEngine
Trading Engine.

accessType

public java.lang.Integer accessType
Access Type.

duration

public java.sql.Timestamp duration
Duration.

endResult

public java.lang.Integer endResult
End Result.

nextOffering

public java.lang.Long nextOffering
Next Offering.

nextOfferingType

public java.lang.Integer nextOfferingType
Next Offering Type.

numResponses

public java.lang.Integer numResponses
Number of Responses.

previousOffering

public java.lang.Long previousOffering
Previous Offering.

previousOfferingType

public java.lang.Integer previousOfferingType
Previous Offering Type.

ruleType

public java.lang.Integer ruleType
Rule Type.

versionflags

public java.lang.Integer versionflags
Version Flag.

accountId

public java.lang.Long accountId
Account Id.
Constructor Detail

CreateRFQBasicInfoCmdImpl

public CreateRFQBasicInfoCmdImpl()
Default Constructor.
Method Detail

reset

public void reset()
Reset the command.
Overrides:
reset in class AbstractECTargetableCommand

getAccessType

public java.lang.Integer getAccessType()
Retrieves the accesstype of the RFQ.
Returns:
The access type of the RFQ.

getAccountId

public java.lang.Long getAccountId()
Retrieves the account Id.
Returns:
The account Id.

getDuration

public java.sql.Timestamp getDuration()
Retrieves the duration limit between successive responses. Once this duration is past, the RFQ could be set up to close automatically.
Returns:
The duration limit between successive responses.

getEndResult

public java.lang.Integer getEndResult()
Retrieves an integer representing the expected outcome of this RFQ. An RFQ could result in further negotiation, a contract or an order.
Returns:
The end result of the RFQ.

getEndTime

public java.sql.Timestamp getEndTime()
Retrieves RFQ closing time.
Returns:
The RFQ closing time.

getLanguageId

public java.lang.Integer getLanguageId()
Retrieves the identifier of the language in which the RFQ descriptions are being created.
Returns:
The language identifier.

getLongdesc

public java.lang.String getLongdesc()
Retrieves the long description for the RFQ.
Returns:
The RFQ long description.

getMajorVersion

public java.lang.Integer getMajorVersion()
Retrieves the major version number of the RFQ.
Returns:
The RFQ major version number.

getMarkForDelete

public java.lang.Integer getMarkForDelete()
Retrieves the value of the MarkForDelete flag.
Returns:
The value of the MarkForDelete flag. "1" implies the RFQ is marked for delete. It will subsequently be cleaned up by the DBClean utility.

getMinorVersion

public java.lang.Integer getMinorVersion()
Retrieves the minor version number of the RFQ.
Returns:
The RFQ minor version.

getName

public java.lang.String getName()
Retrieves the name of the RFQ.
Returns:
The RFQ name.

getNextOffering

public java.lang.Long getNextOffering()
Retrieves the ID of the next offering in the chain, if the RFQ is a part of a multistage business process.
Returns:
The ID of the offering that follows this RFQ in a multistage business process.

getNextOfferingType

public java.lang.Integer getNextOfferingType()
Retrieves the type of the next offering in the chain, if the RFQ is a part of a multistage business process.
Returns:
The type of the offering that follows this RFQ in a multistage business process.

getNumResponses

public java.lang.Integer getNumResponses()
Retrieves the limit for the number of responses. Once this limit is exceeded, the RFQ could be set up to close automatically.
Returns:
The limit for the number of RFQ responses.

getOfferingId

public java.lang.Long getOfferingId()
Retrieves the ID of the created RFQ.
Specified by:
getOfferingId in interface CreateRFQBasicInfoCmd
Returns:
The new RFQ ID.

getOwnerId

public java.lang.Long getOwnerId()
Retrieves the ID of the RFQ owner.
Returns:
The RFQ owner ID.

getPreviousOffering

public java.lang.Long getPreviousOffering()
Retrieves the ID of the previous offering in the chain, if the RFQ is a part of a multistage business process.
Returns:
The ID of the offering that this RFQ resulted from in a multistage business process.

getPreviousOfferingType

public java.lang.Integer getPreviousOfferingType()
Retrieves the type of the previous offering in the chain, if the RFQ is a part of a multistage business process.
Returns:
The type of the offering that this RFQ resulted from in a multistage business process.

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.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs
Throws:
ECException
ECApplicationException
See Also:
ECCommand#getResources()

getRoundNumber

public java.lang.Integer getRoundNumber()
Retrieves the current round number of the RFQ. Several rounds of an RFQ might be conducted.
Returns:
The current round number of the RFQ.

getShortdesc

public java.lang.String getShortdesc()
Retrieves a brief description of the RFQ
Returns:
The RFQ short description.

getStageNumber

public java.lang.Integer getStageNumber()
Retrieves the stage number. The RFQ belongs to this stage number within a multistage business process.
Returns:
The stage this RFQ belongs to within a multistage business process.

getStartTime

public java.sql.Timestamp getStartTime()
Retrieves the effective date and time for this RFQ.
Returns:
The RFQ start date and time.

getState

public java.lang.Integer getState()
Retrieves an integer representing the RFQ state.
Returns:
The RFQ state represented by an integer.

getTradingEngine

public java.lang.Long getTradingEngine()
Retrieves the ID of the trading engine that manages the RFQ.
Returns:
The ID of the trading engine.

performExecute

public void performExecute()
                    throws ECException
Creates the RFQ object. This method does the following:
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECApplicationException - If an application error occurs while creating the RFQ.
ECSystemException - If a system error occurs while creating the RFQ.
ECException
See Also:
ECCommand#performExecute()

setAccessType

public void setAccessType(java.lang.Integer newAccessType)
Stores the accesstype of the RFQ.
Specified by:
setAccessType in interface CreateRFQBasicInfoCmd
Parameters:
newAccessType - The access type of the RFQ. The access type could be private or public.

setAccountId

public void setAccountId(java.lang.Long newAccountId)
Stores the incoming account Id .
Specified by:
setAccountId in interface CreateRFQBasicInfoCmd
Parameters:
newAccountId - The account Id.

setDuration

public void setDuration(java.sql.Timestamp newDuration)
Stores the duration limit between successive responses. Once this duration is past, it could be so set up that the RFQ automatically closes.
Specified by:
setDuration in interface CreateRFQBasicInfoCmd
Parameters:
newDuration - The duration limit between successive responses.

setEndResult

public void setEndResult(java.lang.Integer newEndResult)
Stores an integer representing the expected outcome of this RFQ. An RFQ could result in further negotiation, a contract or an order.
Specified by:
setEndResult in interface CreateRFQBasicInfoCmd
Parameters:
newEndResult - The end result of the RFQ.

setEndTime

public void setEndTime(java.sql.Timestamp newEndTime)
Stores the supplied value for the RFQ closing time.
Specified by:
setEndTime in interface CreateRFQBasicInfoCmd
Parameters:
newEndTime - The closing date and time of the RFQ.

setLanguageId

public void setLanguageId(java.lang.Integer newLanguageId)
Stores the language identifier.
Specified by:
setLanguageId in interface CreateRFQBasicInfoCmd
Parameters:
newLanguageId - The language iudentifier.

setLongdesc

public void setLongdesc(java.lang.String newLongdesc)
Stores the long description for the RFQ.
Specified by:
setLongdesc in interface CreateRFQBasicInfoCmd
Parameters:
newLongdesc - The RFQ long description.

setMajorVersion

public void setMajorVersion(java.lang.Integer newMajorVersion)
Stores the major version number of the RFQ.
Specified by:
setMajorVersion in interface CreateRFQBasicInfoCmd
Parameters:
newMajorVersion - The major version number.

setMarkForDelete

public void setMarkForDelete(java.lang.Integer newMarkForDelete)
Stores the incoming value for the MarkForDelete flag.
Specified by:
setMarkForDelete in interface CreateRFQBasicInfoCmd
Parameters:
newMarkForDelete - The value of the MarkForDelete flag. "1" implies the RFQ is marked for delete. It will subsequently be cleaned up by the DBClean utility.

setMinorVersion

public void setMinorVersion(java.lang.Integer newMinorVersion)
Stores the minor version number of the RFQ.
Specified by:
setMinorVersion in interface CreateRFQBasicInfoCmd
Parameters:
newMinorVersion - java.lang.Integer

setName

public void setName(java.lang.String newName)
Stores the name of the RFQ.
Specified by:
setName in interface CreateRFQBasicInfoCmd
Parameters:
newName - The RFQ name.

setNextOffering

public void setNextOffering(java.lang.Long newNextOffering)
Stores the ID of the next offering in the chain, if the RFQ is a part of a multistage business process.
Specified by:
setNextOffering in interface CreateRFQBasicInfoCmd
Parameters:
newNextOffering - The ID of the offering that results from this RFQ in a multistage process.

setNextOfferingType

public void setNextOfferingType(java.lang.Integer newNextOfferingType)
Stores the type of the next offering in the chain, if the RFQ is a part of a multistage business process.
Specified by:
setNextOfferingType in interface CreateRFQBasicInfoCmd
Parameters:
newNextOfferingType - The type of the offering that follows this RFQ in a multistage process.

setNumResponses

public void setNumResponses(java.lang.Integer newNumResponses)
Stores the limit for the number of responses. If specified, once this limit is exceeded, the RFQ could be set up to close automatically.
Specified by:
setNumResponses in interface CreateRFQBasicInfoCmd
Parameters:
newNumResponses - The limit for the number of RFQ responses.

setOfferingId

public void setOfferingId(java.lang.Long newOfferingId)
Stores the trading agreement ID, which is the RFQ ID.
Specified by:
setOfferingId in interface CreateRFQBasicInfoCmd

setOwnerId

public void setOwnerId(java.lang.Long newOwnerId)
Stores the RFQ Owner ID.
Specified by:
setOwnerId in interface CreateRFQBasicInfoCmd
Parameters:
newOwnerId - The ID of the RFQ owner.

setPreviousOffering

public void setPreviousOffering(java.lang.Long newPreviousOffering)
Stores the ID of the previous offering in the chain, if the RFQ is a part of a multistage business process.
Specified by:
setPreviousOffering in interface CreateRFQBasicInfoCmd
Parameters:
newPreviousOffering - The ID of the offering that this RFQ resulted from in a multistage process.

setPreviousOfferingType

public void setPreviousOfferingType(java.lang.Integer newPreviousOfferingType)
Stores the type of the previous offering in the chain, if the RFQ is a part of a multistage business process.
Specified by:
setPreviousOfferingType in interface CreateRFQBasicInfoCmd
Parameters:
newPreviousOfferingType - The type of the offering that this RFQ resulted from in a multistage process.

setRoundNumber

public void setRoundNumber(java.lang.Integer newRoundNumber)
Stores the current round number of the RFQ. Several rounds of an RFQ might be conducted.
Specified by:
setRoundNumber in interface CreateRFQBasicInfoCmd
Parameters:
newRoundNumber - The current rounD number of the RFQ.

setShortdesc

public void setShortdesc(java.lang.String newShortdesc)
Stores a brief description of the RFQ.
Specified by:
setShortdesc in interface CreateRFQBasicInfoCmd
Parameters:
newShortdesc - The RFQ short description.

setStageNumber

public void setStageNumber(java.lang.Integer newStageNumber)
Stores the stage number. The RFQ belongs to this stage number within a multistage business process.
Specified by:
setStageNumber in interface CreateRFQBasicInfoCmd
Parameters:
newStageNumber - The stage this RFQ belongs to within a multistage business process.

setStartTime

public void setStartTime(java.sql.Timestamp newStartTime)
Stores the effective date and time for this RFQ.
Specified by:
setStartTime in interface CreateRFQBasicInfoCmd
Parameters:
newStartTime - The RFQ start date and time.

setState

public void setState(java.lang.Integer newState)
Stores an integer representing the RFQ state.
Specified by:
setState in interface CreateRFQBasicInfoCmd
Parameters:
newState - The RFQ state represented by an integer.

setTradingEngine

public void setTradingEngine(java.lang.Long newTradingEngine)
Stores the ID of the trading engine that manages the RFQ.
Specified by:
setTradingEngine in interface CreateRFQBasicInfoCmd
Parameters:
newTradingEngine - The ID of the trading engine.

validateParameters

public void validateParameters()
                        throws ECException
Checks for the validity of the incoming parameters. This method does the following:
  1. Verifies that a name has been provided for the RFQ.
  2. Verifies that the closing date and time has been specified.
  3. Verifies that ID of the RFQ owner has been provided.
  4. Verifies that a language identifier has been provided. The language identifier determines the language in which the descriptions are being stored.
  5. Verifies that the RFQ name is not in use already.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException -
  • If the name has not been provided.
  • If the closing date and time has not been provided.
  • If the owner ID has not been provided.
  • If the language identifier has not been provided.
  • If the RFQ name is found to be a duplicate.
ECException
See Also:
ECCommand#validateParameters()

getRuleType

public java.lang.Integer getRuleType()
Gets the ruleType
Returns:
Returns a java.lang.Integer

setRuleType

public void setRuleType(java.lang.Integer newRuleType)
Sets the ruleType
Specified by:
setRuleType in interface CreateRFQBasicInfoCmd
Parameters:
newRuleType - The type of closing rule to close an RFQ.

getVersionflags

public java.lang.Integer getVersionflags()
Gets the versionflags
Returns:
Returns a java.lang.Integer

setVersionflags

public void setVersionflags(java.lang.Integer versionflags)
Sets the versionflags
Specified by:
setVersionflags in interface CreateRFQBasicInfoCmd
Parameters:
versionflags - The versionflags to set