public class PromotionImportExport extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
PMDL_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
PromotionImportExport() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
addPromotion(PromotionImportExportSession pSession,
PromotionImportExportInfo pPromotion)
addPromotion
This method manages the addition of a promotion to the promotions repository.
|
protected java.lang.String |
createClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier,
java.lang.String pTemplateId)
createClosenessQualifier
This method manages the creation of a closeness qualifier.
|
protected java.lang.String |
createCoupon(CouponImportExportInfo pCoupon,
java.lang.String pPromotionId)
createCoupon
This method manages the creation of a coupon.
|
protected java.lang.String |
deleteClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier)
deleteClosenessQualifier
This method manages the deletion of a closeness qualifier.
|
protected void |
deleteCoupon(CouponImportExportInfo pCoupon,
java.lang.String pPromotionId)
deleteCoupon
This method manages the deletion of a coupon.
|
void |
doStartService()
doStartService
This is called after a Service has been created, placed into the naming
hierarchy, and initialized with its configured property values.
|
void |
doStopService()
doStopService
This is called when a Service is required to shut down.
|
void |
endImportExportSession(PromotionImportExportSession pSession)
endImportExportSession
This method sets ends the import export session by completing the current transaction
and ending the publishing workflow session in the case of import into a versioned
repository.
|
java.util.List<PromotionImportExportInfo> |
exportPromotionsById(java.util.List<java.lang.String> pPromotionIds)
exportPromotionsById
This method enables the user to export promotions by specifying a list of promotion item ids.
|
java.util.List<PromotionImportExportInfo> |
exportPromotionsByRQLQuery(java.lang.String pRQLQuery)
exportPromotionsByRQLQuery
This method enables the user to export promotions by specifying an RQL query to do the retrievals.
|
int |
getBatchSize()
Get the batch size.
|
ClaimableTools |
getClaimableTools()
Get the claimable tools.
|
PromotionImportExportIntegrator[] |
getIntegrators()
Gets the integrators.
|
PromotionImportExportTools |
getPromotionImportExportTools()
Get the promotion import export tools.
|
PromotionTemplateManager |
getPromotionTemplateManager()
Get the promotion template manager.
|
PromotionTools |
getPromotionTools()
Get the promotion tools.
|
atg.epub.PublishingWorkflowSession |
getPublishingWorkflowAutomator()
Get the publishing workflow automator.
|
java.util.Hashtable<java.lang.String,java.lang.Object> |
getSessions()
Get the sessions
|
javax.transaction.TransactionManager |
getTransactionManager()
Get the transaction manager.
|
PromotionImportExportStatus |
importPromotion(PromotionImportExportSession pSession,
PromotionImportExportInfo pPromotion)
importPromotion
This method enables the API user to create or update an individual promotion and all of
its associated items, i.e.
|
protected java.lang.String |
mergeIds(java.util.HashSet<RepositoryItem> pRepositoryItems,
java.lang.String pCommaSeparatedIdList,
java.lang.String pItemId)
mergeIdList
This method merges the ids, from a set of repository items, a comma separated
list of ids (from a map value), and a single id representing the current item.
|
void |
setBatchSize(int pBatchSize)
Set the batch size.
|
void |
setClaimableTools(ClaimableTools pClaimableTools)
Set the claimable tools.
|
void |
setIntegrators(PromotionImportExportIntegrator[] pIntegrators)
Sets the integrators.
|
void |
setPromotionImportExportTools(PromotionImportExportTools pPromotionImportExportTools)
Set the promotion import export tools.
|
void |
setPromotionTemplateManager(PromotionTemplateManager pPromotionTemplateManager)
Set the promotion template manager.
|
void |
setPromotionTools(PromotionTools pPromotionTools)
Set the promotion tools.
|
void |
setPublishingWorkflowAutomator(atg.epub.PublishingWorkflowSession pPublishingWorkflowAutomator)
Set the publishing workflow automator.
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Set the transaction manager.
|
PromotionImportExportSession |
startImportExportSession(java.lang.String pSessionId)
startImportExportSession
This method sets up the import export session for the user.
|
protected java.lang.String |
updateClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier,
java.lang.String pTemplateId)
updateClosenessQualifier
This method manages the updating of a closeness qualifier.
|
protected java.lang.String |
updateCoupon(CouponImportExportInfo pCoupon,
java.lang.String pPromotionId)
updateCoupon
This method manages the updating of a coupon.
|
protected java.lang.String |
updatePromotion(PromotionImportExportSession pSession,
PromotionImportExportInfo pPromotion)
updatePromotion
This method manages the update of a promotion.
|
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String PMDL_VERSION
public javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- - the transaction manager component.public ClaimableTools getClaimableTools()
public void setClaimableTools(ClaimableTools pClaimableTools)
pClaimableTools
- - the claimable tools component.public PromotionTools getPromotionTools()
public void setPromotionTools(PromotionTools pPromotionTools)
pPromotionTools
- - the promotion tools component.public PromotionImportExportTools getPromotionImportExportTools()
public void setPromotionImportExportTools(PromotionImportExportTools pPromotionImportExportTools)
pPromotionImportExportTools
- - the promotion import export tools component.public PromotionTemplateManager getPromotionTemplateManager()
public void setPromotionTemplateManager(PromotionTemplateManager pPromotionTemplateManager)
pPromotionTemplateManager
- - the promotion template manager component.public atg.epub.PublishingWorkflowSession getPublishingWorkflowAutomator()
public void setPublishingWorkflowAutomator(atg.epub.PublishingWorkflowSession pPublishingWorkflowAutomator)
pPublishingWorkflowAutomator
- - the publishing workflow automator component.public int getBatchSize()
public void setBatchSize(int pBatchSize)
pBatchSize
- - the transaction batch size.public PromotionImportExportIntegrator[] getIntegrators()
public void setIntegrators(PromotionImportExportIntegrator[] pIntegrators)
pIntegrators
- - the integrator components array.public java.util.Hashtable<java.lang.String,java.lang.Object> getSessions()
public PromotionImportExportSession startImportExportSession(java.lang.String pSessionId) throws atg.commerce.promotion.PromotionException
pSessionId
- - the unique session id. If null, an id is generated.atg.commerce.promotion.PromotionException
public PromotionImportExportStatus importPromotion(PromotionImportExportSession pSession, PromotionImportExportInfo pPromotion) throws atg.commerce.promotion.PromotionException
pSession
- - the import export session.pPromotion
- - the promotion details to import.atg.commerce.promotion.PromotionException
public java.util.List<PromotionImportExportInfo> exportPromotionsById(java.util.List<java.lang.String> pPromotionIds) throws atg.commerce.promotion.PromotionException
pPromotionIds
- - the list of ids of the promotions to export. If null, all promotions are returned.atg.commerce.promotion.PromotionException
public java.util.List<PromotionImportExportInfo> exportPromotionsByRQLQuery(java.lang.String pRQLQuery) throws atg.commerce.promotion.PromotionException
pRQLQuery
- - the RQL query to be used to query the promotions repository.atg.commerce.promotion.PromotionException
public void endImportExportSession(PromotionImportExportSession pSession) throws atg.commerce.promotion.PromotionException
pSession
- - the import export session.atg.commerce.promotion.PromotionException
protected java.lang.String addPromotion(PromotionImportExportSession pSession, PromotionImportExportInfo pPromotion) throws atg.commerce.promotion.PromotionException
pSession
- - the import export session.pPromotion
- - the promotion details to import.atg.commerce.promotion.PromotionException
protected java.lang.String updatePromotion(PromotionImportExportSession pSession, PromotionImportExportInfo pPromotion) throws atg.commerce.promotion.PromotionException
pSession
- - the import export session.pPromotion
- - the promotion details to import.atg.commerce.promotion.PromotionException
protected java.lang.String createClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier, java.lang.String pTemplateId) throws atg.commerce.promotion.PromotionException
pClosenessQualifier
- - the closeness qualifier import export object.pTemplateId
- - the id of the template to use (optional).atg.commerce.promotion.PromotionException
protected java.lang.String updateClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier, java.lang.String pTemplateId) throws atg.commerce.promotion.PromotionException
pClosenessQualifier
- - the closeness qualifier import export object.pTemplateId
- - the id of the template to use (optional).atg.commerce.promotion.PromotionException
protected java.lang.String deleteClosenessQualifier(ClosenessQualifierImportExportInfo pClosenessQualifier) throws atg.commerce.promotion.PromotionException
pClosenessQualifier
- - the closeness qualifier import export object.atg.commerce.promotion.PromotionException
protected java.lang.String createCoupon(CouponImportExportInfo pCoupon, java.lang.String pPromotionId) throws atg.commerce.promotion.PromotionException
pCoupon
- - the coupon import export object.pPromotionId
- - the id of the promotion to associate with the coupon.atg.commerce.promotion.PromotionException
protected java.lang.String updateCoupon(CouponImportExportInfo pCoupon, java.lang.String pPromotionId) throws atg.commerce.promotion.PromotionException
pCoupon
- - the coupon import export object.pPromotionId
- - the id of the promotion to associate with the coupon.atg.commerce.promotion.PromotionException
protected void deleteCoupon(CouponImportExportInfo pCoupon, java.lang.String pPromotionId) throws atg.commerce.promotion.PromotionException
pCoupon
- - the coupon import export object.pPromotionId
- - the id of the current promotion.atg.commerce.promotion.PromotionException
protected java.lang.String mergeIds(java.util.HashSet<RepositoryItem> pRepositoryItems, java.lang.String pCommaSeparatedIdList, java.lang.String pItemId)
pRepositoryItems
- - a HashSet of repository items.pCommaSeparatedIdList
- - a comma seperated list of ids.pItemId
- - a repository item id.public void doStartService()
doStartService
in class GenericService
public void doStopService()
doStopService
in class GenericService