Class SalesDocumentImpl
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SimpleDocumentImpl<L,I,H>
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl<ItemList,Item,Header>
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.businessobject.impl.SalesDocumentImpl
-
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,SalesDocument,SalesDocumentBase<ItemList,Item,Header>,SimpleDocument<ItemList,Item,Header>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<Item>
- Direct Known Subclasses:
BasketImpl,OrderImpl
public abstract class SalesDocumentImpl extends SalesDocumentBaseImpl<ItemList,Item,Header> implements SalesDocument
Common superclass for all sales documents.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanalreadyInitializedprotected SalesDocumentBackendbackendServiceprotected booleancheckCatalogNecessaryprotected booleandeterminationRequiredprotected booleanexternalToOrderprotected booleangrossValueAvailableprotected java.util.List<TechKey>itemsWithAlternativeProductListThis list stores items with alternative products.protected booleannetValueAvailableprotected booleanpricesTracedprotected java.lang.StringredemptionValueredemption valueprotected TransactionConfigurationtransactionConfiguration-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl
billToList, changeHeaderOnly, persistentInBackend, shipToList
-
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKey
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
Fields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SalesDocumentBase
NO_OF_ITEMS_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description SalesDocumentImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidadaptHeaderDocumentType()Sets the document type on the document header depending on the Java class instance of the Sales Document (evaluated withinstanceof).voidaddShipTo(ShipTo shipTo)Adds a shipTo to the shipTo listvoidafterDeleteItemInBackend()Releases all configuration sessions attached to this sales documentprotected voidafterDeleteItemInBackend(java.util.List<TechKey> itemsToDelete)Releases configuration sessions for all items providedprotected voidafterUpdateItemInBackend(java.util.List<TechKey> itemsToDelete)Releases configuration sessions for all items providedvoidclearItemBuffer()Removes all buffered item informationvoidclearShipTos()Clears the list of the shipTo.BillTocreateBillTo()Creates a new billTo objectprotected voidcreateInBackend()ItemcreateItem()Gets a new Item objectprotected java.lang.StringcreateItemKey(Item toCheck)ShipTocreateShipTo()Creates a new ship objectprotected voiddeleteItemInt(TechKey techKey)Deletes the item with the given Techkeyvoiddestroy()Method will be called by theBusinessObjectManagerwhen the end of the life cycle is reached, so that all used resources can be released.voiddestroyContent()Destroy the data of the document (items and header) in the backend representation.protected java.util.List<TechKey>determineConfigurableItemsToRelease()voidemptyContent()Resets the entire document to empty state.protected abstract SalesDocumentBackendgetBackendService()Method retrieving the backend object for the object.SalesDocumentTypegetDocumentType()Returns the type of the sales document (e.g.protected java.util.Map<java.lang.String,java.util.List<Item>>getDublicatesForItems()java.util.List<SalesDocumentHook>getSalesDocumentHooks()SessionServicegetSessionService()TechKeygetSoldToGuid()TransactionConfigurationgetTransactionConfiguration()Returns the transaction configuration.booleanhasPredecessorOfSpecificType(DocumentType docType)Scans list of predecessors for given document type.voidinit(PartnerList partnerList)Initializes the sales document with the given arguments and creates and instance in back-end application memory.voidinit(PartnerList partnerList, java.lang.String processType)Initializes a sales documentvoidinit(SalesDocument source, java.lang.String processType)Initializes an empty instance of this object with the data coming from the provided document.booleanisBackendDown()booleanisCheckCatalogNecessary()Does the document require that the items are checked against the catalog?booleanisDeterminationRequired()Determines if manual Product-, Campaign-, ...booleanisExistingInBackend()Checks if the document exists in the backend storagebooleanisExternalToOrder()Indicates whether or not the order has to be maintained as an external document to this one.booleanisGrossValueAvailable()Indicates whether or not the sales document can provide the Gross value.booleanisInitialized()Does the document carry an initialization error?booleanisItemBasedAvailability()Checks if availability is compiled only based on item information.booleanisMultipleAddressesSupported()Returns if multiple addresses are supportedbooleanisNetValueAvailable()Indicates whether or not the sales document can provide a net value.booleanisUpdateMissing()Check whether its required to Update the objectprotected booleanmergeIdenticalProducts()Merges identical products (this is told from the product ID) and states whether changes have been doneprotected booleanmergeIdenticalProductsIfRequired()protected voidmergingItem(java.util.List<Item> mergeItems, Item merged, double sumQty, int discarded)protected voidprepareItemsWithChangedProducts()protected java.lang.StringBuilderprocessItems(SalesDocument source)voidread()Reads the sales document.voidread(boolean force)Reads the sales document.voidreadForUpdate()Reads the sales document for update (tried to get a lock).voidreadForUpdate(boolean force)Reads the sales document for update (tried to get a lock).voidremoveItem(Item item)Removes the item.voidremoveItems(TechKey[] techKeys)Deletes items from the sales document.abstract booleansaveAndCommit()Abstract Dummy implementation of interface methodvoidsetBillToList(java.util.List<BillTo> billToList)Sets BillTo listvoidsetCheckCatalogNecessary(boolean checkCatalogNecessary)Indicates whether a check of the items against the catalog is requiredvoidsetConverter(Converter converter)voidsetDeterminationRequired(boolean isDeterminationRequired)Sets the isDeterminationRequired flagvoidsetExternalToOrder(boolean isExternalToOrder)Sets whether or not the order has to be maintained as an external document to this one.voidsetGrossValueAvailable(boolean isGrossValueAvailable)Sets the property grossValueAvailablevoidsetInitialized(boolean b)Indicates whether a sales document could be initializedvoidsetNetValueAvailable(boolean isNetValueAvailable)Sets the property netValueAvailablevoidsetSalesDocumentHooks(java.util.List<SalesDocumentHook> salesDocumentHooks)voidsetSessionService(SessionService sessionService)voidsetShipToList(java.util.List<ShipTo> shipToList)Sets shipTo listvoidsetSoldToGuid(TechKey techKeySoldTo)voidsetSoldToGuid(TechKey techKeySoldTo, java.lang.String soldToId)voidsetTransactionConfiguration(TransactionConfiguration transConf)The transaction configuration provides access to sales-specific settings (e.g.voidsetUpdateMissing(boolean updateMissing)Sets whether update before save is required.java.lang.StringtoString()Returns a string representation of the objectvoidupdate()Update the sales document in the backend.protected voidupdateInBackend(java.util.List<TechKey> itemsToDelete, java.util.List<TechKey> configurableItemsToRelease)voidvalidate()Validates as sales document.-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl
clear, getAlternativeBillTos, getAlternativeShipTos, isChangeHeaderOnly, isPersistentInBackend, setPersistentInBackend
-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SimpleDocumentImpl
addItem, clearHeader, clearItems, clearMessages, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getTypedExtensionMap, getVersion, isDirty, iterator, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setTechKey, setVersion
-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearOwnMessages, clone, copyMessages, copyMessages, createUniqueHandle, determineBackendObject, equals, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hashCode, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setValid
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.sap.core.bol.businessobject.BusinessObject
addExtensionData, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setExtensionMap, setHandle, setInvalid, setTechKey, setValid
-
Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SalesDocumentBase
getAlternativeBillTos, getAlternativeShipTos, isChangeHeaderOnly, isPersistentInBackend, setPersistentInBackend
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SimpleDocument
addItem, clear, clearHeader, clearItems, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getTypedExtensionMap, getVersion, isDirty, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setVersion
-
-
-
-
Field Detail
-
transactionConfiguration
protected TransactionConfiguration transactionConfiguration
-
backendService
protected SalesDocumentBackend backendService
-
alreadyInitialized
protected boolean alreadyInitialized
-
externalToOrder
protected boolean externalToOrder
-
checkCatalogNecessary
protected boolean checkCatalogNecessary
-
redemptionValue
protected java.lang.String redemptionValue
redemption value
-
determinationRequired
protected boolean determinationRequired
-
grossValueAvailable
protected boolean grossValueAvailable
-
netValueAvailable
protected boolean netValueAvailable
-
pricesTraced
protected boolean pricesTraced
-
itemsWithAlternativeProductList
protected final java.util.List<TechKey> itemsWithAlternativeProductList
This list stores items with alternative products. For these items events should only be fired when a product is selected (see int msg 385863 2010).
-
-
Method Detail
-
isCheckCatalogNecessary
public boolean isCheckCatalogNecessary()
Description copied from interface:SalesDocumentDoes the document require that the items are checked against the catalog?- Specified by:
isCheckCatalogNecessaryin interfaceSalesDocument- Returns:
- true if check is required
-
setCheckCatalogNecessary
public void setCheckCatalogNecessary(boolean checkCatalogNecessary)
Description copied from interface:SalesDocumentIndicates whether a check of the items against the catalog is required- Specified by:
setCheckCatalogNecessaryin interfaceSalesDocument- Parameters:
checkCatalogNecessary- if check is required
-
adaptHeaderDocumentType
protected void adaptHeaderDocumentType() throws CommunicationExceptionSets the document type on the document header depending on the Java class instance of the Sales Document (evaluated withinstanceof).- Throws:
CommunicationException
-
addShipTo
public void addShipTo(ShipTo shipTo)
Adds a shipTo to the shipTo list- Parameters:
shipTo- shipTo to add
-
clearShipTos
public void clearShipTos()
Description copied from interface:SalesDocumentClears the list of the shipTo.- Specified by:
clearShipTosin interfaceSalesDocument
-
createBillTo
public BillTo createBillTo()
Description copied from interface:SalesDocumentCreates a new billTo object- Specified by:
createBillToin interfaceSalesDocument- Returns:
- Newly created billTo
-
createItem
public Item createItem()
Description copied from interface:SalesDocumentGets a new Item object- Specified by:
createItemin interfaceSalesDocument- Specified by:
createItemin interfaceSimpleDocument<ItemList,Item,Header>- Returns:
- new item instance
- See Also:
SimpleDocument.createItem()
-
createShipTo
public ShipTo createShipTo()
Description copied from interface:SalesDocumentCreates a new ship object- Specified by:
createShipToin interfaceSalesDocument- Returns:
- Newly created shipTo
-
deleteItemInt
protected void deleteItemInt(TechKey techKey) throws CommunicationException
Deletes the item with the given Techkey- Parameters:
techKey-- Throws:
CommunicationException
-
removeItems
public void removeItems(TechKey[] techKeys) throws CommunicationException
Description copied from interface:SalesDocumentDeletes items from the sales document.- Specified by:
removeItemsin interfaceSalesDocument- Parameters:
techKeys- Technical keys of the items to be canceld- Throws:
CommunicationException- in case back-end error
-
destroy
public void destroy()
Description copied from class:SalesDocumentBaseImplMethod will be called by theBusinessObjectManagerwhen the end of the life cycle is reached, so that all used resources can be released.- Specified by:
destroyin interfaceBusinessObject- Overrides:
destroyin classSalesDocumentBaseImpl<ItemList,Item,Header>
-
destroyContent
public void destroyContent() throws CommunicationExceptionDescription copied from interface:SalesDocumentDestroy the data of the document (items and header) in the backend representation. After a call to this method, the object is in an undefined state. You have to call init() before you can use it again.
This method is normally called before removing the BO-representation of the object using the BOM.- Specified by:
destroyContentin interfaceSalesDocument- Throws:
CommunicationException- in case back-end error
-
emptyContent
public void emptyContent() throws CommunicationExceptionResets the entire document to empty state.- Throws:
CommunicationException- in case of aback-end error
-
getBackendService
protected abstract SalesDocumentBackend getBackendService() throws BackendException
Method retrieving the backend object for the object. This method is abstract because every concrete subclass ofSalesDocumentmay use its own implementation of a backend object.- Returns:
- Backend object to be used
- Throws:
BackendException
-
getDocumentType
public SalesDocumentType getDocumentType() throws CommunicationException
Description copied from interface:SalesDocumentReturns the type of the sales document (e.g. Order, Basket)- Specified by:
getDocumentTypein interfaceSalesDocument- Returns:
- type of sales document
- Throws:
CommunicationException- in case back-end error
-
getTransactionConfiguration
public TransactionConfiguration getTransactionConfiguration()
Description copied from interface:SalesDocumentReturns the transaction configuration. The transaction configuration provides access to sales-specific settings (e.g. sales organisation)- Specified by:
getTransactionConfigurationin interfaceSalesDocument- Returns:
- TransactionConfiguration to access the sales-related configuration
-
init
public void init(PartnerList partnerList, java.lang.String processType) throws CommunicationException
Initializes a sales document- Parameters:
partnerList- Partner listprocessType- Sales document type- Throws:
CommunicationException
-
init
public void init(PartnerList partnerList) throws CommunicationException
Description copied from interface:SalesDocumentInitializes the sales document with the given arguments and creates and instance in back-end application memory.- Specified by:
initin interfaceSalesDocument- Parameters:
partnerList- any partners maintained will be added to the sales document in the same partner function- Throws:
CommunicationException- in case back-end error
-
init
public void init(SalesDocument source, java.lang.String processType) throws BusinessObjectException
Description copied from interface:SalesDocumentInitializes an empty instance of this object with the data coming from the provided document. The former state of this document is dropped and lost, the fields of the other document are copied into the fields of this document. To do this the clone() method of the fields is used to get an shallow copy and minimise interference between the new and the old object. The creation date of the old document is not copied to the new one but the original date is left as it is. A back-end representation of the new object is created and filled with the data retrieved by the copy operation.- Specified by:
initin interfaceSalesDocument- Parameters:
source- The SalesDocument to retrieve data fromprocessType- process type for the new SalesDocument (optional)- Throws:
BusinessObjectException- in case back-end error
-
processItems
protected java.lang.StringBuilder processItems(SalesDocument source)
- Parameters:
source-- Returns:
-
createInBackend
protected void createInBackend() throws BusinessObjectException- Throws:
BusinessObjectException
-
isExistingInBackend
public boolean isExistingInBackend()
Description copied from interface:SalesDocumentChecks if the document exists in the backend storage- Specified by:
isExistingInBackendin interfaceSalesDocument- Returns:
- does the document exist in backend?
-
isDeterminationRequired
public boolean isDeterminationRequired()
Description copied from interface:SalesDocumentBaseDetermines if manual Product-, Campaign-, ... Determination is necessary for at least one top level item.- Specified by:
isDeterminationRequiredin interfaceSalesDocumentBase<ItemList,Item,Header>- Returns:
- boolean true if there is at least on item that needs manual determination for products, camapigns, etc.
-
isExternalToOrder
public boolean isExternalToOrder()
Description copied from interface:SalesDocumentIndicates whether or not the order has to be maintained as an external document to this one. (e.g. java basket is external to crm backend order)- Specified by:
isExternalToOrderin interfaceSalesDocument- Returns:
- true indicates that the order is maintained external to this document, false indicates that the order lies on the same system.
-
isGrossValueAvailable
public boolean isGrossValueAvailable()
Description copied from interface:SalesDocumentIndicates whether or not the sales document can provide the Gross value.- Specified by:
isGrossValueAvailablein interfaceSalesDocument- Returns:
- true indicates that the sales document can provide the gross value. false indicates that the sales document can not deliver the gross value.
-
isMultipleAddressesSupported
public boolean isMultipleAddressesSupported() throws BusinessObjectExceptionDescription copied from interface:SalesDocumentReturns if multiple addresses are supported- Specified by:
isMultipleAddressesSupportedin interfaceSalesDocument- Returns:
- multiple addresses supported
- Throws:
BusinessObjectException- in case back-end error
-
isNetValueAvailable
public boolean isNetValueAvailable()
Description copied from interface:SalesDocumentIndicates whether or not the sales document can provide a net value.- Specified by:
isNetValueAvailablein interfaceSalesDocument- Returns:
- true indicates that the sales document can provide the net value false indicates that the sales document can not deliver the net value.
-
isUpdateMissing
public boolean isUpdateMissing()
Description copied from interface:SalesDocumentCheck whether its required to Update the object- Specified by:
isUpdateMissingin interfaceSalesDocument- Returns:
true, only if the object has to be updated
-
mergeIdenticalProducts
protected boolean mergeIdenticalProducts() throws CommunicationExceptionMerges identical products (this is told from the product ID) and states whether changes have been done- Returns:
- did we do changes?
- Throws:
CommunicationException
-
mergingItem
protected void mergingItem(java.util.List<Item> mergeItems, Item merged, double sumQty, int discarded)
- Parameters:
mergeItems-merged-sumQty-discarded-
-
getDublicatesForItems
protected java.util.Map<java.lang.String,java.util.List<Item>> getDublicatesForItems()
-
createItemKey
protected java.lang.String createItemKey(Item toCheck)
-
read
public void read() throws CommunicationExceptionDescription copied from interface:SalesDocumentReads the sales document. The backend call happens only if necessary.- Specified by:
readin interfaceSalesDocument- Throws:
CommunicationException- in case back-end error
-
read
public void read(boolean force) throws CommunicationExceptionDescription copied from interface:SalesDocumentReads the sales document. The backend call happens if considered as necessary or if forced.- Specified by:
readin interfaceSalesDocument- Parameters:
force- If true, then read even if not considered as necessary- Throws:
CommunicationException- in case back-end error
-
readForUpdate
public void readForUpdate() throws CommunicationExceptionDescription copied from interface:SalesDocumentReads the sales document for update (tried to get a lock). The backend call happens only if necessary.- Specified by:
readForUpdatein interfaceSalesDocument- Throws:
CommunicationException- in case back-end error
-
readForUpdate
public void readForUpdate(boolean force) throws CommunicationExceptionDescription copied from interface:SalesDocumentReads the sales document for update (tried to get a lock). The backend call happens if considered as necessary or if forced.- Specified by:
readForUpdatein interfaceSalesDocument- Parameters:
force- If true, then read even if not considered as necessary- Throws:
CommunicationException- in case back-end error
-
removeItem
public void removeItem(Item item) throws CommunicationException
Description copied from interface:SalesDocumentRemoves the item.- Specified by:
removeItemin interfaceSalesDocument- Parameters:
item- to remove- Throws:
CommunicationException- in case back-end error
-
saveAndCommit
public abstract boolean saveAndCommit() throws CommunicationExceptionAbstract Dummy implementation of interface method- Specified by:
saveAndCommitin interfaceSalesDocument- Returns:
- true if the save and commit was successful
- Throws:
CommunicationException
-
setDeterminationRequired
public void setDeterminationRequired(boolean isDeterminationRequired)
Description copied from interface:SalesDocumentBaseSets the isDeterminationRequired flag- Specified by:
setDeterminationRequiredin interfaceSalesDocumentBase<ItemList,Item,Header>- Parameters:
isDeterminationRequired- true if there are items that need manual determination either for camapigns, substitution products or something similar
-
setExternalToOrder
public void setExternalToOrder(boolean isExternalToOrder)
Description copied from interface:SalesDocumentSets whether or not the order has to be maintained as an external document to this one. (e.g. a java basket is an external document to crm backend order)- Specified by:
setExternalToOrderin interfaceSalesDocument- Parameters:
isExternalToOrder- true indicates that the order is maintained external to this document, false indicates that the order lies on the same system.
-
setGrossValueAvailable
public void setGrossValueAvailable(boolean isGrossValueAvailable)
Description copied from interface:SalesDocumentSets the property grossValueAvailable- Specified by:
setGrossValueAvailablein interfaceSalesDocument- Parameters:
isGrossValueAvailable- true indicates that the sales document can provide the gross valuefalseindicates that the sales document can not provide the gross value.
-
setNetValueAvailable
public void setNetValueAvailable(boolean isNetValueAvailable)
Description copied from interface:SalesDocumentSets the property netValueAvailable- Specified by:
setNetValueAvailablein interfaceSalesDocument- Parameters:
isNetValueAvailable- true indicates that the sales document can deliver the net value false indicates that the sales document can not deliver the net value.
-
setShipToList
public void setShipToList(java.util.List<ShipTo> shipToList)
Description copied from interface:SalesDocumentSets shipTo list- Specified by:
setShipToListin interfaceSalesDocument- Parameters:
shipToList- list of ShipTo's
-
setBillToList
public void setBillToList(java.util.List<BillTo> billToList)
Description copied from interface:SalesDocumentSets BillTo list- Specified by:
setBillToListin interfaceSalesDocument- Parameters:
billToList- list of BillTo's
-
setTransactionConfiguration
public void setTransactionConfiguration(TransactionConfiguration transConf)
Description copied from interface:SalesDocumentThe transaction configuration provides access to sales-specific settings (e.g. sales organisation)- Specified by:
setTransactionConfigurationin interfaceSalesDocument- Parameters:
transConf- API to access the configuration and documents
-
setUpdateMissing
public void setUpdateMissing(boolean updateMissing)
Description copied from interface:SalesDocumentSets whether update before save is required. Has to be set to true for initial objects to ensure that update is called at least once before save.- Specified by:
setUpdateMissingin interfaceSalesDocument- Parameters:
updateMissing- set totrueto force an update before next save
-
toString
public java.lang.String toString()
Returns a string representation of the object- Overrides:
toStringin classSimpleDocumentImpl<ItemList,Item,Header>- Returns:
- String representation
-
update
public void update() throws CommunicationExceptionDescription copied from interface:SalesDocumentUpdate the sales document in the backend. The method also checks for changes in the businesspartner list- Specified by:
updatein interfaceSalesDocument- Throws:
CommunicationException- in case back-end error
-
updateInBackend
protected void updateInBackend(java.util.List<TechKey> itemsToDelete, java.util.List<TechKey> configurableItemsToRelease) throws BackendException, CommunicationException, BusinessObjectException
- Parameters:
itemsToDelete-configurableItemsToRelease-- Throws:
BackendExceptionCommunicationExceptionBusinessObjectException
-
determineConfigurableItemsToRelease
protected java.util.List<TechKey> determineConfigurableItemsToRelease()
-
mergeIdenticalProductsIfRequired
protected boolean mergeIdenticalProductsIfRequired() throws CommunicationException- Throws:
CommunicationException
-
prepareItemsWithChangedProducts
protected void prepareItemsWithChangedProducts()
-
getSoldToGuid
public TechKey getSoldToGuid()
- Specified by:
getSoldToGuidin interfaceSimpleDocument<ItemList,Item,Header>- Overrides:
getSoldToGuidin classSimpleDocumentImpl<ItemList,Item,Header>- Returns:
- techKey GUID of the soldTo
-
setSoldToGuid
public void setSoldToGuid(TechKey techKeySoldTo)
- Specified by:
setSoldToGuidin interfaceSimpleDocument<ItemList,Item,Header>- Overrides:
setSoldToGuidin classSimpleDocumentImpl<ItemList,Item,Header>- Parameters:
techKeySoldTo- GUID of the soldTo
-
setSoldToGuid
public void setSoldToGuid(TechKey techKeySoldTo, java.lang.String soldToId)
- Specified by:
setSoldToGuidin interfaceSalesDocument- Parameters:
techKeySoldTo- the guid of the soldtosoldToId- the partner id of the soldto
-
clearItemBuffer
public void clearItemBuffer()
Description copied from interface:SalesDocumentRemoves all buffered item information- Specified by:
clearItemBufferin interfaceSalesDocument
-
hasPredecessorOfSpecificType
public boolean hasPredecessorOfSpecificType(DocumentType docType)
Description copied from interface:SalesDocumentScans list of predecessors for given document type.- Specified by:
hasPredecessorOfSpecificTypein interfaceSalesDocument- Parameters:
docType- to be searched for in predecessors- Returns:
- true if predecessor list contains given doc type
-
setInitialized
public void setInitialized(boolean b)
Description copied from interface:SalesDocumentIndicates whether a sales document could be initialized- Specified by:
setInitializedin interfaceSalesDocument- Parameters:
b- true if initialization was not possible
-
isInitialized
public boolean isInitialized()
Description copied from interface:SalesDocumentDoes the document carry an initialization error?- Specified by:
isInitializedin interfaceSalesDocument- Returns:
- true if initialization was not possible
-
isItemBasedAvailability
public boolean isItemBasedAvailability()
Description copied from interface:SalesDocumentChecks if availability is compiled only based on item information.- Specified by:
isItemBasedAvailabilityin interfaceSalesDocument- Returns:
- Availability is compiled only based item on information?
-
setConverter
public void setConverter(Converter converter)
- Specified by:
setConverterin interfaceSalesDocument- Parameters:
converter- access object for unit related conversions
-
validate
public void validate() throws CommunicationExceptionDescription copied from interface:SalesDocumentValidates as sales document. Afterwards, all messages are available as part of the message list- Specified by:
validatein interfaceSalesDocument- Throws:
CommunicationException
-
afterDeleteItemInBackend
protected void afterDeleteItemInBackend(java.util.List<TechKey> itemsToDelete)
Releases configuration sessions for all items provided- Parameters:
itemsToDelete- List of item TechKeys
-
afterUpdateItemInBackend
protected void afterUpdateItemInBackend(java.util.List<TechKey> itemsToDelete)
Releases configuration sessions for all items provided- Parameters:
itemsToDelete- List of item TechKeys
-
afterDeleteItemInBackend
public void afterDeleteItemInBackend()
Description copied from interface:SalesDocumentReleases all configuration sessions attached to this sales document- Specified by:
afterDeleteItemInBackendin interfaceSalesDocument
-
isBackendDown
public boolean isBackendDown()
- Specified by:
isBackendDownin interfaceSalesDocument- Returns:
- Is back end down for a planned downtime?
-
getSessionService
public SessionService getSessionService()
- Returns:
- the sessionService
-
setSessionService
public void setSessionService(SessionService sessionService)
- Parameters:
sessionService- the sessionService to set
-
getSalesDocumentHooks
public java.util.List<SalesDocumentHook> getSalesDocumentHooks()
- Returns:
- the salesDocumentHooks
-
setSalesDocumentHooks
public void setSalesDocumentHooks(java.util.List<SalesDocumentHook> salesDocumentHooks)
- Parameters:
salesDocumentHooks- the salesDocumentHooks to set
-
-