@Experimental public class ActionBuilder extends Object
Builds a new Action
using a fluent API.
Modifier and Type | Method and Description |
---|---|
Action |
build()
Builds the
Action instance. |
ActionBuilder |
buttonLabel(String buttonLabel)
Sets the button label.
|
ActionBuilder |
buttonLabelKey(String buttonLabelKey)
Sets the i18n message key for the action button label.
|
ActionBuilder |
description(String description)
Sets the action description.
|
ActionBuilder |
enabled(boolean enabled)
Sets the action 'enabled' state.
|
ActionBuilder |
endpoint(String endpoint)
Sets the URL for the REST endpoint to be invoked when the action is triggered.
|
ActionBuilder |
endpointHttpMethod(HttpMethod endpointHttpMethod)
Sets the
HttpMethod to be used for the action endpoint invocation. |
ActionBuilder |
form(String form)
Sets the key for the action form.
|
ActionBuilder |
group(String group)
Sets the action group information.
|
ActionBuilder |
hidden(boolean hidden)
Sets the action 'hidden' state.
|
ActionBuilder |
icon(String icon)
Sets the icon key.
|
ActionBuilder |
id(String id)
Sets the action ID.
|
ActionBuilder |
name(String name)
Sets the action name.
|
ActionBuilder |
nameKey(String nameKey)
Sets the i18n message key for the action name.
|
ActionBuilder |
url(String url)
Sets the navigation URL.
|
ActionBuilder |
workObject(Optional<WorkObject> workObject)
Sets the optional referenced work object.
|
ActionBuilder |
workObject(WorkObject workObject)
Sets the referenced work object.
|
public ActionBuilder id(String id)
Sets the action ID.
id
- the action IDpublic ActionBuilder nameKey(String nameKey)
Sets the i18n message key for the action name.
nameKey
- the i18n message keypublic ActionBuilder name(String name)
Sets the action name.
Note
|
this value may be overwritten by the translated i18n message key |
name
- the action namepublic ActionBuilder buttonLabelKey(String buttonLabelKey)
Sets the i18n message key for the action button label.
buttonLabelKey
- the i18n message keypublic ActionBuilder buttonLabel(String buttonLabel)
Sets the button label.
Note
|
this value may be overwritten by the translated i18n message key |
buttonLabel
- the button labelpublic ActionBuilder description(String description)
Sets the action description.
description
- the action descriptionpublic ActionBuilder icon(String icon)
Sets the icon key.
icon
- the icon keypublic ActionBuilder hidden(boolean hidden)
Sets the action 'hidden' state.
hidden
- the action 'hidden' statepublic ActionBuilder enabled(boolean enabled)
Sets the action 'enabled' state.
enabled
- the action 'enabled' statepublic ActionBuilder url(String url)
Sets the navigation URL.
The value should be relative to the server base URL (e.g. "#/dashboard/user"). If the action was successful then the browser will navigate to the given URL.
url
- the navigation URLpublic ActionBuilder form(String form)
Sets the key for the action form.
This form will be shown before the action is executed.
form
- the form keypublic ActionBuilder endpointHttpMethod(HttpMethod endpointHttpMethod)
Sets the HttpMethod
to be used for the action endpoint invocation.
endpointHttpMethod
- the HttpMethod
valuepublic ActionBuilder endpoint(String endpoint)
Sets the URL for the REST endpoint to be invoked when the action is triggered.
The URL may either be relative to the base server URL (e.g. "acme/ping") or an absolute URL (e.g. "http://acme.com/ping").
endpoint
- the REST endpoint URLpublic ActionBuilder group(String group)
Sets the action group information.
group
- the action grouppublic ActionBuilder workObject(WorkObject workObject)
Sets the referenced work object.
workObject
- the referenced work objectpublic ActionBuilder workObject(Optional<WorkObject> workObject)
Sets the optional referenced work object.
workObject
- the optional referenced work objectCopyright © 2010 - 2017 edorasware ag. All Rights Reserved.