atg.commerce.gifts
Class GiftlistTools

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

public class GiftlistTools
extends GenericService

This class provides the low level functionality for giftlist and gift item creation/manipulation. It performs the calls required to read and write information to and from the giftlist repository.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
GiftlistTools()
          Constructs a GiftlistTools object.
 
Method Summary
 boolean addGiftlistToProfile(MutableRepositoryItem pProfile, RepositoryItem pGiftlist)
          Add the given giftlist to the given profile.
 void addItem(RepositoryItem pItem)
          Add the given item to the repository
 boolean addItemToGiftlist(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId)
          Add the given giftlistItem to the giftlist
 boolean addOtherGiftlistToProfile(MutableRepositoryItem pProfile, RepositoryItem pGiftlist)
          Adds a giftlist to a customer's otherGiftlist property.
 MutableRepositoryItem createGiftlist()
          Creates and returns a new instance of a Giftlist repository item.
 MutableRepositoryItem createGiftlistItem()
          Creates a new giftlist item in the repository and returns the item.
 RepositoryItem getAddress(java.lang.String pAddressId)
          Return the address repository item for the given address id
 java.lang.String getCatalogRefIdProperty()
          Property to store Catalog Ref Id property on a giftlist item
 CatalogTools getCatalogTools()
          Returns property catalogTools.
 ClientLockManager getClientLockManager()
          The obtaining and releasing of locks on an item during writes is handled by the client lock manager.
 java.lang.String getCommentsProperty()
          Property to store Comments property on a giftlist
 java.lang.String getDefaultAddressType()
          returns the defaultAddressType
 java.lang.String getDefaultGiftlistItemType()
          Returns the defaultGiftlistItemType
 java.lang.String getDefaultGiftlistType()
          Returns the defaultGiftlistType.
 java.lang.String getDefaultProfileType()
          Returns the defaultProfileType.
 java.lang.String getDescriptionProperty()
          Property to store Description property on a giftlist
 java.lang.String getDisplayNameProperty()
          Property to store displayName property on a giftlist
 java.lang.String getEventDateProperty()
          Property to store eventDate property on a giftlist
 java.lang.String getEventNameProperty()
          Property to store eventName property on a giftlist
 java.lang.String getEventTypeProperty()
          Property to store eventType property on a giftlist
 RepositoryItem getGiftitem(java.lang.String pId)
          Returns a repository item giftitem with the id passed in.
 java.lang.String getGiftItemDescriptor()
          Property to store repository item descriptor name for gifts
 RepositoryItem getGiftlist(java.lang.String pId)
          Returns a repository item giftlist with the id passed in.
 java.lang.String getGiftlistItemDescriptor()
          Property to store repository item descriptor name for giftlists
 java.util.Collection getGiftlistItems(RepositoryItem pGiftlist)
          Return the collection of giftlist items in the given giftlist
 java.lang.String getGiftlistItemsProperty()
          Property of the profile to which we add new giftlist items
 Repository getGiftlistRepository()
          Returns property giftlistRepository.
 java.util.Collection getGiftlists(RepositoryItem pProfile)
          Returns a collection of the giftlists owned by the given profile
 java.lang.String getInstructionsProperty()
          Property to store Instructions property on a giftlist
 java.lang.String getItemsProperty()
          Property to store Items property on a giftlist
 java.lang.String getLastModifiedDateProperty()
          Property to store LastModifiedDate property on a giftlist
 java.lang.String getOtherGiftlistsProperty()
          Property of the profile to which we add other people's giftlists a a customer finds.
 java.lang.String getOwnerProperty()
          Property to store Owner property on a giftlist
 java.lang.String getPersonalGiftlistsProperty()
          Property of the profile to which we add new giftlists
 java.lang.String getProductIdProperty()
          Property to store Product Id property on a gift item
 MutableRepositoryItem getProfile(java.lang.String pProfileId)
          Return the profile with the specified Id.
 Repository getProfileRepository()
          Returns property profileRepository.
 java.lang.String getPublicProperty()
          Property to store Public property on a giftlist
 java.lang.String getPublishedProperty()
          Property to store Published property on a giftlist
 java.lang.String getQuantityDesiredProperty()
          Property to store QuantityDesired property on a giftlist
 java.lang.String getQuantityPurchasedProperty()
          Property to store QuantityPurchased property on a giftlist
 java.lang.String getShippingAddressProperty()
          Property to store the id of hte shipping address property on a giftlist
 java.lang.String getSiteProperty()
          Property to store the id of site property of a giftlist
 java.lang.String getSpecialInstructionsProperty()
          Property to store SpecialInstructions property on a giftlist
 javax.transaction.TransactionManager getTransactionManager()
          The beginning and ending of transactions are handled by the transaction manager.
 java.lang.String getWishlistProperty()
          Property of the profile to which we add new wishlist
 boolean removeGiftlistFromOtherProfiles(RepositoryItem pGiftlist)
          Removes a person's giftlist from the profiles of those shopping for the person.
 boolean removeGiftlistFromProfile(MutableRepositoryItem pProfile, RepositoryItem pGiftlist)
          Removes a giftlist from a person's profile.
 boolean removeItemFromGiftlist(MutableRepositoryItem pGiftlist, MutableRepositoryItem pGiftitem)
          Remove the given giftlistItem from the giftlist
 boolean removeItemFromGiftlist(java.lang.String pGiftlistId, java.lang.String pGiftlistItemId)
          Remove the given giftlistItem from the giftlist
 boolean removeOtherGiftlistFromProfile(MutableRepositoryItem pProfile, RepositoryItem pGiftlist)
          Removes a giftlist from a customer's otherGiftlist property.
 void setCatalogRefIdProperty(java.lang.String pCatalogRefIdProperty)
          Sets the catalogRefIdProperty
 void setCatalogTools(CatalogTools pCatalogTools)
          Sets property catalogTools.
 void setClientLockManager(ClientLockManager pClientLockManager)
          Sets property clientLockManager
 void setCommentsProperty(java.lang.String pCommentsProperty)
          Sets the comments property
 void setDefaultAddressType(java.lang.String pDefaultAddressType)
          Sets the defaultAddressType
 void setDefaultGiftlistItemType(java.lang.String pDefaultGiftlistItemType)
          Sets the defaultGiftlistItemType
 void setDefaultGiftlistType(java.lang.String pDefaultGiftlistType)
          Sets the defaultGiftlistType.
 void setDefaultProfileType(java.lang.String pDefaultProfileType)
          Sets the defaultProfileType.
 void setDescriptionProperty(java.lang.String pDescriptionProperty)
          Sets the description property
 void setDisplayNameProperty(java.lang.String pDisplayNameProperty)
          Sets the displayNameProperty
 void setEventDateProperty(java.lang.String pEventDateProperty)
          Sets the eventDate property
 void setEventNameProperty(java.lang.String pEventNameProperty)
          Sets the eventName property
 void setEventTypeProperty(java.lang.String pEventTypeProperty)
          Sets the eventTypeProperty
 void setGiftItemDescriptor(java.lang.String pGiftItemDescriptor)
          Sets the giftItemDescriptor
 void setGiftlistItemDescriptor(java.lang.String pGiftlistItemDescriptor)
          Sets the giftlistItemDescriptor
 void setGiftlistItemsProperty(java.lang.String pGiftlistItemsProperty)
          Sets the giftlistItemsProperty.
 void setGiftlistRepository(Repository pGiftlistRepository)
          Sets property giftlistRepository.
 void setInstructionsProperty(java.lang.String pInstructionsProperty)
          Sets the instructions property
 void setItemsProperty(java.lang.String pItemsProperty)
          Sets the itemsProperty
 void setLastModifiedDateProperty(java.lang.String pLastModifiedDateProperty)
          Sets the lastModifiedDateProperty
 void setOtherGiftlistsProperty(java.lang.String pOtherGiftlistsProperty)
          Sets the otherGiftlistsProperty
 void setOwnerProperty(java.lang.String pOwnerProperty)
          Sets the ownerProperty
 void setPersonalGiftlistsProperty(java.lang.String pPersonalGiftlistsProperty)
          Sets the personalGiftlistsProperty
 void setProductIdProperty(java.lang.String pProductIdProperty)
          Sets the productIdProperty
 void setProfileRepository(Repository pProfileRepository)
          Sets property profileRepository.
 void setPublicProperty(java.lang.String pPublicProperty)
          Sets the publicProperty
 void setPublishedProperty(java.lang.String pPublishedProperty)
          Sets the publishedProperty
 void setQuantityDesiredProperty(java.lang.String pQuantityDesiredProperty)
          Sets the quantityDesiredProperty
 void setQuantityPurchasedProperty(java.lang.String pQuantityPurchasedProperty)
          Sets the quantityPurchasedProperty
 void setShippingAddressProperty(java.lang.String pShippingAddressProperty)
          Sets the shippingAddressProperty
 void setSiteProperty(java.lang.String pSiteProperty)
          Sets the siteProperty
 void setSpecialInstructionsProperty(java.lang.String pSpecialInstructionsProperty)
          Sets the specialInstructions property
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets property transactionManager
 void setWishlistProperty(java.lang.String pWishlistProperty)
          Sets the wishlistProperty
 boolean updateGiftlist(java.lang.String pProfileId, MutableRepositoryItem pGiftlist, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pShippingAddressId, java.lang.String pDescription, java.lang.String pComments, java.lang.String pInstructions)
          Update the given giftlist with the given parameters.
 boolean updateGiftlist(java.lang.String pProfileId, MutableRepositoryItem pGiftlist, boolean pPublished, java.lang.String pEventName, java.util.Date pEventDate, java.lang.String pEventType, java.lang.String pShippingAddressId, java.lang.String pDescription, java.lang.String pComments, java.lang.String pInstructions, java.lang.String pSiteId)
          Update the given giftlist with the given parameters.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

