public class StockToAdjustController
extends DefaultWidgetController
| Modifier and Type | Field and Description |
|---|---|
protected static int |
COLUMN_INDEX_QTY |
protected static int |
COLUMN_INDEX_REASON |
protected static java.lang.Object |
COMPLETED |
protected static java.lang.String |
IN_SOCKET |
protected static java.lang.String |
OUT_CONFIRM |
| Constructor and Description |
|---|
StockToAdjustController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdjustment()
Add a new row of stock adjustment reason.
|
protected void |
addButtonListeners(Component myComponent)
Add listeners on the buttons for each line
|
protected void |
addListComponentListeners(Component component)
Adds a listener according to the type of component inside a vertical box
|
protected void |
addListeners()
Add listeners on Intbox, Combobox and Textbox so that when a change happens on one of these components, we are
catching it.
|
protected void |
addStockAdjustment(Event event)
Adds an individual stock adjustment.
|
void |
confirmStockAdjustmentCreation()
Confirm the creation of the listed stock level adjustments
|
protected void |
editStockAdjustment(Event event)
Edits an individual stock adjustment.
|
protected BackofficeLocaleService |
getCockpitLocaleService() |
protected EnumerationService |
getEnumerationService() |
protected java.util.Locale |
getLocale() |
protected ModelService |
getModelService() |
protected NotificationService |
getNotificationService() |
Grid |
getStockAdjustments() |
protected StockLevelModel |
getStockLevel() |
protected StockLevelAdjustmentData |
getStockLevelAdjustmentData(StockAdjustmentDto stockAdjustmentDto)
Instantiate a
StockLevelAdjustmentData and populate it from the given StockAdjustmentDto |
DefaultWarehousingStockLevelFacade |
getWarehousingStockLevelFacade() |
protected void |
handleIndividualReason(Event event)
Updates an individual entry with the selected reason
|
void |
initStockLevelAdjustmentForm(StockLevelModel inputObject)
Initialize the popup to create stock level adjustment(s)
|
protected void |
manageButtonsVisibility(boolean isEditable,
Component myComponent)
Handles the display of the buttons according to the situation (editable or not)
|
protected void |
manageFieldsVisibility(Row myRow,
StockAdjustmentDto stockAdjustmentDto)
Handles buttons visibility
|
protected java.util.Optional<StockLevelAdjustmentReason> |
matchingComboboxStockAdjustmentReason(java.lang.String stockAdjustmentReasonLabel)
Retrieve the
StockLevelAdjustmentReason according to the selected label in the combobox |
protected void |
refreshGrid()
Refresh the rendering of the grid of stock adjustment to create
|
protected void |
removeStockAdjustment(Event event)
Removes an individual stock adjustment.
|
void |
reset()
Reinitialize the popup.
|
void |
setStockLevel(StockLevelModel stockLevel) |
protected void |
validateStockAdjustmentCreation()
Check if the data provided by the form are compliant with the validation rules
|
protected static final java.lang.String IN_SOCKET
protected static final java.lang.String OUT_CONFIRM
protected static final java.lang.Object COMPLETED
protected static final int COLUMN_INDEX_REASON
protected static final int COLUMN_INDEX_QTY
public void initStockLevelAdjustmentForm(StockLevelModel inputObject)
inputObject - the StockLevelModel for which we want to create one or several stock level adjustment(s)public void addAdjustment()
public void reset()
protected void refreshGrid()
protected void addListeners()
protected void addListComponentListeners(Component component)
component - the vertical box component containing the element to target to add a listenerprotected void handleIndividualReason(Event event)
event - the event that triggered the changeprotected java.util.Optional<StockLevelAdjustmentReason> matchingComboboxStockAdjustmentReason(java.lang.String stockAdjustmentReasonLabel)
StockLevelAdjustmentReason according to the selected label in the comboboxstockAdjustmentReasonLabel - a StringStockLevelAdjustmentReason corresponding to the labelprotected void addButtonListeners(Component myComponent)
myComponent - the initial componentprotected void addStockAdjustment(Event event)
event - the click event triggered by the userprotected void removeStockAdjustment(Event event)
event - the click event triggered by the userprotected void editStockAdjustment(Event event)
event - the click event triggered by the userprotected void manageFieldsVisibility(Row myRow,
StockAdjustmentDto stockAdjustmentDto)
myRow - the row for which the visibility change is requestedstockAdjustmentDto - the stock adjustment dto containing informations about the reason selectedprotected void manageButtonsVisibility(boolean isEditable,
Component myComponent)
isEditable - the line is editable or notmyComponent - the component containing the buttonspublic void confirmStockAdjustmentCreation()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void validateStockAdjustmentCreation()
protected StockLevelAdjustmentData getStockLevelAdjustmentData(StockAdjustmentDto stockAdjustmentDto)
StockLevelAdjustmentData and populate it from the given StockAdjustmentDtostockAdjustmentDto - the stock adjustment DTO to use for populationStockLevelAdjustmentDataprotected java.util.Locale getLocale()
protected StockLevelModel getStockLevel()
public void setStockLevel(StockLevelModel stockLevel)
protected BackofficeLocaleService getCockpitLocaleService()
protected EnumerationService getEnumerationService()
protected ModelService getModelService()
public Grid getStockAdjustments()
public DefaultWarehousingStockLevelFacade getWarehousingStockLevelFacade()
protected NotificationService getNotificationService()
Copyright © 2018 SAP SE. All Rights Reserved.