atg.projects.store.gifts
Class StoreGiftlistManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.gifts.GiftlistManager
              extended by atg.projects.store.gifts.StoreGiftlistManager
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreGiftlistManager
extends atg.commerce.gifts.GiftlistManager

This class performs specific to CRS actions with gift lists in addition to those which are provided in parent class.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/gifts/StoreGiftlistManager.java#3 $$Change: 804240 $
Author:
ATG

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.commerce.gifts.GiftlistManager
ALL, CURRENT, mCompareGiftListAddressPropertyNames, sResourceBundle
 
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
StoreGiftlistManager()
           
 
Method Summary
 atg.commerce.order.HardgoodShippingGroup createShippingGroupFromGiftlist(java.lang.String pGiftlistId)
          This method creates HardgoodShippingGroup for the gift list.
 java.lang.String getGiftShippingGroupDescriptionPrefix()
           
 atg.commerce.pricing.PricingTools getPricingTools()
           
 boolean hasGiftAddress(atg.commerce.order.ShippingGroup pShippingGroup)
           
 boolean isProfileWishlist(java.lang.String pProfileId, java.lang.String pGiftlistId)
          Checks whether the given gift list ID is profile's wish list.
 void removeInvalidGiftServices(StoreOrderImpl pOrder)
          When an order only contains a GiftWrapCommerceItem, remove it.
 void setGiftShippingGroupDescriptionPrefix(java.lang.String pGiftShippingGroupDescriptionPrefix)
          Use this method to set the description prefix - it is used in createShippingGroupFromGiftlist(String)
 void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
           
 
Methods inherited from class atg.commerce.gifts.GiftlistManager
addCatalogItemToGiftlist, addGiftToOrder, addItemToGiftlist, addOtherGiftlistToProfile, addSpecialInstruction, adjustGiftsForQuantityDecrease, adjustGiftsForQuantityIncrease, areSitesCompatible, areSitesCompatible, buyItemFromGiftlist, createGiftlist, createGiftlist, createGiftlist, createGiftlistItem, createGiftlistItem, decreaseGiftlistItemQuantityPurchased, decreaseGiftQuantityForItem, findGiftShippingGroupWithAddress, getAllGiftHandlingInstructions, getCatalogTools, getCompareGiftListAddressPropertyNames, getGiftHandlingForShippingGroup, getGiftHandlingInstructionForCommerceItem, getGiftitem, getGiftlist, getGiftlistComments, getGiftlistDescription, getGiftlistEventDate, getGiftlistEventName, getGiftlistEventType, getGiftlistItemCatalogRefId, getGiftlistItemDescription, getGiftlistItemDisplayName, getGiftlistItemId, getGiftlistItemId, getGiftlistItemProductId, getGiftlistItemQuantityDesired, getGiftlistItemQuantityPurchased, getGiftlistItems, getGiftlistItemSite, getGiftlistOwner, getGiftlistShippingAddress, getGiftlistSite, getGiftlistTools, getGiftOnlyShippingGroups, getGiftQuantity, getGiftQuantity, getGiftQuantityForShippingGroup, getGiftShippingGroups, getOrderManager, getProfileTools, getSiteGroupManager, getSiteScope, getSpecialInstruction, getWishlistId, increaseGiftlistItemQuantityDesired, increaseGiftlistItemQuantityPurchased, increaseGiftQuantityForItem, isGiftlistOwner, isGiftlistPublic, isGiftlistPublished, isGiftOnlyShippingGroup, isGiftShippingGroup, isRemoveItemFromGiftlistOnMoveToCart, removeGiftlist, removeItemFromGiftlist, removeOtherGiftlistFromProfile, setCatalogTools, setCompareGiftListAddressPropertyNames, setGiftlistComments, setGiftlistDescription, setGiftlistEventDate, setGiftlistEventName, setGiftlistEventType, setGiftlistItemCatalogRefId, setGiftlistItemDescription, setGiftlistItemDisplayName, setGiftlistItemProductId, setGiftlistItemQuantityDesired, setGiftlistItemQuantityPurchased, setGiftlistItemSite, setGiftlistOwner, setGiftlistOwner, setGiftlistPublic, setGiftlistPublished, setGiftlistShippingAddress, setGiftlistSite, setGiftlistTools, setOrderManager, setProfileTools, setRemoveItemFromGiftlistOnMoveToCart, setSiteGroupManager, setSiteScope, updateGiftlist, updateGiftlist
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

StoreGiftlistManager

public StoreGiftlistManager()
Method Detail

getGiftShippingGroupDescriptionPrefix

public java.lang.String getGiftShippingGroupDescriptionPrefix()
Returns:
the description prefix.

setGiftShippingGroupDescriptionPrefix

public void setGiftShippingGroupDescriptionPrefix(java.lang.String pGiftShippingGroupDescriptionPrefix)
Use this method to set the description prefix - it is used in createShippingGroupFromGiftlist(String)

Parameters:
pGiftShippingGroupDescriptionPrefix - - the giftShippingGroupDescriptionPrefix to set
See Also:
createShippingGroupFromGiftlist(String)

getPricingTools

public atg.commerce.pricing.PricingTools getPricingTools()
Returns:
the pricing tools component.

setPricingTools

public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
Parameters:
pPricingTools - - The pricing tools component.

createShippingGroupFromGiftlist

public atg.commerce.order.HardgoodShippingGroup createShippingGroupFromGiftlist(java.lang.String pGiftlistId)
                                                                         throws atg.commerce.CommerceException
This method creates HardgoodShippingGroup for the gift list. The description of created shipping group is made up of getGiftShippingGroupDescriptionPrefix() + giftlistEventName.

Overrides:
createShippingGroupFromGiftlist in class atg.commerce.gifts.GiftlistManager
Parameters:
pGiftlistId - - GiftlistId based on which a ShippingGroup will be created.
Returns:
an instance of HardgoodShippingGroup.
Throws:
atg.commerce.CommerceException - indicates that a severe error occurred while performing a commerce operation.

isProfileWishlist

public boolean isProfileWishlist(java.lang.String pProfileId,
                                 java.lang.String pGiftlistId)
Checks whether the given gift list ID is profile's wish list.

Parameters:
pProfileId - - The profile ID
pGiftlistId - - The gift list ID
Returns:
true if the gift list ID is in the profile's wish list, otherwise false.

hasGiftAddress

public boolean hasGiftAddress(atg.commerce.order.ShippingGroup pShippingGroup)
Returns:
a boolean indicating if a shipping group has the gift list description prefix.

removeInvalidGiftServices

public void removeInvalidGiftServices(StoreOrderImpl pOrder)
                               throws atg.commerce.CommerceException
When an order only contains a GiftWrapCommerceItem, remove it. If no CommerceItems belong to an order but a gift note flag is still set to true, set it to false.

Parameters:
pOrder - - The order that will have invalid gift services removed from.
Throws:
atg.commerce.CommerceException