GiftlistTools

public GiftlistTools()
Constructs a GiftlistTools object.

Method Detail

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager

Parameters:
pTransactionManager - The beginning and ending of transactions are handled by the transaction manager.

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
The beginning and ending of transactions are handled by the transaction manager.

Returns:
the transaction manager

setClientLockManager

public void setClientLockManager(ClientLockManager pClientLockManager)
Sets property clientLockManager

Parameters:
pClientLockManager - The client lock manager acquires and releases locks to during a transaction

getClientLockManager

public ClientLockManager getClientLockManager()
The obtaining and releasing of locks on an item during writes is handled by the client lock manager.

Returns:
the client lock manager

setCatalogTools

public void setCatalogTools(CatalogTools pCatalogTools)
Sets property catalogTools.

Parameters:
pCatalogTools - the catalogTools which provides low level operations on the catalog.

getCatalogTools

public CatalogTools getCatalogTools()
Returns property catalogTools. Default catalogTools.

Returns:
property catalogTools. Default catalogTools.

setProfileRepository

public void setProfileRepository(Repository pProfileRepository)
Sets property profileRepository.

Parameters:
pProfileRepository - The property to store the value of the profile repository.

getProfileRepository

public Repository getProfileRepository()
Returns property profileRepository. Default ProfileRepository.

