public class GiftlistManager extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL |
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
CURRENT |
protected java.lang.String[] |
mCompareGiftListAddressPropertyNames |
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
GiftlistManager()
Constructs a GiftlistManager object.
|
Modifier and Type | Method and Description |
---|---|
void |
addCatalogItemToGiftlist(java.lang.String pSkuId,
java.lang.String pProductId,
java.lang.String pGiftlistId,
java.lang.String pSiteId,
long pQuantity)
Adds a catalog item to the giftlist.
|
void |
addCatalogItemToGiftlist(java.lang.String pSkuId,
java.lang.String pProductId,
java.lang.String pGiftlistId,
java.lang.String pSiteId,
long pQuantity,
double pQuantityWithFraction)
Adds a catalog item to the giftlist.
|
void |
addGiftToOrder(RepositoryItem pProfile,
Order pOrder,
java.lang.String pItemId,
ShippingGroup pShippingGroup,
long pQuantity,
double pQuantityWithFraction,
java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId)
Creates a new shipping group based on the given gift list and moves
the item from the given shipping group to the new shipping group.
|
void |
addGiftToOrder(RepositoryItem pProfile,
Order pOrder,
java.lang.String pItemId,
ShippingGroup pShippingGroup,
long pQuantity,
java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId)
Creates a new shipping group based on the given gift list and moves
the item from the given shipping group to the new shipping group.
|
void |
addItemToGiftlist(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId)
Add the given giftlistItem to the given giftlist.
|
void |
addOtherGiftlistToProfile(MutableRepositoryItem pProfile,
java.lang.String pGiftlistId)
Adds other giftlist to the profileId and from the profile repository.
|
boolean |
addSpecialInstruction(java.lang.String pGiftlistId,
java.lang.String pKey,
java.lang.String pValue)
Add a new special instruction to this giftlist
|
void |
adjustGiftsForQuantityDecrease(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityDecrease,
double pQuantityWithFractionDecrease)
Adjusts the gift handling instructions for a decrease of item quantity in a shipping group.
|
void |
adjustGiftsForQuantityDecrease(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pNewQuantity,
long pQuantityDecrease)
Adjusts the gift handling instructions for a decrease of item quantity in a shipping group.
|
void |
adjustGiftsForQuantityIncrease(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityIncrease,
double pQuantityWithFractionIncrease)
Adjusts the gift handling instructions for an increase of item quantity in a shipping group.
|
void |
adjustGiftsForQuantityIncrease(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pNewQuantity,
long pQuantityIncrease)
Adjusts the gift handling instructions for an increase of item quantity in a shipping group.
|
protected boolean |
areSitesCompatible(java.lang.String pSiteId1,
java.lang.String pSiteId2)
Checks if two sites are compatible using GiftlistManager's
siteScope setting. |
protected boolean |
areSitesCompatible(java.lang.String pSiteId1,
java.lang.String pSiteId2,
java.lang.String pSiteScope)
Checks if two sites are compatible.
|
void |
buyItemFromGiftlist(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
Order pOrder,
ShippingGroup pShippingGroup)
Moves the given giftlistItem from the given giftlist to the shopping cart.
|
java.lang.String |
createGiftlist(java.lang.String pProfileId,
boolean pPublished,
java.lang.String pEventName,
java.util.Date pEventDate,
java.lang.String pEventType,
java.lang.String pShippingAddressId)
Creates a new giflist using @see GiftlistTools#createGiftlist and returns its id
|
java.lang.String |
createGiftlist(java.lang.String pProfileId,
boolean pPublished,
java.lang.String pEventName,
java.util.Date pEventDate,
java.lang.String pEventType,
java.lang.String pDescription,
java.lang.String pComments,
java.lang.String pShippingAddressId,
java.lang.String pInstructions)
Creates a new giflist @see GiftlistTools#createGiftlist and returns its id
|
java.lang.String |
createGiftlist(java.lang.String pProfileId,
boolean pPublished,
java.lang.String pEventName,
java.util.Date pEventDate,
java.lang.String pEventType,
java.lang.String pDescription,
java.lang.String pComments,
java.lang.String pShippingAddressId,
java.lang.String pInstructions,
java.lang.String pSiteId)
Creates a new giflist @see GiftlistTools#createGiftlist and returns its id
|
java.lang.String |
createGiftlistItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantityDesired,
double pQuantityWithFractionDesired,
java.lang.String pDisplayName,
java.lang.String pDescription,
java.lang.String pSiteId)
Creates a new GiftlistItem object using the default GiftlistItem type defined in GiftlistTools.
|
java.lang.String |
createGiftlistItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantityDesired,
java.lang.String pDisplayName,
java.lang.String pDescription)
Creates a new GiftlistItem object using the default GiftlistItem type defined in GiftlistTools.
|
java.lang.String |
createGiftlistItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantityDesired,
java.lang.String pDisplayName,
java.lang.String pDescription,
java.lang.String pSiteId)
Creates a new GiftlistItem object using the default GiftlistItem type defined in GiftlistTools.
|
HardgoodShippingGroup |
createShippingGroupFromGiftlist(java.lang.String pGiftlistId)
Creates a hardgood shipping address based on the address in the given gift list.
|
boolean |
decreaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity)
Decrease the quantityPurchased for this giftlist item by the given quantity
|
boolean |
decreaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity,
double pQuantityWithFraction)
Decrease the quantityPurchased for this giftlist item by the given quantity or if dealing with
fractional, decrease the quantityWithFractionPurchased for this giftlist item by the given fractional quantity.
|
void |
decreaseGiftQuantityForItem(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityDecrease)
Decreases the gift quantity for an item in a shipping group.
|
void |
decreaseGiftQuantityForItem(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityDecrease,
double pQuantityWithFractionDecrease)
Decreases the gift quantity for an item in a shipping group.
|
protected HardgoodShippingGroup |
findGiftShippingGroupWithAddress(Order pOrder,
java.lang.String pGiftlistId)
Finds a gift shipping group with an address that matches the gift list address
|
java.util.Collection |
getAllGiftHandlingInstructions(Order pOrder)
Returns a Collection of all gift handling instructions in the order.
|
CatalogTools |
getCatalogTools()
Returns property catalogTools.
|
java.lang.String[] |
getCompareGiftListAddressPropertyNames()
Returns the CompareGiftListAddressPropertyNames
|
java.util.Collection |
getGiftHandlingForShippingGroup(ShippingGroup pShippingGroup,
CommerceItem pCommerceItem)
Returns the gift handling instructions for a given item in a given shipping group
|
GiftlistHandlingInstruction |
getGiftHandlingInstructionForCommerceItem(ShippingGroup pShippingGroup,
java.lang.String pCommerceItemId,
java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId)
Returns the gift list handling instruction for the item with a commerce item id,
matching gift list id and gift list item id.
|
RepositoryItem |
getGiftitem(java.lang.String pId)
Gets the giftitem from the repository with the id passed.
|
RepositoryItem |
getGiftlist(java.lang.String pId)
Gets the giftlist from the repository with the id passed.
|
java.lang.String |
getGiftlistComments(java.lang.String pGiftlistId)
Return the comments of this giftlist
|
java.lang.String |
getGiftlistDescription(java.lang.String pGiftlistId)
Return the description of this giftlist
|
java.util.Date |
getGiftlistEventDate(java.lang.String pGiftlistId)
Return the eventDate of this giftlist
|
java.lang.String |
getGiftlistEventName(java.lang.String pGiftlistId)
Return the eventName of this giftlist
|
java.lang.String |
getGiftlistEventType(java.lang.String pGiftlistId)
Return the eventType of this giftlist
|
java.lang.String |
getGiftlistItemCatalogRefId(java.lang.String pGiftlistItemId)
Return the catalogRefId of this giftlist item
|
java.lang.String |
getGiftlistItemDescription(java.lang.String pGiftlistItemId)
Return the description of this giftlist item
|
java.lang.String |
getGiftlistItemDisplayName(java.lang.String pGiftlistItemId)
Return the displayName of this giftlist item
|
java.lang.String |
getGiftlistItemId(java.lang.String pGiftlistId,
java.lang.String pSkuId)
Return the giftlistItemId if the sku is in the giftlist, null otherwise
|
java.lang.String |
getGiftlistItemId(java.lang.String pGiftlistId,
java.lang.String pSkuId,
java.lang.String pProductId,
java.lang.String pSiteId)
Return the giftlistItemId if the sku with the same SKU ID, product ID and site ID
is in the giftlist, null otherwise
|
java.lang.String |
getGiftlistItemProductId(java.lang.String pGiftlistItemId)
Return the productId of this giftlist item
|
long |
getGiftlistItemQuantityDesired(java.lang.String pGiftlistItemId)
Return the quantityDesired of this giftlist item
|
long |
getGiftlistItemQuantityPurchased(java.lang.String pGiftlistItemId)
Return the quantityPurchased of this giftlist item
|
double |
getGiftlistItemQuantityWithFractionDesired(java.lang.String pGiftlistItemId)
Return the quantityWithFractionDesired of this giftlist item
|
double |
getGiftlistItemQuantityWithFractionPurchased(java.lang.String pGiftlistItemId)
Return the quantityWithFractionPurchased of this giftlist item
|
java.util.List |
getGiftlistItems(java.lang.String pGiftlistId)
Get the list of giftlist items from the giftlist
|
java.lang.String |
getGiftlistItemSite(java.lang.String pGiftlistItemId)
Return the site id of this giftlist item
|
java.lang.String |
getGiftlistOwner(java.lang.String pGiftlistId)
Return the owner of this giftlist
|
RepositoryItem |
getGiftlistShippingAddress(java.lang.String pGiftlistId)
Return the shippingAddress of this giftlist
|
java.lang.String |
getGiftlistSite(java.lang.String pGiftlistId)
Return the site id of this giftlist
|
GiftlistTools |
getGiftlistTools()
Returns property giftlistTools.
|
java.util.List |
getGiftOnlyShippingGroups(Order pOrder)
Returns a list of shipping groups the contain just gifts.
|
long |
getGiftQuantity(CommerceItem pCommerceItem,
ShippingGroup pShippingGroup)
Returns the quantity of the CommerceItem that is a gift in the given shipping group
|
long |
getGiftQuantity(Order pOrder,
CommerceItem pCommerceItem)
Returns the quantity (non-fractional) of a CommerceItem that should be treated as a gift.
|
long |
getGiftQuantityForShippingGroup(ShippingGroup pShippingGroup,
CommerceItem pCommerceItem)
Returns the gift quantity for a items relationship to a shipping group.
|
double |
getGiftQuantityWithFraction(CommerceItem pCommerceItem,
ShippingGroup pShippingGroup)
Returns the quantity of the CommerceItem that is a gift in the given shipping group
|
double |
getGiftQuantityWithFraction(Order pOrder,
CommerceItem pCommerceItem)
Returns the quantity (with fraction) of a CommerceItem that should be treated as a gift.
|
double |
getGiftQuantityWithFractionForShippingGroup(ShippingGroup pShippingGroup,
CommerceItem pCommerceItem)
Returns the gift quantity with fraction for a items relationship to a shipping group.
|
java.util.List |
getGiftShippingGroups(Order pOrder)
Returns a list of all shipping groups that contain gifts.
|
SimpleOrderManager |
getOrderManager()
Returns property orderManager.
|
CommerceProfileTools |
getProfileTools()
Returns property profileTools.
|
SiteGroupManager |
getSiteGroupManager()
Returns property siteGroupManager.
|
java.lang.String |
getSiteScope()
gets the property siteScope
|
java.util.Map |
getSpecialInstruction(java.lang.String pGiftlistId)
Return the specialInstructions of this giftlist
|
java.lang.String |
getWishlistId(java.lang.String pProfileId)
Return the id of the customer's wishlist
|
boolean |
increaseGiftlistItemQuantityDesired(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity)
Increase the quantityDesired for this giftlist item by the given quantity
|
boolean |
increaseGiftlistItemQuantityDesired(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity,
double pQuantityWithFraction)
Increase the quantityDesired for this giftlist item by the given quantity
|
boolean |
increaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity)
Increase the quantityPurchased for this giftlist item by the given quantity
|
boolean |
increaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity,
double pQuantityWithFraction)
Increase the quantityPurchased for this giftlist item by the given quantity
|
void |
increaseGiftQuantityForItem(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityIncrease)
Increases the gift quantity for an item in a shipping group.
|
void |
increaseGiftQuantityForItem(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityIncrease,
double pQuantityWithFractionIncrease)
Increases the gift quantity for an item in a shipping group.
|
protected boolean |
isGiftlistOwner(java.lang.String pGiftlistId,
java.lang.String pProfileId) |
boolean |
isGiftlistPublic(java.lang.String pGiftlistId)
Return the public property of this giftlist
|
boolean |
isGiftlistPublished(java.lang.String pGiftlistId)
Return the published property of this giftlist
|
boolean |
isGiftOnlyShippingGroup(ShippingGroup pShippingGroup)
Determines if the items in the shipping group are all gifts
|
boolean |
isGiftShippingGroup(ShippingGroup pShippingGroup)
Returns true if a shipping group has gift handling instructions
|
boolean |
isRemoveItemFromGiftlistOnMoveToCart()
Gets property removeItemFromGiftlistOnMoveToCart.
|
void |
removeGiftlist(java.lang.String pProfileId,
java.lang.String pGiftlistId)
Deletes the giftlist from the profileId and from the profile repository.
|
void |
removeItemFromGiftlist(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId)
Removes the given giftlistItem from the given giftlist.
|
void |
removeOtherGiftlistFromProfile(MutableRepositoryItem pProfile,
java.lang.String pGiftlistId)
Deletes other giftlist from the profileId and from the profile repository.
|
void |
setCatalogTools(CatalogTools pCatalogTools)
Sets property catalogTools.
|
void |
setCompareGiftListAddressPropertyNames(java.lang.String[] pCompareGiftListAddressPropertyNames)
Sets the CompareGiftListAddressPropertyNames
|
boolean |
setGiftlistComments(java.lang.String pGiftlistId,
java.lang.String pComments)
Set the comments of the giftlist
|
boolean |
setGiftlistDescription(java.lang.String pGiftlistId,
java.lang.String pDescription)
Set the description of the giftlist
|
boolean |
setGiftlistEventDate(java.lang.String pGiftlistId,
java.util.Date pEventDate)
Set the eventDate of the giftlist
|
boolean |
setGiftlistEventName(java.lang.String pGiftlistId,
java.lang.String pEventName)
Set the eventName of the giftlist
|
boolean |
setGiftlistEventType(java.lang.String pGiftlistId,
java.lang.String pEventType)
Set the eventType of the giftlist
|
boolean |
setGiftlistItemCatalogRefId(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
java.lang.String pCatalogRefId)
Set the catalogRefId of the giftlist item
|
boolean |
setGiftlistItemDescription(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
java.lang.String pDescription)
Set the description of the giftlist item
|
boolean |
setGiftlistItemDisplayName(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
java.lang.String pDisplayName)
Set the displayName of the giftlist item
|
boolean |
setGiftlistItemProductId(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
java.lang.String pProductId)
Set the productId of the giftlist item
|
boolean |
setGiftlistItemQuantityDesired(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantityDesired)
Set the quantityDesired of the giftlist item
|
boolean |
setGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantityPurchased)
Set the quantityPurchased of the giftlist item
|
boolean |
setGiftlistItemQuantityWithFractionDesired(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
double pQuantityWithFractionDesired)
Set the quantityWithFractionDesired of the giftlist item
|
boolean |
setGiftlistItemQuantityWithFractionPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
double pQuantityWithFractionPurchased)
Set the quantityWithFractionPurchased of the giftlist item
|
boolean |
setGiftlistItemSite(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
java.lang.String pSiteId)
Set the site of the giftlist item
|
boolean |
setGiftlistOwner(java.lang.String pGiftlistId,
RepositoryItem pProfile)
Set the owner of the giftlist
|
boolean |
setGiftlistOwner(java.lang.String pGiftlistId,
java.lang.String pProfileId)
Set the owner of the giftlist
|
boolean |
setGiftlistPublic(java.lang.String pGiftlistId,
boolean pPublic)
Set the public property of this giftlist
|
boolean |
setGiftlistPublished(java.lang.String pGiftlistId,
boolean pPublished)
Set the published property of the giftlist.
|
boolean |
setGiftlistShippingAddress(java.lang.String pGiftlistId,
java.lang.String pShippingAddressId)
Set the ShippingAddress of the giftlist
|
boolean |
setGiftlistSite(java.lang.String pGiftlistId,
java.lang.String pSiteId)
Set the site id of the giftlist
|
void |
setGiftlistTools(GiftlistTools pGiftlistTools)
Sets property giftlistTools.
|
void |
setOrderManager(SimpleOrderManager pOrderManager)
Sets property OrderManager.
|
void |
setProfileTools(CommerceProfileTools pProfileTools)
Sets property profileTools.
|
void |
setRemoveItemFromGiftlistOnMoveToCart(boolean pRemoveItemFromGiftlistOnMoveToCart)
Sets property removeItemFromGiftlistOnMoveToCart.
|
void |
setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets property SiteGroupManager.
|
void |
setSiteScope(java.lang.String pSiteScope)
Sets the property siteScope.
|
boolean |
updateGiftlist(java.lang.String pProfileId,
java.lang.String pGiftlistId,
boolean pPublished,
java.lang.String pEventName,
java.util.Date pEventDate,
java.lang.String pEventType,
java.lang.String pDescription,
java.lang.String pComments,
java.lang.String pShippingAddressId,
java.lang.String pInstructions)
Updates the giftlist with the values passed in.
|
boolean |
updateGiftlist(java.lang.String pProfileId,
java.lang.String pGiftlistId,
boolean pPublished,
java.lang.String pEventName,
java.util.Date pEventDate,
java.lang.String pEventType,
java.lang.String pDescription,
java.lang.String pComments,
java.lang.String pShippingAddressId,
java.lang.String pInstructions,
java.lang.String pSiteId)
Updates the giftlist with the values passed in.
|
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String ALL
public static final java.lang.String CURRENT
protected static java.util.ResourceBundle sResourceBundle
protected java.lang.String[] mCompareGiftListAddressPropertyNames
public java.lang.String[] getCompareGiftListAddressPropertyNames()
public void setCompareGiftListAddressPropertyNames(java.lang.String[] pCompareGiftListAddressPropertyNames)
These property names are used to compare the gift list address to shipping group addresses already in the order when adding a gift to an order.
public void setOrderManager(SimpleOrderManager pOrderManager)
pOrderManager
- the orderManager class which provides low level operations on giftlists.public SimpleOrderManager getOrderManager()
public void setProfileTools(CommerceProfileTools pProfileTools)
pProfileTools
- the profileTools class which provides low level operations on profiles.public CommerceProfileTools getProfileTools()
public void setGiftlistTools(GiftlistTools pGiftlistTools)
pGiftlistTools
- the giftlistTools class which provides low level operations on giftlists.public GiftlistTools getGiftlistTools()
public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the siteGroupManagerpublic SiteGroupManager getSiteGroupManager()
public boolean isRemoveItemFromGiftlistOnMoveToCart()
public void setRemoveItemFromGiftlistOnMoveToCart(boolean pRemoveItemFromGiftlistOnMoveToCart)
pRemoveItemFromGiftlistOnMoveToCart
- The value which tells Dynamo whether to remove a
giftlist item when it is transferred to a user's cart.public void setSiteScope(java.lang.String pSiteScope)
public java.lang.String getSiteScope()
public void setCatalogTools(CatalogTools pCatalogTools)
pCatalogTools
- the catalogTools which provides low level operations on the catalog.public CatalogTools getCatalogTools()
public java.lang.String createGiftlist(java.lang.String pProfileId, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pShippingAddressId) throws CommerceException
pProfileId
- the id of the Profile object to which this giftlist belongs.pPublished
- If true, this giftlist will be visible to all.pEventName
- The name of the event that these gifts are forpEventDate
- The date of the evenpEventType
- The type of event (e.g. birthday)pShippingAddressId
- The id of the address that these gifts should be shipped toCommerceException
- if there were any errors creating giftlist.public java.lang.String createGiftlist(java.lang.String pProfileId, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pDescription, java.lang.String pComments, java.lang.String pShippingAddressId, java.lang.String pInstructions) throws CommerceException
pProfileId
- the id of the Profile object to which this giftlist belongs.pPublished
- If true, this giftlist will be visible to all.pEventName
- The name of the event that these gifts are forpEventDate
- The date of the evenpEventType
- The type of event (e.g. birthday)pDescription
- The description of this giftlistpComments
- The owner's comments for this giftlistpShippingAddressId
- The id of the address that these gifts should be shipped topInstructions
- the extra information or instructionsCommerceException
- if there were any errors creating giftlist.public java.lang.String createGiftlist(java.lang.String pProfileId, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pDescription, java.lang.String pComments, java.lang.String pShippingAddressId, java.lang.String pInstructions, java.lang.String pSiteId) throws CommerceException
pProfileId
- the id of the Profile object to which this giftlist belongs.pPublished
- If true, this giftlist will be visible to all.pEventName
- The name of the event that these gifts are forpEventDate
- The date of the evenpEventType
- The type of event (e.g. birthday)pDescription
- The description of this giftlistpComments
- The owner's comments for this giftlistpShippingAddressId
- The id of the address that these gifts should be shipped topInstructions
- the extra information or instructionspSiteId
- the site id where gift list is createdCommerceException
- if there were any errors creating giftlist.public boolean updateGiftlist(java.lang.String pProfileId, java.lang.String pGiftlistId, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pDescription, java.lang.String pComments, java.lang.String pShippingAddressId, java.lang.String pInstructions) throws CommerceException
pProfileId
- the owner of the giftlistpGiftlistId
- the giftlist idpPublished
- If true, this giftlist will be visible to all.pEventName
- The name of the event that these gifts are forpEventDate
- The date of the evenpEventType
- The type of event (e.g. birthday)pDescription
- The description of this giftlistpComments
- The owner's comments for this giftlistpShippingAddressId
- The id of the address that these gifts should be shipped topInstructions
- the extra information or instructionsCommerceException
- if there were any errors updating giftlist.public boolean updateGiftlist(java.lang.String pProfileId, java.lang.String pGiftlistId, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pDescription, java.lang.String pComments, java.lang.String pShippingAddressId, java.lang.String pInstructions, java.lang.String pSiteId) throws CommerceException
pProfileId
- the owner of the giftlistpGiftlistId
- the giftlist idpPublished
- If true, this giftlist will be visible to all.pEventName
- The name of the event that these gifts are forpEventDate
- The date of the evenpEventType
- The type of event (e.g. birthday)pDescription
- The description of this giftlistpComments
- The owner's comments for this giftlistpShippingAddressId
- The id of the address that these gifts should be shipped topInstructions
- the extra information or instructionspSiteId
- the site idCommerceException
- if there were any errors updating giftlist.public RepositoryItem getGiftlist(java.lang.String pId) throws CommerceException
pId
- the id of the Giftlist object.CommerceException
- if there were any errors getting giftlist.RepositoryItem
public RepositoryItem getGiftitem(java.lang.String pId) throws CommerceException
pId
- the id of the Giftitem object.CommerceException
- if there were any errors getting gift item.RepositoryItem
public void removeGiftlist(java.lang.String pProfileId, java.lang.String pGiftlistId) throws CommerceException, RepositoryException
pProfileId
- the id to remove the giftlist frompGiftlistId
- the id of the giftlistCommerceException
- if there were any errors removing giftlist.RepositoryException
- if an error occurs accessing the repositorypublic void removeOtherGiftlistFromProfile(MutableRepositoryItem pProfile, java.lang.String pGiftlistId) throws CommerceException, RepositoryException
pProfile
- the profile to remove the giftlist frompGiftlistId
- the id of the giftlist to removeCommerceException
- if there were any errors removing giftlist from profile.RepositoryException
- if an error occurs accessing the repositorypublic void addOtherGiftlistToProfile(MutableRepositoryItem pProfile, java.lang.String pGiftlistId) throws CommerceException, RepositoryException
pProfile
- the profile to add the giftlist topGiftlistId
- the id of the giftlist to addCommerceException
- if there were any errors adding giftlist to profile.RepositoryException
- if an error occurs accessing the repositorypublic java.lang.String createGiftlistItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantityDesired, java.lang.String pDisplayName, java.lang.String pDescription) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantityDesired
- the quantity that this CommerceItem should representpDisplayName
- the display name of the catalog itempDescription
- the description of the catalog itemCommerceException
- if there were any errors creating gift item.public java.lang.String createGiftlistItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantityDesired, java.lang.String pDisplayName, java.lang.String pDescription, java.lang.String pSiteId) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantityDesired
- the quantity that this CommerceItem should representpDisplayName
- the display name of the catalog itempDescription
- the description of the catalog itempSiteId
- the site id where gift item is createdCommerceException
- if there were any errors creating gift item.public java.lang.String createGiftlistItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantityDesired, double pQuantityWithFractionDesired, java.lang.String pDisplayName, java.lang.String pDescription, java.lang.String pSiteId) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantityDesired
- the quantity that this CommerceItem should representpQuantityWithFractionDesired
- the quantityWithFraction that this CommerceItem should representpDisplayName
- the display name of the catalog itempDescription
- the description of the catalog itempSiteId
- the site id where gift item is createdCommerceException
- if there were any errors creating gift item.public void addCatalogItemToGiftlist(java.lang.String pSkuId, java.lang.String pProductId, java.lang.String pGiftlistId, java.lang.String pSiteId, long pQuantity) throws CommerceException
pSkuId
- the id of the sku to add to the giftlistpProductId
- the id of the productpGiftlistId
- the giftlist idpSiteId
- the site id where gift item is createdpQuantity
- the quantity to add to the giftlistCommerceException
- if there were any errors adding the item to the giftlistpublic void addCatalogItemToGiftlist(java.lang.String pSkuId, java.lang.String pProductId, java.lang.String pGiftlistId, java.lang.String pSiteId, long pQuantity, double pQuantityWithFraction) throws CommerceException
pSkuId
- the id of the sku to add to the giftlistpProductId
- the id of the productpGiftlistId
- the giftlist idpSiteId
- the site id where gift item is createdpQuantity
- the quantity to add to the giftlistpQuantityWithFraction
- the quantity (with fraction) to add to the giftlistCommerceException
- if there were any errors adding the item to the giftlistpublic void addItemToGiftlist(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId) throws CommerceException, RepositoryException
pGiftlistId
- the id of the giftlist to add the item topGiftlistItemId
- the id of the giftlist item to addCommerceException
- if there were any errors adding item to giftlist.RepositoryException
- if an error occurs accessing the repositorypublic void removeItemFromGiftlist(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId) throws CommerceException, RepositoryException
pGiftlistId
- the id of the giftlist from which to remove the itempGiftlistItemId
- the id of the giftlist item to removeCommerceException
- if there were any errors removing item from giftlist.RepositoryException
- if an error occurs accessing the repositorypublic void buyItemFromGiftlist(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, Order pOrder, ShippingGroup pShippingGroup) throws CommerceException, RepositoryException
pGiftlistId
- the id of the giftlist from which to buy the itempGiftlistItemId
- the id of the giftlist item to buygCommerceException
- if there were any errors moving item from giftlist to cart.RepositoryException
- if an error occurs accessing the repositorypublic java.util.List getGiftlistItems(java.lang.String pGiftlistId)
pGiftlistId
- The id of the giftlistRepositoryItem
public boolean setGiftlistOwner(java.lang.String pGiftlistId, java.lang.String pProfileId)
pGiftlistId
- The id of the giftlist being changed.pProfileId
- The id of the new owner of this giftlistpublic boolean setGiftlistOwner(java.lang.String pGiftlistId, RepositoryItem pProfile)
pGiftlistId
- The id of the giftlist being changed.pProfile
- The new owner of this giftlistpublic java.lang.String getGiftlistOwner(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic java.lang.String getWishlistId(java.lang.String pProfileId)
pProfileId
- the profilepublic boolean setGiftlistPublic(java.lang.String pGiftlistId, boolean pPublic)
pGiftlistId
- The id of the giftlist being changed.pPublic
- If true, this giftlist is public, if false, it is not.public boolean isGiftlistPublic(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistPublished(java.lang.String pGiftlistId, boolean pPublished)
pGiftlistId
- The id of the giftlist being changed.pPublished
- The new value of the published propertypublic boolean isGiftlistPublished(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistEventName(java.lang.String pGiftlistId, java.lang.String pEventName)
pGiftlistId
- The id of the giftlist being changed.pEventName
- The name of the event this giftlist refers topublic java.lang.String getGiftlistEventName(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistEventDate(java.lang.String pGiftlistId, java.util.Date pEventDate)
pGiftlistId
- The id of the giftlist being changed.pEventDate
- The date that this event occurspublic java.util.Date getGiftlistEventDate(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistEventType(java.lang.String pGiftlistId, java.lang.String pEventType)
pGiftlistId
- The id of the giftlist being changed.pEventType
- The type of this event (eg birthday)public java.lang.String getGiftlistEventType(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistDescription(java.lang.String pGiftlistId, java.lang.String pDescription)
pGiftlistId
- The id of the giftlist being changed.pDescription
- The new description of this eventpublic java.lang.String getGiftlistDescription(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistComments(java.lang.String pGiftlistId, java.lang.String pComments)
pGiftlistId
- The id of the giftlist being changed.pComments
- The new comments for this giftlistpublic java.lang.String getGiftlistComments(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistShippingAddress(java.lang.String pGiftlistId, java.lang.String pShippingAddressId)
pGiftlistId
- The id of the giftlist being changed.pShippingAddressId
- The id of the new shipping address for this giftlistpublic RepositoryItem getGiftlistShippingAddress(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistSite(java.lang.String pGiftlistId, java.lang.String pSiteId)
pGiftlistId
- The id of the giftlist being changed.pSiteId
- The site idpublic java.lang.String getGiftlistSite(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean addSpecialInstruction(java.lang.String pGiftlistId, java.lang.String pKey, java.lang.String pValue)
pGiftlistId
- The id of the giftlist being changedpKey
- The name of the new specialInstructionpValue
- The value of the instructionpublic java.util.Map getSpecialInstruction(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in questionpublic boolean setGiftlistItemSite(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, java.lang.String pSiteId)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpSiteId
- The site id of the itempublic java.lang.String getGiftlistItemSite(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemCatalogRefId(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, java.lang.String pCatalogRefId)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpCatalogRefId
- The catalogRefId of the itempublic java.lang.String getGiftlistItemCatalogRefId(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemProductId(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, java.lang.String pProductId)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpProductId
- The product id for this itempublic java.lang.String getGiftlistItemProductId(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic java.lang.String getGiftlistItemId(java.lang.String pGiftlistId, java.lang.String pSkuId)
pGiftlistId
- the giftlist idpSkuId
- the sku idpublic java.lang.String getGiftlistItemId(java.lang.String pGiftlistId, java.lang.String pSkuId, java.lang.String pProductId, java.lang.String pSiteId)
pGiftlistId
- the giftlist idpSkuId
- the sku idpProductId
- the product idpSiteId
- the site idpublic boolean setGiftlistItemDisplayName(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, java.lang.String pDisplayName)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpDisplayName
- The displayName for this giftlist itempublic java.lang.String getGiftlistItemDisplayName(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemDescription(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, java.lang.String pDescription)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpDescription
- The new descriptionpublic java.lang.String getGiftlistItemDescription(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemQuantityDesired(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantityDesired)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantityDesired
- The quantity of this item that is wantedpublic long getGiftlistItemQuantityDesired(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemQuantityWithFractionDesired(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, double pQuantityWithFractionDesired)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantityWithFractionDesired
- The quantity of this item that is wantedpublic double getGiftlistItemQuantityWithFractionDesired(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean increaseGiftlistItemQuantityDesired(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to increase bypublic boolean increaseGiftlistItemQuantityDesired(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity, double pQuantityWithFraction)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to increase bypQuantityWithFraction
- the quantity to increase bypublic boolean setGiftlistItemQuantityPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantityPurchased)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantityPurchased
- The amount of this item that have been purchasedpublic long getGiftlistItemQuantityPurchased(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean setGiftlistItemQuantityWithFractionPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, double pQuantityWithFractionPurchased)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantityWithFractionPurchased
- The amount of this item that have been purchasedpublic double getGiftlistItemQuantityWithFractionPurchased(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in questionpublic boolean increaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to increase bypublic boolean increaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity, double pQuantityWithFraction)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to increase bypQuantityWithFraction
- the quantity to increase bypublic boolean decreaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to decrease bypublic boolean decreaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId, long pQuantity, double pQuantityWithFraction)
pGiftlistId
- the giftlist containing the itempGiftlistItemId
- the giftlist item in questionpQuantity
- the quantity to decrease bypQuantityWithFraction
- the quantity to decrease bypublic void addGiftToOrder(RepositoryItem pProfile, Order pOrder, java.lang.String pItemId, ShippingGroup pShippingGroup, long pQuantity, java.lang.String pGiftlistId, java.lang.String pGiftlistItemId) throws CommerceException
This method will attempt to find a gift shipping group in the order with the same address and use it before defaulting to create a brand new shipping group.
If there's a matching gift handling instruction in the shipping group for the same item, gift list and gift item, then the quantity is incremented. If not, a new handling instruction is created.
pProfile
- the current commerce profile.pOrder
- the Order to add the CommerceItem topItemId
- the Commerce Item Id.pShippingGroup
- the Shipping group to move the item from.pGiftlistId
- the giftlist id that the item is purchased from.pGiftlistItemId
- the giftlist item id that is being purchasedCommerceException
- thrown if an error occurs while accessing the repositorypublic void addGiftToOrder(RepositoryItem pProfile, Order pOrder, java.lang.String pItemId, ShippingGroup pShippingGroup, long pQuantity, double pQuantityWithFraction, java.lang.String pGiftlistId, java.lang.String pGiftlistItemId) throws CommerceException
This method will attempt to find a gift shipping group in the order with the same address and use it before defaulting to create a brand new shipping group.
If there's a matching gift handling instruction in the shipping group for the same item, gift list and gift item, then the quantity is incremented. If not, a new handling instruction is created.
pProfile
- the current commerce profile.pOrder
- the Order to add the CommerceItem topItemId
- the Commerce Item Id.pShippingGroup
- the Shipping group to move the item from.pGiftlistId
- the giftlist id that the item is purchased from.pGiftlistItemId
- the giftlist item id that is being purchasedCommerceException
- thrown if an error occurs while accessing the repositorypublic HardgoodShippingGroup createShippingGroupFromGiftlist(java.lang.String pGiftlistId) throws CommerceException
pGiftlistId
- CommerceException
protected HardgoodShippingGroup findGiftShippingGroupWithAddress(Order pOrder, java.lang.String pGiftlistId)
pOrder
- pGiftlistId
- public GiftlistHandlingInstruction getGiftHandlingInstructionForCommerceItem(ShippingGroup pShippingGroup, java.lang.String pCommerceItemId, java.lang.String pGiftlistId, java.lang.String pGiftlistItemId)
pShippingGroup
- pCommerceItemId
- pGiftlistId
- pGiftlistItemId
- public java.util.Collection getAllGiftHandlingInstructions(Order pOrder) throws CommerceException
pOrder
- the order to use.CommerceException
public java.util.List getGiftShippingGroups(Order pOrder) throws CommerceException
pOrder
- the order to use.CommerceException
public java.util.List getGiftOnlyShippingGroups(Order pOrder) throws CommerceException
pOrder
- CommerceException
public boolean isGiftOnlyShippingGroup(ShippingGroup pShippingGroup) throws CommerceException
pShippingGroup
- CommerceException
public long getGiftQuantity(CommerceItem pCommerceItem, ShippingGroup pShippingGroup) throws CommerceException
pCommerceItem
- the Commerce ItempShippingGroup
- the Shipping GroupCommerceException
- thrown if an input parameter is invalidpublic double getGiftQuantityWithFraction(CommerceItem pCommerceItem, ShippingGroup pShippingGroup) throws CommerceException
pCommerceItem
- the Commerce ItempShippingGroup
- the Shipping Groupdouble
value.CommerceException
- thrown if an input parameter is invalidpublic long getGiftQuantity(Order pOrder, CommerceItem pCommerceItem) throws CommerceException
pOrder
- the Order containing the CommerceItempCommerceItem
- the Commerce ItemCommerceException
- thrown if an input parameter is invalidpublic double getGiftQuantityWithFraction(Order pOrder, CommerceItem pCommerceItem) throws CommerceException
pOrder
- the Order containing the CommerceItempCommerceItem
- the Commerce ItemCommerceException
- thrown if an input parameter is invalidpublic boolean isGiftShippingGroup(ShippingGroup pShippingGroup)
public java.util.Collection getGiftHandlingForShippingGroup(ShippingGroup pShippingGroup, CommerceItem pCommerceItem)
pShippingGroup
- pCommerceItem
- public long getGiftQuantityForShippingGroup(ShippingGroup pShippingGroup, CommerceItem pCommerceItem) throws CommerceException
pShippingGroup
- pCommerceItem
- CommerceException
public double getGiftQuantityWithFractionForShippingGroup(ShippingGroup pShippingGroup, CommerceItem pCommerceItem) throws CommerceException
pShippingGroup
- represents the shipping group.pCommerceItem
- represents the commerce item.double
the fractional quantity.CommerceException
public void adjustGiftsForQuantityDecrease(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pNewQuantity, long pQuantityDecrease) throws CommerceException
If the item is considered a gift, decrease its gift quantity by the total decrease
pShippingGroup
- the affected shipping grouppCommerceItem
- the affected commerce itempNewQuantity
- the new quantity of the relationshippQuantityDecrease
- the amount by which the quantity has been decreased.CommerceException
public void adjustGiftsForQuantityDecrease(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityDecrease, double pQuantityWithFractionDecrease) throws CommerceException
If the item is considered a gift, decrease its gift quantity by the total decrease
pShippingGroup
- the affected shipping grouppCommerceItem
- the affected commerce itempQuantityDecrease
- the amount by which the quantity has been decreased.pQuantityWithFractionDecrease
- the amount by which the quantity has been decreased.CommerceException
public void adjustGiftsForQuantityIncrease(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pNewQuantity, long pQuantityIncrease) throws CommerceException
If the item is considered a gift, increase its gift quantity by the total increase
pShippingGroup
- the affected shipping grouppCommerceItem
- the affected commerce itempNewQuantity
- the new quantity of the relationshippQuantityIncrease
- the amount by which the quantity has been increased.CommerceException
public void adjustGiftsForQuantityIncrease(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityIncrease, double pQuantityWithFractionIncrease) throws CommerceException
If the item is considered a gift, increase its gift quantity by the total increase
pShippingGroup
- the affected shipping grouppCommerceItem
- the affected commerce itempQuantityIncrease
- the amount by which the quantity has been increased.pQuantityWithFractionIncrease
- the amount by which the quantity has been increased.CommerceException
public void increaseGiftQuantityForItem(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityIncrease) throws CommerceException
pOrder
- the orderpShippingGroup
- the shipping group for which the item contains a gift quantitypCommerceItem
- the commerce itempQuantityIncrease
- the amount by which to increase the quantityCommerceException
public void increaseGiftQuantityForItem(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityIncrease, double pQuantityWithFractionIncrease) throws CommerceException
pOrder
- the orderpShippingGroup
- the shipping group for which the item contains a gift quantitypCommerceItem
- the commerce itempQuantityIncrease
- the amount by which to increase the quantitypQuantityWithFractionIncrease
- the amount by which to increase the quantityCommerceException
public void decreaseGiftQuantityForItem(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityDecrease) throws CommerceException
pOrder
- the orderpShippingGroup
- the shipping group for which the item contains a gift quantitypCommerceItem
- the commerce itempQuantityDecrease
- the amount by which to decrease the quantityCommerceException
public void decreaseGiftQuantityForItem(Order pOrder, ShippingGroup pShippingGroup, CommerceItem pCommerceItem, long pQuantityDecrease, double pQuantityWithFractionDecrease) throws CommerceException
pOrder
- the orderpShippingGroup
- the shipping group for which the item contains a gift quantitypCommerceItem
- the commerce itempQuantityDecrease
- the amount by which to decrease the quantitypQuantityWithFractionDecrease
- the amount by which to decrease the quantityCommerceException
protected boolean areSitesCompatible(java.lang.String pSiteId1, java.lang.String pSiteId2)
siteScope
setting.pSiteId1
- the first site idpSiteId2
- the secont site idprotected boolean areSitesCompatible(java.lang.String pSiteId1, java.lang.String pSiteId2, java.lang.String pSiteScope)
pSiteScope
setting passed to the method.
Two sites are always compatible if gift lists
are not site limited. If gift lists are limited to one site then two sites are compatible
when they are the same. And if gift lists are limited to a sharing group then two sites are
compatible when they share the specified shareable type or when one of the site IDs is null
.pSiteId1
- the first site IDpSiteId2
- the second site IDpSiteScope
- may be "current", "all", or a shareable type ID and indicates whether gift
lists are universal or limited to a single site or shareable typeprotected boolean isGiftlistOwner(java.lang.String pGiftlistId, java.lang.String pProfileId)