All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
CreateTransferRequest, TransferRequestDetail

public abstract class ManageTransferRequest extends Container
Abstract class in order to manage the edit of a transfer request.
Since:
13.0
See Also:
GCApi:
controller
  • Field Details

    • BUSINESS_OBJECT

      public static final String BUSINESS_OBJECT
      See Also:
    • STOCK_QUANTITY_FIELD

      public static final String STOCK_QUANTITY_FIELD
      See Also:
    • transferRequest

      protected TransferRequest transferRequest
    • headerForm

      protected Form headerForm
    • itemForm

      protected Form itemForm
    • editItemPanel

      protected Panel editItemPanel
    • itemsTableView

      protected TableView itemsTableView
    • serialsTableView

      protected TableView serialsTableView
    • newItemButton

      protected TableMessage newItemButton
    • cmItemRowMenu

      protected ColumnMessage cmItemRowMenu
    • saveButton

      protected PlainButton saveButton
    • itemOkButton

      protected Button itemOkButton
    • defaultStockType

      protected Long defaultStockType
    • currentItemRow

      protected int currentItemRow
    • materialCache

      protected MaterialCache materialCache
    • xCoord

      protected Double xCoord
    • yCoord

      protected Double yCoord
  • Constructor Details

    • ManageTransferRequest

      public ManageTransferRequest()
  • Method Details

    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class Container
      Parameters:
      o - Object received from the caller
    • completeOpeningData

      protected abstract void completeOpeningData(Object o)
    • initWindow

      protected abstract void initWindow()
    • saveTransferRequest

      protected abstract void saveTransferRequest(TransferRequest transferRequest) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • onSave

      public boolean onSave(UIMessage uim)
      UI event handler to save a transfer request.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • checkBeforeSaving

      protected void checkBeforeSaving(Map<String,Object> data) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • searchTransferRequests

      Throws:
      DAValidateException
      DAException
    • onItemOk

      public boolean onItemOk(UIMessage uim)
      UI event handler to edit an item of the transfer request items list.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • checkBeforeItemSaving

      protected void checkBeforeItemSaving(Map<String,Object> itemData) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • saveItem

      protected void saveItem(Map<String,Object> itemData)
    • prepareSerializedMaterialRelations

      protected void prepareSerializedMaterialRelations(TransferRequestItem item)
    • onNewItem

      public boolean onNewItem(UIMessage uim)
      UI event handler to add an item of the transfer request items list.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • changeWarehouseTypeEditability

      protected void changeWarehouseTypeEditability()
    • getPickingWarehouseType

      protected String getPickingWarehouseType(Long transferRequestType)
    • getDestinyWarehouseType

      protected String getDestinyWarehouseType(Long transferRequestType)
    • onChangeDefaultStockType

      public boolean onChangeDefaultStockType(UIMessage uim)
      UI event handler to change the default stock type for the transfer request items.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • editItemRow

      protected void editItemRow(TransferRequestItem item) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • getSelectedObjectId

      protected Long getSelectedObjectId(Object selection)
    • checkCurrentState

      protected boolean checkCurrentState(Long neededState)
    • checkCurrentType

      protected boolean checkCurrentType(Long type)
    • onChangedMaterial

      public boolean onChangedMaterial(UIMessage uim)
      UI event handler to react to the selection of a material.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • changeCurrentStockQuantity

      protected void changeCurrentStockQuantity() throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • showSerializedMaterials

      protected void showSerializedMaterials(boolean showSerializedGrid)
    • onAddSerials

      public boolean onAddSerials(UIMessage uim)
      UI event handler to open the StockSerializedMaterialSelection page.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • prepareSerializedMaterialSelectionConfiguration

      protected TransferRequestSerializedMaterialSelectionConfiguration prepareSerializedMaterialSelectionConfiguration()
    • onFillSerials

      public void onFillSerials(Object o)
      Called on page restore after serialized material selection. This method fill the table with the serialized materials used for generate the transaction.
      Parameters:
      o - the object containing the selected serialized material
    • createSerializedMaterialRelation

      protected BOTransferRequestItemSerializedMaterial createSerializedMaterialRelation(TransferRequestItem item, Map<String,Object> serializedMaterialData)
    • onDeleteSerialRow

      public boolean onDeleteSerialRow(UIMessage uim)
      UI event handler to manage the delete of a serial row.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onConfirmDeleteSerialRow

      public boolean onConfirmDeleteSerialRow(UIMessage uim)
      UI event handler to confirm the decision to delete a serial row.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onDeleteItemRow

      public boolean onDeleteItemRow(UIMessage uim)
      UI event handler to add a edit an item of the transfer request items list.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onItemRowMenu

      public boolean onItemRowMenu(UIMessage uim)
      UI event handler to build the row menu for the items table.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • findTransferRequestItem

      protected TransferRequestItem findTransferRequestItem(int row)
    • isMaterialSerialized

      protected boolean isMaterialSerialized(BOMaterial material)
    • loadMaterial

      protected BOMaterial loadMaterial(Long materialId) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • refreshItemsDBView

      protected void refreshItemsDBView()
    • refreshSerialsDBView

      protected void refreshSerialsDBView(TransferRequestItem item) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • buildSerializedMaterialDBView

      protected DBView buildSerializedMaterialDBView(Set<Long> serializedMaterialIds, TransferRequestItem item) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • deleteItem

      protected void deleteItem()
    • deleteItemSerial

      protected void deleteItemSerial(int row) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • onChangeItemStockType

      public boolean onChangeItemStockType(UIMessage uim)
      UI event handler to manage the change of the stock type for the current transfer request item.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onChangePickingWarehouse

      public boolean onChangePickingWarehouse(UIMessage uim)
      UI event handler used to manage actions after the change of the selected picking warehouse.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.