atg.commerce.fulfillment.processor
Class ProcCreateElectronicGood
java.lang.Object
atg.commerce.fulfillment.processor.ProcCreateElectronicGood
- All Implemented Interfaces:
- PipelineProcessor
public class ProcCreateElectronicGood
- extends java.lang.Object
- implements PipelineProcessor
This processor allocates an electronic item by calling the ClaimableManager
Field Summary |
static java.lang.String |
CLASS_VERSION
Class version string |
Method Summary |
protected RepositoryItem |
createElectronicGood(ElectronicFulfiller of,
java.lang.Double pAmount,
java.lang.Double pAmountRemaining,
java.lang.String pPurchaserId,
java.util.Date pPurchaseDate)
This method is used to create the electronic good that is being
fulfilled. |
int[] |
getRetCodes()
Returns the valid return codes
1 - The processor completed |
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
Allocates an electronic item by calling the ClaimableManager
This method requires that an Order and OrderFulfiller object be supplied
in pParam in a HashMap. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
ProcCreateElectronicGood
public ProcCreateElectronicGood()
getRetCodes
public int[] getRetCodes()
- Returns the valid return codes
1 - The processor completed
- Specified by:
getRetCodes
in interface PipelineProcessor
- Returns:
- an integer array of the valid return codes.
runProcess
public int runProcess(java.lang.Object pParam,
PipelineResult pResult)
throws java.lang.Exception
- Allocates an electronic item by calling the ClaimableManager
This method requires that an Order and OrderFulfiller object be supplied
in pParam in a HashMap. Use the PipelineConstants class' static members to key
the objects in the HashMap.
- Specified by:
runProcess
in interface PipelineProcessor
- Parameters:
pParam
- a HashMap which must contain an Order and OrderFulfiller objectpResult
- a PipelineResult object which stores any information which must
be returned from this method invokation
- Returns:
- an integer specifying the processor's return code
- Throws:
java.lang.Exception
- throws any exception back to the caller- See Also:
PipelineProcessor.runProcess(Object, PipelineResult)
createElectronicGood
protected RepositoryItem createElectronicGood(ElectronicFulfiller of,
java.lang.Double pAmount,
java.lang.Double pAmountRemaining,
java.lang.String pPurchaserId,
java.util.Date pPurchaseDate)
throws CommerceException
- This method is used to create the electronic good that is being
fulfilled. In this implementation that means create a gift certificate
in the claimable repository. The gift certificate will then be initialized
with the specified amount, amountRemaining, purchaserId and date.
- Parameters:
pAmount
- the amount of the gift certificatepAmountRemaining
- the amount left on a gift certificatepPurchaserId
- profile id of the person who purchased the gift certificatepPurchaseDate
- the date the gift certificate was purchased
- Returns:
- the created electronic good
- Throws:
CommerceException
- if an error occurs