public abstract class AbstractOrderRestResource extends GenericService
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
static java.lang.String | 
COLON  | 
protected java.lang.String | 
mEmbeddedAppliedPromotionsRelationshipName  | 
protected java.util.Properties | 
mEmbeddedResources  | 
protected java.lang.String | 
mGWPChoicesRelationshipName  | 
protected GWPManager | 
mGwpManager  | 
protected java.lang.String | 
mOrderGWPInfoRelationshipName  | 
protected OrderManager | 
mOrderManager  | 
protected javax.transaction.TransactionManager | 
mTransactionManager  | 
static java.lang.String | 
ORDER_ID  | 
static java.lang.String | 
PIPELINE_RESULT  | 
static java.lang.String | 
RESOURCE_NAME  | 
static java.util.ResourceBundle | 
sResourceBundle
Resource Bundle 
 | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
AbstractOrderRestResource()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addEmbeddedResource(RepresentationModel.Builder pBuilder,
                   java.lang.String pEmbeddedResourceId,
                   java.lang.String pResourceId,
                   boolean pSubResource,
                   boolean pSingular)
Add an embedded resource to the representation model. 
 | 
void | 
addEmbeddedResources(RepresentationModel.Builder pBuilder)
Adds embedded resources to the representation model, as required by the order. 
 | 
void | 
addEmbeddedResources(RepresentationModel.Builder pBuilder,
                    boolean pSubResource,
                    boolean pSingular)
Adds embedded resources to the representation model, as required by the order. 
 | 
protected void | 
addGiftWithPurchaseChoicesLinks(RepresentationModel.Builder pBuilder,
                               java.util.Collection<GiftWithPurchaseSelection> pOrderGifts)
This method iterates the collection of  
GiftWithPurchaseSelection beans,
 and generates extra links to appear on the RepresentationModel.Builder. | 
protected void | 
checkPipelineResult()
Checks PipelineResult for errors if any. 
 | 
protected void | 
checkPipelineResult(PipelineResult pPipelineResult)
Checks a pipeline result for errors. 
 | 
protected RepresentationModel.Builder | 
createRepresentationModelBuilder(Order pOrder)
Create a RepresentationModel.Builder with the order acting as the state. 
 | 
java.lang.String | 
getEmbeddedAppliedPromotionsRelationshipName()
Get the relationship name used  for the embedded applied promotions. 
 | 
java.util.Properties | 
getEmbeddedResources()
Gets the embedded resources 
 | 
java.lang.String | 
getGWPChoicesRelationshipName()
Return the relationship name used for the gift with purchase choices links. 
 | 
GWPManager | 
getGwpManager()
Returns property GwpManager 
 | 
java.lang.String | 
getOrderGWPInfoRelationshipName()
Return the relationship name used for the order level gift with purchase information. 
 | 
OrderManager | 
getOrderManager()
Returns property OrderManager 
 | 
protected RepresentationModel.Builder | 
getRepresentationModelBuilder(Order pOrder)
Gets the RepresentationModel.Builder with the given order acting as the state. 
 | 
javax.transaction.TransactionManager | 
getTransactionManager()
Returns property TransactionManager 
 | 
void | 
setEmbeddedAppliedPromotionsRelationshipName(java.lang.String pEmbeddedAppliedPromotionsRelationshipName)
Configure the relationship name used for the embedded applied promotions. 
 | 
void | 
setEmbeddedResources(java.util.Properties pEmbeddedResources)
Sets the EmbddedResources property. 
 | 
void | 
setGWPChoicesRelationshipName(java.lang.String pGWPChoicesRelationshipName)
Configure the relationship name used for the gift with purchase choices links
 The configured name is used by the filter schema to display the property in the payload. 
 | 
void | 
setGwpManager(GWPManager pGwpManager)
Sets property GWPManager 
 | 
void | 
setOrderGWPInfoRelationshipName(java.lang.String pOrderGWPInfoRelationshipName)
Configure the relationship name used for the order level gift with purchase information
 The configured name is used by the filter schema to display the property in the payload. 
 | 
void | 
setOrderManager(OrderManager pOrderManager)
Sets property OrderManager 
 | 
void | 
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property TransactionManager 
 | 
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, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static final java.lang.String CLASS_VERSION
public static final java.lang.String ORDER_ID
public static final java.lang.String PIPELINE_RESULT
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String COLON
public static java.util.ResourceBundle sResourceBundle
protected javax.transaction.TransactionManager mTransactionManager
protected OrderManager mOrderManager
protected java.util.Properties mEmbeddedResources
protected java.lang.String mEmbeddedAppliedPromotionsRelationshipName
protected java.lang.String mOrderGWPInfoRelationshipName
protected java.lang.String mGWPChoicesRelationshipName
protected GWPManager mGwpManager
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager - a TransactionManager valuepublic javax.transaction.TransactionManager getTransactionManager()
TransactionManager value.public void setOrderManager(OrderManager pOrderManager)
public OrderManager getOrderManager()
OrderManager value.public java.util.Properties getEmbeddedResources()
public void setEmbeddedResources(java.util.Properties pEmbeddedResources)
pEmbeddedResources - - the EmbeddedResources value.public void setEmbeddedAppliedPromotionsRelationshipName(java.lang.String pEmbeddedAppliedPromotionsRelationshipName)
pEmbeddedAppliedPromotionsRelationshipName - the name of the applied promotions relationship to the embedded resource.public java.lang.String getEmbeddedAppliedPromotionsRelationshipName()
public void setOrderGWPInfoRelationshipName(java.lang.String pOrderGWPInfoRelationshipName)
pOrderGWPInfoRelationshipName - the relationship name of the order gwp info propertypublic java.lang.String getOrderGWPInfoRelationshipName()
public void setGWPChoicesRelationshipName(java.lang.String pGWPChoicesRelationshipName)
pGWPChoicesRelationshipName - the relationship name of the gwp choices links propertypublic java.lang.String getGWPChoicesRelationshipName()
public void setGwpManager(GWPManager pGwpManager)
pGwpManager - the GWPManager component property.public GWPManager getGwpManager()
GWPManager component property.protected RepresentationModel.Builder getRepresentationModelBuilder(Order pOrder) throws CommerceException
 See createRepresentationModelBuilder(Order) for further details as to what is generated as part
 of the builder.
pOrder - the order from which the RepresentationModel.Builder will be createdCommerceException - if a problem occurred whilst generating the builderprotected RepresentationModel.Builder createRepresentationModelBuilder(Order pOrder) throws CommerceException
Pricing messages and gift with purchase information are included as additional state.
Applied promotions are also embedded.
pOrder - the order from which the RepresentationModel.Builder will be createdCommerceException - if a problem occurred whilst creating the builderpublic void addEmbeddedResources(RepresentationModel.Builder pBuilder) throws RestException
 Calls addEmbeddedResources(RepresentationModel.Builder, boolean, boolean) with
 values of true for subresource and false for singular.
pBuilder - - the RepresentationModel Builder on which to add the embedded resources.RestException - if a problem occurs embedding a resource.public void addEmbeddedResources(RepresentationModel.Builder pBuilder, boolean pSubResource, boolean pSingular) throws RestException
pBuilder - - the RepresentationModel Builder on which to add the embedded resources.pSubResource - - indicates if the resource is a sub resource or not.pSingular - - indicates if the resource is a singular resource.RestException - if a problem occurs embedding a resource.public void addEmbeddedResource(RepresentationModel.Builder pBuilder, java.lang.String pEmbeddedResourceId, java.lang.String pResourceId, boolean pSubResource, boolean pSingular) throws RestException
pBuilder - - the RepresentationModel Builder on which to add the embedded resources.pEmbeddedResourceId - - the embedded resource Id used to identify the resource in the RepresentationModel.pResourceId - - the global resource Id.pSubResource - - true if uri being built is subresource of current context.pSingular - - true if the singular of the given resource should be used.RestException - if a problem occurs embedding a resource.protected void addGiftWithPurchaseChoicesLinks(RepresentationModel.Builder pBuilder, java.util.Collection<GiftWithPurchaseSelection> pOrderGifts)
GiftWithPurchaseSelection beans,
 and generates extra links to appear on the RepresentationModel.Builder.
 These links will use the relationship name 'gwp_choices', and have link parameters 'gwp_identifier'
 added to uniquely identify which gift the link belongs to.pBuilder - RepresentationModel.Builder used to create the order representationpOrderGifts - Collection of GiftWithPurchaseSelection beans to be inspectedprotected void checkPipelineResult()
                            throws RestException
RestException - if a pipeline processing issue occurs.protected void checkPipelineResult(PipelineResult pPipelineResult) throws RestException
pPipelineResult - the messages and exceptions returned from execution of a pipeline chainRestException - if pPipelineResult contains any errors.