public abstract class CreateAction 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_TYPE
action parameter - the type of the item to be created
|
protected static Logger |
log |
| Constructor and Description |
|---|
CreateAction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ActionResult |
afterCreate(Item item,
DisplayState displayState,
Map initialValues,
Map currentValues,
ActionResult actionResult) |
protected abstract ActionResult |
beforeCreate(ComposedType itemType,
DisplayState displayState,
Map initialValues,
Map currentValues)
The maps currentValues and initialValues can be used to implement filtering of values, which must not be saved.
|
protected abstract ActionResult |
create(ComposedType itemType,
DisplayState displayState,
Map initialValues,
Map currentValues,
ActionResult actionResult) |
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.
|
public static final String ITEM_TYPE
public static final String DISPLAY_STATE
public static final String INITIAL_VALUES
public static final String CURRENT_VALUES
protected static final Logger log
protected abstract ActionResult beforeCreate(ComposedType itemType, DisplayState displayState, Map initialValues, Map currentValues)
itemType - A new Item of this ComposedType will be created.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 abstract ActionResult create(ComposedType itemType, DisplayState displayState, Map initialValues, Map currentValues, ActionResult actionResult)
itemType - A new Item of this ComposedType will be created.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.actionResult - The ActionResult object, containing the status of the current action.protected abstract ActionResult afterCreate(Item item, DisplayState displayState, Map initialValues, Map currentValues, ActionResult actionResult)
item - the new created itemdisplayState - DisplayStateinitialValues - 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.currentValues - 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.actionResult - The ActionResult object, containing the status of the current action.public ActionResult perform(ActionEvent actionEvent) throws JaloBusinessException
perform in interface HMCActionactionEvent - JaloBusinessExceptionITEM_TYPE,
DISPLAY_STATE,
INITIAL_VALUES,
CURRENT_VALUESpublic 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 yopur 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.