Returns:
property profileRepository. Default ProfileRepository.

setGiftlistRepository

public void setGiftlistRepository(Repository pGiftlistRepository)
Sets property giftlistRepository.

Parameters:
pGiftlistRepository - The property to store the value of the giftlist repository.

getGiftlistRepository

public Repository getGiftlistRepository()
Returns property giftlistRepository. Default Giftlists.

Returns:
property giftlistRepository. Default Giftlists.

setDefaultProfileType

public void setDefaultProfileType(java.lang.String pDefaultProfileType)
Sets the defaultProfileType.

Parameters:
pDefaultProfileType - The property to store the default profile type.

getDefaultProfileType

public java.lang.String getDefaultProfileType()
Returns the defaultProfileType.

Returns:
the defaultProfileType

setDefaultAddressType

public void setDefaultAddressType(java.lang.String pDefaultAddressType)
Sets the defaultAddressType

Parameters:
pDefaultAddressType - The property to store the default address type.

getDefaultAddressType

public java.lang.String getDefaultAddressType()
returns the defaultAddressType

Returns:
the defaultAddressType

setDefaultGiftlistType

public void setDefaultGiftlistType(java.lang.String pDefaultGiftlistType)
Sets the defaultGiftlistType.

Parameters:
pDefaultGiftlistType - The property to store the default giftlist type.

getDefaultGiftlistType

public java.lang.String getDefaultGiftlistType()
Returns the defaultGiftlistType.

Returns:
the defaultGiftlistType.

setDefaultGiftlistItemType

public void setDefaultGiftlistItemType(java.lang.String pDefaultGiftlistItemType)
Sets the defaultGiftlistItemType

Parameters:
pDefaultGiftlistItemType - The property to store the default giftitem type.

getDefaultGiftlistItemType

