Interface SalesDocument

    • Method Detail

      • clearShipTos

        void clearShipTos()
        Clears the list of the shipTo.
      • createBillTo

        BillTo createBillTo()
        Creates a new billTo object
        Returns:
        Newly created billTo
      • createShipTo

        ShipTo createShipTo()
        Creates a new ship object
        Returns:
        Newly created shipTo
      • destroyContent

        void destroyContent()
                     throws CommunicationException
        Destroy 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.
        Throws:
        CommunicationException - in case back-end error
      • getTransactionConfiguration

        TransactionConfiguration getTransactionConfiguration()
        Returns the transaction configuration. The transaction configuration provides access to sales-specific settings (e.g. sales organisation)
        Returns:
        TransactionConfiguration to access the sales-related configuration
      • init

        void init​(PartnerList partnerList)
           throws CommunicationException
        Initializes the sales document with the given arguments and creates and instance in back-end application memory.
        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

        void init​(SalesDocument posd,
                  java.lang.String processType)
           throws BusinessObjectException
        Initializes 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.
        Parameters:
        posd - The SalesDocument to retrieve data from
        processType - process type for the new SalesDocument (optional)
        Throws:
        BusinessObjectException - in case back-end error
      • isExistingInBackend

        boolean isExistingInBackend()
        Checks if the document exists in the backend storage
        Returns:
        does the document exist in backend?
      • isExternalToOrder

        boolean isExternalToOrder()
        Indicates 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)
        Returns:
        true indicates that the order is maintained external to this document, false indicates that the order lies on the same system.
      • isGrossValueAvailable

        boolean isGrossValueAvailable()
        Indicates whether or not the sales document can provide the Gross value.
        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

        boolean isMultipleAddressesSupported()
                                      throws BusinessObjectException
        Returns if multiple addresses are supported
        Returns:
        multiple addresses supported
        Throws:
        BusinessObjectException - in case back-end error
      • isNetValueAvailable

        boolean isNetValueAvailable()
        Indicates whether or not the sales document can provide a net value.
        Returns:
        true indicates that the sales document can provide the net value false indicates that the sales document can not deliver the net value.
      • read

        void read​(boolean force)
           throws CommunicationException
        Reads the sales document. The backend call happens if considered as necessary or if forced.
        Parameters:
        force - If true, then read even if not considered as necessary
        Throws:
        CommunicationException - in case back-end error
      • readForUpdate

        void readForUpdate()
                    throws CommunicationException
        Reads the sales document for update (tried to get a lock). The backend call happens only if necessary.
        Throws:
        CommunicationException - in case back-end error
      • readForUpdate

        void readForUpdate​(boolean force)
                    throws CommunicationException
        Reads the sales document for update (tried to get a lock). The backend call happens if considered as necessary or if forced.
        Parameters:
        force - If true, then read even if not considered as necessary
        Throws:
        CommunicationException - in case back-end error
      • saveAndCommit

        boolean saveAndCommit()
                       throws BusinessObjectException
        Save the sales document and commit it in the backend. If successful, locks in backend are released
        Returns:
        true if the save and commit was successful
        Throws:
        BusinessObjectException - in case back-end error
      • setExternalToOrder

        void setExternalToOrder​(boolean isExternalToOrder)
        Sets 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)
        Parameters:
        isExternalToOrder - true indicates that the order is maintained external to this document, false indicates that the order lies on the same system.
      • setGrossValueAvailable

        void setGrossValueAvailable​(boolean grossValueAvailable)
        Sets the property grossValueAvailable
        Parameters:
        grossValueAvailable - true indicates that the sales document can provide the gross value false indicates that the sales document can not provide the gross value.
      • setNetValueAvailable

        void setNetValueAvailable​(boolean netValueAvailable)
        Sets the property netValueAvailable
        Parameters:
        netValueAvailable - true indicates that the sales document can deliver the net value false indicates that the sales document can not deliver the net value.
      • setShipToList

        void setShipToList​(java.util.List<ShipTo> shipToList)
        Sets shipTo list
        Parameters:
        shipToList - list of ShipTo's
      • setBillToList

        void setBillToList​(java.util.List<BillTo> billToList)
        Sets BillTo list
        Parameters:
        billToList - list of BillTo's
      • setTransactionConfiguration

        void setTransactionConfiguration​(TransactionConfiguration transConf)
        The transaction configuration provides access to sales-specific settings (e.g. sales organisation)
        Parameters:
        transConf - API to access the configuration and documents
      • setUpdateMissing

        void setUpdateMissing​(boolean updateMissing)
        Sets 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.
        Parameters:
        updateMissing - set to true to force an update before next save
      • isUpdateMissing

        boolean isUpdateMissing()
        Check whether its required to Update the object
        Returns:
        true, only if the object has to be updated
      • setSoldToGuid

        void setSoldToGuid​(TechKey techKeySoldTo,
                           java.lang.String soldToId)
        Parameters:
        techKeySoldTo - the guid of the soldto
        soldToId - the partner id of the soldto
      • clearItemBuffer

        void clearItemBuffer()
        Removes all buffered item information
      • hasPredecessorOfSpecificType

        boolean hasPredecessorOfSpecificType​(DocumentType docType)
        Scans list of predecessors for given document type.
        Parameters:
        docType - to be searched for in predecessors
        Returns:
        true if predecessor list contains given doc type
      • setInitialized

        void setInitialized​(boolean b)
        Indicates whether a sales document could be initialized
        Parameters:
        b - true if initialization was not possible
      • isInitialized

        boolean isInitialized()
        Does the document carry an initialization error?
        Returns:
        true if initialization was not possible
      • isCheckCatalogNecessary

        boolean isCheckCatalogNecessary()
        Does the document require that the items are checked against the catalog?
        Returns:
        true if check is required
      • setCheckCatalogNecessary

        void setCheckCatalogNecessary​(boolean checkCatalogNecessary)
        Indicates whether a check of the items against the catalog is required
        Parameters:
        checkCatalogNecessary - if check is required
      • isItemBasedAvailability

        boolean isItemBasedAvailability()
        Checks if availability is compiled only based on item information.
        Returns:
        Availability is compiled only based item on information?
      • setConverter

        void setConverter​(Converter converter)
        Parameters:
        converter - access object for unit related conversions
      • afterDeleteItemInBackend

        void afterDeleteItemInBackend()
        Releases all configuration sessions attached to this sales document
      • isBackendDown

        boolean isBackendDown()
        Returns:
        Is back end down for a planned downtime?