atg.projects.b2bstore.order
Class ProcUpdateCatalogRefOfProfile
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.projects.b2bstore.order.ProcUpdateCatalogRefOfProfile
- All Implemented Interfaces:
- NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineProcessor, java.util.EventListener
public class ProcUpdateCatalogRefOfProfile
- extends GenericService
- implements PipelineProcessor
This processor is called in the final stages of processOrder chain. Whenever user
purchases any items, those items and profileId of the user are stored in
userCatalogRefs item descriptor.
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
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, 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 |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
sResourceBundle
public static final java.util.ResourceBundle sResourceBundle
ProcUpdateCatalogRefOfProfile
public ProcUpdateCatalogRefOfProfile()
setRepository
public void setRepository(Repository pRepository)
- Sets Order Repository
getRepository
public Repository getRepository()
- Returns Order Repository
runProcess
public int runProcess(java.lang.Object pParam,
PipelineResult pResult)
throws java.lang.Exception
- This method is executed by the pipeline manager to execute this
process. This processor takes Order & Profile Parameters from the
passed parameters and tries to add the catalogRef of all the commerce
Items to the userCatalogRefs item-descriptor.
- Specified by:
runProcess
in interface PipelineProcessor
- Parameters:
pParam
- an optional user parameterpResult
- the PipelineResult object which is used to return errors or other data
- Returns:
- an integer value which is mapped to the next processor to execute. STOP_CHAIN_EXECUTION
will notify the PipelineManager to stop execution. An unmapped value will throw a
RunProcessException.
- Throws:
java.lang.Exception
checkAndUpdate
protected void checkAndUpdate(Order pOrder,
RepositoryItem pProfile)
throws RepositoryException
- This function checks the profile for the catalogRefId, and updates the
profile with catalogRefId if it doesn't contain the catalog
- Parameters:
pOrder
- the orderpProfile
- the profile to check and update for.
- Throws:
RepositoryException
checkProfile
protected boolean checkProfile(CommerceItem pCItem,
RepositoryItem pProfile)
throws RepositoryException
- This function checks whether the given profile contains the catalogRefId
of the commerce item. If it contains then it returns false, else returns
true.
- Parameters:
pCItem
- the CommerceItem which contains the catalogRefId.pProfile
- the profile of the user to check for.
- Returns:
- true if profile contains catalogRefId, false else.
- Throws:
RepositoryException
getRetCodes
public int[] getRetCodes()
- The return codes that this processor can return.
The list of return codes are:
- 1 - The processor completed
- Specified by:
getRetCodes
in interface PipelineProcessor
- Returns:
- an
int[]
of the valid return codes