Class UnboxProcessor
- java.lang.Object
-
- org.openbravo.materialmgmt.refinventory.UnboxProcessor
-
public class UnboxProcessor extends Object
Process of unboxing storage details out of a referenced inventory
-
-
Constructor Summary
Constructors Constructor Description UnboxProcessor(ReferencedInventory referencedInventory, org.codehaus.jettison.json.JSONArray selectedStorageDetails)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InternalMovement
createAndProcessGoodsMovement()
Creates, process and returns a goods movement with the referenced inventory change.protected String
generateInternalMovementName()
Returns a string with the name for the generated goods movementprotected AttributeSetInstance
getAttributeSetInstanceTo(StorageDetail storageDetail)
Returns the right ReferencedInventory which will be associated to the given storage detailprotected String
getNewStorageBinId(org.codehaus.jettison.json.JSONObject storageDetailJS)
Returns the expected goods movement line bin toprotected ReferencedInventory
getReferencedInventory()
Returns the Referenced Inventory linked to this box/unbox processprotected Organization
getReferencedInventoryOrganization()
Returns the Organization associated to the referenced inventoryprotected StorageDetail
getStorageDetail(org.codehaus.jettison.json.JSONObject storageDetailJS)
protected void
setSelectedStorageDetailsAndValidateThem(org.codehaus.jettison.json.JSONArray selectedStorageDetails)
-
-
-
Constructor Detail
-
UnboxProcessor
public UnboxProcessor(ReferencedInventory referencedInventory, org.codehaus.jettison.json.JSONArray selectedStorageDetails) throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
-
-
Method Detail
-
setSelectedStorageDetailsAndValidateThem
protected void setSelectedStorageDetailsAndValidateThem(org.codehaus.jettison.json.JSONArray selectedStorageDetails) throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
-
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
-
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
-
-