public class OrderManager extends Manager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
OrderManager.OrderManagerSerializableDTO |
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator| Constructor and Description |
|---|
OrderManager() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
adjustOrderCode(String presetCode)
Deprecated.
Since 4.3 the following is done automatically by order's
DefaultAbstractOrderPrepareInterceptor |
void |
appendToCart(Cart sourceCart,
Cart targetCart)
Deprecated.
Use CartService.appendToCart(CartModel, CartModel) instead.
|
protected void |
checkBeforeItemRemoval(SessionContext ctx,
Item item)
TODO improve API doc Override this method to implement pre-removal consistency checks.
|
Cart |
createCart(AbstractOrder original,
String newCode)
Deprecated.
use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel ,
AbstractOrderModel, String );
|
Cart |
createCart(ComposedType type,
ComposedType entryType,
AbstractOrder original,
String newCode)
Deprecated.
use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel ,
AbstractOrderModel, String );
|
Cart |
createCart(ComposedType type,
PK pkBase,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Cart |
createCart(ComposedType type,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Cart |
createCart(PK pk,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Cart |
createCart(String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Cart |
createCart(User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
DeliveryMode |
createDeliveryMode(ComposedType type,
String code)
Deprecated.
Use ModelService to create DeliveryMode and standard setters to provide attribute values.
|
Discount |
createDiscount(String code)
Deprecated.
Use ModelService to create Discounts and standard setters to provide attribute values.
|
DiscountValue |
createDiscountValue(String code,
String description,
double value,
int priority,
boolean absolute,
Discount discount)
Deprecated.
just instantiate
DiscountValue |
Order |
createOrder(AbstractOrder original)
Deprecated.
use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel ,
AbstractOrderModel, String );
|
Order |
createOrder(ComposedType type,
ComposedType entryType,
AbstractOrder original)
Deprecated.
use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel ,
AbstractOrderModel, String );
|
Order |
createOrder(ComposedType type,
PK pkBase,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Order |
createOrder(ComposedType type,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Order |
createOrder(PK pk,
String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Order |
createOrder(String code,
User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
Order |
createOrder(User user,
Currency currency,
Date date,
boolean net)
Deprecated.
use modelService and standard model setters
|
PaymentMode |
createPaymentMode(ComposedType type,
String code,
ComposedType paymentInfoType)
Deprecated.
Use ModelService to create PaymentMode and standard setters to provide attribute values.
|
Tax |
createTax(String code)
Deprecated.
Use ModelService to create Taxes and standard setters to set attribute values.
|
TaxValue |
createTaxValue(String code,
double value,
boolean absolute,
Tax tax)
Deprecated.
just instantiate
TaxValue directly |
Collection |
getAllDeliveryModes()
Deprecated.
Use DeliveryModeService.getAllDeliveryModes() instead.
|
Collection |
getAllDiscounts()
Deprecated.
Obsolete get all method. Use FlexibleSearchService to query for Discounts.
|
Collection |
getAllDiscounts(boolean global)
Deprecated.
Obsolete get all method. Use FlexibleSearchService to query for Discounts.
|
Collection |
getAllOrders()
Returns all
Orders. |
Collection |
getAllPaymentInfos()
Deprecated.
Obsolete get all method. Use flexible search to fetch desired payment infos.
|
Collection |
getAllPaymentModes()
Deprecated.
Use PaymentModeService#getAllPaymentModes() instead.
|
Collection |
getAllTaxes()
Deprecated.
Obsolete get all method. Use FlexibleSearchService to query for taxes.
|
String |
getCartEntryTypeCode()
Deprecated.
Use CartEntryModel._TYPECODE instead.
|
protected String |
getCartTypeCode()
Deprecated.
Use CartModel._TYPECODE instead.
|
CloneCartStrategy<Cart> |
getCloneCartStrategy()
Deprecated.
Use spring injected de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy instead.
|
protected CloneOrderStrategy<Order> |
getCloneOrderStrategy()
Deprecated.
Use spring injected de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy instead.
|
AbstractPriceFactory |
getDefaultPriceFactory()
Returns the default
PriceFactory. |
DeliveryCostsStrategy |
getDeliveryCostsStrategy() |
DeliveryMode |
getDeliveryModeByCode(String code)
Deprecated.
Use DeliveryModeService.getDeliveryModeForCode(String) instead.
|
protected String |
getDeliveryModeTypeCode()
Deprecated.
Use DeliveryModeModel._TYPECODE instead.
|
EnumerationType |
getDeliveryStatusType()
Deprecated.
Use DeliveryStatus.getType()
|
Discount |
getDiscountByCode(String code)
Deprecated.
Use DiscountService.getDiscountForCode(String).
|
Collection |
getDiscountsByCode(String searchString)
Deprecated.
UseDiscountService.getDiscountsForCode(String).
|
protected String |
getDiscountTypeCode()
Deprecated.
Use DiscountModel._TYPECODE instead.
|
EnumerationType |
getExportStatusType()
Deprecated.
Use ExportStatus.getType() instead.
|
static OrderManager |
getInstance() |
String |
getOrderEntryTypeCode()
Deprecated.
Use OrderEntryModel._TYPECODE instead.
|
Collection |
getOrders(User user)
Deprecated.
please use
GeneratedUser.getOrders() |
EnumerationType |
getOrderStatusType()
Deprecated.
Use OrderStatus.getType() instead.
|
protected String |
getOrderTypeCode()
Deprecated.
Use OrderModel._TYPECODE instead.
|
PaymentInfo |
getPaymentInfoByCode(String code)
Deprecated.
since payment info object are not intended to have unique codes this method makes no sense at all;
further payment infos should only be accessed via their users; use
getPaymentInfosByCode(String) instead |
Collection |
getPaymentInfos(int type)
Deprecated.
Obsolete method. Use flexible search to fetch desired PaymentInfos.
|
Collection |
getPaymentInfosByCode(String code)
Deprecated.
Obsolete method. Since payment info object are not intended to have unique codes this method makes no
sense at all; further PaymentInfos should only be accessed via their users.
|
Collection |
getPaymentInfosByUser(User user)
Deprecated.
Use UserModel.getPaymentInfos() instead.
|
protected String |
getPaymentInfoTypeCode()
Deprecated.
Use PaymentInfoModel._TYPECODE instead.
|
PaymentMode |
getPaymentModeByCode(String code)
Deprecated.
Use PaymentModeService.getPaymentModeByCode(String) instead.
|
protected String |
getPaymentModeTypeCode()
Deprecated.
Use PaymentModeModel._TYPECODE instead.
|
EnumerationType |
getPaymentStatusType()
Deprecated.
Use PaymentStatus.getType()
|
PriceFactory |
getPriceFactory()
Returns the configured
PriceFactory. |
Collection |
getSupportedDeliveryModes(PaymentMode pm)
Deprecated.
Use PaymentModeModel.getSupportedDeliveryModes() instead.
|
Tax |
getTaxByCode(String code)
Deprecated.
Use TaxService.getTaxForCode(String) instead.
|
Collection |
getTaxesByCode(String searchString)
Deprecated.
Use TaxService.getTaxesForCode(String) instead.
|
protected String |
getTaxTypeCode()
Deprecated.
Use TaxModel._TYPECODE instead.
|
protected void |
notifyItemRemoval(SessionContext ctx,
Item item)
Avoids call to ejb layer except for
PaymentMode and Currency instances. |
protected Collection |
searchAbstractOrders(String orderTypeCode,
SearchContext context)
Deprecated.
Obsolete way of dynamic searching within orders. Use FlexibleSearchService to query for orders.
|
Collection |
searchCarts(SearchContext context)
Deprecated.
Obsolete way of dynamic searching within carts. Use FlexibleSearchService to query for carts.
|
Collection |
searchDiscounts(SearchContext context)
Deprecated.
Obsolete way of dynamic searching within discounts. Use FlexibleSearchService to query for discounts.
|
Collection |
searchOrders(SearchContext context)
Deprecated.
Obsolete way of dynamic searching within orders. Use FlexibleSearchService to query for orders.
|
protected Collection |
searchPaymentInfos(User user,
String code,
Integer type) |
Collection |
searchTaxes(SearchContext context)
Deprecated.
Obsolete way of dynamic searching within taxes. Use FlexibleSearchService to query for taxes.
|
void |
setCloneCartStrategy(CloneCartStrategy<Cart> cloneCartStrategy)
Deprecated.
Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy
instead.
|
void |
setCloneOrderStrategy(CloneOrderStrategy<Order> cloneOrderStrategy)
Deprecated.
Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy
instead.
|
void |
setDeliveryCostsStrategy(DeliveryCostsStrategy deliveryCostsStrategys) |
void |
setOrderCodeGenerator(KeyGenerator orderCodeGenerator) |
Object |
writeReplace() |
afterItemCreation, beforeItemCreation, destroy, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, unwrap, unwrap, wrappublic static final String BEAN_NAME
public void setOrderCodeGenerator(KeyGenerator orderCodeGenerator)
@Deprecated protected CloneOrderStrategy<Order> getCloneOrderStrategy()
@Deprecated public void setCloneOrderStrategy(CloneOrderStrategy<Order> cloneOrderStrategy)
@Deprecated public CloneCartStrategy<Cart> getCloneCartStrategy()
@Deprecated public void setCloneCartStrategy(CloneCartStrategy<Cart> cloneCartStrategy)
public DeliveryCostsStrategy getDeliveryCostsStrategy()
public void setDeliveryCostsStrategy(DeliveryCostsStrategy deliveryCostsStrategys)
public static OrderManager getInstance()
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
ManagerManager and allows aborting removal by throwing a ConsistencyCheckException. If no manager
did so each one is notified by calling Manager.notifyItemRemoval(SessionContext, Item).
This method does nothing and may be overridden.
checkBeforeItemRemoval in class Managerctx - the current session contextitem - the item which should be removedConsistencyCheckException - thrown to abort removal due to consistency errorsprotected void notifyItemRemoval(SessionContext ctx, Item item)
PaymentMode and Currency instances.notifyItemRemoval in class Managerctx - the currency session contextitem - the item which is going to be removedpublic AbstractPriceFactory getDefaultPriceFactory()
PriceFactory.PriceFactory First the setting inside the project.properties (see entry
'default.pricefactory') will be consulted.. If this fails, an instance of
de.hybris.platform.jalo.order.price.DummyPriceFactory will be returned.public PriceFactory getPriceFactory()
PriceFactory.
At first the session property 'pricefactory' will be evaluated. If its value is
PriceFactory@Deprecated protected String getPaymentInfoTypeCode()
@Deprecated public String getOrderEntryTypeCode()
@Deprecated protected String getOrderTypeCode()
@Deprecated protected String getTaxTypeCode()
@Deprecated protected String getDiscountTypeCode()
@Deprecated protected String getDeliveryModeTypeCode()
@Deprecated protected String getPaymentModeTypeCode()
@Deprecated public String getCartEntryTypeCode()
@Deprecated protected String getCartTypeCode()
@Deprecated public Collection getAllPaymentInfos()
PaymentInfo objects.Collection containing all PaymentInfos.@Deprecated public Collection getPaymentInfos(int type)
PaymentInfos of the specified type. The types are defined in
PaymentInfo.type - the type of the searched PaymentInfosCollection of all PaymentInfos of the specified type.@Deprecated public Collection getPaymentInfosByUser(User user)
PaymentInfos of the specified User.user - the User whoes PaymentInfos should be returned.Collection of all PaymentInfos of the specified User@Deprecated public PaymentInfo getPaymentInfoByCode(String code) throws JaloItemNotFoundException
getPaymentInfosByCode(String) insteadcode - PaymentInfo with the given codeJaloItemNotFoundException@Deprecated public Collection getPaymentInfosByCode(String code)
PaymentInfos object which match the given code ('%' as wildcard can be used).code - the codeCollection of PaymentInfosprotected Collection searchPaymentInfos(User user, String code, Integer type)
@Deprecated public Collection getSupportedDeliveryModes(PaymentMode pm)
pm - public Collection getAllOrders()
Orders.Collection containing all Orders@Deprecated public Collection getOrders(User user)
GeneratedUser.getOrders()User.user - Collection containing all Orders of the specified User@Deprecated public Order createOrder(User user, Currency currency, Date date, boolean net) throws JaloInvalidParameterException
user - currency - date - net - OrderJaloInvalidParameterException@Deprecated public Order createOrder(String code, User user, Currency currency, Date date, boolean net) throws JaloInvalidParameterException
code - user - currency - date - net - OrderJaloInvalidParameterException@Deprecated public Order createOrder(ComposedType type, String code, User user, Currency currency, Date date, boolean net) throws JaloInvalidParameterException
code - user - currency - date - net - OrderJaloInvalidParameterException@Deprecated public Order createOrder(PK pk, String code, User user, Currency currency, Date date, boolean net) throws JaloInvalidParameterException
pk - the pk for the new item; it will be equipped with type code additionally (code - user - currency - date - net - OrderJaloInvalidParameterException@Deprecated public Order createOrder(ComposedType type, PK pkBase, String code, User user, Currency currency, Date date, boolean net)
pkBase - the pk for the new item; it will be equipped with type code additionally (code - user - currency - date - net - OrderJaloInvalidParameterException@Deprecated public Cart createCart(User user, Currency currency, Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
user - currency - date - net - CartJaloInvalidParameterExceptionConsistencyCheckException@Deprecated public Cart createCart(String code, User user, Currency currency, Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
code - user - currency - date - net - CartJaloInvalidParameterExceptionConsistencyCheckException@Deprecated public Cart createCart(ComposedType type, String code, User user, Currency currency, Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
code - user - currency - date - net - CartJaloInvalidParameterExceptionConsistencyCheckException@Deprecated public Cart createCart(PK pk, String code, User user, Currency currency, Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
pk - the pk for the new item; it will be equipped with type code additionally (code - user - currency - date - net - CartJaloInvalidParameterExceptionConsistencyCheckException@Deprecated public Cart createCart(ComposedType type, PK pkBase, String code, User user, Currency currency, Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
pkBase - the pk for the new item; it will be equipped with type code additionally (code - user - currency - date - net - CartJaloInvalidParameterExceptionConsistencyCheckException@Deprecated public Order createOrder(AbstractOrder original)
Order, which takes all informations and entries from an existing
AbstractOrder. This includes user, currency and gross / net status. Please note that the order is
not calculated , even if the cart has been.original - the original order which will be copiedOrder@Deprecated public Order createOrder(ComposedType type, ComposedType entryType, AbstractOrder original)
Order, which takes all informations and entries from an existing
AbstractOrder. This includes user, currency and gross / net status. Please note that the order is
not calculated , even if the cart has been.type - the item type of the new orderentryType - the item type of the new order entriesoriginal - the original order which will be copiedOrder@Deprecated public Cart createCart(AbstractOrder original, String newCode) throws ConsistencyCheckException
Cart, which takes all informations and entries from an existing
AbstractOrder. This includes user, currency, date and gross / net status. Please note that the
order is not calculated , even if the cart has been.original - the original order which will be copiednewCode - the code of the new CartOrderConsistencyCheckException@Deprecated public Cart createCart(ComposedType type, ComposedType entryType, AbstractOrder original, String newCode) throws ConsistencyCheckException
Cart, which takes all informations and entries from an existing
AbstractOrder. This includes user, currency, date and gross / net status. Please note that the
order is not calculated , even if the cart has been.original - the original order which will be copiednewCode - the code of the new CartOrderConsistencyCheckException@Deprecated public Collection searchOrders(SearchContext context)
Orders with the specified SearchContext. The following
propertie fields are availaible:
GeneratedAbstractOrder.CODE : String | nullGeneratedAbstractOrder.USER : User | nullOrder.START_DATE : Date | nullOrder.END_DATE : Date | nullGeneratedAbstractOrder.CURRENCY : Currency | nullGeneratedAbstractOrder.NET : java.lang.Boolean | nullGeneratedAbstractOrder.STATUS : EnumerationValue | nullAbstractOrder.PAYMENT_MODE : PaymentMode | nullAbstractOrder.DELIVERY_MODE : DeliveryMode | nullAbstractOrder.PAYMENT_STATUS : EnumerationValue | nullAbstractOrder.DELIVERY_STATUS : EnumerationValue | nullcontext - Collection containing all Orders which matched the specified
SearchContext@Deprecated protected Collection searchAbstractOrders(String orderTypeCode, SearchContext context)
searchOrders(SearchContext) and searchCarts(SearchContext).orderTypeCode - the actual type code of orders to searchcontext - the search context holding the parameters@Deprecated public Collection searchCarts(SearchContext context)
Carts with the specified SearchContext. The following
propertie fields are availaible:
GeneratedAbstractOrder.CODE : String | nullGeneratedAbstractOrder.USER : User | nullCart.START_DATE : Date | nullCart.END_DATE : Date | nullGeneratedAbstractOrder.CURRENCY : Currency | nullGeneratedAbstractOrder.NET : java.lang.Boolean | nullAbstractOrder.ORDER_STATUS_TYPE : EnumerationValue | nullAbstractOrder.PAYMENT_MODE : PaymentMode | nullAbstractOrder.DELIVERY_MODE : DeliveryMode | nullcontext - Collection containing all Cartss which matched the specified
SearchContext@Deprecated public Collection searchTaxes(SearchContext context)
Tax with the specified
SearchContext. See tax for definition of search properties.
Null values are equivalent to omitting the field. This has the meaning that all objects will be found, if not constricted by other fields.
context - the search context containing all search parameters@Deprecated public Collection searchDiscounts(SearchContext context)
Discount with the specified
SearchContext. See discount for definition of search properties.
Null values are equivalent to omitting the field. This has the meaning that all objects will be found, if not constricted by other fields.
context - the search context containing all search parameters@Deprecated public Collection getAllTaxes()
>Tax objects.Collection of all Tax/code>es@Deprecated public Collection getTaxesByCode(String searchString)
Tax objects which matched the specified code.searchString - an SQL-Like statement as StringCollection of all Tax/code>es which matched the specified code@Deprecated public Tax getTaxByCode(String code)
Tax with the specified code.code - the codeTax with the specified code@Deprecated public Tax createTax(String code) throws ConsistencyCheckException
Tax object.code - the code of the new TaxTax objectConsistencyCheckException - if the specified code is already in use.@Deprecated public TaxValue createTaxValue(String code, double value, boolean absolute, Tax tax)
TaxValue directlycode - value - absolute - tax - TaxValue@Deprecated public DiscountValue createDiscountValue(String code, String description, double value, int priority, boolean absolute, Discount discount)
DiscountValuecode - description - value - priority - absolute - discount - DiscountValue object.@Deprecated public Collection getAllDiscounts()
Collection of all Discounts@Deprecated public Collection getAllDiscounts(boolean global)
global - @Deprecated public Discount getDiscountByCode(String code)
code - Discount with the specified code@Deprecated public Collection getDiscountsByCode(String searchString)
searchString - SQL-LIKE statement as String ( %ab% , a_b% , ... )Collection of Discount matching the specified code@Deprecated public Discount createDiscount(String code) throws ConsistencyCheckException
code - DiscountConsistencyCheckException - if the code is already in use@Deprecated public DeliveryMode createDeliveryMode(ComposedType type, String code) throws ConsistencyCheckException
ConsistencyCheckException@Deprecated public Collection getAllDeliveryModes()
Delivery objectsCollection of all Delivery objects@Deprecated public DeliveryMode getDeliveryModeByCode(String code) throws JaloItemNotFoundException
DeliveryMode with the specified code.code - DeliveryMode with the specified codeJaloItemNotFoundException - if no DeliveryMode with the specified code exists@Deprecated public PaymentMode createPaymentMode(ComposedType type, String code, ComposedType paymentInfoType) throws ConsistencyCheckException
ConsistencyCheckException@Deprecated public PaymentMode getPaymentModeByCode(String code) throws JaloItemNotFoundException
PaymentMode with the specified code.code - PaymentMode with the specified codeJaloItemNotFoundException - if no PaymentMode with the specified code exists@Deprecated public Collection getAllPaymentModes()
PaymentMode objectsCollection of all PaymentMode objects@Deprecated public void appendToCart(Cart sourceCart, Cart targetCart)
sourceCart - the cart providing the entries to copytargetCart - the taret cart to create new entries for@Deprecated public EnumerationType getOrderStatusType()
@Deprecated public EnumerationType getPaymentStatusType()
@Deprecated public EnumerationType getDeliveryStatusType()
@Deprecated public EnumerationType getExportStatusType()
@Deprecated protected String adjustOrderCode(String presetCode)
DefaultAbstractOrderPrepareInterceptorpublic Object writeReplace() throws ObjectStreamException
writeReplace in class ManagerObjectStreamExceptionCopyright © 2017 SAP SE. All Rights Reserved.