public class ReturnTools extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
DEFAULT |
protected java.lang.String |
mAmountAdjustmentPropertyName |
protected java.util.Properties |
mBeanNameToItemDescriptorMap |
protected java.lang.String[] |
mFulfilledOrderStates |
protected GWPManager |
mGwpManager
Manager component for gift with purchase promotions
|
protected java.lang.String |
mManualAdjustmentShareAdjustmentPropertyName |
protected java.lang.String |
mNonReturnItemCostAdjustmentsPropertyName |
protected java.lang.String |
mOrderDiscountShareAdjustmentPropertyName |
protected java.lang.String |
mOrderPropertyName |
protected java.lang.String[] |
mPendingReturnStates |
protected boolean |
mPerformanceMonitorEnabled |
protected PricingTools |
mPricingTools |
protected ProfileTools |
mProfileTools |
protected PromotionTools |
mPromotionTools |
protected java.lang.String |
mPromotionValueAdjustmentsPropertyName |
protected java.lang.String |
mQuantityAdjustedPropertyName |
protected java.util.Properties |
mRefundMethodTypeClassMap |
protected java.util.Properties |
mReturnItemTypeClassMap |
protected java.lang.Class<ReturnRequest> |
mReturnRequestClass |
protected java.util.Properties |
mReturnShippingTypeClassMap |
protected static ReturnTools |
mReturnTools |
static java.lang.String |
mReturnToolsComponentPath |
protected java.lang.String |
mShippingShareAdjustmentPropertyName |
protected SiteContextManager |
mSiteContextManager |
protected SiteManager |
mSiteManager |
protected java.lang.String |
mTaxShareAdjustmentPropertyName |
protected static java.util.ResourceBundle |
sResourceBundle |
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 |
---|
ReturnTools() |
Modifier and Type | Method and Description |
---|---|
java.util.Map |
addDisableGWPProcessParameter(java.util.Map pExtraParameters)
Adds the extra parameter that disables the processing of GWPInfo objects
at the end of pricing.
|
java.util.Map |
addDisableReturnTotalValidationParameter(java.util.Map pExtraParameters)
Adds the parameter to disable the refund total validation processor.
|
java.util.Map |
addExchangeOrderPricingParameters(java.util.Map pExtraParameterMap,
ReturnRequest pReturnRequest)
Adds the extra parameters for pricing the exchange order.
|
protected void |
addRefundMethodsToReturnRequest(java.util.Set pRefundMethods,
RepositoryItem pReturnRequest)
Adds a set of refund methods to the return request
|
protected void |
addReturnItemsToReturnRequest(java.util.Set pReturnItems,
RepositoryItem pReturnRequest)
Adds a set of return items to the return request
|
java.util.Map |
addReturnRequestParameter(java.util.Map pExtraParameters,
ReturnRequest pReturnRequest)
Adds the current
ReturnRequest to the parameter map |
java.util.Map |
addReturnRequestPricelistParameters(java.util.Map pExtraParameters,
ReturnRequest pReturnRequest)
Adds the ReturnRequest's price lists to the given parameter map.
|
java.util.Map |
addWorkingOrderPricingParams(java.util.Map pExtraParameterMap,
ReturnRequest pReturnRequest)
Deprecated.
|
java.util.Map |
addWorkingOrderPricingParams(ReturnRequest pReturnRequest,
Order pWorkingOrder,
java.util.Map pExtraParameterMap)
Adss the extra paramters necessary for pricing the given working order.
|
void |
adjustExchangeItemPriceInfo(ReturnRequest pReturnRequest,
CommerceItem pExchangeItem,
ItemPriceInfo pItemPriceInfo)
This method is called by a CSC item post calcualtor and will copy the information from the corresponding
item in promotion evaluation order.
|
boolean |
associateAgentAndReturnRequest(ReturnRequest pReturnRequest)
Deprecated.
|
boolean |
associateAgentAndReturnRequest(ReturnRequest pReturnRequest,
java.lang.String pAgentId)
Associates the given agent id to the ReturnRequest.
|
protected double |
calculateAmountDetailShareForRange(DetailedItemPriceInfo pDetailedItemPriceInfo,
atg.core.util.Range pRange)
Calculates the share of the detail's amount for the given range.
|
protected void |
calculateNonReturnItemSubtotalAdjustment(ReturnRequest pReturnRequest)
Sets the
nonReturnItemRefundSubtotalAdjustment value
of the return request. |
protected double |
calculateShareForRange(DetailedItemPriceInfo pDetailedItemPriceInfo,
atg.core.util.Range pRange,
double pAmount)
Calculates the share of the given amount for the given range within the given detail.
|
protected void |
clearAllItemCostAdjustments(ReturnRequest pReturnRequest)
This method clears all the ItemCostAdjustments from the ReturnRequest
and ReturnItems.
|
void |
copyGWPItemMarkersFromPEO(ReturnRequest pReturnRequest,
CommerceItem pExchangeItem)
Copies the GWP Item markers from the matching item in the PEO to the
given exchange item.
|
protected void |
copyItemsAndShippingGroups(Order pOrderFrom,
Order pOrderTo,
java.util.Map pItemMap,
java.util.Map pShippingGroupMap,
java.util.Map pPropExceptions,
java.util.Map pExcludedProperties)
Util method that copies the items and shipping groups from one Order to the other.
|
protected void |
copyPEOPricingInfo(ReturnRequest pReturnRequest,
CommerceItem pPEOItem,
ItemPriceInfo pPEOItemPriceInfo,
CommerceItem pExchangeItem,
ItemPriceInfo pExchangeItemPriceInfo)
Copies pricing info from the PEO ItemPriceInfo to the exhange ItemPriceInfo.
|
protected Query |
createExcludedReturnRequests(QueryBuilder pQueryBuilder,
java.util.Collection pExcludedReturnRequests)
Creates a query the excludes all return requests in the collection
|
protected ItemCostAdjustment |
createItemCostAdjustment()
Creates a new ItemCostAdjustment object.
|
protected ItemCostAdjustment |
createItemCostAdjustment(RepositoryItem pItemCostAdjustmentItem)
This method is used when reconstituting the ItemCostAdjustmments of the
ReturnRequest from the repository.
|
protected ItemCostAdjustment |
createItemCostAdjustmentFromItem(RepositoryItem pItemCostAdjustmentItem)
This method generates and new ItemCostAdjustment object from the given itemCostAdjustment
repository item.
|
protected MutableRepositoryItem |
createItemCostAdjustmentItem(ItemCostAdjustment pItemCostAdjustment)
The method is called when saving the ItemCostAdjustments of the ReturnRequest to the
repository.
|
protected MutableRepositoryItem |
createItemCostAdjustmentRepositoryItem(ItemCostAdjustment pItemCostAdjustment)
The method is called when saving the ItemCostAdjustments of the ReturnRequest to the
repository.
|
protected java.util.Map |
createPipelineExtraParameterMap(ReturnRequest pReturnRequest)
Creates the extra parameter map that's passed to pipeline execution used to
create the working orders.
|
RefundMethod |
createRefundMethodInstance(java.lang.String pType)
This method returns
RefundMethod instance. |
protected RepositoryItem |
createRefundMethodItem(RefundMethod pRefundMethod)
Creates a refundMethod repository item, populates its properties, and adds it to
the repository
|
RepositoryItem |
createReturnComment(java.lang.String pReturnRequestId,
java.lang.String pComment,
java.lang.String pAgentId)
Creates a new comment item for the given return.
|
ReturnItem |
createReturnItemInstance(CommerceItem pCommerceItem)
This method returns
ReturnItem instance. |
protected MutableRepositoryItem |
createReturnItemItem(java.lang.String pRequestId,
ReturnItem pReturnItem)
Create a repository item that represents an item in a return request
|
ReturnRequest |
createReturnRequestInstance(Order pOrder)
This method creates
ReturnRequest instance. |
protected MutableRepositoryItem |
createReturnRequestItem(ReturnRequest pReturnRequest)
Create a repository item that represents a return request record.
|
protected Query |
createReturnRequestSearchQuery(QueryBuilder pQueryBuilder,
java.lang.String pOrderId)
Creates a query to find all return requests where the order is either the original order or the exchange order.
|
ReturnShippingGroup |
createReturnShippingGroupInstance(ShippingGroup pShippingGroup)
This method returns
ReturnShippingGroup instance. |
void |
determineOriginatingOrder(ReturnRequest pReturnRequest)
Determines and sets the
originatingOrder property of a return request. |
void |
determinePricelistsForReturn(ReturnRequest pReturnRequest)
Sets the priceList and salePricelist properties of the ReturnRequest based on
the price lists extracted from the originating Order referenced in the ReturnRequest.
|
void |
determinePromotionsForReturn(ReturnRequest pReturnRequest)
This API will determine and set the item and order promotions to be used for the given return request.
|
protected java.util.Collection |
findAdjustmentsForItem(java.util.Collection pAdjustments,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId)
Returns the adjustments that match by commerce item id and shipping group id
|
protected java.util.Collection |
findAllAdjustmentsForNonReturnItems(ReturnRequest pReturnRequest,
java.util.Collection pAdjustments)
Returns all the adjustments that reference a commerce item and shipping group
not being returned.
|
java.util.List |
findAllRelatedReturnRequests(java.lang.String pOrderId)
returns a list of all return requests related to the given order id.
|
protected java.lang.String |
findExchangeOrderItemForPEOItem(ReturnRequest pReturnRequest,
java.lang.String pPEOItemId)
Returns the corresponding exchange order item id for the given promotion evaluation order item
id.
|
protected java.lang.String |
findExchangeOrderShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pPEOShippingGroupId)
Returns the corresponding exchange order shipping group id for the given promotion evaluation order
shipping group id.
|
protected java.lang.String |
findOriginalItemForPEOItem(ReturnRequest pReturnRequest,
java.lang.String pPEOItemId)
Returns the original commerce item corresponds with the gigve PEO item.
|
protected java.lang.String |
findOriginalItemForRAOItem(ReturnRequest pReturnRequest,
java.lang.String pRAOItemId)
Returns the original commerce item that corresponds with the given RAO Item.
|
protected java.lang.String |
findOriginalItemForRCOItem(ReturnRequest pReturnRequest,
java.lang.String pRCOItemId)
Returns the original commerce item that corresponds with the given RCO item.
|
protected java.lang.String |
findOriginalItemForWorkingItem(ReturnRequest pReturnRequest,
java.lang.String pWorkingItemId)
Returns the original item id for the given working item.
|
protected java.lang.String |
findOriginalShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pPEOShippingGroupId)
Returns the original commerce shipping group corresponds with an shipping group in the PEO.
|
protected java.lang.String |
findOriginalShippingGroupForRAOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pRAOShippingGroupId)
Returns the original shipping group that corresponds with a shipping group in the RAO
|
protected java.lang.String |
findOriginalShippingGroupForRCOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pRCOShippingGroup)
Returns the original shipping group corresponds with an shipping group in the RCO.
|
protected java.lang.String |
findOriginalShippingGroupForWorkingShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pWorkingShippingGroupId)
Returns the original shipping group id for the given working shipping group.
|
protected java.lang.String |
findOriginalShippingGrouporPEOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pPEOShippingGroupId)
Returns the original shipping group corresponds with an shipping group in the PEO.
|
protected java.lang.String |
findPEOItemForExchangeItem(ReturnRequest pReturnRequest,
java.lang.String pExchangeItemId)
Returns the corresponding PEO item id for the given exchange item id.
|
protected java.lang.String |
findPEOShippingGroupForExchangeShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pExchangeShippingGroupId)
Returns the corresponding PEO shipping group id for the given exchange shipping group id.
|
protected java.lang.String |
findRAOItemForOriginalItem(ReturnRequest pReturnRequest,
java.lang.String pOriginalItemId)
Returns the id of the item in the RAO
that corresponds to the given original item.
|
protected java.lang.String |
findRAOItemForRCOItem(ReturnRequest pReturnRequest,
java.lang.String pRCOItemId)
Returns the id of the corresponding item in the RAO for the given RCO item id
|
protected java.lang.String |
findRAOShippingGroupForOriginalShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pOriginalShippingGroupId)
Finds the corresponding shipping group in the RAO for the original shipping group
|
protected java.lang.String |
findRAOShippingGroupForRCOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pRCOShippingGroupId)
Returns the id of the corresponding shipping group in the RAO for the given RCO shipping group id
|
protected java.lang.String |
findRCOItemForOriginalItem(ReturnRequest pReturnRequest,
java.lang.String pOriginalItemId)
Returns the id of the item in the RCO
that corresponds to the given original item.
|
protected java.lang.String |
findRCOItemForPEOItem(ReturnRequest pReturnRequest,
java.lang.String pPEOItemId)
Finds the item in the RCO that corresponds to the given PEO item.
|
protected java.lang.String |
findRCOItemForRAOItem(ReturnRequest pReturnRequest,
java.lang.String pRAOItemId)
Returns the id of the corresponding item that was originally created in the RCO
for the given RAOItemId
|
protected java.lang.String |
findRCOShippingGroupForOriginalShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pOriginalShippingGroupId)
Returns the corresponding shipping group in the Return Calculation Order to the original shipping group.
|
protected java.lang.String |
findRCOShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pPEOShippingGroupId)
Finds the corresponding shipping group in the RCO for the given PEO shipping group.
|
protected java.lang.String |
findRCOShippingGroupForRAOShippingGroup(ReturnRequest pReturnRequest,
java.lang.String pRAOShippingGroupId)
Returns the id of the corresponding shipping group that was originally created in the RCO
for the given RAOShippingGroupId
|
protected java.util.List |
findReturnItemsForItemAndGroup(java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId,
java.util.List pReturnItems)
Gets the ReturnItems for the given commerce item id and shipping group.
|
RepositoryItem[] |
findReturnRequestsByBalancingPaymentGroupId(java.lang.String pBalancingPaymentGroupId)
Finds all return requests that reference the given balancing payment group id
|
RepositoryItem[] |
findReturnRequestsByExchangeOrder(java.lang.String pOrderId)
Finds all return requests that reference this given order as the replacement order
|
java.util.List<ReturnRequest> |
findReturnRequestsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumReturns,
java.lang.String[] pStates,
java.lang.String pSortProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
Finds all return request for the given profile.
|
java.util.Map |
generateItemToReturnQuantityMap(java.util.Collection pReturnRequestRepositoryItems)
generates a map that summarizes the quantity to return for each commerce item in the
provided return requests
|
protected void |
generatePromotionValueAdjustmentMap(ReturnRequest pReturnRequest)
This method will generate the promotion value adjustment map and store it
in the
promotionValueAdjustments property of the ReturnRequest |
java.lang.Object[] |
generateSortedRelatedReturnRequests(java.lang.String pOrderId)
Returns all return requests related to the given order id sorted by creation date.
|
java.lang.String |
getActualShippingRefundPropertyName() |
java.lang.String |
getActualShippingRefundSharePropertyName() |
java.lang.String |
getActualTaxRefundPropertyName() |
java.lang.String |
getActualTaxRefundSharePropertyName() |
protected java.util.Collection |
getAllItemCostAdjustments(ReturnRequest pReturnRequest)
returns all the ItemCostAdjustments for this return request.
|
protected java.util.List |
getAllRelatedReplacementOrders(ReturnRequest pReturnRequest)
Builds a list of all replacement orders related to the current return request.
|
java.lang.String |
getAmountAdjustmentPropertyName()
Property name on the item cost adjustment item that contains
the amount adjustment value
|
java.lang.String |
getAmountPropertyName() |
java.lang.String |
getBalancingPaymentIdPropertyName()
Returns the balancingPaymentIdPropertyName.
|
java.util.Properties |
getBeanNameToItemDescriptorMap()
Returns the beanNameToItemDescriptorMap
|
java.lang.String |
getBonusRefundPropertyName() |
ClaimableManager |
getClaimableManager() |
java.lang.String |
getCommentAgentPropertyName() |
java.lang.String |
getCommentCreationDatePropertyName() |
java.lang.String |
getCommentOwnerPropertyName() |
java.lang.String |
getCommentPropertyName() |
java.lang.String |
getCommerceItemIdPropertyName() |
CommercePropertyManager |
getCommercePropertyManager() |
java.lang.String |
getCreatedDatePropertyName() |
java.lang.String |
getCreditCardRefundMethodItemDescriptorName()
Returns the creditCardRefundMethodItemDescriptorName.
|
java.util.List |
getDispositionCodes()
Retrieve a list of disposition codes
|
java.lang.String |
getDispositionPropertyName() |
java.lang.String[] |
getFulfilledOrderStates() |
GWPManager |
getGwpManager()
Getter for the gift with purchase manager property.
|
java.lang.String |
getItemCostAdjustmentDescriptorName() |
java.lang.String |
getItemPromotionsPropertyName() |
java.lang.String |
getItemReturnableState(RepositoryItem pCommerceItem)
Determines the returnable state for the given item.
|
java.lang.String |
getManualAdjustmentShareAdjustmentPropertyName()
Property name on the item cost adjustment item that contains
the manual adjustment share adjustment value
|
java.lang.String |
getMappedItemDescriptorName(java.lang.String pBeanName)
Returns the repository item name mapped to the bean name.
|
java.lang.String |
getMethodTypePropertyName() |
java.lang.String |
getNonReturnItemCostAdjustmentsPropertyName() |
protected double |
getNonReturnItemTotalShippingAdjustment(ReturnRequest pReturnRequest)
Returns the total shipping adjustments for non-return items.
|
protected double |
getNonReturnItemTotalTaxAdjustment(ReturnRequest pReturnRequest)
Returns the total tax adjustments for non-return items.
|
java.lang.String |
getOrderDiscountShareAdjustmentPropertyName()
Property name on the item cost adjustment item that contains
the order discount share adjustment value
|
protected java.lang.String |
getOrderIdFromPaymentGroup(PaymentGroup pPaymentGroup)
Returns the order id associated with the given payment group
|
protected java.lang.String |
getOrderIdFromPaymentGroupItem(RepositoryItem pPaymentGroupItem)
Returns the order id associated with the given payment group
|
OrderManager |
getOrderManager()
Returns the order manager
|
java.lang.String |
getOrderPromotionsPropertyName() |
java.lang.String |
getOrderPropertyName() |
java.lang.String |
getOrderReturnableState(RepositoryItem pOrderItem)
Determines the returnable state for the given order.
|
java.lang.String |
getOriginalOrderIdPropertyName() |
java.lang.String |
getOtherRefundPropertyName()
Returns the otherRefundPropertyName.
|
protected java.lang.String |
getPaymentGroupIdFromRefundMethod(RepositoryItem pRefundMethod)
Returns the payment group id from the given refundMethod item
|
java.lang.String |
getPaymentGroupIdPropertyName() |
java.lang.String[] |
getPendingReturnStates() |
PricingTools |
getPricingTools() |
java.lang.String |
getProcessedPropertyName() |
java.lang.String |
getProcessImmediatelyPropertyName() |
ProfileTools |
getProfileTools()
The ProfileTools component
|
java.util.Collection |
getPromotionsLost(ReturnRequest pReturnRequest)
Generates a collection of promotion ids that contains
all the promotions that no longer apply as a result
of the return.
|
PromotionTools |
getPromotionTools() |
java.lang.String |
getPromotionValueAdjustmentsPropertyName()
Returns the return request property name used for storing the
promotion value adjustments
|
java.lang.String |
getQuantityAdjustedPropertyName()
Property name on the item cost adjustment item that contains
the quantity adjusted value
|
java.lang.String |
getQuantityReceivedPropertyName() |
java.lang.String |
getQuantityToExchangePropertyName() |
java.lang.String |
getQuantityToReturnPropertyName() |
java.util.List |
getReasonCodes()
Retrieve a list of reason codes
|
java.lang.String |
getReasonPropertyName() |
java.lang.String |
getRefundAmountPropertyName() |
protected RefundMethod |
getRefundMethod(RepositoryItem pRefundMethodItem,
Order pOrder)
Create a RefundMethod object based on information in the given repository item
|
protected RefundMethod |
getRefundMethod(java.lang.String pRefundMethodId,
Order pOrder)
Create a RefundMethod object based on information in the repository designated by
the given id
|
java.lang.String |
getRefundMethodItemDescriptorName() |
java.lang.String |
getRefundMethodsPropertyName() |
java.util.Properties |
getRefundMethodTypeClassMap()
Returns the refundMethodTypeClassMap
|
java.lang.String |
getReplacementOrderIdPropertyName() |
java.lang.String |
getReturnAgentPropertyName()
Gets property returnAgentPropertyName
|
java.lang.String |
getReturnCommentItemDescriptorName() |
java.lang.String |
getReturnFeePropertyName() |
protected ReturnItem |
getReturnItem(RepositoryItem pReturnItemItem,
Order pOrder)
Create a ReturnItem object based on information in the given repository item
|
protected ReturnItem |
getReturnItem(java.lang.String pReturnItemId,
Order pOrder)
Create a ReturnItem object based on information in the repository designated by
the given id
|
java.lang.String |
getReturnItemDispositionItemDescriptorName() |
java.lang.String |
getReturnItemItemDescriptorName() |
java.util.List<ReturnItem> |
getReturnItems(ShippingGroup pShippingGroup)
Return all
ReturnItem in the pShippingGroup |
java.lang.String |
getReturnItemsPropertyName() |
java.lang.String |
getReturnItemStatePropertyName() |
ReturnItemStates |
getReturnItemStates() |
java.util.Properties |
getReturnItemTypeClassMap()
Returns the returnItemTypeClassMap
|
java.lang.String |
getReturnOriginOfReturnPropertyName()
Gets property returnOriginOfReturnPropertyName
|
java.lang.String |
getReturnReasonsItemDescriptorName() |
java.lang.String |
getReturnRefPropertyName() |
MutableRepository |
getReturnRepository()
Returns the return repository
|
ReturnRequest |
getReturnRequest(java.lang.String pReturnRequestId)
Create a ReturnRequest object based on information in the repository designated by
the given id.
|
java.lang.Class<ReturnRequest> |
getReturnRequestClass()
Returns the returnRequestClass
|
int |
getReturnRequestCountForProfile(java.lang.String pProfileId,
java.lang.String[] pStates,
java.util.Collection<java.lang.String> pSiteIds)
Returns the total number of return requests for the given profile
|
java.lang.String |
getReturnRequestItemDescriptorName() |
Query |
getReturnRequestQueryForProfile(java.lang.String pProfileId,
java.lang.String[] pStates,
java.util.Collection<java.lang.String> pSiteIds,
RepositoryView pView)
Constructs a
Query to get the returns for the given profile. |
java.util.List |
getReturnRequestsByOrderId(java.lang.String pOrderId) |
java.util.List |
getReturnRequestsByReplacementOrderId(java.lang.String pReplacementOrderId)
This method gets all return requests for a given replacement order.
|
protected RepositoryView |
getReturnRequestView() |
java.lang.String |
getReturnRequiredPropertyName() |
java.util.Collection<ReturnShippingGroup> |
getReturnShippingGroups(Order pOrder)
Return all
ReturnShippingGroup in the order |
java.util.Properties |
getReturnShippingTypeClassMap()
Returns the returnShippingTypeClassMap
|
ReturnStates |
getReturnStates() |
static ReturnTools |
getReturnTools()
Returns the ReturnTools component.
|
java.lang.String |
getRmaPropertyName() |
java.lang.String |
getShippingGroupIdPropertyName() |
java.lang.String |
getShippingPromotionsPropertyName() |
java.lang.String |
getShippingShareAdjustmentPropertyName()
Property name on the item cost adjustment item that contains
the shipping share adjustment value
|
SiteContextManager |
getSiteContextManager()
Returns the siteContextManager
|
SiteManager |
getSiteManager()
Returns the siteManager
|
java.lang.String |
getStatePropertyName() |
java.lang.String |
getStoreCreditNumberPropertyName()
Returns the storeCreditNumberPropertyName.
|
java.lang.String |
getStoreCreditRefundMethodItemDescriptorName()
Returns the storeCreditRefundMethodItemDescriptorName.
|
java.lang.String |
getSuggestedShippingRefundPropertyName() |
java.lang.String |
getSuggestedShippingRefundSharePropertyName() |
java.lang.String |
getSuggestedTaxRefundPropertyName() |
java.lang.String |
getSuggestedTaxRefundSharePropertyName() |
java.lang.String |
getTaxShareAdjustmentPropertyName()
Property name on the item cost adjustment item that contains
the tax share adjustment value
|
double |
getTotalAdjustments(java.util.Collection pItemCostAdjustments)
Sums all adjustments
|
double |
getTotalAmountAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
amountAdjustment property of all the
refund adjustments |
double |
getTotalItemAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
amountAdjustment, orderDiscountShareAdjustment and manualDiscountShareAdjustment properties of all the
refund adjustments |
double |
getTotalManualAdjustmentAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
manualAdjustmentShareAdjustment property for all the
refund adjustments |
double |
getTotalManualAdjustmentValue(Order pOrder,
java.lang.String pManualAdjustmentId)
returns the total adjustment made by an order promotion
|
double |
getTotalOrderDiscountAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
orderDiscountShareAdjustment property of all the
refund adjustments |
double |
getTotalOrderPromotionValue(Order pOrder,
java.lang.String pOrderPromotionId)
returns the total adjustment made by an order promotion
|
double |
getTotalShippingAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
shippingAdjustment property of all the
refund adjustments |
double |
getTotalTaxAdjustments(java.util.Collection pItemCostAdjustments)
Sums the
taxAdjustment property of all the
refund adjustments |
java.lang.String |
getUpdateInventoryPropertyName() |
boolean |
isFulfilledOrderState(java.lang.String pState)
Determines if the given state is one of the states
defined in the
fulfilledOrderStates property. |
boolean |
isItemReturnable(CommerceItem pCommerceItem)
Determines if the given commerce item is returnable
|
boolean |
isItemReturnable(RepositoryItem pCommerceItem)
Determines if the given commerce item is returnable.
|
boolean |
isOrderFulfilled(Order pOrder)
Determines if an order is fulfilled based on the states defined
in the
fulfilledOrderStates property. |
boolean |
isOrderFulfilled(RepositoryItem pOrderItem)
Determines if an order is fulfilled based on the states defined
in the
fulfilledOrderStates property. |
boolean |
isOrderPendingReturn(Order pOrder)
Determines if the order is in a state that means
it is waiting for items to be returned.
|
boolean |
isPerformanceMonitorEnabled() |
boolean |
isReturnable(Order pOrder)
Determines if an return or exchange can be initiated
for the given Order.
|
boolean |
isReturnable(RepositoryItem pOrderItem)
This method determines whether a return or exchange
can be initiated for the given order.
|
protected void |
loadAppliedPromotions(ReturnRequest pReturnRequest,
RepositoryItem pReturnRequestItem)
Loads the
itemPromotions and orderPromotions properties of the
ReturnRequest from the corresponding properties in the
return request item. |
protected void |
loadItemCostAdjustments(ReturnRequest pReturnRequest,
RepositoryItem pReturnRequestItem)
Loads the ItemCostAdjustments for the non-return items by creating a new ItemCostAjustment
for each itemCostAdjustment repository item found on the return request item and adding
it to the ReturnRequest object.
|
protected void |
loadPromotionValueAdjustments(ReturnRequest pReturnRequest,
RepositoryItem pReturnRequestItem)
Loads the promotion value adjustment map on the return request repository item into the
ReturnRequest 's promotionValueAdjustments property |
protected void |
loadRefundMethodsList(ReturnRequest pReturnRequest,
RepositoryItem pReturnRequestItem)
Loads the refund methods from the given returnrequest item into the given
ReturnRequest object. |
void |
loadRelatedReplacementOrders(ReturnRequest pReturnRequest)
Loads the
relatedReplacementOrders property of the ReturnRequest based on the
sortedReturnRequests in the ReturnRequest. |
protected ReturnRequest |
loadReturnRequest(RepositoryItem pReturnRequestItem)
Creates and loads a ReturnRequest object for the given return request repository item
|
java.lang.String |
logGWPItemMarkers(CommerceItem pCommerceItem)
Generates a String that details the GWP items markers on the
given CommerceItem
|
java.lang.String |
logGWPOrderMarkers(Order pOrder)
Generates a String that details the GWP order markers on the
given Order
|
protected java.lang.String |
logOrderInfo(ReturnRequest pReturnRequest,
Order pOrder)
Generates a String that details the contents of the Order.
|
java.lang.String |
logReturnRequest(ReturnRequest pReturnRequest)
Generates a String that details the contents of the ReturnRequest.
|
protected void |
removeEmptyShippingGroups(Order pOrder)
Util method that removes all shipping groups in the order that have
no CommerceItemRelationships
|
void |
removeUnallocatedRefundMethods(ReturnRequest pReturnRequest)
Removes the refund methods that have an allocated amount of 0.
|
protected void |
removeZeroQuantityItems(Order pOrder)
Removes all items from the order with a quantity of 0.
|
protected void |
removeZeroQuantityRelationships(Order pOrder)
Removes all ShippingGroupCommerceItemRelationships that have a quantity of 0.
|
protected void |
repriceCurrentExchangeOrder(ReturnRequest pReturnRequest)
Reprices the current exchange order.
|
void |
repriceWorkingOrder(ReturnRequest pReturnRequest,
Order pWorkingOrder,
java.util.Locale pLocale,
RepositoryItem pCustomerProfile,
java.util.Map pExtraParameters)
This method should be used to price the working orders: return adjusted,
return calculation and promotion evaluation.
|
protected RepositoryItem |
retrieveDisposition(java.lang.String pDisposition)
Load an item disposition from the repository
|
protected MutableRepositoryItem |
retrieveRefundMethod(java.lang.String pRefundMethodId)
Load an updateable refund method from the repository
|
protected MutableRepositoryItem |
retrieveReturnItem(java.lang.String pReturnItemId)
Load an updateable returned item from the repository
|
protected MutableRepositoryItem |
retrieveReturnRequest(java.lang.String pRequestId)
Load an updateable return request from the repository
|
void |
rollbackTransaction()
This method is used to roll-back the current transaction.
|
protected void |
saveAppliedPromotions(ReturnRequest pReturnRequest,
MutableRepositoryItem pReturnRequestItem)
Extracts the promotions that still apply and saves their ids with the return request
item.
|
protected void |
saveItemCostAdjustments(ReturnRequest pReturnRequest,
MutableRepositoryItem pReturnRequestItem)
The method is called when saving the ItemCostAdjustments of the ReturnRequest to the
repository.
|
protected void |
savePromotionValueAdjustments(ReturnRequest pReturnRequest,
MutableRepositoryItem pReturnRequestItem)
Transfers the
map in the ReturnRequest to the
promotionValueAdjustments |
void |
setActualShippingRefundPropertyName(java.lang.String pActualShippingRefundPropertyName)
Set the name of the returnRequest property that identifies the actual shipping refund amount
|
void |
setActualShippingRefundSharePropertyName(java.lang.String pActualShippingRefundSharePropertyName) |
void |
setActualTaxRefundPropertyName(java.lang.String pActualTaxRefundPropertyName)
Set the name of the returnRequest property that identifies the actual tax refund amount
|
void |
setActualTaxRefundSharePropertyName(java.lang.String pActualTaxRefundSharePropertyName) |
void |
setAmountAdjustmentPropertyName(java.lang.String pAmountAdjustmentPropertyName) |
void |
setAmountPropertyName(java.lang.String pAmountPropertyName)
Set the name of the refundMethod property that indicates the amount for this refund method
|
void |
setBalancingPaymentIdPropertyName(java.lang.String pBalancingPaymentIdPropertyName)
Sets the balancingPaymentIdPropertyName.
|
protected void |
setBasePropertiesOfItemCostAdjustment(ItemCostAdjustment pItemCostAdjustment,
RepositoryItem pItemCostAdjustmentItem)
This method is used when reconstituting the ItemCostAdjustmments of the
ReturnRequest from the repository.
|
protected void |
setBasePropertiesOfRepositoryItem(ItemCostAdjustment pItemCostAdjustment,
MutableRepositoryItem pItemCostAdjustmentItem)
This method will set the properties of the given repository item based on the content of the
given ItemCostAdjustment object.
|
void |
setBeanNameToItemDescriptorMap(java.util.Properties pBeanNameToItemDescriptorMap)
Sets the beanNameToItemDescriptorMap
|
void |
setBonusRefundPropertyName(java.lang.String pBonusRefundPropertyName)
Set the name of the bonusRefund property in the returnItem item descriptor
|
void |
setClaimableManager(ClaimableManager pClaimableManager)
Sets the Claimable manager
|
void |
setCommentAgentPropertyName(java.lang.String pCommentAgentPropertyName)
Set the name of the comment property that holds the id of the agent who placed the comment
|
void |
setCommentCreationDatePropertyName(java.lang.String pCommentCreationDatePropertyName)
Set the name of the comment property that holds the comment's creation date
|
void |
setCommentOwnerPropertyName(java.lang.String pCommentOwnerPropertyName)
Set the name of the comment property that holds the id of the return request that owns the comment
|
void |
setCommentPropertyName(java.lang.String pCommentPropertyName)
Set the name of the comment property that holds the actual comment
|
void |
setCommerceItemIdPropertyName(java.lang.String pCommerceItemIdPropertyName)
Set the name of the returnItem property that identifies the commerce item that is being returned
|
void |
setCommercePropertyManager(CommercePropertyManager pCommercePropertyManager)
Sets the component that defines properties of the profile for Commerce
|
void |
setCreatedDatePropertyName(java.lang.String pCreatedDatePropertyName)
Set the name of the returnRequest property that identifies the date the request was created
|
void |
setCreditCardRefundMethodItemDescriptorName(java.lang.String pCreditCardRefundMethodItemDescriptorName)
Sets the creditCardRefundMethodItemDescriptorName.
|
void |
setDispositionPropertyName(java.lang.String pDispositionPropertyName)
Set the name of the returnItem property that indicates the disposition of the returned item
|
void |
setFulfilledOrderStates(java.lang.String[] pFulfilledOrderStates)
Sets array of order states that indicate that an order is fulfilled
|
void |
setGwpManager(GWPManager pGwpManager)
Setter for the gift with purchase manager property.
|
void |
setItemCostAdjustmentDescriptorName(java.lang.String pItemCostAdjustmentDescriptorName)
Set the name of the itemCostAdjustment item-descriptor
|
void |
setItemPromotionsPropertyName(java.lang.String pItemPromotionsPropertyName)
Set the name of the returnRequest property that holds the item promotion ids used to calculated refund values and replacement
item prices.
|
void |
setManualAdjustmentShareAdjustmentPropertyName(java.lang.String pManualAdjustmentShareAdjustmentPropertyName) |
void |
setMethodTypePropertyName(java.lang.String pMethodTypePropertyName)
Set the name of the refundMethod property that indicates the type of refund method
|
void |
setNonReturnItemCostAdjustmentsPropertyName(java.lang.String pNonReturnItemCostAdjustmentsPropertyName)
Set the name of the returnRequest property that holds the ItemCostAdjustment objects for non-return items.
|
void |
setOrderDiscountShareAdjustmentPropertyName(java.lang.String pOrderDiscountShareAdjustmentPropertyName) |
void |
setOrderManager(OrderManager pOrderManager)
Sets the order manager
|
void |
setOrderPromotionsPropertyName(java.lang.String pOrderPromotionsPropertyName)
Set the name of the returnRequest property that holds the order promotion ids used to calculated refund values and replacement
item prices.
|
void |
setOrderPropertyName(java.lang.String pOrderPropertyName) |
void |
setOriginalOrderIdPropertyName(java.lang.String pOriginalOrderIdPropertyName)
Set the name of the returnRequest property that holds the id of the original order
|
void |
setOtherRefundPropertyName(java.lang.String pOtherRefundPropertyName)
Sets the otherRefundPropertyName.
|
void |
setPaymentGroupIdPropertyName(java.lang.String pPaymentGroupIdPropertyName)
Set the name of the refundMethod property that identifies the payment group that this refund method is related to
|
void |
setPendingReturnStates(java.lang.String[] pPendingReturnStates)
Sets array of order states that indicate that an order is pending a
return (i.e.
|
void |
setPerformanceMonitorEnabled(boolean pPerformanceMonitorEnabled) |
void |
setPricingTools(PricingTools pPricingTools) |
void |
setProcessedPropertyName(java.lang.String pProcessedPropertyName)
Set the name of the returnRequest property that identifies the 'request has been processed' setting
|
void |
setProcessImmediatelyPropertyName(java.lang.String pProcessImmediatelyPropertyName)
Set the name of the returnRequest property that identifies the 'process immediately' setting
|
void |
setProfileTools(ProfileTools pProfileTools)
Sets the ProfileTools component
|
void |
setPromotionTools(PromotionTools pPromotionTools) |
void |
setPromotionValueAdjustmentsPropertyName(java.lang.String pPromotionValueAdjustmentsPropertyName) |
void |
setQuantityAdjustedPropertyName(java.lang.String pQuantityAdjustedPropertyName) |
void |
setQuantityReceivedPropertyName(java.lang.String pQuantityReceivedPropertyName)
Set the name of the returnItem property that identifies the quantity of this item that has been received
|
void |
setQuantityToExchangePropertyName(java.lang.String pQuantityToExchangePropertyName)
Set the name of the returnItem property that identifies the quantity that will be replaced
|
void |
setQuantityToReturnPropertyName(java.lang.String pQuantityToReturnPropertyName)
Set the name of the returnItem property that identifies the quantity that will be returned
|
void |
setReasonPropertyName(java.lang.String pReasonPropertyName)
Set the name of the returnItem property that identifies the reason that the item is being returned/replaced
|
void |
setRefundAmountPropertyName(java.lang.String pRefundAmountPropertyName)
Set the name of the returnItem property that identifies the amount that will be refunded for this item
|
void |
setRefundMethodItemDescriptorName(java.lang.String pRefundMethodItemDescriptorName)
Set the name of the RefundMethod item-descriptor
|
void |
setRefundMethodsPropertyName(java.lang.String pRefundMethodsPropertyName)
Set the name of the returnRequest property that identifies the the refund methods for this request
|
void |
setRefundMethodTypeClassMap(java.util.Properties pRefundMethodTypeClassMap)
Sets the refundMethodTypeClassMap
|
void |
setReplacementOrderIdPropertyName(java.lang.String pReplacementOrderIdPropertyName)
Set the name of the returnRequest property that holds the replacement order id
|
void |
setReturnAgentPropertyName(java.lang.String pReturnAgentPropertyName)
Sets property returnAgentPropertyName
|
void |
setReturnCommentItemDescriptorName(java.lang.String pReturnCommentItemDescriptorName)
Set the name of the item descriptor that holds the return request's comments
|
void |
setReturnFeePropertyName(java.lang.String pReturnFeePropertyName)
Set the name of the returnRequest property that holds the return fee
|
void |
setReturnItemDispositionItemDescriptorName(java.lang.String pReturnItemDispositionItemDescriptorName)
Set the name of the ReturnItemDisposition item-descriptor
|
void |
setReturnItemItemDescriptorName(java.lang.String pReturnItemItemDescriptorName)
Set the name of the returnItem item-descriptor
|
protected void |
setReturnItemProperties(ReturnItem pReturnItem,
MutableRepositoryItem pReturnItemItem,
java.lang.String pRequestId)
Sets the properties in a returnItem repository item based on the given ReturnItem object
|
void |
setReturnItemsPropertyName(java.lang.String pReturnItemsPropertyName)
Set the name of the returnRequest property that identifies the items that are being exchanged/returned
|
void |
setReturnItemStatePropertyName(java.lang.String pReturnItemStatePropertyName)
Set the name of the returnItem property that identifies the indicates state of the item
|
void |
setReturnItemStates(ReturnItemStates pReturnItemStates)
Sets the returned item states
|
void |
setReturnItemTypeClassMap(java.util.Properties pReturnItemTypeClassMap)
Sets the returnItemTypeClassMap
|
void |
setReturnOriginOfReturnPropertyName(java.lang.String pReturnOriginOfReturnPropertyName)
Sets property returnOriginOfReturnPropertyName
|
void |
setReturnReasonsItemDescriptorName(java.lang.String pReturnReasonsItemDescriptorName)
Set the name of the returnReasons item-descriptor
|
void |
setReturnRefPropertyName(java.lang.String pReturnRefPropertyName)
Set the name of the returnItem property that identifies the returnRequest that this item is related to
|
void |
setReturnRepository(MutableRepository pReturnRepository)
sets the return repository
|
void |
setReturnRequestClass(java.lang.Class<ReturnRequest> pReturnRequestClass)
Sets the returnRequestClass
|
void |
setReturnRequestItemDescriptorName(java.lang.String pReturnRequestItemDescriptorName)
Set the name of the returnRequest item-descriptor
|
void |
setReturnRequiredPropertyName(java.lang.String pReturnRequiredPropertyName)
Set the name of the returnItem property that indicates if the item must be physically returned
|
void |
setReturnShippingTypeClassMap(java.util.Properties pReturnShippingTypeClassMap)
Sets the returnShippingTypeClassMap
|
void |
setReturnStates(ReturnStates pReturnStates)
Sets the return request states
|
void |
setRmaPropertyName(java.lang.String pRmaPropertyName)
Set the name of the returnRequest property that identifies the RMA
|
void |
setShippingGroupIdPropertyName(java.lang.String pShippingGroupIdPropertyName)
Set the name of the returnItem property that identifies the shipping group that the returned item is related to
|
void |
setShippingPromotionsPropertyName(java.lang.String pShippingPromotionsPropertyName)
Set the name of the returnRequest property that holds the shipping promotion ids used to calculated refund values and replacement
item prices.
|
void |
setShippingShareAdjustmentPropertyName(java.lang.String pShippingShareAdjustmentPropertyName) |
void |
setSiteContextManager(SiteContextManager pSiteContextManager)
Sets the siteContextManager
|
void |
setSiteManager(SiteManager pSiteManager)
Sets the siteManager
|
void |
setStatePropertyName(java.lang.String pStatePropertyName)
Set the name of the returnRequest property that identifies the state of the request
|
void |
setStoreCreditNumberPropertyName(java.lang.String pStoreCreditNumberPropertyName)
Sets the storeCreditNumberPropertyName.
|
void |
setStoreCreditRefundMethodItemDescriptorName(java.lang.String pStoreCreditRefundMethodItemDescriptorName)
Sets the storeCreditRefundMethodItemDescriptorName.
|
void |
setSuggestedShippingRefundPropertyName(java.lang.String pSuggestedShippingRefundPropertyName)
Set the name of the returnRequest property that identifies the suggested shipping refund amount
|
void |
setSuggestedShippingRefundSharePropertyName(java.lang.String pSuggestedShippingRefundSharePropertyName) |
void |
setSuggestedTaxRefundPropertyName(java.lang.String pSuggestedTaxRefundPropertyName)
Set the name of the returnRequest property that identifies the suggested tax refund amount
|
void |
setSuggestedTaxRefundSharePropertyName(java.lang.String pSuggestedTaxRefundSharePropertyName) |
void |
setTaxShareAdjustmentPropertyName(java.lang.String pTaxShareAdjustmentPropertyName) |
void |
setUpdateInventoryPropertyName(java.lang.String pUpdateInventoryPropertyName)
Set the name of the returnItemDisposition property that indicates whether the the inventory should
be updated when the item is received
|
protected boolean |
shouldUpdateInventory(ReturnItem pReturnItem)
Indicates if the inventory of the return item should be updated upon receipt
|
protected java.lang.String |
stateToString(ObjectStates pObjectStates,
java.lang.String pStateString)
Convert a state string
|
protected double |
sumDetails(CommerceItem pCommerceItem,
atg.core.util.Range pRange,
java.lang.String pDetailPropertyName)
Iterates over the DetailedItemPriceInfos for the item and returns the
total value of the given property.
|
protected void |
updateItem(MutableRepositoryItem pRepositoryItem)
Update the repository item
|
protected void |
updateReturnItemState(ReturnItem pReturnItem)
Updates the ReturnItem state in the repository.
|
protected void |
updateReturnRequestState(ReturnRequest pReturnRequest)
This method updates the return request state in the repository.
|
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
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
protected static java.util.ResourceBundle sResourceBundle
public static final java.lang.String DEFAULT
protected ProfileTools mProfileTools
protected java.lang.String[] mFulfilledOrderStates
protected SiteContextManager mSiteContextManager
protected SiteManager mSiteManager
protected GWPManager mGwpManager
protected boolean mPerformanceMonitorEnabled
protected java.lang.String[] mPendingReturnStates
protected java.lang.String mPromotionValueAdjustmentsPropertyName
protected PromotionTools mPromotionTools
protected PricingTools mPricingTools
protected java.lang.String mNonReturnItemCostAdjustmentsPropertyName
protected java.lang.String mOrderPropertyName
protected java.lang.String mQuantityAdjustedPropertyName
protected java.lang.String mAmountAdjustmentPropertyName
protected java.lang.String mOrderDiscountShareAdjustmentPropertyName
protected java.lang.String mManualAdjustmentShareAdjustmentPropertyName
protected java.lang.String mTaxShareAdjustmentPropertyName
protected java.lang.String mShippingShareAdjustmentPropertyName
protected java.lang.Class<ReturnRequest> mReturnRequestClass
protected java.util.Properties mReturnShippingTypeClassMap
protected java.util.Properties mRefundMethodTypeClassMap
protected java.util.Properties mReturnItemTypeClassMap
protected java.util.Properties mBeanNameToItemDescriptorMap
protected static ReturnTools mReturnTools
public static java.lang.String mReturnToolsComponentPath
public void setProfileTools(ProfileTools pProfileTools)
pProfileTools
- the ProfileTools componentpublic ProfileTools getProfileTools()
public void setFulfilledOrderStates(java.lang.String[] pFulfilledOrderStates)
pFulfilledOrderStates
- an array of order states that indicate that
an order is fulfilledpublic java.lang.String[] getFulfilledOrderStates()
public SiteContextManager getSiteContextManager()
public void setSiteContextManager(SiteContextManager pSiteContextManager)
pSiteContextManager
- the siteContextManager to setpublic SiteManager getSiteManager()
public void setSiteManager(SiteManager pSiteManager)
pSiteManager
- the siteManager to setpublic void setCommercePropertyManager(CommercePropertyManager pCommercePropertyManager)
pCommercePropertyManager
- the component that defines properties of the profile for Commercepublic CommercePropertyManager getCommercePropertyManager()
public void setGwpManager(GWPManager pGwpManager)
pGwpManager
- GWPManagerpublic GWPManager getGwpManager()
public boolean isPerformanceMonitorEnabled()
public void setPerformanceMonitorEnabled(boolean pPerformanceMonitorEnabled)
public void setPendingReturnStates(java.lang.String[] pPendingReturnStates)
pPendingReturnStates
- an array of order states that indicate that
an order is pending returnpublic java.lang.String[] getPendingReturnStates()
public java.lang.String getPromotionValueAdjustmentsPropertyName()
public void setPromotionValueAdjustmentsPropertyName(java.lang.String pPromotionValueAdjustmentsPropertyName)
public PromotionTools getPromotionTools()
public void setPromotionTools(PromotionTools pPromotionTools)
public PricingTools getPricingTools()
public void setPricingTools(PricingTools pPricingTools)
public java.lang.String getOtherRefundPropertyName()
public void setOtherRefundPropertyName(java.lang.String pOtherRefundPropertyName)
pOtherRefundPropertyName
- public java.lang.String getBalancingPaymentIdPropertyName()
public void setBalancingPaymentIdPropertyName(java.lang.String pBalancingPaymentIdPropertyName)
pBalancingPaymentIdPropertyName
- public java.lang.String getStoreCreditNumberPropertyName()
public void setStoreCreditNumberPropertyName(java.lang.String pStoreCreditNumberPropertyName)
pStoreCreditNumberPropertyName
- public java.lang.String getCreditCardRefundMethodItemDescriptorName()
public void setCreditCardRefundMethodItemDescriptorName(java.lang.String pCreditCardRefundMethodItemDescriptorName)
pCreditCardRefundMethodItemDescriptorName
- public java.lang.String getStoreCreditRefundMethodItemDescriptorName()
public void setStoreCreditRefundMethodItemDescriptorName(java.lang.String pStoreCreditRefundMethodItemDescriptorName)
pStoreCreditRefundMethodItemDescriptorName
- public void setActualShippingRefundPropertyName(java.lang.String pActualShippingRefundPropertyName)
pActualShippingRefundPropertyName
- the name of the returnRequest property that identifies
the actual shipping refund amountpublic java.lang.String getActualShippingRefundPropertyName()
public void setActualTaxRefundPropertyName(java.lang.String pActualTaxRefundPropertyName)
pActualTaxRefundPropertyName
- the name of the returnRequest property that identifies the
actual tax refund amountpublic java.lang.String getActualTaxRefundPropertyName()
public void setAmountPropertyName(java.lang.String pAmountPropertyName)
pAmountPropertyName
- the name of the refundMethod property that indicates the amount
for this refund methodpublic java.lang.String getAmountPropertyName()
public void setBonusRefundPropertyName(java.lang.String pBonusRefundPropertyName)
pBonusRefundPropertyName
- the name of the bonusRefund property in the returnItem item descriptorpublic java.lang.String getBonusRefundPropertyName()
public void setCommentPropertyName(java.lang.String pCommentPropertyName)
pCommentPropertyName
- the name of the comment property that holds the actual commentpublic java.lang.String getCommentPropertyName()
public void setCommentAgentPropertyName(java.lang.String pCommentAgentPropertyName)
pCommentAgentPropertyName
- the name of the comment property that holds the id of the
agent who placed the commentpublic java.lang.String getCommentAgentPropertyName()
public void setCommentCreationDatePropertyName(java.lang.String pCommentCreationDatePropertyName)
pCommentCreationDatePropertyName
- the name of the comment property that holds the comment's
creation datepublic java.lang.String getCommentCreationDatePropertyName()
public void setCommentOwnerPropertyName(java.lang.String pCommentOwnerPropertyName)
pCommentOwnerPropertyName
- the name of the comment property that holds the id of the return
request that owns the commentpublic java.lang.String getCommentOwnerPropertyName()
public void setCommerceItemIdPropertyName(java.lang.String pCommerceItemIdPropertyName)
pCommerceItemIdPropertyName
- the name of the returnItem property that identifies the commerce item
that is being returnedpublic java.lang.String getCommerceItemIdPropertyName()
public void setCreatedDatePropertyName(java.lang.String pCreatedDatePropertyName)
pCreatedDatePropertyName
- the name of the returnRequest property that identifies the
date the request was createdpublic java.lang.String getCreatedDatePropertyName()
public void setDispositionPropertyName(java.lang.String pDispositionPropertyName)
pDispositionPropertyName
- the name of the returnItem property that indicates
the disposition of the returned itempublic java.lang.String getDispositionPropertyName()
public void setMethodTypePropertyName(java.lang.String pMethodTypePropertyName)
pMethodTypePropertyName
- the name of the refundMethod property that indicates the type of refund methodpublic java.lang.String getMethodTypePropertyName()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager
- the order managerpublic OrderManager getOrderManager()
public void setNonReturnItemCostAdjustmentsPropertyName(java.lang.String pNonReturnItemCostAdjustmentsPropertyName)
pNonReturnItemCostAdjustmentsPropertyName
- the name of the returnRequest property that holds holds the ItemCostAdjustment objects for non-return itemspublic java.lang.String getNonReturnItemCostAdjustmentsPropertyName()
public void setItemPromotionsPropertyName(java.lang.String pItemPromotionsPropertyName)
pPromotionsPropertyName
- the name of the returnRequest property that holds the item promotion ids used to calculated refund values
and replacement item prices.public java.lang.String getItemPromotionsPropertyName()
public void setShippingPromotionsPropertyName(java.lang.String pShippingPromotionsPropertyName)
pPromotionsPropertyName
- the name of the returnRequest property that holds the item promotion ids used to calculated refund values
and replacement item prices.public java.lang.String getShippingPromotionsPropertyName()
public void setOrderPromotionsPropertyName(java.lang.String pOrderPromotionsPropertyName)
pPromotionsPropertyName
- the name of the returnRequest property that holds the order promotion ids used to calculated refund values
and replacement item prices.public java.lang.String getOrderPromotionsPropertyName()
public java.lang.String getOrderPropertyName()
public void setOrderPropertyName(java.lang.String pOrderPropertyName)
public void setOriginalOrderIdPropertyName(java.lang.String pOriginalOrderIdPropertyName)
pOriginalOrderIdPropertyName
- the name of the returnRequest property that holds the id of the original orderpublic java.lang.String getOriginalOrderIdPropertyName()
public void setPaymentGroupIdPropertyName(java.lang.String pPaymentGroupIdPropertyName)
pPaymentGroupIdPropertyName
- the name of the refundMethod property that identifies
the payment group that this refund method is related topublic java.lang.String getPaymentGroupIdPropertyName()
public void setProcessedPropertyName(java.lang.String pProcessedPropertyName)
pProcessedPropertyName
- the name of the returnRequest property that identifies the
'request has been processed' settingpublic java.lang.String getProcessedPropertyName()
public void setProcessImmediatelyPropertyName(java.lang.String pProcessImmediatelyPropertyName)
pProcessImmediatelyPropertyName
- the name of the returnRequest property that identifies the
'process immediately' settingpublic java.lang.String getProcessImmediatelyPropertyName()
public void setQuantityReceivedPropertyName(java.lang.String pQuantityReceivedPropertyName)
pQuantityReceivedPropertyName
- the name of the returnItem property that identifies the quantity of
this item that has been receivedpublic java.lang.String getQuantityReceivedPropertyName()
public void setQuantityToExchangePropertyName(java.lang.String pQuantityToExchangePropertyName)
pQuantityToExchangePropertyName
- the name of the returnItem property that identifies
the quantity that will be replacedpublic java.lang.String getQuantityToExchangePropertyName()
public void setQuantityToReturnPropertyName(java.lang.String pQuantityToReturnPropertyName)
pQuantityToReturnPropertyName
- the name of the returnItem property that identifies the quantity
that will be returnedpublic java.lang.String getQuantityToReturnPropertyName()
public void setReasonPropertyName(java.lang.String pReasonPropertyName)
public java.lang.String getReasonPropertyName()
public void setRefundAmountPropertyName(java.lang.String pRefundAmountPropertyName)
pRefundAmountPropertyName
- the name of the returnItem property that identifies the amount
that will be refunded for this itempublic java.lang.String getRefundAmountPropertyName()
public void setRefundMethodItemDescriptorName(java.lang.String pRefundMethodItemDescriptorName)
pRefundMethodItemDescriptorName
- the name of the refundMethod item descriptorpublic java.lang.String getRefundMethodItemDescriptorName()
public void setRefundMethodsPropertyName(java.lang.String pRefundMethodsPropertyName)
pRefundMethodsPropertyName
- the name of the returnRequest property that identifies the the
refund methods for this requestpublic java.lang.String getRefundMethodsPropertyName()
public void setReplacementOrderIdPropertyName(java.lang.String pReplacementOrderIdPropertyName)
pReplacementOrderIdPropertyName
- the name of the returnRequest property that holds the replacemnet order idpublic java.lang.String getReplacementOrderIdPropertyName()
public void setReturnFeePropertyName(java.lang.String pReturnFeePropertyName)
pReturnFeePropertyName
- the name of the returnRequest property that holds the return feepublic java.lang.String getReturnFeePropertyName()
public java.lang.String getReturnAgentPropertyName()
public void setReturnAgentPropertyName(java.lang.String pReturnAgentPropertyName)
pReturnAgentPropertyName
- public java.lang.String getReturnOriginOfReturnPropertyName()
public void setReturnOriginOfReturnPropertyName(java.lang.String pReturnOriginOfReturnPropertyName)
pReturnOriginOfReturnPropertyName
- public java.lang.String getSuggestedShippingRefundSharePropertyName()
public void setSuggestedShippingRefundSharePropertyName(java.lang.String pSuggestedShippingRefundSharePropertyName)
public java.lang.String getSuggestedTaxRefundSharePropertyName()
public void setSuggestedTaxRefundSharePropertyName(java.lang.String pSuggestedTaxRefundSharePropertyName)
public java.lang.String getActualShippingRefundSharePropertyName()
public void setActualShippingRefundSharePropertyName(java.lang.String pActualShippingRefundSharePropertyName)
public java.lang.String getActualTaxRefundSharePropertyName()
public void setActualTaxRefundSharePropertyName(java.lang.String pActualTaxRefundSharePropertyName)
public void setReturnCommentItemDescriptorName(java.lang.String pReturnCommentItemDescriptorName)
pReturnCommentItemDescriptorName
- the name of the item descriptor that holds
the return request's commentspublic java.lang.String getReturnCommentItemDescriptorName()
public void setReturnItemDispositionItemDescriptorName(java.lang.String pReturnItemDispositionItemDescriptorName)
pReturnItemDispositionItemDescriptorName
- the name of the ReturnItemDisposition item-descriptorpublic java.lang.String getReturnItemDispositionItemDescriptorName()
public void setReturnItemItemDescriptorName(java.lang.String pReturnItemItemDescriptorName)
pReturnItemItemDescriptorName
- the name of the returnItem item-descriptorpublic java.lang.String getReturnItemItemDescriptorName()
public void setReturnItemsPropertyName(java.lang.String pReturnItemsPropertyName)
pReturnItemsPropertyName
- the name of the returnRequest property that identifies the items
that are being exchanged/returnedpublic java.lang.String getReturnItemsPropertyName()
public void setReturnItemStatePropertyName(java.lang.String pReturnItemStatePropertyName)
pReturnItemStatePropertyName
- the name of the returnItem property that identifies
the indicates state of the itempublic java.lang.String getReturnItemStatePropertyName()
public void setReturnItemStates(ReturnItemStates pReturnItemStates)
pReturnItemStates
- the returned item statespublic ReturnItemStates getReturnItemStates()
public void setReturnReasonsItemDescriptorName(java.lang.String pReturnReasonsItemDescriptorName)
pReturnReasonsItemDescriptorName
- the name of the returnReasonsItemDescriptorpublic java.lang.String getReturnReasonsItemDescriptorName()
public void setReturnRefPropertyName(java.lang.String pReturnRefPropertyName)
pReturnRefPropertyName
- the name of the returnItem property that identifies the returnRequest that
this item is related topublic java.lang.String getReturnRefPropertyName()
public void setReturnRepository(MutableRepository pReturnRepository)
pReturnRepository
- the return repositorypublic MutableRepository getReturnRepository()
public void setItemCostAdjustmentDescriptorName(java.lang.String pItemCostAdjustmentDescriptorName)
pItemCostAdjustmentDescriptorName
- the name of the itemCostAdjustment item-descriptorpublic java.lang.String getItemCostAdjustmentDescriptorName()
public void setReturnRequestItemDescriptorName(java.lang.String pReturnRequestItemDescriptorName)
pReturnRequestItemDescriptorName
- the name of the returnRequest item-descriptorpublic java.lang.String getReturnRequestItemDescriptorName()
public void setReturnRequiredPropertyName(java.lang.String pReturnRequiredPropertyName)
pReturnRequiredPropertyName
- the name of the returnItem property that indicates if the item
must be physically returnedpublic java.lang.String getReturnRequiredPropertyName()
public void setReturnStates(ReturnStates pReturnStates)
pReturnStates
- the returned request statespublic ReturnStates getReturnStates()
public void setRmaPropertyName(java.lang.String pRmaPropertyName)
pRmaPropertyName
- the name of the returnRequest property that identifies the RMApublic java.lang.String getRmaPropertyName()
public void setShippingGroupIdPropertyName(java.lang.String pShippingGroupIdPropertyName)
pShippingGroupIdPropertyName
- the name of the returnItem property that identifies the shipping group that
the returned item is related topublic java.lang.String getShippingGroupIdPropertyName()
public void setStatePropertyName(java.lang.String pStatePropertyName)
pStatePropertyName
- the name of the returnRequest property that identifies the state of the requestpublic java.lang.String getStatePropertyName()
public void setSuggestedShippingRefundPropertyName(java.lang.String pSuggestedShippingRefundPropertyName)
pSuggestedShippingRefundPropertyName
- the name of the returnRequest property that identifies
the suggested shipping refund amountpublic java.lang.String getSuggestedShippingRefundPropertyName()
public void setSuggestedTaxRefundPropertyName(java.lang.String pSuggestedTaxRefundPropertyName)
pSuggestedTaxRefundPropertyName
- the name of the returnRequest property that identifies the
suggested tax refund amountpublic java.lang.String getSuggestedTaxRefundPropertyName()
public void setUpdateInventoryPropertyName(java.lang.String pUpdateInventoryPropertyName)
pUpdateInventoryPropertyName
- the name of the returnItemDisposition property that indicates
whether the the inventory should be updated when the item is receivedpublic java.lang.String getUpdateInventoryPropertyName()
public java.lang.String getQuantityAdjustedPropertyName()
public void setQuantityAdjustedPropertyName(java.lang.String pQuantityAdjustedPropertyName)
public java.lang.String getAmountAdjustmentPropertyName()
public void setAmountAdjustmentPropertyName(java.lang.String pAmountAdjustmentPropertyName)
public java.lang.String getOrderDiscountShareAdjustmentPropertyName()
public void setOrderDiscountShareAdjustmentPropertyName(java.lang.String pOrderDiscountShareAdjustmentPropertyName)
public java.lang.String getManualAdjustmentShareAdjustmentPropertyName()
public void setManualAdjustmentShareAdjustmentPropertyName(java.lang.String pManualAdjustmentShareAdjustmentPropertyName)
public java.lang.String getTaxShareAdjustmentPropertyName()
public void setTaxShareAdjustmentPropertyName(java.lang.String pTaxShareAdjustmentPropertyName)
public java.lang.String getShippingShareAdjustmentPropertyName()
public void setShippingShareAdjustmentPropertyName(java.lang.String pShippingShareAdjustmentPropertyName)
public void setClaimableManager(ClaimableManager pClaimableManager)
pClaimableManager
- the claimable managerpublic ClaimableManager getClaimableManager()
public java.lang.Class<ReturnRequest> getReturnRequestClass()
public void setReturnRequestClass(java.lang.Class<ReturnRequest> pReturnRequestClass)
pReturnRequestClass
- the returnRequestClass to setpublic java.util.Properties getReturnShippingTypeClassMap()
public void setReturnShippingTypeClassMap(java.util.Properties pReturnShippingTypeClassMap)
pReturnShippingTypeClassMap
- the returnShippingTypeClassMap to setpublic java.util.Properties getRefundMethodTypeClassMap()
public void setRefundMethodTypeClassMap(java.util.Properties pRefundMethodTypeClassMap)
pRefundMethodTypeClassMap
- the refundMethodTypeClassMap to setpublic java.util.Properties getReturnItemTypeClassMap()
public void setReturnItemTypeClassMap(java.util.Properties pReturnItemTypeClassMap)
pReturnItemTypeClassMap
- the returnItemTypeClassMap to setpublic java.util.Properties getBeanNameToItemDescriptorMap()
public void setBeanNameToItemDescriptorMap(java.util.Properties pBeanNameToItemDescriptorMap)
public java.lang.String getMappedItemDescriptorName(java.lang.String pBeanName)
pBeanName
- the bean nameprotected void addRefundMethodsToReturnRequest(java.util.Set pRefundMethods, RepositoryItem pReturnRequest)
pRefundMethods
- a set of refund method idspReturnRequest
- the returnRequest repository itemprotected void addReturnItemsToReturnRequest(java.util.Set pReturnItems, RepositoryItem pReturnRequest)
pReturnItems
- a Set of return itemspReturnRequest
- the returnRequest repository itemprotected RepositoryItem createRefundMethodItem(RefundMethod pRefundMethod) throws RepositoryException
pRefundMethod
- the refund methodRepositoryException
getMappedItemDescriptorName(String)
,
RefundMethod.saveRefundMethod(MutableRepositoryItem)
public RepositoryItem createReturnComment(java.lang.String pReturnRequestId, java.lang.String pComment, java.lang.String pAgentId)
pReturnRequestId
- the return request that will own the commentpComment
- the comment dataprotected MutableRepositoryItem createReturnItemItem(java.lang.String pRequestId, ReturnItem pReturnItem) throws RepositoryException, CommerceException
pRequestId
- the id of the request that this item is related topReturnItem
- the returned item that should be usedRepositoryException
CommerceException
getMappedItemDescriptorName(String)
,
setReturnItemProperties(ReturnItem, MutableRepositoryItem, String)
protected MutableRepositoryItem createReturnRequestItem(ReturnRequest pReturnRequest) throws RepositoryException
ReturnRequest
. If the authorization
number is empty, then this method sets the return request item's repository id as authorization number.pReturnRequest
- the return request to use when populating the repository itemRepositoryException
#getMappedItemDescriptorName(String)}
,
ReturnRequest.saveReturnRequest(MutableRepositoryItem)
public java.util.List getReasonCodes()
public java.util.List getDispositionCodes()
protected RefundMethod getRefundMethod(java.lang.String pRefundMethodId, Order pOrder) throws RepositoryException, CommerceException
pRefundMethodId
- the id of the refundMethod repository itempOrder
- the original order this return is based onRepositoryException
CommerceException
protected RefundMethod getRefundMethod(RepositoryItem pRefundMethodItem, Order pOrder) throws CommerceException
pRefundMethodItem
- the refundMethod repository itempOrder
- the order from where this payment group originated.CommerceException
createRefundMethodInstance(String)
,
RefundMethod.loadRefundMethod(RepositoryItem, Order)
protected ReturnItem getReturnItem(java.lang.String pReturnItemId, Order pOrder) throws RepositoryException, CommerceException
pReturnItemId
- the id of the returnItem repository itempOrder
- the order the return was originally based onRepositoryException
CommerceException
protected ReturnItem getReturnItem(RepositoryItem pReturnItemItem, Order pOrder) throws RepositoryException, CommerceException
pReturnItemItem
- the returnItem repository itempOrder
- the order the return was originally based onRepositoryException
CommerceException
createReturnItemInstance(CommerceItem)
,
ReturnItem.loadReturnItem(RepositoryItem)
protected java.lang.String getOrderIdFromPaymentGroup(PaymentGroup pPaymentGroup)
pPaymentGroup
- protected java.lang.String getOrderIdFromPaymentGroupItem(RepositoryItem pPaymentGroupItem)
pPaymentGroup
- public ReturnRequest getReturnRequest(java.lang.String pReturnRequestId) throws RepositoryException, CommerceException
pReturnRequestId
- the id of the returnRequest repository itemRepositoryException
CommerceException
createReturnRequestInstance(Order)
,
ReturnRequest.loadReturnRequest(RepositoryItem)
protected ReturnRequest loadReturnRequest(RepositoryItem pReturnRequestItem) throws ReturnException
pReturnRequestItem
- RepositoryException
CommerceException
ReturnException
protected void loadRefundMethodsList(ReturnRequest pReturnRequest, RepositoryItem pReturnRequestItem) throws RepositoryException, CommerceException
ReturnRequest
object.pReturnRequest
- pReturnRequestItem
- RepositoryException
CommerceException
protected java.lang.String getPaymentGroupIdFromRefundMethod(RepositoryItem pRefundMethod)
pRefundMethod
- protected RepositoryItem retrieveDisposition(java.lang.String pDisposition) throws RepositoryException
pDisposition
- the disposition codeRepositoryException
ReturnException
protected MutableRepositoryItem retrieveRefundMethod(java.lang.String pRefundMethodId) throws RepositoryException
pRefundMethodId
- the id of the returned itemRepositoryException
ReturnException
protected MutableRepositoryItem retrieveReturnItem(java.lang.String pReturnItemId) throws RepositoryException
pReturnItemId
- the id of the returned itemRepositoryException
ReturnException
protected MutableRepositoryItem retrieveReturnRequest(java.lang.String pRequestId) throws RepositoryException
pRequestId
- the id of the return requestRepositoryException
ReturnException
protected void updateReturnRequestState(ReturnRequest pReturnRequest) throws RepositoryException
RepositoryException
protected void updateReturnItemState(ReturnItem pReturnItem) throws RepositoryException
pReturnItem
- RepositoryException
protected void setReturnItemProperties(ReturnItem pReturnItem, MutableRepositoryItem pReturnItemItem, java.lang.String pRequestId) throws RepositoryException
pReturnItem
- the ReturnItem objectpReturnItemItem
- the returnItem repository itemRepositoryException
ReturnItem.saveReturnItem(MutableRepositoryItem)
protected boolean shouldUpdateInventory(ReturnItem pReturnItem) throws RepositoryException
pReturnItem
- the returnItemRepositoryException
protected java.lang.String stateToString(ObjectStates pObjectStates, java.lang.String pStateString)
pObjectStates
- the object states object to usepStateString
- the state string to convertprotected void updateItem(MutableRepositoryItem pRepositoryItem) throws RepositoryException
pRepositoryItem
- the repository itemRepositoryException
public java.util.List getReturnRequestsByOrderId(java.lang.String pOrderId) throws ReturnException
ReturnException
public java.util.List getReturnRequestsByReplacementOrderId(java.lang.String pReplacementOrderId) throws ReturnException
pReplacementOrderId
- ReturnException
public boolean associateAgentAndReturnRequest(ReturnRequest pReturnRequest, java.lang.String pAgentId) throws RepositoryException
This method updates the agentId property of the return request.
pReturnRequest
- -- The return request that need to be associated with an agent.pAgentId
- -- The agent id to associate.RepositoryException
public boolean associateAgentAndReturnRequest(ReturnRequest pReturnRequest) throws RepositoryException
public java.util.Map generateItemToReturnQuantityMap(java.util.Collection pReturnRequestRepositoryItems)
pReturnRequestRepositoryItems
- public java.lang.Object[] generateSortedRelatedReturnRequests(java.lang.String pOrderId)
All return requests are part of a tree that originates with a single order (e.g. the original order that was submitted) and continues up through the orderId or replacementOrderId properties.
|-> Exchange Order -> Exchange Order -> Return Original Order |-> Exchange Order -> Return |-> Return
This API returns all return requests in the tree based on any order created within the tree
pOrderId
- any order within the treefindAllRelatedReturnRequests(String)
public java.util.List findAllRelatedReturnRequests(java.lang.String pOrderId)
pOrderId
- protected Query createReturnRequestSearchQuery(QueryBuilder pQueryBuilder, java.lang.String pOrderId) throws RepositoryException
pQueryBuilder
- pOrderId
- pExcludedReturnRequests
- RepositoryException
public RepositoryItem[] findReturnRequestsByExchangeOrder(java.lang.String pOrderId) throws RepositoryException
pOrderId
- RepositoryException
public RepositoryItem[] findReturnRequestsByBalancingPaymentGroupId(java.lang.String pBalancingPaymentGroupId) throws RepositoryException
pBalancingPaymentGroupId
- RepositoryException
public void removeUnallocatedRefundMethods(ReturnRequest pReturnRequest)
pReturnRequest
- protected Query createExcludedReturnRequests(QueryBuilder pQueryBuilder, java.util.Collection pExcludedReturnRequests) throws RepositoryException
pQueryBuilder
- the query builder to usepExcludedReturnRequests
- the return requests to excludeRepositoryException
protected java.util.Map createPipelineExtraParameterMap(ReturnRequest pReturnRequest)
public void repriceWorkingOrder(ReturnRequest pReturnRequest, Order pWorkingOrder, java.util.Locale pLocale, RepositoryItem pCustomerProfile, java.util.Map pExtraParameters) throws ReturnException
The promotions used are extracted fromt the Originating order in the ret
Extra parameters include the ReturnRequest's list of ItemPriceSource objects and the global price lists. Note that because an ItemPriceSource is provided for all the items in the order, the price list context isn't really relevant to the working orders. The items will end up with their original prices and price list designations since the ItemPriceSource provides that info.
The site context is determined from the originating order's site property. This
is necessary to maintain a consistent application of the original promotions, which may be
site specific. The originating site can be different from the current global site context
since the agent can browse to a different site within the same group during an exchange.
This method calls PricingTools.priceOrderTotal
using
the item and order promotions contained in the given ReturnRequest
pReturnRequest
- the return requestpWorkingOrder
- one of the working orders: Return Adjusted, Return Calculation and Promotion Evaluation.pLocale
- pCustomerProfile
- pExtraParameters
- ReturnException
addWorkingOrderPricingParams(Map, ReturnRequest)
public java.util.Map addWorkingOrderPricingParams(java.util.Map pExtraParameterMap, ReturnRequest pReturnRequest)
addWorkingOrderPricingParams(ReturnRequest, Order, Map)
pExtraParameterMap
- pReturnRequest
- CSRAgentTools#addPriceListParameter(Map)
,
CSRAgentTools#addItemPriceSourceParameter(Map, List)
,
CSRAgentTools#addBypassPromotionVetoersParameter(Map)
,
CSRAgentTools#addDisableAutoGWPParameter(Map);
public java.util.Map addWorkingOrderPricingParams(ReturnRequest pReturnRequest, Order pWorkingOrder, java.util.Map pExtraParameterMap)
pReturnRequest
- pWorkingOrder
- pExtraParameterMap
- protected void repriceCurrentExchangeOrder(ReturnRequest pReturnRequest) throws ReturnException
pReturnRequest
- ReturnException
protected void removeZeroQuantityItems(Order pOrder) throws CommerceException
pOrder
- the order for which to remove the itemsCommerceException
protected void removeEmptyShippingGroups(Order pOrder) throws CommerceException
pOrder
- the order from which the shipping groups will be removedCommerceException
protected void removeZeroQuantityRelationships(Order pOrder) throws CommerceException
pOrder
- the order for which to remove the relationshipsCommerceException
protected java.lang.String findOriginalItemForRAOItem(ReturnRequest pReturnRequest, java.lang.String pRAOItemId)
pReturnRequest
- pRAOItemId
- ReturnRequest.getRAOToReplacementItemMap()
,
ReturnRequest.getRAOToOriginatingItemMap()
protected java.lang.String findRCOItemForPEOItem(ReturnRequest pReturnRequest, java.lang.String pPEOItemId)
pReturnRequest
- pPEOItemId
- protected java.lang.String findOriginalItemForRCOItem(ReturnRequest pReturnRequest, java.lang.String pRCOItemId)
pReturnRequest
- pRCOItemId
- item id in the RCOprotected java.lang.String findOriginalItemForPEOItem(ReturnRequest pReturnRequest, java.lang.String pPEOItemId)
pReturnRequest
- pPEOItemId
- item id in the PEOprotected java.lang.String findOriginalShippingGrouporPEOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pPEOShippingGroupId)
pReturnRequest
- pPEOShippingGroupId
- item id in the PEOprotected java.lang.String findRCOShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pPEOShippingGroupId)
pReturnRequest
- pPEOShippingGroupId
- protected java.lang.String findOriginalShippingGroupForRCOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pRCOShippingGroup)
pReturnRequest
- pRCOShippingGroup
- shipping group id in the RCOprotected java.lang.String findRAOShippingGroupForRCOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pRCOShippingGroupId)
pReturnRequest
- pRCOShippingGroupId
- the RCO shipping group for which to get the corresponding rao shipping group id.protected java.lang.String findOriginalItemForWorkingItem(ReturnRequest pReturnRequest, java.lang.String pWorkingItemId)
pReturnRequest
- pWorkingItemId
- protected java.lang.String findOriginalShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pPEOShippingGroupId)
pReturnRequest
- pPEOShippingGroupId
- shipping group id in the PEOprotected java.lang.String findOriginalShippingGroupForWorkingShippingGroup(ReturnRequest pReturnRequest, java.lang.String pWorkingShippingGroupId)
pReturnRequest
- pWorkingShippingGroupId
- protected java.lang.String findOriginalShippingGroupForRAOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pRAOShippingGroupId)
pReturnRequest
- pRAOShippingGroupId
- ReturnRequest.getRAOToReplacementShippingGroupMap()
,
ReturnRequest.getRAOToOriginatingShippingGroupMap()
protected java.lang.String findRCOItemForOriginalItem(ReturnRequest pReturnRequest, java.lang.String pOriginalItemId)
pReturnRequest
- pOriginalItemId
- the original item for which to get the corresponding rco item id.protected java.lang.String findRCOItemForRAOItem(ReturnRequest pReturnRequest, java.lang.String pRAOItemId)
pReturnRequest
- pRAOItemId
- the RAO Item for which to get the corresponding rco item id.protected java.lang.String findRAOItemForRCOItem(ReturnRequest pReturnRequest, java.lang.String pRCOItemId)
pReturnRequest
- pRCOItemId
- the RCO Item for which to get the corresponding rao item id.protected java.lang.String findRAOItemForOriginalItem(ReturnRequest pReturnRequest, java.lang.String pOriginalItemId)
pReturnRequest
- pOriginalItemId
- the original item for which to get the corresponding rao item id.protected java.lang.String findRCOShippingGroupForOriginalShippingGroup(ReturnRequest pReturnRequest, java.lang.String pOriginalShippingGroupId)
The corresponding shipping group in the Return Adjusted Order must be determined first, which can be used to identify the corresponding shipping group in the Return Calculcation Order.
pReturnRequest
- pOriginalShippingGroupId
- the original shipping group from submitted orderprotected java.lang.String findRCOShippingGroupForRAOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pRAOShippingGroupId)
pReturnRequest
- pRAOItemId
- the RAO shipping group for which to get the corresponding rco shipping group id.protected java.lang.String findRAOShippingGroupForOriginalShippingGroup(ReturnRequest pReturnRequest, java.lang.String pOriginalShippingGroupId)
pReturnRequest
- pOriginalShippingGroupId
- protected java.lang.String findPEOItemForExchangeItem(ReturnRequest pReturnRequest, java.lang.String pExchangeItemId) throws ReturnException
pReturnRequest
- pExchangeItemId
- the exchange item id for which the corresponding peo item id is returned.ReturnException
protected java.lang.String findPEOShippingGroupForExchangeShippingGroup(ReturnRequest pReturnRequest, java.lang.String pExchangeShippingGroupId) throws ReturnException
pReturnRequest
- pExchangeShippingGroupId
- the shipping group id for which the corresponding shipping group id is returned.ReturnException
protected java.lang.String findExchangeOrderItemForPEOItem(ReturnRequest pReturnRequest, java.lang.String pPEOItemId) throws ReturnException
Using the maps orignally generated when the exchange order items were cloned for the promotion evaluation order, the associated itemid is determined.
pReturnRequest
- pPEOItemId
- the PEO item id for which the corresponding exchange item id is found.ReturnException
protected java.lang.String findExchangeOrderShippingGroupForPEOShippingGroup(ReturnRequest pReturnRequest, java.lang.String pPEOShippingGroupId) throws ReturnException
pReturnRequest
- pPEOShippingGroupId
- the PEO shipping group id for which the corresponding exchange shipping group id is found.ReturnException
protected void copyItemsAndShippingGroups(Order pOrderFrom, Order pOrderTo, java.util.Map pItemMap, java.util.Map pShippingGroupMap, java.util.Map pPropExceptions, java.util.Map pExcludedProperties) throws CommerceException
pOrderFrom
- the order containing the items and groups to copypOrderTo
- the order to which the copied items will be addedpItemMap
- a Map this process will update with entries that map the
From item id to the To item idpShippingGroupMap
- a Map this process will update with entries that map the
From shipping group id to the To shipping group idpPropExceptions
- Optional. Map of property exceptions passed to the
repository cloning process .pExcludedProperties
- Properties to exclude from repository cloning processCommerceException
RepositoryUtils.cloneItem(RepositoryItem, boolean, Map, Map, MutableRepository, String)
,
RepositoryUtils.cloneItem
public void adjustExchangeItemPriceInfo(ReturnRequest pReturnRequest, CommerceItem pExchangeItem, ItemPriceInfo pItemPriceInfo) throws ReturnException
pReturnRequest
- the current return requestpExchangeItem
- the item from the exchange orderpItemPriceInfo
- the price info of the exchange item to where peo pricing information is copiedReturnException
copyPEOPricingInfo(ReturnRequest, CommerceItem, ItemPriceInfo, CommerceItem, ItemPriceInfo)
public void copyGWPItemMarkersFromPEO(ReturnRequest pReturnRequest, CommerceItem pExchangeItem) throws ReturnException
pReturnRequest
- pExchangeItem
- ReturnException
protected void copyPEOPricingInfo(ReturnRequest pReturnRequest, CommerceItem pPEOItem, ItemPriceInfo pPEOItemPriceInfo, CommerceItem pExchangeItem, ItemPriceInfo pExchangeItemPriceInfo) throws PricingException
Currently copies the amount, listPrice, salePrice, discounted, adjustments and currentPriceDetails.
Also resets order discount share and manual adjustment shares to 0 in the exchange item price info.
pReturnRequest
- the return requestpPEOItem
- the commerce item from the PEOpPEOItemPriceInfo
- the PEO item's price info.pExchangeItem
- the commerce item form the exchange orderpExchangeItemPriceInfo
- the exchange items's price infoPricingException
public double getTotalOrderPromotionValue(Order pOrder, java.lang.String pOrderPromotionId)
pOrder
- the orderpOrderPromotionId
- the order promotion for which to return the total adjustmentpublic double getTotalManualAdjustmentValue(Order pOrder, java.lang.String pManualAdjustmentId)
pOrder
- the orderpManualAdjustmentId
- the order promotion for which to return the total adjustmentprotected void generatePromotionValueAdjustmentMap(ReturnRequest pReturnRequest)
promotionValueAdjustments
property of the ReturnRequest
It uses the pre-return promotion value map located in the preReturnPromotionValue
property of the ReturnRequest
and compares that to a newly generated map of promotion values.
The newly generated map is generated from either the Return Calculation Order or the Promotion Evaluation Order depending on whether a return or exchange is being done.
pReturnRequest
- PromotionTools.createPromotionValueMap(Order, boolean, boolean, boolean, boolean)
public java.util.Collection getPromotionsLost(ReturnRequest pReturnRequest)
This method is only valid for determining the promotions lost for the active current return request.
The promotions are determined by comparing the promotion active at the start of the return to the promotions applied to the return's Return Calculation Order or Promotion Evaluation Order for exchanges.
pReturnRequest
- protected RepositoryView getReturnRequestView()
public void determineOriginatingOrder(ReturnRequest pReturnRequest) throws CommerceException
originatingOrder
property of a return request.
To determine the originating order the sorted array of related return requests is generated
and stored in the ReturnRequest's sortedRealtedReturnRequests
property.
If related returns are found, it sets the originating order to the first return request's order.
If no related returns are found, this is considered the first return and the originating order is set to the same value as the order property.
pReturnRequest
- CommerceException
generateSortedRelatedReturnRequests(String)
public void loadRelatedReplacementOrders(ReturnRequest pReturnRequest) throws ReturnException
relatedReplacementOrders
property of the ReturnRequest based on the
sortedReturnRequests
in the ReturnRequest.pReturnRequest
- ReturnException
public void determinePricelistsForReturn(ReturnRequest pReturnRequest) throws ReturnException
ReturnException
public void determinePromotionsForReturn(ReturnRequest pReturnRequest) throws ReturnException
The promotions are either extracted from the originating order of the return request when it's the first
return, or from the last return request obtained from the sortedReturnRequest
property of the
ReturnRequest.
pReturnRequest
- ReturnException
protected void saveAppliedPromotions(ReturnRequest pReturnRequest, MutableRepositoryItem pReturnRequestItem)
pReturnRequest
- pReturnRequestItem
- protected void loadItemCostAdjustments(ReturnRequest pReturnRequest, RepositoryItem pReturnRequestItem) throws RepositoryException
pReturnRequest
- pReturnRequestItem
- RepositoryException
createItemCostAdjustmentFromItem(RepositoryItem)
,
ReturnRequest.addNonReturnItemCostAdjustment(ItemCostAdjustment)
protected void setBasePropertiesOfItemCostAdjustment(ItemCostAdjustment pItemCostAdjustment, RepositoryItem pItemCostAdjustmentItem)
Values of the given ItemCostAdjustment are set from the given item cost adjustment repository item
pItemCostAdjustment
- pItemCostAdjustmentItem
- protected ItemCostAdjustment createItemCostAdjustmentFromItem(RepositoryItem pItemCostAdjustmentItem) throws RepositoryException
pItemCostAdjustmentItem
- RepositoryException
createItemCostAdjustment(RepositoryItem)
,
setBasePropertiesOfItemCostAdjustment(ItemCostAdjustment, RepositoryItem)
protected ItemCostAdjustment createItemCostAdjustment(RepositoryItem pItemCostAdjustmentItem) throws RepositoryException
pItemCostAdjustmentItem
- RepositoryException
protected void saveItemCostAdjustments(ReturnRequest pReturnRequest, MutableRepositoryItem pReturnRequestItem) throws RepositoryException
This implemention saves the non-return item cost adjustments only.
pReturnRequest
- pReturnRequestItem
- RepositoryException
createItemCostAdjustmentItem(ItemCostAdjustment)
protected MutableRepositoryItem createItemCostAdjustmentItem(ItemCostAdjustment pItemCostAdjustment) throws RepositoryException
pItemCostAdjustment
- RepositoryException
createItemCostAdjustmentRepositoryItem(ItemCostAdjustment)
,
setBasePropertiesOfRepositoryItem(ItemCostAdjustment, MutableRepositoryItem)
protected MutableRepositoryItem createItemCostAdjustmentRepositoryItem(ItemCostAdjustment pItemCostAdjustment) throws RepositoryException
pItemCostAdjustment
- RepositoryException
protected void setBasePropertiesOfRepositoryItem(ItemCostAdjustment pItemCostAdjustment, MutableRepositoryItem pItemCostAdjustmentItem)
pItemCostAdjustment
- pItemCostAdjustmentItem
- protected void loadAppliedPromotions(ReturnRequest pReturnRequest, RepositoryItem pReturnRequestItem) throws ReturnException
itemPromotions
and orderPromotions
properties of the
ReturnRequest
from the corresponding properties in the
return request item.pReturnRequest
- pReturnRequestItem
- ReturnException
protected void savePromotionValueAdjustments(ReturnRequest pReturnRequest, MutableRepositoryItem pReturnRequestItem)
map in the ReturnRequest to the
promotionValueAdjustments property of the return request repository item.
pReturnRequest
- pReturnRequestItem
- protected void loadPromotionValueAdjustments(ReturnRequest pReturnRequest, RepositoryItem pReturnRequestItem)
ReturnRequest
's promotionValueAdjustments
propertypReturnRequest
- pReturnRequestItem
- protected double calculateAmountDetailShareForRange(DetailedItemPriceInfo pDetailedItemPriceInfo, atg.core.util.Range pRange)
pDetailedItemPriceInfo
- the detail for which the share value of the range is determined.pRange
- range for which to calculate the share. this range must be within the range covered by the
detail's range.calculateShareForRange(DetailedItemPriceInfo, Range, double)
protected double calculateShareForRange(DetailedItemPriceInfo pDetailedItemPriceInfo, atg.core.util.Range pRange, double pAmount)
If the range includes the last unit within the detail's range, any remaining amount is rolled into the share. For example, if the range covers a quantity of 3 and the amount is 10, the .01 will be included in the share value of the last unit.
pDetailedItemPriceInfo
- the detail price info that contains the given range.pRange
- range for which to calculate the share. this range must be within the range covered by the
detail's range.pAmount
- the amount for which the share is determined.protected double sumDetails(CommerceItem pCommerceItem, atg.core.util.Range pRange, java.lang.String pDetailPropertyName)
pCommerceItem
- the commerce itempShippingGroupId
- optional. used to limit the number of details used to those in the item's relationship range.
if not null and the relationship cannot be found, 0.0 is returnedpDetailAmountProperty
- public java.util.Map addExchangeOrderPricingParameters(java.util.Map pExtraParameterMap, ReturnRequest pReturnRequest)
Adds the current ReturnRequest
and the
the ReturnRequest
's ItemPriceSource objects to the parameter map.
Adds the param to bypass the Promotion vetoers during pricing.
pExtraParameterMap
- pReturnRequest
- the current return requestaddReturnRequestParameter(Map, ReturnRequest)
,
CSRAgentTools#addBypassPromotionVetoersParameter(Map)
,
CSRAgentTools#addItemPriceSourceParameter(Map, List)
public java.util.Map addReturnRequestPricelistParameters(java.util.Map pExtraParameters, ReturnRequest pReturnRequest)
pExtraParameters
- pReturnRequest
- public java.util.Map addDisableReturnTotalValidationParameter(java.util.Map pExtraParameters)
pExtraParameters
- public java.util.Map addDisableGWPProcessParameter(java.util.Map pExtraParameters)
pExtraParameters
- atg.commerce.pricing.Constants.DISABLE_PROCESS_GWPINFOS
public java.util.Map addReturnRequestParameter(java.util.Map pExtraParameters, ReturnRequest pReturnRequest)
ReturnRequest
to the parameter mappExtraParameterMap
- the parameter map to add to.pReturnRequest
- the return request to pass in the paramsprotected java.util.Collection findAdjustmentsForItem(java.util.Collection pAdjustments, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId)
pAdjustments
- collection of adjustmentspCommerceItemId
- the commerce item idpShippingGroupId
- optional. the shipping group id. if null, all adjustments for the commerce item will be
includedprotected java.util.List getAllRelatedReplacementOrders(ReturnRequest pReturnRequest) throws ReturnException
pReturnRequest
- ReturnException
protected ItemCostAdjustment createItemCostAdjustment()
Extend this method to extend the ItemCostAdjustment object
ItemCostAdjustment
ItemCostAdjustment
protected java.util.Collection findAllAdjustmentsForNonReturnItems(ReturnRequest pReturnRequest, java.util.Collection pAdjustments)
pReturnRequest
- pAdjustments
- the adjustments from which the non-return adjusts should be returnedprotected double getNonReturnItemTotalTaxAdjustment(ReturnRequest pReturnRequest)
pReturnRequest
- protected double getNonReturnItemTotalShippingAdjustment(ReturnRequest pReturnRequest)
pReturnRequest
- protected java.util.List findReturnItemsForItemAndGroup(java.lang.String pCommerceItemId, java.lang.String pShippingGroupId, java.util.List pReturnItems)
pCommerceItemId
- pShippingGroup
- pReturnItems
- protected void clearAllItemCostAdjustments(ReturnRequest pReturnRequest)
pReturnRequest
- protected java.util.Collection getAllItemCostAdjustments(ReturnRequest pReturnRequest)
pReturnRequest
- public double getTotalItemAdjustments(java.util.Collection pItemCostAdjustments)
amountAdjustment, orderDiscountShareAdjustment and manualDiscountShareAdjustment
properties of all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalpublic double getTotalAdjustments(java.util.Collection pItemCostAdjustments)
pItemCostAdjustments
- the adjustments to totalpublic double getTotalAmountAdjustments(java.util.Collection pItemCostAdjustments)
amountAdjustment
property of all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalpublic double getTotalTaxAdjustments(java.util.Collection pItemCostAdjustments)
taxAdjustment
property of all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalpublic double getTotalShippingAdjustments(java.util.Collection pItemCostAdjustments)
shippingAdjustment
property of all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalpublic double getTotalOrderDiscountAdjustments(java.util.Collection pItemCostAdjustments)
orderDiscountShareAdjustment
property of all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalpublic double getTotalManualAdjustmentAdjustments(java.util.Collection pItemCostAdjustments)
manualAdjustmentShareAdjustment
property for all the
refund adjustmentspItemCostAdjustments
- the adjustments to totalprotected void calculateNonReturnItemSubtotalAdjustment(ReturnRequest pReturnRequest)
nonReturnItemRefundSubtotalAdjustment
value
of the return request.
This value is determined by totaling the amount, order discount share and manual
discount share adjustments of the non-return item ItemCostAdjustments
in the ReturnRequest. The sign of the final total is flipped and stored as the
nonReturnItemRefundSubtotalAdjustment
value in the ReturnRequest
pReturnRequest
- public boolean isReturnable(RepositoryItem pOrderItem)
This API returns true if the returnable state is {@link ReturnableStates#ORDER_RETURNABLE. Otherwise it returns false.
pOrderItem
- the ordergetOrderReturnableState(RepositoryItem)
public boolean isReturnable(Order pOrder)
pOrder
- isReturnable(RepositoryItem)
public boolean isOrderPendingReturn(Order pOrder)
pOrder
- public boolean isItemReturnable(CommerceItem pCommerceItem)
pCommmerceItem
- isReturnable(RepositoryItem)
public boolean isItemReturnable(RepositoryItem pCommerceItem)
This API returns true if the returnable state is {@link ReturnableStates#ITEM_RETURNABLE. Otherwise it returns false.
RepositoryItem
- the commerce item repository itemgetItemReturnableState(RepositoryItem)
public java.lang.String getItemReturnableState(RepositoryItem pCommerceItem)
An item is not returnable if it has already been completely returned or if the product or sku is flagged as non-returnable in the catalog.
pCommerceItem
- ReturnableStates
public java.lang.String getOrderReturnableState(RepositoryItem pOrderItem)
An order is not returnable if it is not completely fulfilled or if there are no items in it that can be returned.
pOrderItem
- isOrderFulfilled(RepositoryItem)
,
isItemReturnable(RepositoryItem)
,
ReturnableStates
public ReturnRequest createReturnRequestInstance(Order pOrder) throws ReturnException
ReturnRequest
instance.
This method calls ReturnRequest.ReturnRequest(Order)
constructor and
returns ReturnRequest
instance.
pOrder
- ReturnException
ReturnRequest#ReturnRequest(Order)}
,
getReturnRequestClass()
public ReturnShippingGroup createReturnShippingGroupInstance(ShippingGroup pShippingGroup) throws ReturnException
ReturnShippingGroup
instance.
If there is a class configured for ShippingGroup.getShippingGroupClassType()
in the getReturnShippingTypeClassMap()
, then that
class instance is created and returned. Otherwise default configured
class instance is returned.
pShippingGroup
- ReturnException
ReturnShippingGroup.ReturnShippingGroup(ShippingGroup)
,
getReturnShippingTypeClassMap()
public ReturnItem createReturnItemInstance(CommerceItem pCommerceItem) throws ReturnException
ReturnItem
instance.
If there is a class configured for CommerceItem.getCommerceItemClassType()
in the getReturnItemTypeClassMap()
, then that
class instance is created and returned. Otherwise default configured
class instance is returned.
pCommerceItem
- ReturnException
getReturnItemTypeClassMap()
,
ReturnItem.ReturnItem(CommerceItem)
public RefundMethod createRefundMethodInstance(java.lang.String pType) throws ReturnException
RefundMethod
instance.
If there is a class configured for pType
in the getRefundMethodTypeClassMap()
, then that
class instance is created and returned.
pType
- ReturnException
RefundMethod.RefundMethod(String)
,
getRefundMethodTypeClassMap()
public java.util.Collection<ReturnShippingGroup> getReturnShippingGroups(Order pOrder) throws ReturnException
ReturnShippingGroup
in the order
Iterates through all shipping groups in the order and creates ReturnShippingGroup
instances and returns them.
pOrder
- ReturnException
public java.util.List<ReturnItem> getReturnItems(ShippingGroup pShippingGroup) throws ReturnException
ReturnItem
in the pShippingGroup
Iterates through all commerce items in the shipping group and creates ReturnItem
instances and returns them.
pShippingGroup
- ReturnException
public static ReturnTools getReturnTools()
mReturnTools
is null, then the ReturnTools is resolved using
Nucleus#getGlobalNucleus()#resolveName(String)
and the mReturnTools
variable is set.public boolean isOrderFulfilled(RepositoryItem pOrderItem)
fulfilledOrderStates
property.pOrderItem
- public boolean isOrderFulfilled(Order pOrder)
fulfilledOrderStates
property.pOrderItem
- public boolean isFulfilledOrderState(java.lang.String pState)
fulfilledOrderStates
property.pState
- public void rollbackTransaction()
public java.util.List<ReturnRequest> findReturnRequestsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumReturns, java.lang.String[] pStates, java.lang.String pSortProperty, boolean pAscending, java.util.Collection<java.lang.String> pSiteIds) throws ReturnException
pProfileId
- This is the user whose returns will be returnedpStartIndex
- The index into the result set of the first returned ReturnRequest,
use 0 to start at the beginningpNumOrders
- The number of ReturnRequests to return, use -1 to return all of thempStates
- All returned ReturnRequests will have a state that is in this list of states. If there are no
states here then results are not limited by state.pSortProperty
- The property to sort the results on, use null
to not sort.pAscending
- If true, the returns will be sorted on pSortProperty
in ascending order,
If false, then descending order is used. If pSortProperty is null, then
pAscending
is ignored.
pSiteIds
- The sites the returns should belong to, null for all sitesReturnRequest
objectsReturnException
public int getReturnRequestCountForProfile(java.lang.String pProfileId, java.lang.String[] pStates, java.util.Collection<java.lang.String> pSiteIds) throws CommerceException
pProfileId
- the id of the profilepStates
- Optional. Constrains the query by statepSiteIds
- Optional. Constrains the query by siteCommerceException
public Query getReturnRequestQueryForProfile(java.lang.String pProfileId, java.lang.String[] pStates, java.util.Collection<java.lang.String> pSiteIds, RepositoryView pView) throws RepositoryException
Query
to get the returns for the given profile.pProfileId
- the id of the profilepStates
- Optional. Constrains the query by statepSiteIds
- Optional. Constrains the query by sitepView
- the RepositoryView
for the return request repository itemRepositoryException
protected java.lang.String logOrderInfo(ReturnRequest pReturnRequest, Order pOrder)
Used for logging purposes
pOrder
- public java.lang.String logGWPItemMarkers(CommerceItem pCommerceItem)
pCommerceItem
- public java.lang.String logGWPOrderMarkers(Order pOrder)
Order
- public java.lang.String logReturnRequest(ReturnRequest pReturnRequest)
Used for logging purposes
pReturnRequest
-