Class ActionImpl
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractAction
ch.tocco.nice2.model.form.impl.form2.components.ActionImpl
- All Implemented Interfaces:
Action
,BaseAction
,Component
,CompositeComponent
,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.components.BaseAction
BaseAction.ActionType, BaseAction.ButtonStyle
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
Component.Configuration
-
Field Summary
Fields inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractAction
actionType, confirmationThreshold, fullscreen, icon, maxSelection, minSelection, runInBackgroundTask, showConfirmation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, Object value) @Nullable String
getAppId()
The app with this id will be called by the action.used to decide the look of an action buttonused to decide the look of an actionName of the action condition used to decide if action is shownused to determine on which dms items to display an action@Nullable String
This REST endpoint will be called by the action.@Nullable String
getPath()
The legacy action with this path will be called.The properties for the action.used to determine whether the label should be displayedboolean
boolean
Returns true if an action is only a placeholder.void
void
setButtonStyle
(BaseAction.ButtonStyle buttonStyle) void
setButtonType
(ButtonType buttonType) void
setConditionName
(String conditionName) void
setDmsEntityModel
(String dmsEntityModel) void
setEndpoint
(String endpoint) void
setOnlyShowOnEmptyColumn
(boolean onlyShowOnEmptyColumn) void
void
setPlaceholder
(boolean isPlaceholder) void
setUseLabel
(UseLabel useLabel) void
validate()
Will be called when the form has been built completely.Methods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractAction
getActionType, getConfirmationThreshold, getIcon, getMaxSelection, getMinSelection, getShowConfirmation, isFullscreen, isRunInBackgroundTask, setActionType, setConfirmationThreshold, setFullscreen, setIcon, setMaxSelection, setMinSelection, setRunInBackgroundTask, setShowConfirmation, setUsesLabelAsTextResource, usesLabelAsTextResource
Methods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
accept, addComponent, addScope, addScopes, clone, findById, getChildren, getScopes, hasChildren, indexOf, insertComponent, parseScopes, removeComponent, removeScope, removeScopes, replaceComponent
Methods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
getDefaultFormLabel, getId, getLabel, getParent, getPosition, setId, setLabel, setParent, setPosition
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.components.BaseAction
getActionType, getConfirmationThreshold, getIcon, getMaxSelection, getMinSelection, getShowConfirmation, isFullscreen, isRunInBackgroundTask, usesLabelAsTextResource
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
accept, getForm, getId, getLabel, getParent, getPosition
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.components.CompositeComponent
findById, getChildren, getScopes, hasChildren
-
Constructor Details
-
ActionImpl
public ActionImpl()
-
-
Method Details
-
getEndpoint
Description copied from interface:Action
This REST endpoint will be called by the action. Must be defined if the action type is equalBaseAction.ActionType.SIMPLE
. It can also be set onBaseAction.ActionType.CUSTOM
for pre-action logic.- Specified by:
getEndpoint
in interfaceAction
-
setEndpoint
-
getAppId
Description copied from interface:Action
The app with this id will be called by the action. Must only be defined if the action type is equalBaseAction.ActionType.CUSTOM
-
setAppId
-
getPath
Description copied from interface:Action
The legacy action with this path will be called. Must only be defined if the action type is equalBaseAction.ActionType.LEGACY
-
setPath
-
setUseLabel
-
getUseLabel
Description copied from interface:Action
used to determine whether the label should be displayed- Specified by:
getUseLabel
in interfaceAction
-
setDmsEntityModel
-
getDmsEntityModel
Description copied from interface:Action
used to determine on which dms items to display an action- Specified by:
getDmsEntityModel
in interfaceAction
-
setButtonType
-
getButtonType
Description copied from interface:Action
used to decide the look of an action- Specified by:
getButtonType
in interfaceAction
-
setButtonStyle
-
getButtonStyle
Description copied from interface:Action
used to decide the look of an action button- Specified by:
getButtonStyle
in interfaceAction
-
getProperties
Description copied from interface:Action
The properties for the action. The value can either be of type string, boolean or number.- Specified by:
getProperties
in interfaceAction
-
addProperty
-
validate
Description copied from interface:Component
Will be called when the form has been built completely. Can be used to validate values (and throwModelBuildException
) or the fill in default value.- Specified by:
validate
in interfaceComponent
- Overrides:
validate
in classAbstractCompositeComponent
- Throws:
ModelBuildException
-
setOnlyShowOnEmptyColumn
public void setOnlyShowOnEmptyColumn(boolean onlyShowOnEmptyColumn) -
isOnlyShowOnEmptyColumn
public boolean isOnlyShowOnEmptyColumn()- Specified by:
isOnlyShowOnEmptyColumn
in interfaceAction
-
setConditionName
-
getConditionName
Description copied from interface:Action
Name of the action condition used to decide if action is shown- Specified by:
getConditionName
in interfaceAction
-
isPlaceholder
public boolean isPlaceholder()Description copied from interface:Action
Returns true if an action is only a placeholder. A placeholder is only available during usingFormInterceptor
s. The lastFormInterceptor
RemovePlaceholderInterceptor removes such placeholders. Placeholders are required to define the sorting (e.g. "after:delete"). Else during sorting sometimes errors are logged.- Specified by:
isPlaceholder
in interfaceAction
-
setPlaceholder
public void setPlaceholder(boolean isPlaceholder)
-