public java.lang.String getDefaultGiftlistItemType()
Returns the defaultGiftlistItemType

Returns:
the defaultGiftlistItemType

setGiftlistItemsProperty

public void setGiftlistItemsProperty(java.lang.String pGiftlistItemsProperty)
Sets the giftlistItemsProperty.

Parameters:
pGiftlistItemsProperty - Property of the profile to which we add new giftlist items

getGiftlistItemsProperty

public java.lang.String getGiftlistItemsProperty()
Property of the profile to which we add new giftlist items

Returns:
giftlistItemsProperty

setPersonalGiftlistsProperty

public void setPersonalGiftlistsProperty(java.lang.String pPersonalGiftlistsProperty)
Sets the personalGiftlistsProperty

Parameters:
pPersonalGiftlistsProperty - Property of the profile to which we add new giftlists

getPersonalGiftlistsProperty

public java.lang.String getPersonalGiftlistsProperty()
Property of the profile to which we add new giftlists

Returns:
the property of the profile to which we add new giftlists

setWishlistProperty

public void setWishlistProperty(java.lang.String pWishlistProperty)
Sets the wishlistProperty

Parameters:
pWishlistProperty - Property of the profile to which we add new wishlist

getWishlistProperty

public java.lang.String getWishlistProperty()
Property of the profile to which we add new wishlist

Returns:
the property of the profile to which we add new wishlist

setOtherGiftlistsProperty

public void setOtherGiftlistsProperty(java.lang.String pOtherGiftlistsProperty)
Sets the otherGiftlistsProperty

Parameters:
pOtherGiftlistsProperty - Property of the profile to which we add giftlists a customer finds for others.

getOtherGiftlistsProperty

public java.lang.String getOtherGiftlistsProperty()
Property of the profile to which we add other people's giftlists a a customer finds.

Returns:
the property of the profile to which we add other people's giftlists.

setEventTypeProperty

public void setEventTypeProperty(java.lang.String pEventTypeProperty)
Sets the eventTypeProperty

Parameters:
pEventTypeProperty -

getEventTypeProperty

public java.lang.String getEventTypeProperty()
Property to store eventType property on a giftlist

Returns:
the property of the giftlist event type.

setOwnerProperty

public void setOwnerProperty(java.lang.String pOwnerProperty)
Sets the ownerProperty

Parameters:
pOwnerProperty -

getOwnerProperty

public java.lang.String getOwnerProperty()
Property to store Owner property on a giftlist

Returns:
the property of the giftlist owner.

setEventDateProperty

public void setEventDateProperty(java.lang.String pEventDateProperty)
Sets the eventDate property

Parameters:
pEventDateProperty -

getEventDateProperty

public java.lang.String getEventDateProperty()
Property to store eventDate property on a giftlist

Returns:
the property of the giftlist event Date.

setEventNameProperty

public void setEventNameProperty(java.lang.String pEventNameProperty)
Sets the eventName property

Parameters:
pEventNameProperty -

getEventNameProperty

public java.lang.String getEventNameProperty()
Property to store eventName property on a giftlist

Returns:
the property of the giftlist event Name.

setCommentsProperty

public void setCommentsProperty(java.lang.String pCommentsProperty)
Sets the comments property

Parameters:
pCommentsProperty - The comments property of the giftlist in the repository

getCommentsProperty

public java.lang.String getCommentsProperty()
Property to store Comments property on a giftlist

Returns:
the property of the giftlist comments.

setDescriptionProperty

public void setDescriptionProperty(java.lang.String pDescriptionProperty)
Sets the description property

Parameters:
pDescriptionProperty - The description property of the giftlist in the repository

getDescriptionProperty

public java.lang.String getDescriptionProperty()
Property to store Description property on a giftlist

Returns:
the property of the giftlist description.

setInstructionsProperty

public void setInstructionsProperty(java.lang.String pInstructionsProperty)
Sets the instructions property

Parameters:
pInstructionsProperty - The instructions property of the giftlist in the repository

getInstructionsProperty

public java.lang.String getInstructionsProperty()
Property to store Instructions property on a giftlist

Returns:
the property to store Instructions property on a giftlist

setSpecialInstructionsProperty

public void setSpecialInstructionsProperty(java.lang.String pSpecialInstructionsProperty)
Sets the specialInstructions property

Parameters:
pSpecialInstructionsProperty - The special instructions property of the giftlist in the repository

getSpecialInstructionsProperty

public java.lang.String getSpecialInstructionsProperty()
Property to store SpecialInstructions property on a giftlist

Returns:
the property to store SpecialInstructions property on a giftlist

setPublicProperty

public void setPublicProperty(java.lang.String pPublicProperty)
Sets the publicProperty

Parameters:
pPublicProperty -

getPublicProperty

public java.lang.String getPublicProperty()
Property to store Public property on a giftlist

Returns:
the property of the giftlist to identify the giftlist as public.

setPublishedProperty

public void setPublishedProperty(java.lang.String pPublishedProperty)
Sets the publishedProperty

Parameters:
pPublishedProperty -

getPublishedProperty

public java.lang.String getPublishedProperty()
Property to store Published property on a giftlist

Returns:
the property of the giftlist to identify the giftlist as published.

setShippingAddressProperty

public void setShippingAddressProperty(java.lang.String pShippingAddressProperty)
Sets the shippingAddressProperty

Parameters:
pShippingAddressProperty -

getShippingAddressProperty

public java.lang.String getShippingAddressProperty()
Property to store the id of hte shipping address property on a giftlist

Returns:
the property of the giftlist which identifies the shipping address id.

setSiteProperty

public void setSiteProperty(java.lang.String pSiteProperty)
Sets the siteProperty

Parameters:
pSiteProperty -

getSiteProperty

public java.lang.String getSiteProperty()
Property to store the id of site property of a giftlist

Returns:
the property of the giftlist which identifies the site id.

setItemsProperty

public void setItemsProperty(java.lang.String pItemsProperty)
Sets the itemsProperty

Parameters:
pItemsProperty -

getItemsProperty

public java.lang.String getItemsProperty()
Property to store Items property on a giftlist

Returns:
the property of the giftlist Items.

setLastModifiedDateProperty

public void setLastModifiedDateProperty(java.lang.String pLastModifiedDateProperty)
Sets the lastModifiedDateProperty

Parameters:
pLastModifiedDateProperty -

getLastModifiedDateProperty

public java.lang.String getLastModifiedDateProperty()
Property to store LastModifiedDate property on a giftlist

Returns:
the property of the giftlist lastModifiedDate.

setCatalogRefIdProperty

public void setCatalogRefIdProperty(java.lang.String pCatalogRefIdProperty)
Sets the catalogRefIdProperty

Parameters:
pCatalogRefIdProperty -

getCatalogRefIdProperty

public java.lang.String getCatalogRefIdProperty()
Property to store Catalog Ref Id property on a giftlist item

Returns:
the property of the gift item CatalogRefId.

setProductIdProperty

public void setProductIdProperty(java.lang.String pProductIdProperty)
Sets the productIdProperty

Parameters:
pProductIdProperty -

getProductIdProperty

public java.lang.String getProductIdProperty()
Property to store Product Id property on a gift item

Returns:
the property of the gift item ProductId.

setQuantityDesiredProperty

public void setQuantityDesiredProperty(java.lang.String pQuantityDesiredProperty)
Sets the quantityDesiredProperty

Parameters:
pQuantityDesiredProperty -

getQuantityDesiredProperty

public java.lang.String getQuantityDesiredProperty()
Property to store QuantityDesired property on a giftlist

Returns:
the property of the gift item QuantityDesired.

setQuantityPurchasedProperty

public void setQuantityPurchasedProperty(java.lang.String pQuantityPurchasedProperty)
Sets the quantityPurchasedProperty

Parameters:
pQuantityPurchasedProperty -

getQuantityPurchasedProperty

public java.lang.String getQuantityPurchasedProperty()
Property to store QuantityPurchased property on a giftlist

Returns:
the property of the gift item QuantityPurchased.

setDisplayNameProperty

public void setDisplayNameProperty(java.lang.String pDisplayNameProperty)
Sets the displayNameProperty

Parameters:
pDisplayNameProperty -

getDisplayNameProperty

public java.lang.String getDisplayNameProperty()
Property to store displayName property on a giftlist

Returns:
the property of the gift item displayName.

setGiftlistItemDescriptor

public void setGiftlistItemDescriptor(java.lang.String pGiftlistItemDescriptor)
Sets the giftlistItemDescriptor

Parameters:
pGiftlistItemDescriptor -

getGiftlistItemDescriptor

public java.lang.String getGiftlistItemDescriptor()
Property to store repository item descriptor name for giftlists

Returns:
the property to store the repository item descriptor name for giftlists

setGiftItemDescriptor

public void setGiftItemDescriptor(java.lang.String pGiftItemDescriptor)
Sets the giftItemDescriptor

Parameters:
pGiftItemDescriptor -

getGiftItemDescriptor

public java.lang.String getGiftItemDescriptor()
Property to store repository item descriptor name for gifts

Returns:
the property of the gift item descriptor

createGiftlist

public MutableRepositoryItem createGiftlist()
                                     throws CommerceException
Creates and returns a new instance of a Giftlist repository item.

Returns:
the new giftlist.
Throws:
CommerceException - if the creation of the giftlist fails.

getGiftlist

public RepositoryItem getGiftlist(java.lang.String pId)
                           throws CommerceException
Returns a repository item giftlist with the id passed in.

Parameters:
pId - The id of the giftlist
Returns:
The giftlist repository item with the id supplied.
Throws:
CommerceException - if the retrieval of the giftlist fails.

getGiftitem

public RepositoryItem getGiftitem(java.lang.String pId)
                           throws CommerceException
Returns a repository item giftitem with the id passed in.

Parameters:
pId - The id of the giftitem
Returns:
The gift repository item with the id supplied.
Throws:
CommerceException - if the retrieval of the giftitem fails.

addItemToGiftlist

public boolean addItemToGiftlist(java.lang.String pGiftlistId,
                                 java.lang.String pGiftlistItemId)
                          throws CommerceException
Add the given giftlistItem to the giftlist

Parameters:
pGiftlistId - the id of the giftlist to add the item to
pGiftlistItemId - the id of the item to add to the giftlist
Returns:
success
Throws:
CommerceException - if there was a problem adding the item to the giftlist.

removeItemFromGiftlist

public boolean removeItemFromGiftlist(java.lang.String pGiftlistId,
                                      java.lang.String pGiftlistItemId)
                               throws CommerceException
Remove the given giftlistItem from the giftlist

Parameters:
pGiftlistId - the id of the giftlist to remove the gift from
pGiftlistItemId - the id of the item to remove from the giftlist
Returns:
success
Throws:
CommerceException - if there was a problem removing the item from the giftlist.

removeItemFromGiftlist

public boolean removeItemFromGiftlist(MutableRepositoryItem pGiftlist,
                                      MutableRepositoryItem pGiftitem)
                               throws CommerceException
Remove the given giftlistItem from the giftlist

Parameters:
pGiftlist - the giftlist to remove the gift from
pGiftitem - the item to remove
Returns:
success
Throws:
CommerceException - if there was a problem removing the item from the giftlist.

addOtherGiftlistToProfile

public boolean addOtherGiftlistToProfile(MutableRepositoryItem pProfile,
                                         RepositoryItem pGiftlist)
                                  throws CommerceException
Adds a giftlist to a customer's otherGiftlist property. These are the giftlists currently being shopped for.

Parameters:
pProfile - the profile to add the giftlist to
pGiftlist - the giftlist to add to the profile
Returns:
success
Throws:
CommerceException - if there was a problem adding the giftlist to the customer's profile

removeOtherGiftlistFromProfile

public boolean removeOtherGiftlistFromProfile(MutableRepositoryItem pProfile,
                                              RepositoryItem pGiftlist)
                                       throws CommerceException
Removes a giftlist from a customer's otherGiftlist property. These are the giftlists currently being shopped for.

Parameters:
pProfile - the profile to add the giftlist to
pGiftlist - the giftlist to add to the profile
Returns:
success
Throws:
CommerceException - if there was a problem removing the giftlist from the customer's profile

createGiftlistItem

public MutableRepositoryItem createGiftlistItem()
                                         throws CommerceException
Creates a new giftlist item in the repository and returns the item.

Returns:
the new giftlist item.
Throws:
CommerceException - if the creation of the giftlist item fails.

addItem

public void addItem(RepositoryItem pItem)
             throws RepositoryException
Add the given item to the repository

Parameters:
pItem - the item to add to the repository
Throws:
RepositoryException - if there was a problem accessing the repository

getGiftlistItems

public java.util.Collection getGiftlistItems(RepositoryItem pGiftlist)
                                      throws CommerceException
Return the collection of giftlist items in the given giftlist

Parameters:
pGiftlist - the giftlist to get items from.
Returns:
the collection of giftlist items in a giftlist
Throws:
CommerceException - if the retrieval of the giftlist items fails.

getGiftlists

public java.util.Collection getGiftlists(RepositoryItem pProfile)
                                  throws CommerceException
Returns a collection of the giftlists owned by the given profile

Parameters:
pProfile - the profile of which to get the giftlists.
Returns:
the collection of giftlists
Throws:
CommerceException - if the retrieval of the giftlists fails.

getProfile

public MutableRepositoryItem getProfile(java.lang.String pProfileId)
Return the profile with the specified Id.

Parameters:
pProfileId - the id of the profile
Returns:
The profile

getAddress

public RepositoryItem getAddress(java.lang.String pAddressId)
Return the address repository item for the given address id

Parameters:
pAddressId - the id of the address
Returns:
address repository item based on id.

addGiftlistToProfile

public boolean addGiftlistToProfile(MutableRepositoryItem pProfile,
                                    RepositoryItem pGiftlist)
                             throws CommerceException
Add the given giftlist to the given profile. These are a person's own giftlists.

Parameters:
pProfile - the profile to add the giftlist to
pGiftlist - the giftlist to add to the profile
Returns:
success
Throws:
CommerceException - if there was a problem adding the giftlist to the profile.

removeGiftlistFromOtherProfiles

public boolean removeGiftlistFromOtherProfiles(RepositoryItem pGiftlist)
                                        throws CommerceException,
                                               RepositoryException
Removes a person's giftlist from the profiles of those shopping for the person.

Parameters:
pGiftlist - the giftlist to remove from the profile
Returns:
success
Throws:
CommerceException - if there was a problem removing the giftlist from the profile.
RepositoryException

removeGiftlistFromProfile

public boolean removeGiftlistFromProfile(MutableRepositoryItem pProfile,
                                         RepositoryItem pGiftlist)
                                  throws CommerceException,
                                         RepositoryException
Removes a giftlist from a person's profile. These are a customer's own giftlists.

Parameters:
pProfile - the profile to remove the giftlist from
pGiftlist - the giftlist to add to the profile
Returns:
success
Throws:
CommerceException - if there was a problem removing the giftlist from the profile.
RepositoryException

updateGiftlist

public boolean updateGiftlist(java.lang.String pProfileId,
                              MutableRepositoryItem pGiftlist,
                              boolean pPublished,
                              java.lang.String pEventName,
                              java.util.Date pEventDate,
                              java.lang.String pEventType,
                              java.lang.String pShippingAddressId,
                              java.lang.String pDescription,
                              java.lang.String pComments,
                              java.lang.String pInstructions)
                       throws CommerceException
Update the given giftlist with the given parameters.

Parameters:
pProfileId - the owner of the giftlist.
pGiftlist - the giftlist to update.
pPublished - boolean to identify whether giftlist is published.
pEventName - the name of the event for the giftlist.
pEventDate - the date of the event.
pEventType - the event type (e.g. birthday).
pShippingAddressId - the address where to ship the items.
pDescription - the description of the giftlist/event.
pComments - comments.
pInstructions - any special instructions on the giftlist.
Returns:
success
Throws:
CommerceException - if there was a problem updating the giftlist.

updateGiftlist

public boolean updateGiftlist(java.lang.String pProfileId,
                              MutableRepositoryItem pGiftlist,
                              boolean pPublished,
                              java.lang.String pEventName,
                              java.util.Date pEventDate,
                              java.lang.String pEventType,
                              java.lang.String pShippingAddressId,
                              java.lang.String pDescription,
                              java.lang.String pComments,
                              java.lang.String pInstructions,
                              java.lang.String pSiteId)
                       throws CommerceException
Update the given giftlist with the given parameters.

Parameters:
pProfileId - the owner of the giftlist.
pGiftlist - the giftlist to update.
pPublished - boolean to identify whether giftlist is published.
pEventName - the name of the event for the giftlist.
pEventDate - the date of the event.
pEventType - the event type (e.g. birthday).
pShippingAddressId - the address where to ship the items.
pDescription - the description of the giftlist/event.
pComments - comments.
pInstructions - any special instructions on the giftlist.
pSiteId - site id
Returns:
success
Throws:
CommerceException - if there was a problem updating the giftlist.