Class BoxProcessor


  • public class BoxProcessor
    extends Object
    Process of boxing storage details into a concrete referenced inventory
    • Constructor Detail

      • BoxProcessor

        public BoxProcessor​(ReferencedInventory referencedInventory,
                            org.codehaus.jettison.json.JSONArray selectedStorageDetails,
                            String newStorageBinId)
                     throws org.codehaus.jettison.json.JSONException
        Throws:
        org.codehaus.jettison.json.JSONException
    • Method Detail

      • getAttributeSetInstanceTo

        protected AttributeSetInstance getAttributeSetInstanceTo​(StorageDetail storageDetail)
        Returns the right ReferencedInventory which will be associated to the given storage detail
      • generateInternalMovementName

        protected String generateInternalMovementName()
        Returns a string with the name for the generated goods movement
      • getNewStorageBinId

        protected String getNewStorageBinId​(org.codehaus.jettison.json.JSONObject storageDetailJS)
        Returns the expected goods movement line bin to
      • getReferencedInventory

        protected ReferencedInventory getReferencedInventory()
        Returns the Referenced Inventory linked to this box/unbox process
      • getReferencedInventoryOrganization

        protected Organization getReferencedInventoryOrganization()
        Returns the Organization associated to the referenced inventory
      • setSelectedStorageDetailsAndValidateThem

        protected void setSelectedStorageDetailsAndValidateThem​(org.codehaus.jettison.json.JSONArray selectedStorageDetails)
                                                         throws org.codehaus.jettison.json.JSONException
        Throws:
        org.codehaus.jettison.json.JSONException
      • createAndProcessGoodsMovement

        public InternalMovement createAndProcessGoodsMovement()
                                                       throws Exception
        Creates, process and returns a goods movement with the referenced inventory change.
        Throws:
        Exception - In case of exception, the transaction is rollback and the exception is thrown.
      • getStorageDetail

        protected StorageDetail getStorageDetail​(org.codehaus.jettison.json.JSONObject storageDetailJS)
                                          throws org.codehaus.jettison.json.JSONException
        Throws:
        org.codehaus.jettison.json.JSONException