|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.promotion.PromotionTools
public class PromotionTools
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
COPIED_DURING_LOGIN
|
protected ComponentName |
mUserPricingModelHolderPath
|
static java.lang.String |
REVOKED_DURING_LOGIN
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
PromotionTools()
|
Method Summary | |
---|---|
void |
addAllPromotions(MutableRepositoryItem pProfile,
java.util.Collection pPromotions)
Adds all of the promotions in the collection to the user's activePromotion attribute value. |
void |
addAllPromotions(MutableRepositoryItem pProfile,
java.util.Collection pPromotions,
java.lang.String pComment)
Adds all of the promotions in the collection to the user's activePromotion attribute value. |
boolean |
addPromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion)
Adds the promotion to the user's activePromotion attribute value. |
boolean |
addPromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion,
java.lang.String pComment)
Adds the promotion to the user's activePromotion attribute value. |
java.util.Map |
calculatePromotionsForOrder(Order pOrder)
This method will return a map containing the count of promotions contained in the given order, and the total value of those promotions |
boolean |
checkPromotionExpiration(RepositoryItem pPromotion,
java.util.Date pNow)
Return true if the promotion or the promotionStatus has expired and should not be used in pricing. |
boolean |
consumePromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion)
This method moves a promotion from the user's activePromotions list to their usedPromotions list. |
java.util.Collection |
convertPromoStatusToPromo(java.util.Collection pPromoStatuses)
|
RepositoryItem |
createPromotionStatus(RepositoryItem pProfile,
RepositoryItem pPromotion,
java.lang.Integer pNumUses)
This method creates a PromotionStatus repository item and returns it. |
void |
expirePromotion(RepositoryItem pPromotion,
RepositoryItem pProfile)
This method will remove the passed in promotion from the Profile. |
java.lang.String |
getActivePromotionsProperty()
Property of the profile to which we add new promotions |
java.lang.String |
getAddItemEventPipeline()
The name of the pipeline used to send the ScenarioAddedItemToOrder event Defaults to PipelineConstants.SENDSCENARIOEVENT |
java.lang.String |
getAllowMultipleProperty()
Property name of the 'allowMultiple' property in the promotion |
java.lang.String[] |
getAlternateUserPricingModelHolderPaths()
Returns property AlternateUserPricingModelHolderPaths |
java.lang.String |
getBasePromotionItemType()
Returns property BasePromotionItemType |
GetService |
getGetService()
The tool used to convert promotions to xml in getPromotionsAsXML |
java.lang.String |
getGiveToAnonymousProfilesProperty()
Property name of the 'giveToAnonymousProfiles' property in the promotion |
void |
getItemPromotions(CommerceItem pItem,
java.util.Collection pPromotions)
Returns the promotions used in the CommerceItem. |
void |
getItemPromotions(CommerceItem pItem,
java.util.Collection pPromotions,
boolean pGetAdjustments)
Returns the promotions used in the CommerceItem. |
java.lang.String |
getMappingFileName()
The name of the mapping file that describes the XML format for getPromotionsAsXML |
void |
getOrderPromotions(Order pOrder,
java.util.Collection pPromotions)
Returns the promotions used in the order. |
void |
getOrderPromotions(Order pOrder,
java.util.Collection pPromotions,
boolean pGetAdjustments)
Returns the promotions used in the order. |
void |
getOrderPromotions(Order pOrder,
java.util.Collection pOrderPromotions,
java.util.Collection pTaxPromotions,
java.util.Collection pItemPromotions,
java.util.Collection pShippingPromotions)
This method retrieves all the promotions in an order and adds them to their respective collection. |
void |
getOrderPromotions(Order pOrder,
java.util.Collection pOrderPromotions,
java.util.Collection pTaxPromotions,
java.util.Collection pItemPromotions,
java.util.Collection pShippingPromotions,
boolean pGetAdjustments)
This method retrieves all the promotions in an order and adds them to their respective collection. |
PipelineManager |
getPipelineManager()
The PipelineManager is used to run the pipeline process that sends scenario events |
PricingModelProperties |
getPricingModelProperties()
Returns a bean that contains properties for a PricingModel |
PricingTools |
getPricingTools()
Return the PricingTools component |
RepositoryItem |
getProfile(java.lang.String pProfileId)
Gets the profile repository item with the given id |
java.lang.String |
getProfileItemType()
|
MutableRepository |
getProfileRepository()
Return the editable profile repository |
java.lang.String |
getPromoStatusDescriptorName()
Returns the descriptor name for the promoStatus descriptor |
java.lang.String |
getPromoStatusNumUsesProperty()
Returns the promoStatus num_uses property name |
java.lang.String |
getPromoStatusProfileIdProperty()
Returns the promoStatus profile id property name |
java.lang.String |
getPromoStatusPromoProperty()
Returns the promoStatus promo property name |
int |
getPromotionCount(Order pOrder,
RepositoryItem pPromotion)
Returns the number of times a promotion appears in the order. |
MessageSender |
getPromotionGrantedMessageSender()
Gets property MessageSender. |
MessageSender |
getPromotionRevokedMessageSender()
Gets property PromotionRevokedMessageSender. |
Repository |
getPromotions()
Returns property Promotions |
java.util.Collection |
getPromotions(java.lang.String pProfileId)
This method will look up the given profile and return all of the available promotions for that user. |
java.lang.String[] |
getPromotionsAsXML(java.lang.String pProfileId)
This method will look up the given profile, and for each available promotion, will return an xml representation of it using the GetService and the mappingFileName . |
void |
getShippingPromotions(ShippingGroup pGroup,
java.util.Collection pPromotions)
Returns the promotions used in the ShippingGroup. |
void |
getShippingPromotions(ShippingGroup pGroup,
java.util.Collection pPromotions,
boolean pGetAdjustments)
Returns the promotions used in the ShippingGroup. |
void |
getTaxPromotions(Order pOrder,
java.util.Collection pPromotions)
Returns the promotions used in the tax calculation. |
void |
getTaxPromotions(Order pOrder,
java.util.Collection pPromotions,
boolean pGetAdjustments)
Returns the promotions used in the tax calculation. |
java.lang.String |
getUsedPromotionsProperty()
Property of the profile to which we add consumed promotions |
java.lang.String |
getUserPricingModelHolderPath()
Returns property UserPricingModelHolderPath |
java.lang.String |
getUsesProperty()
Returns the usesProperty |
void |
grantPromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion)
Adds the given promotion to the user's "activePromotions" list. |
void |
grantPromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion,
java.lang.String pComment)
Adds the given promotion to the user's "activePromotions" list. |
void |
grantPromotion(java.lang.String pProfileId,
java.lang.String pPromotionId)
Adds the given promotion to the user's "activePromotions" list. |
void |
grantPromotion(java.lang.String pProfileId,
java.lang.String pPromotionId,
java.lang.String pComment)
Adds the given promotion to the user's "activePromotions" list. |
void |
initializePricingModels()
Initialize the set of pricing models/promotions that a user currently holds while having an active session. |
void |
initializePricingModels(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Initialize the set of pricing models/promotions that a user currently holds while having an active session. |
boolean |
isFirePromotionGrantedEvent()
Gets property FirePromotionGrantedEvent |
boolean |
isFirePromotionRevokedEvent()
Gets property FirePromotionRevokedEvent |
boolean |
isSendEventOnAddItem()
If this is true, then the ScenarioAddedItemToCart event will be sent If this is false, then the ScenarioAddedItemToCart event will not be sent. |
boolean |
removePromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion,
boolean pRemoveAll)
Removes the passed in promotion pPromotion from the pProfile's list of active promotions. |
boolean |
revokePromotion(MutableRepositoryItem pProfile,
RepositoryItem pPromotion,
boolean pRemoveAll)
Removes the passed in promotion pPromotion from the pProfile's list of active promotions. |
boolean |
revokePromotion(java.lang.String pProfileId,
java.lang.String pPromotionId,
boolean pRemoveAllInstances)
Removes the passed in promotion pPromotion from the pProfile's list of active promotions. |
boolean |
scenarioAddedItemToOrder(Order pOrder,
CommerceItem pItem,
long pQuantity)
This method is called by the AddItemToOrder scenario action. |
void |
sendPromotionGrantedEvent(MutableRepositoryItem pProfile,
RepositoryItem pPromotion)
Sends an PromotionGranted Event through the PromotionGrantedMessageSender if FirePromotionGrantedEvent is set to true. |
void |
sendPromotionGrantedEvent(MutableRepositoryItem pProfile,
RepositoryItem pPromotion,
java.lang.String pComment)
Sends an PromotionGranted Event through the PromotionGrantedMessageSender if FirePromotionGrantedEvent is set to true. |
void |
sendPromotionRevokedEvent(RepositoryItem pProfile,
RepositoryItem pPromotion)
Sends a PromotionRevoked Event through the PromotionRevokedMessageSender if FirePromotionRevokedEvent is set to true. |
void |
sendPromotionRevokedEvent(RepositoryItem pProfile,
RepositoryItem pPromotion,
java.lang.String pComment)
Sends a PromotionRevoked Event through the PromotionRevokedMessageSender if FirePromotionRevokedEvent is set to true. |
void |
setActivePromotionsProperty(java.lang.String pActivePromotionsProperty)
|
void |
setAddItemEventPipeline(java.lang.String pAddItemEventPipeline)
|
void |
setAllowMultipleProperty(java.lang.String pAllowMultipleProperty)
|
void |
setAlternateUserPricingModelHolderPaths(java.lang.String[] pAlternateUserPricingModelHolderPaths)
Sets property AlternateUserPricingModelHolderPaths |
void |
setBasePromotionItemType(java.lang.String pBasePromotionItemType)
Sets property BasePromotionItemType |
void |
setFirePromotionGrantedEvent(boolean pFirePromotionGrantedEvent)
Sets property FirePromotionGrantedEvent |
void |
setFirePromotionRevokedEvent(boolean pFirePromotionRevokedEvent)
Sets property FirePromotionRevokedEvent |
void |
setGetService(GetService pGetService)
|
void |
setGiveToAnonymousProfilesProperty(java.lang.String pGiveToAnonymousProfilesProperty)
|
void |
setMappingFileName(java.lang.String pMappingFileName)
|
void |
setPipelineManager(PipelineManager pPipelineManager)
|
void |
setPricingModelProperties(PricingModelProperties pPricingModelProperties)
|
void |
setPricingTools(PricingTools pPricingTools)
|
void |
setProfileItemType(java.lang.String pProfileItemType)
|
void |
setProfileRepository(MutableRepository pProfileRepository)
|
void |
setPromoStatusDescriptorName(java.lang.String pPromoStatusDescriptorName)
|
void |
setPromoStatusNumUsesProperty(java.lang.String pPromoStatusNumUsesProperty)
|
void |
setPromoStatusProfileIdProperty(java.lang.String pPromoStatusProfileIdProperty)
|
void |
setPromoStatusPromoProperty(java.lang.String pPromoStatusPromoProperty)
|
void |
setPromotionGrantedMessageSender(MessageSender pPromotionGrantedMessageSender)
Sets property PromotionGrantedMessageSender. |
void |
setPromotionRevokedMessageSender(MessageSender pPromotionRevokedMessageSender)
Sets property PromotionRevokedMessageSender. |
void |
setPromotions(Repository pPromotions)
Sets property Promotions |
void |
setSendEventOnAddItem(boolean pSendEventOnAddItem)
|
void |
setUsedPromotionsProperty(java.lang.String pUsedPromotionsProperty)
|
void |
setUserPricingModelHolderPath(java.lang.String pUserPricingModelHolderPath)
Sets property UserPricingModelHolderPath |
void |
setUsesProperty(java.lang.String pUsesProperty)
Sets the usesProperty |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String COPIED_DURING_LOGIN
public static final java.lang.String REVOKED_DURING_LOGIN
protected ComponentName mUserPricingModelHolderPath
Constructor Detail |
---|
public PromotionTools()
Method Detail |
---|
public void setFirePromotionGrantedEvent(boolean pFirePromotionGrantedEvent)
public boolean isFirePromotionGrantedEvent()
public void setFirePromotionRevokedEvent(boolean pFirePromotionRevokedEvent)
public boolean isFirePromotionRevokedEvent()
public void setPromotionGrantedMessageSender(MessageSender pPromotionGrantedMessageSender)
public MessageSender getPromotionGrantedMessageSender()
public void setPromotionRevokedMessageSender(MessageSender pPromotionRevokedMessageSender)
public MessageSender getPromotionRevokedMessageSender()
public void setPipelineManager(PipelineManager pPipelineManager)
public PipelineManager getPipelineManager()
public void setSendEventOnAddItem(boolean pSendEventOnAddItem)
public boolean isSendEventOnAddItem()
public void setAddItemEventPipeline(java.lang.String pAddItemEventPipeline)
public java.lang.String getAddItemEventPipeline()
public void setPricingModelProperties(PricingModelProperties pPricingModelProperties)
public PricingModelProperties getPricingModelProperties()
public void setActivePromotionsProperty(java.lang.String pActivePromotionsProperty)
public java.lang.String getActivePromotionsProperty()
public void setUsedPromotionsProperty(java.lang.String pUsedPromotionsProperty)
public java.lang.String getUsedPromotionsProperty()
public void setAllowMultipleProperty(java.lang.String pAllowMultipleProperty)
public java.lang.String getAllowMultipleProperty()
public void setGiveToAnonymousProfilesProperty(java.lang.String pGiveToAnonymousProfilesProperty)
public java.lang.String getGiveToAnonymousProfilesProperty()
public void setUsesProperty(java.lang.String pUsesProperty)
public java.lang.String getUsesProperty()
public void setPromoStatusDescriptorName(java.lang.String pPromoStatusDescriptorName)
public java.lang.String getPromoStatusDescriptorName()
public void setPromoStatusProfileIdProperty(java.lang.String pPromoStatusProfileIdProperty)
public java.lang.String getPromoStatusProfileIdProperty()
public void setPromoStatusNumUsesProperty(java.lang.String pPromoStatusNumUsesProperty)
public java.lang.String getPromoStatusNumUsesProperty()
public void setPromoStatusPromoProperty(java.lang.String pPromoStatusPromoProperty)
public java.lang.String getPromoStatusPromoProperty()
public void setProfileRepository(MutableRepository pProfileRepository)
public MutableRepository getProfileRepository()
public void setProfileItemType(java.lang.String pProfileItemType)
public java.lang.String getProfileItemType()
public void setPricingTools(PricingTools pPricingTools)
public PricingTools getPricingTools()
public void setPromotions(Repository pPromotions)
public Repository getPromotions()
public void setBasePromotionItemType(java.lang.String pBasePromotionItemType)
public java.lang.String getBasePromotionItemType()
public void setUserPricingModelHolderPath(java.lang.String pUserPricingModelHolderPath)
public java.lang.String getUserPricingModelHolderPath()
public void setAlternateUserPricingModelHolderPaths(java.lang.String[] pAlternateUserPricingModelHolderPaths)
public java.lang.String[] getAlternateUserPricingModelHolderPaths()
public void setGetService(GetService pGetService)
public GetService getGetService()
getPromotionsAsXML
public void setMappingFileName(java.lang.String pMappingFileName)
public java.lang.String getMappingFileName()
getPromotionsAsXML
public RepositoryItem createPromotionStatus(RepositoryItem pProfile, RepositoryItem pPromotion, java.lang.Integer pNumUses) throws RepositoryException
pProfile
- - the profile of the user for whom the promotion status is being created.pPromotion
- - the promotion to be added.pNumUses
- - the number of uses that this promotion can have.
RepositoryException
public void initializePricingModels() throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void initializePricingModels(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public boolean checkPromotionExpiration(RepositoryItem pPromotion, java.util.Date pNow)
pPromotion
- the promotion that should be verifiedpNow
- the current date
public void addAllPromotions(MutableRepositoryItem pProfile, java.util.Collection pPromotions)
public void addAllPromotions(MutableRepositoryItem pProfile, java.util.Collection pPromotions, java.lang.String pComment)
pProfile
- The profile being modifiedpPromotion
- The promotion being addedpComment
- And extra string describe this event.public boolean addPromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion)
pProfile
- The profile being modifiedpPromotion
- The promotion being added
public boolean addPromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion, java.lang.String pComment)
pProfile
- The profile being modifiedpPromotion
- The promotion being addedpComment
- And extra string describe this event.
public void grantPromotion(java.lang.String pProfileId, java.lang.String pPromotionId) throws atg.commerce.promotion.PromotionException
pProfileId
- pPromotionId
-
PromotionException
- Thrown if the promotion can't be added for some reason
(e.g. the promotion is expired, the user already had the promotion)public void grantPromotion(java.lang.String pProfileId, java.lang.String pPromotionId, java.lang.String pComment) throws atg.commerce.promotion.PromotionException
pProfileId
- The profile gaining the promotionpPromotionId
- The promotion being addedpComment
- And extra string describe this event.
PromotionException
- Thrown if the promotion can't be added for some reason
(e.g. the promotion is expired, the user already had the promotion)public void grantPromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion) throws atg.commerce.promotion.PromotionException
pProfile
- pPromotion
-
PromotionException
- Thrown if the promotion can't be added for some reason
(e.g. the promotion is expired, the user already had the promotion)public void grantPromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion, java.lang.String pComment) throws atg.commerce.promotion.PromotionException
pProfile
- The profile gaining the promotionpPromotion
- The promotion being addedpComment
- And extra string describe this event.
PromotionException
- Thrown if the promotion can't be added for some reason
(e.g. the promotion is expired, the user already had the promotion)public void sendPromotionGrantedEvent(MutableRepositoryItem pProfile, RepositoryItem pPromotion)
pProfile
- the user's profile to record with the eventpPromotion
- pPromotion the promotion to record with the eventpublic void sendPromotionGrantedEvent(MutableRepositoryItem pProfile, RepositoryItem pPromotion, java.lang.String pComment)
pProfile
- the user's profile to record with the eventpPromotion
- pPromotion the promotion to record with the eventpComment
- An extra comment describing the evengpublic void sendPromotionRevokedEvent(RepositoryItem pProfile, RepositoryItem pPromotion)
pProfile
- the user's profile to record with the eventpPromotion
- pPromotion the promotion to record with the eventpublic void sendPromotionRevokedEvent(RepositoryItem pProfile, RepositoryItem pPromotion, java.lang.String pComment)
pProfile
- the user's profile to record with the eventpPromotion
- pPromotion the promotion to record with the eventpComment
- An extra comment describing the eventpublic boolean consumePromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion)
pProfile
- the user's profilepPromotion
- the promotion to consume
public boolean removePromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion, boolean pRemoveAll)
pProfile
- - the profile of the user from whom the promotion will be taken outpPromotion
- - the promotion to be removedpRemoveAll
- - true if all instances of this promotion should be removed, false otherwise
public boolean revokePromotion(java.lang.String pProfileId, java.lang.String pPromotionId, boolean pRemoveAllInstances) throws atg.commerce.promotion.PromotionException
pProfileId
- - the profile of the user from whom the promotion will be taken outpPromotionId
- - the promotion to be removedpRemoveAll
- - true if all instances of this promotion should be removed, false otherwise
PromotionException
- if the promotion could not be removed.public boolean revokePromotion(MutableRepositoryItem pProfile, RepositoryItem pPromotion, boolean pRemoveAll) throws atg.commerce.promotion.PromotionException
pProfile
- - the profile of the user from whom the promotion will be taken outpPromotion
- - the promotion to be removedpRemoveAll
- - true if all instances of this promotion should be removed, false otherwise
PromotionException
- if the promotion could not be removed.public void getOrderPromotions(Order pOrder, java.util.Collection pPromotions)
pOrder
- the order that the promotions are inpPromotions
- a collection that the promotions are to be added topublic void getTaxPromotions(Order pOrder, java.util.Collection pPromotions)
pOrder
- the order that the promotions are inpPromotions
- a collection that the promotions are to be added topublic void getItemPromotions(CommerceItem pItem, java.util.Collection pPromotions)
pItem
- the CommerceItem that the promotions are inpPromotions
- a collection that the promotions are to be added topublic void getShippingPromotions(ShippingGroup pGroup, java.util.Collection pPromotions)
pGroup
- the ShippingGroup that the promotions are inpPromotions
- a collection that the promotions are to be added topublic void getOrderPromotions(Order pOrder, java.util.Collection pOrderPromotions, java.util.Collection pTaxPromotions, java.util.Collection pItemPromotions, java.util.Collection pShippingPromotions)
pOrder
- the order to retrieve the promotions frompOrderPromotions
- the collection to add the order level promotions topTaxPromotions
- the collection to add the tax level promotions topItemPromotions
- the collection to add the item level promotions topShippingPromotions
- the collection to add the shipping level promotions topublic void getOrderPromotions(Order pOrder, java.util.Collection pPromotions, boolean pGetAdjustments)
pGetAdjustments
is
true then pPromotions
is populated with each PricingAdjustment associated
with a promotion. If it is false, then pPromotions
is populated
with the actual pricing model repository items.
pOrder
- the order that the promotions are inpPromotions
- a collection that the promotions are to be added topGetAdjustments
- If true, get the PricingAdjustments, if false get the promotionspublic void getTaxPromotions(Order pOrder, java.util.Collection pPromotions, boolean pGetAdjustments)
pGetAdjustments
is
true then pPromotions
is populated with each PricingAdjustment associated
with a promotion. If it is false, then pPromotions
is populated
with the actual pricing model repository items.
pOrder
- the order that the promotions are inpPromotions
- a collection that the promotions are to be added topGetAdjustments
- If true, get the PricingAdjustments, if false get the promotionspublic void getItemPromotions(CommerceItem pItem, java.util.Collection pPromotions, boolean pGetAdjustments)
pGetAdjustments
is
true then pPromotions
is populated with each PricingAdjustment associated
with a promotion. If it is false, then pPromotions
is populated
with the actual pricing model repository items.
pItem
- the CommerceItem that the promotions are inpPromotions
- a collection that the promotions are to be added topGetAdjustments
- If true, get the PricingAdjustments, if false get the promotionspublic void getShippingPromotions(ShippingGroup pGroup, java.util.Collection pPromotions, boolean pGetAdjustments)
pGetAdjustments
is
true then pPromotions
is populated with each PricingAdjustment associated
with a promotion. If it is false, then pPromotions
is populated
with the actual pricing model repository items.
pGroup
- the ShippingGroup that the promotions are inpPromotions
- a collection that the promotions are to be added topGetAdjustments
- If true, get the PricingAdjustments, if false get the promotionspublic void getOrderPromotions(Order pOrder, java.util.Collection pOrderPromotions, java.util.Collection pTaxPromotions, java.util.Collection pItemPromotions, java.util.Collection pShippingPromotions, boolean pGetAdjustments)
pGetAdjustments
is true then each promotion collection is
populated with each PricingAdjustment associated with a promotion. If it is false, then
each promotion collection is populated with the actual pricing model repository items.
pOrder
- the order to retrieve the promotions frompOrderPromotions
- the collection to add the order level promotions topTaxPromotions
- the collection to add the tax level promotions topItemPromotions
- the collection to add the item level promotions topShippingPromotions
- the collection to add the shipping level promotions topGetAdjustments
- If true, get the PricingAdjustments, if false get the promotionspublic void expirePromotion(RepositoryItem pPromotion, RepositoryItem pProfile)
pPromotion
- the promotion which has expiredpProfile
- the profile for which a promotion has expiredpublic java.util.Collection convertPromoStatusToPromo(java.util.Collection pPromoStatuses)
public boolean scenarioAddedItemToOrder(Order pOrder, CommerceItem pItem, long pQuantity)
sendEventOnAddItem
is false, then nothing happens and
true is returned.
pOrder
- The order that was modifiedpItem
- The item that was addedpQuantity
- The quantity of pItem added to pOrder
public RepositoryItem getProfile(java.lang.String pProfileId) throws RepositoryException
pProfileId
- the id of the profile to retrieve
RepositoryException
- if there was an error while retrieving the profilepublic java.lang.String[] getPromotionsAsXML(java.lang.String pProfileId) throws atg.commerce.promotion.PromotionException
mappingFileName
. Both active promotions in the profile
and global promotions are returned.
pProfileId
- The id of the user whose promotions are returned
PromotionException
public java.util.Collection getPromotions(java.lang.String pProfileId) throws atg.commerce.promotion.PromotionException
pProfileId
- The id of the user whose promotions are returned
PromotionException
public java.util.Map calculatePromotionsForOrder(Order pOrder)
pOrder
- the order whose promotions we would like to calculate.public int getPromotionCount(Order pOrder, RepositoryItem pPromotion)
pOrder
- the orderpPromotion
- the promotion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |