|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.gifts.GiftlistManager
public class GiftlistManager
This class is the business layer object for the management of giftlist and giftitem object manipulation. It provides the high level access to giftlists. It makes calls to lowerlevel utilities in GiftlistTools which perform the operations on the repository.
Field Summary | |
---|---|
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 |
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 | |
---|---|
GiftlistManager()
Constructs a GiftlistManager object. |
Method Summary | |
---|---|
void |
addCatalogItemToGiftlist(java.lang.String pSkuId,
java.lang.String pProductId,
java.lang.String pGiftlistId,
java.lang.String pSiteId,
long pQuantity)
|
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 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 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,
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)
Decreate the quantityPurchased for this giftlist item by the given quantity |
void |
decreaseGiftQuantityForItem(Order pOrder,
ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
long pQuantityDecrease)
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 |
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 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. |
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. |
atg.multisite.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 |
increaseGiftlistItemQuantityPurchased(java.lang.String pGiftlistId,
java.lang.String pGiftlistItemId,
long pQuantity)
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. |
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 |
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(atg.multisite.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. |
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 ALL
public static final java.lang.String CURRENT
protected static java.util.ResourceBundle sResourceBundle
protected java.lang.String[] mCompareGiftListAddressPropertyNames
Constructor Detail |
---|
public GiftlistManager()
Method Detail |
---|
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(atg.multisite.SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the siteGroupManagerpublic atg.multisite.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 to
CommerceException
- 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 instructions
CommerceException
- 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 created
CommerceException
- 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 instructions
CommerceException
- 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 id
CommerceException
- 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 giftlist
CommerceException
- 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 remove
CommerceException
- 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 add
CommerceException
- 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 item
CommerceException
- 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 created
CommerceException
- 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
CommerceException
public 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 add
CommerceException
- 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 remove
CommerceException
- 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 buyg
CommerceException
- 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 giftlist
RepositoryItem
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 giftlist
public boolean setGiftlistOwner(java.lang.String pGiftlistId, RepositoryItem pProfile)
pGiftlistId
- The id of the giftlist being changed.pProfile
- The new owner of this giftlist
public java.lang.String getGiftlistOwner(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public java.lang.String getWishlistId(java.lang.String pProfileId)
pProfileId
- the profile
public 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 question
public boolean setGiftlistPublished(java.lang.String pGiftlistId, boolean pPublished)
pGiftlistId
- The id of the giftlist being changed.pPublished
- The new value of the published property
public boolean isGiftlistPublished(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public 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 to
public java.lang.String getGiftlistEventName(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public boolean setGiftlistEventDate(java.lang.String pGiftlistId, java.util.Date pEventDate)
pGiftlistId
- The id of the giftlist being changed.pEventDate
- The date that this event occurs
public java.util.Date getGiftlistEventDate(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public 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 question
public boolean setGiftlistDescription(java.lang.String pGiftlistId, java.lang.String pDescription)
pGiftlistId
- The id of the giftlist being changed.pDescription
- The new description of this event
public java.lang.String getGiftlistDescription(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public boolean setGiftlistComments(java.lang.String pGiftlistId, java.lang.String pComments)
pGiftlistId
- The id of the giftlist being changed.pComments
- The new comments for this giftlist
public java.lang.String getGiftlistComments(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public 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 giftlist
public RepositoryItem getGiftlistShippingAddress(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public boolean setGiftlistSite(java.lang.String pGiftlistId, java.lang.String pSiteId)
pGiftlistId
- The id of the giftlist being changed.pSiteId
- The site id
public java.lang.String getGiftlistSite(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public 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 instruction
public java.util.Map getSpecialInstruction(java.lang.String pGiftlistId)
pGiftlistId
- the giftlist in question
public 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 item
public java.lang.String getGiftlistItemSite(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 item
public java.lang.String getGiftlistItemCatalogRefId(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 item
public java.lang.String getGiftlistItemProductId(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public java.lang.String getGiftlistItemId(java.lang.String pGiftlistId, java.lang.String pSkuId)
pGiftlistId
- the giftlist idpSkuId
- the sku id
public 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 id
public 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 item
public java.lang.String getGiftlistItemDisplayName(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 description
public java.lang.String getGiftlistItemDescription(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 wanted
public long getGiftlistItemQuantityDesired(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 by
public 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 purchased
public long getGiftlistItemQuantityPurchased(java.lang.String pGiftlistItemId)
pGiftlistItemId
- the giftlist item in question
public 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 by
public 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 by
public 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 purchased
CommerceException
- 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
- pAddress
-
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 Group
CommerceException
- thrown if an input parameter is invalidpublic long getGiftQuantity(Order pOrder, CommerceItem pCommerceItem) throws CommerceException
pOrder
- the Order containing the CommerceItempCommerceItem
- the Commerce Item
CommerceException
- 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 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 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 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 quantity
CommerceException
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 quantity
CommerceException
protected boolean areSitesCompatible(java.lang.String pSiteId1, java.lang.String pSiteId2)
siteScope
setting.
pSiteId1
- the first site idpSiteId2
- the secont site id
protected 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 type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |