atg.commerce.promotion
Class PromotionImportExportTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.promotion.PromotionImportExportTools
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class PromotionImportExportTools
extends GenericService


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
PromotionImportExportTools()
           
 
Method Summary
 RepositoryItem createClosenessQualifier(java.util.Map<java.lang.String,java.lang.String> pClosenessQualifierPropertyValues)
          createClosenessQualifier This method creates a closeness qualifier repository item and sets its properties to the values specified in the map parameter.
 RepositoryItem createPromotion(java.util.Map<java.lang.String,java.lang.String> pPromotionPropertyValues, java.lang.String pItemDescriptor)
          createPromotion This method creates a promotion repository item and sets its properties to the values specified in the map parameter.
 RepositoryItem createPromotionFolder(java.util.Map<java.lang.String,java.lang.String> pPromotionFolderPropertyValues)
          createPromotionFolder This method creates a promotion folder repository item and sets its properties to the values specified in the map parameter.
 RepositoryItem createPromotionFolderFromPath(java.lang.String pPromotionFolderPath)
          createPromotionFolderFromPath This method creates a series of promotion folders, from the path provided.
 void deleteClosenessQualifier(java.lang.String pClosenessQualifierId)
          deleteClosenessQualifier This method deletes a closeness qualifier from the promotions repository.
 ClaimableTools getClaimableTools()
          Gets claimableTools.
 RepositoryItem getClosenessQualifier(java.lang.String pClosenessQualifierId)
          getClosenessQualifier This method retrieves a closeness qualifier repository item using the specified id.
 java.lang.String getClosenessQualifierItemDescriptorName()
          Get the closeness qualifier item descriptor name.
 java.lang.String getClosenessQualifierPMDLRuleProperty()
          Get the closeness qualifier PMDL rule property.
 java.lang.String getClosenessQualifierTemplateValuesProperty()
          Get the closeness qualifier template values property.
 RepositoryItem getPromotion(java.lang.String pPromotionId)
          getPromotion This method retrieves a promotion repository item using the specified id.
 RepositoryItem getPromotionFolder(java.lang.String pPromotionFolderId)
          getPromotionFolder This method retrieves a promotion folder repository item using the specified id.
 java.lang.String getPromotionFolderItemDescriptorName()
          Get the promotion folder item descriptor name.
 java.lang.String getPromotionFolderNameProperty()
          Get the promotion folder name property.
 java.lang.String getPromotionFolderParentFolderProperty()
          Get the promotion folder parent folder property.
 java.lang.String getPromotionFolderPath(java.lang.String pPromotionFolderId)
          getPromotionFolderPath This method retrieves the promotion folder's full path.
 java.util.List<PromotionImportExportInfo> getPromotionsById(java.util.List<java.lang.String> pPromotionIds)
          getPromotionsById This method retrieves the promotion repository items, specified by the ids in the list.
 java.util.List<PromotionImportExportInfo> getPromotionsByRQLQuery(java.lang.String pRQLQuery)
          getPromotionsByRQLQuery This method retrieves a list of promotion repository items, using the specified RQL query.
 PromotionTools getPromotionTools()
          Get promotionTools
 javax.transaction.TransactionManager getTransactionManager()
          Gets the transactionManager.
 java.util.Properties getTypeCodeToItemDescriptorMap()
          Get the typeCodeToItemDescriptorMap property.
protected  java.util.List<ClosenessQualifierImportExportInfo> processClosenessQualifiers(java.util.Set pClosenessQualifiers)
          processClosenessQualifiers This method processes an array of closeness qualifier repository items to get thie property values.
protected  java.util.List<PromotionImportExportInfo> processPromotions(RepositoryItem[] pPromotions)
          processPromotions This method process the array of repository items and gets all of the associated details
 void setClaimableTools(ClaimableTools pClaimableTools)
          Sets claimableTools.
 void setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
          Set the closeness qualifier item descriptor name.
 void setClosenessQualifierPMDLRuleProperty(java.lang.String pClosenessQualifierPMDLRuleProperty)
          Set the closeness qualifier PMDL rule property.
 void setClosenessQualifierTemplateValuesProperty(java.lang.String pClosenessQualifierTemplateValuesProperty)
          Set the closeness qualifier template values property.
 void setPromotionFolderItemDescriptorName(java.lang.String pPromotionFolderItemDescriptorName)
          Set the promotion folder item descriptor name.
 void setPromotionFolderNameProperty(java.lang.String pPromotionFolderNameProperty)
          Set the promotion folder name property.
 void setPromotionFolderParentFolderProperty(java.lang.String pPromotionFolderParentFolderProperty)
          Set the promotion folder parent folder property.
 void setPromotionTools(PromotionTools pPromotionTools)
          Set promotionTools
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets the transactionManager.
 void setTypeCodeToItemDescriptorMap(java.util.Properties pTypeCodeToItemDescriptorMap)
          Set the typeCodeToItemDescriptorMap property.
 RepositoryItem updateClosenessQualifier(java.util.Map<java.lang.String,java.lang.String> pClosenessQualifierPropertyValues)
          updateClosenessQualifier This method updates a closeness qualifier repository item, setting its properties to the values specified in the map parameter.
 RepositoryItem updatePromotion(java.util.Map<java.lang.String,java.lang.String> pPromotionPropertyValues, java.lang.String pItemDescriptor)
          updatePromotion This method updates a promotion repository item, setting its properties to the values specified in the map parameter.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

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

See Also:
Constant Field Values
Constructor Detail

PromotionImportExportTools

public PromotionImportExportTools()
Method Detail

setPromotionTools

public void setPromotionTools(PromotionTools pPromotionTools)
Set promotionTools


getPromotionTools

public PromotionTools getPromotionTools()
Get promotionTools


getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Gets the transactionManager.


setTransactionManager

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


getClaimableTools

public ClaimableTools getClaimableTools()
Gets claimableTools.


setClaimableTools

public void setClaimableTools(ClaimableTools pClaimableTools)
Sets claimableTools.


getClosenessQualifierItemDescriptorName

public java.lang.String getClosenessQualifierItemDescriptorName()
Get the closeness qualifier item descriptor name.


setClosenessQualifierItemDescriptorName

public void setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
Set the closeness qualifier item descriptor name.


getClosenessQualifierPMDLRuleProperty

public java.lang.String getClosenessQualifierPMDLRuleProperty()
Get the closeness qualifier PMDL rule property.


setClosenessQualifierPMDLRuleProperty

public void setClosenessQualifierPMDLRuleProperty(java.lang.String pClosenessQualifierPMDLRuleProperty)
Set the closeness qualifier PMDL rule property.


getClosenessQualifierTemplateValuesProperty

public java.lang.String getClosenessQualifierTemplateValuesProperty()
Get the closeness qualifier template values property.


setClosenessQualifierTemplateValuesProperty

public void setClosenessQualifierTemplateValuesProperty(java.lang.String pClosenessQualifierTemplateValuesProperty)
Set the closeness qualifier template values property.


getPromotionFolderItemDescriptorName

public java.lang.String getPromotionFolderItemDescriptorName()
Get the promotion folder item descriptor name.


setPromotionFolderItemDescriptorName

public void setPromotionFolderItemDescriptorName(java.lang.String pPromotionFolderItemDescriptorName)
Set the promotion folder item descriptor name.


getPromotionFolderNameProperty

public java.lang.String getPromotionFolderNameProperty()
Get the promotion folder name property.


setPromotionFolderNameProperty

public void setPromotionFolderNameProperty(java.lang.String pPromotionFolderNameProperty)
Set the promotion folder name property.


getPromotionFolderParentFolderProperty

public java.lang.String getPromotionFolderParentFolderProperty()
Get the promotion folder parent folder property.


setPromotionFolderParentFolderProperty

public void setPromotionFolderParentFolderProperty(java.lang.String pPromotionFolderParentFolderProperty)
Set the promotion folder parent folder property.


getTypeCodeToItemDescriptorMap

public java.util.Properties getTypeCodeToItemDescriptorMap()
Get the typeCodeToItemDescriptorMap property.


setTypeCodeToItemDescriptorMap

public void setTypeCodeToItemDescriptorMap(java.util.Properties pTypeCodeToItemDescriptorMap)
Set the typeCodeToItemDescriptorMap property.


createPromotion

public RepositoryItem createPromotion(java.util.Map<java.lang.String,java.lang.String> pPromotionPropertyValues,
                                      java.lang.String pItemDescriptor)
                               throws atg.commerce.promotion.PromotionException
createPromotion This method creates a promotion repository item and sets its properties to the values specified in the map parameter. If an id is not specified in the map, it is generated.

Parameters:
pPromotionPropertyValues - - a map of the promotion property names and their values.
pItemDescriptor - - the item descriptor to use for promotion creation.
Returns:
- the newly created promotion repository item.
Throws:
atg.commerce.promotion.PromotionException

getPromotion

public RepositoryItem getPromotion(java.lang.String pPromotionId)
                            throws atg.commerce.promotion.PromotionException
getPromotion This method retrieves a promotion repository item using the specified id.

Parameters:
pPromotionId - - the id of the promotion repository item to retrieve.
Returns:
- the promotion repository item.
Throws:
atg.commerce.promotion.PromotionException

getPromotionsById

public java.util.List<PromotionImportExportInfo> getPromotionsById(java.util.List<java.lang.String> pPromotionIds)
                                                            throws atg.commerce.promotion.PromotionException
getPromotionsById This method retrieves the promotion repository items, specified by the ids in the list. If the list is null then all promotions are returned.

Parameters:
pPromotionIds - - the list of promotion ids used to retrieve the repository items.
Returns:
- the promotion repository items.
Throws:
atg.commerce.promotion.PromotionException

getPromotionsByRQLQuery

public java.util.List<PromotionImportExportInfo> getPromotionsByRQLQuery(java.lang.String pRQLQuery)
                                                                  throws atg.commerce.promotion.PromotionException
getPromotionsByRQLQuery This method retrieves a list of promotion repository items, using the specified RQL query.

Parameters:
pRQLQuery - - the RQL query to use.
Returns:
- the promotion repository items.
Throws:
atg.commerce.promotion.PromotionException

updatePromotion

public RepositoryItem updatePromotion(java.util.Map<java.lang.String,java.lang.String> pPromotionPropertyValues,
                                      java.lang.String pItemDescriptor)
                               throws atg.commerce.promotion.PromotionException
updatePromotion This method updates a promotion repository item, setting its properties to the values specified in the map parameter.

Parameters:
pPromotionPropertyValues - - a map of the property names and their values.
pItemDescriptor - - the item descriptor to be used when updating the promotion.
Returns:
- the updated promotion repository item.
Throws:
atg.commerce.promotion.PromotionException

createClosenessQualifier

public RepositoryItem createClosenessQualifier(java.util.Map<java.lang.String,java.lang.String> pClosenessQualifierPropertyValues)
                                        throws atg.commerce.promotion.PromotionException
createClosenessQualifier This method creates a closeness qualifier repository item and sets its properties to the values specified in the map parameter. If an id is not specified in the map, it is generated.

Parameters:
pClosenessQualifierPropertyValues - - a map of the property names and their values.
Returns:
- the newly created closeness qualifier repository item.
Throws:
atg.commerce.promotion.PromotionException

getClosenessQualifier

public RepositoryItem getClosenessQualifier(java.lang.String pClosenessQualifierId)
                                     throws atg.commerce.promotion.PromotionException
getClosenessQualifier This method retrieves a closeness qualifier repository item using the specified id.

Parameters:
pClosenessQualifierId - - the id of the repository item to retrieve
Returns:
- the closeness qualifier repository item.
Throws:
atg.commerce.promotion.PromotionException

updateClosenessQualifier

public RepositoryItem updateClosenessQualifier(java.util.Map<java.lang.String,java.lang.String> pClosenessQualifierPropertyValues)
                                        throws atg.commerce.promotion.PromotionException
updateClosenessQualifier This method updates a closeness qualifier repository item, setting its properties to the values specified in the map parameter.

Parameters:
pClosenessQualifierPropertyValues - - a map of the property names and their values.
Returns:
- the updated closeness qualifier repository item.
Throws:
atg.commerce.promotion.PromotionException

deleteClosenessQualifier

public void deleteClosenessQualifier(java.lang.String pClosenessQualifierId)
                              throws atg.commerce.promotion.PromotionException
deleteClosenessQualifier This method deletes a closeness qualifier from the promotions repository.

Parameters:
pClosenessQualifierId - - the id of the closeness qualifier to be deleted.
Throws:
atg.commerce.promotion.PromotionException

createPromotionFolderFromPath

public RepositoryItem createPromotionFolderFromPath(java.lang.String pPromotionFolderPath)
                                             throws atg.commerce.promotion.PromotionException
createPromotionFolderFromPath This method creates a series of promotion folders, from the path provided. A promotionFolder repository item is created for each token in the path, and those repository items are chained together to form part of the folder tree. An example path is "/Summer/Mens/Shoes".

Parameters:
pPromotionFolderpath - - the full path of the promotion folder.
Returns:
- the repository item corresponding to the last token of the path.
Throws:
atg.commerce.promotion.PromotionException

getPromotionFolderPath

public java.lang.String getPromotionFolderPath(java.lang.String pPromotionFolderId)
                                        throws atg.commerce.promotion.PromotionException
getPromotionFolderPath This method retrieves the promotion folder's full path. It creates the path by starting at the folder specified and working its way up the tree to the root.

Parameters:
pPromotionFolderId - - the id of the promotionFolder item, for which the path is to be constructed.
Returns:
- the logical path for specified promotion folder.
Throws:
atg.commerce.promotion.PromotionException

createPromotionFolder

public RepositoryItem createPromotionFolder(java.util.Map<java.lang.String,java.lang.String> pPromotionFolderPropertyValues)
                                     throws atg.commerce.promotion.PromotionException
createPromotionFolder This method creates a promotion folder repository item and sets its properties to the values specified in the map parameter. If an id is not specified in the map, it is generated.

Parameters:
pPromotionFolderPropertyValues - - a map of the promotion folder property names and their values.
Returns:
- the newly created promotion folder repository item.
Throws:
atg.commerce.promotion.PromotionException

getPromotionFolder

public RepositoryItem getPromotionFolder(java.lang.String pPromotionFolderId)
                                  throws atg.commerce.promotion.PromotionException
getPromotionFolder This method retrieves a promotion folder repository item using the specified id.

Parameters:
pPromotionFolderId - - the id of the repository item to retrieve
Returns:
- the promotion folder repository item.
Throws:
atg.commerce.promotion.PromotionException

processPromotions

protected java.util.List<PromotionImportExportInfo> processPromotions(RepositoryItem[] pPromotions)
                                                               throws atg.commerce.promotion.PromotionException
processPromotions This method process the array of repository items and gets all of the associated details

Parameters:
pPromotions - - the array of promotion repository items
Returns:
- a list of PromotionImportExportInfo objects
Throws:
atg.commerce.promotion.PromotionException

processClosenessQualifiers

protected java.util.List<ClosenessQualifierImportExportInfo> processClosenessQualifiers(java.util.Set pClosenessQualifiers)
                                                                                 throws atg.commerce.promotion.PromotionException
processClosenessQualifiers This method processes an array of closeness qualifier repository items to get thie property values.

Parameters:
pClosenessQualifiers - - the array of closeness qualifier repository items
Returns:
- a list of ClosenessQualifierImportExportInfo objects
Throws:
atg.commerce.promotion.PromotionException