public abstract class SaveAction extends Object implements HMCAction
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_VALUES
action parameter - the list of current values
|
static String |
DISPLAY_STATE
action parameter - the displayState
|
static String |
INITIAL_VALUES
action parameter - the list of initial values
|
static String |
ITEM
action parameter - the item to be saved
|
protected static Logger |
LOG |
static String |
SPECIAL_EDITORS
action parameter - the list of special editors
|
| Constructor and Description |
|---|
SaveAction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ActionResult |
afterSave(Item item,
DisplayState displayState,
Map currentValues,
ActionResult actionResult) |
protected abstract ActionResult |
afterSave(Item item,
DisplayState displayState,
Map currentValues,
Map initialValues,
ActionResult actionResult) |
protected abstract ActionResult |
beforeSave(Item item,
DisplayState displayState,
Map currentValues,
Map initialValues)
The maps currentValues and initialValues can be used to implement filtering of values, which must not be saved.
|
AbstractActionDialogChip |
createDialogChip(Chip parent,
AbstractActionChip actionChip) |
String |
getConfirmationMessage()
This default implementation returns
null (It means the standard confirmation message will be used if
confirmation is on). |
boolean |
hasDialogChip(AbstractActionChip actionChip) |
boolean |
needConfirmation()
This default implementation returns
false. |
ActionResult |
perform(ActionEvent actionEvent)
This action requires Map with action parameters in ActionEvent data.
|
protected abstract ActionResult |
save(Item item,
DisplayState displayState,
Map currentValues,
Map specialEditors,
ActionResult actionResult) |
protected abstract ActionResult |
save(Item item,
DisplayState displayState,
Map currentValues,
Map initialValues,
Map specialEditors,
ActionResult actionResult) |
protected ActionResult |
validateSpecialEditors(Item item,
DisplayState dispalyState,
Map specialEditors,
ActionResult result)
Validates special editors implementing
SpecialValidatingChip to allow them to abort item save process or
simply report errors. |
public static final String ITEM
public static final String DISPLAY_STATE
public static final String INITIAL_VALUES
public static final String CURRENT_VALUES
public static final String SPECIAL_EDITORS
protected static final Logger LOG
protected abstract ActionResult beforeSave(Item item, DisplayState displayState, Map currentValues, Map initialValues)
item - Item which attributes should be saved.displayState - DisplayStatecurrentValues - Map containing all current attribute values. (Mapping: AttributeQualifier -> Value) Note:
AttributeQualifier should always be treated caseinsensitive. Use
de.hybris.platform.util.collections.CaseInsensitiveMap or other caseinsensitive
implementations.initialValues - Map containing all initial attribute values. (Mapping: AttributeQualifier -> Value) Note:
AttributeQualifier should always be treated caseinsensitive. Use
de.hybris.platform.util.collections.CaseInsensitiveMap or other caseinsensitive
implementations.protected ActionResult validateSpecialEditors(Item item, DisplayState dispalyState, Map specialEditors, ActionResult result)
SpecialValidatingChip to allow them to abort item save process or
simply report errors.item - item which is currently being editeddispalyState - the display statespecialEditors - all special editors as { String, AbstractChip } mapprotected abstract ActionResult save(Item item, DisplayState displayState, Map currentValues, Map specialEditors, ActionResult actionResult)
item - Item which attributes should be saved.displayState - DisplayStatecurrentValues - Map containing all attribute values which have to be saved. (Mapping: AttributeQualifier -> Value) Note:
AttributeQualifier should always be treated case insensitively. Use
de.hybris.platform.util.collections.CaseInsensitiveMap or other caseinsensitive
implementations.specialEditors - Map containing all chips, which values are not save through the generic save process.actionResult - The ActionResult object, containing the status of the current action.protected abstract ActionResult save(Item item, DisplayState displayState, Map currentValues, Map initialValues, Map specialEditors, ActionResult actionResult)
protected abstract ActionResult afterSave(Item item, DisplayState displayState, Map currentValues, ActionResult actionResult)
item - Item which attributes should be saved.displayState - DisplayStatecurrentValues - Map containing all attribute values which have been saved. (Mapping: AttributeQualifier -> Value) Note:
AttributeQualifier should always be treated case insensitively. Use
de.hybris.platform.util.collections.CaseInsensitiveMap or other caseinsensitive
implementations.actionResult - The ActionResult object, containing the status of the current action.protected abstract ActionResult afterSave(Item item, DisplayState displayState, Map currentValues, Map initialValues, ActionResult actionResult)
public ActionResult perform(ActionEvent actionEvent) throws JaloBusinessException
perform in interface HMCActionactionEvent - JaloBusinessExceptionITEM,
DISPLAY_STATE,
INITIAL_VALUES,
CURRENT_VALUES,
SPECIAL_EDITORSpublic boolean needConfirmation()
false. Overwrite this method if you want confirmation for this
action.needConfirmation in interface HMCActionpublic String getConfirmationMessage()
null (It means the standard confirmation message will be used if
confirmation is on). Overwrite this method if you want your own confirmation message for this action.getConfirmationMessage in interface HMCActionpublic boolean hasDialogChip(AbstractActionChip actionChip)
hasDialogChip in interface HMCActionpublic AbstractActionDialogChip createDialogChip(Chip parent, AbstractActionChip actionChip)
createDialogChip in interface HMCActionCopyright © 2017 SAP SE. All Rights Reserved.