Package org.nuxeo.ecm.platform.actions
Class Action
java.lang.Object
org.nuxeo.ecm.platform.actions.Action
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Action>
,Descriptor
public class Action
extends Object
implements Serializable, Cloneable, Comparable<Action>, Descriptor
Descriptor for action.
- Author:
- Bogdan Stefanescu
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected boolean
protected String[]
protected String
static final String[]
protected Boolean
protected boolean
protected ActionFilter[]
protected String
protected String
protected String
protected Boolean
protected String
protected String
protected Map
<String, Serializable> Extra set of properties to be used by API, when creating actions on the fly without contributions to the service.protected int
Provides a hint for action ordering.protected ActionPropertiesDescriptor
protected Map
<String, Serializable> protected String
Fields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated.int
boolean
boolean
String[]
Deprecated.since 2025.0 unusedReturns the confirm javascript for this element.getHelp()
getIcon()
getId()
The descriptor id, descriptors with same id are merged.getLabel()
getLink()
Returns the link for this action.int
getOrder()
Returns the action order.Returns an aggregate oflocalProperties
andproperties
set via descriptors.Deprecated.since 2025.0 unusedprotected String
getStringProperty
(String prop) getType()
int
hashCode()
boolean
boolean
Deprecated.since 2025.0 unusedboolean
boolean
Deprecated.since 2025.0 unusedmerge
(Descriptor o) Returns a descriptor representingother
merged intothis
void
setAccessKey
(String accessKey) Deprecated.since 2025.0 unusedvoid
setAvailable
(boolean available) void
setCategories
(String[] categories) Deprecated.since 2025.0 unusedvoid
setConfirm
(String confirm) void
setEnabled
(boolean enabled) void
setFiltered
(boolean filtered) void
setFilterIds
(List<String> filterIds) Deprecated.since 2025.0 unusedvoid
setFilters
(ActionFilter[] filters) void
void
void
setImmediate
(boolean immediate) Deprecated.since 2025.0 unusedvoid
void
void
setOrder
(int order) Sets the order of the action.void
setProperties
(Map<String, Serializable> localProperties) Sets local properties programmaticallyvoid
setPropertiesDescriptor
(ActionPropertiesDescriptor properties) void
toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Descriptor
doesRemove
-
Field Details
-
EMPTY_CATEGORIES
-
id
-
link
-
enabled
-
label
-
icon
-
confirm
-
help
-
immediate
-
accessKey
-
type
- Since:
- 5.6
-
properties
- Since:
- 5.6
-
localProperties
Extra set of properties to be used by API, when creating actions on the fly without contributions to the service.- Since:
- 5.6
-
propertiesCache
- Since:
- 5.6
-
available
protected boolean available -
filtered
protected boolean filtered- Since:
- 8.2
-
order
protected int orderProvides a hint for action ordering.:XXX: Action ordering remains a problem. We will continue to use the existing strategy of, by default, ordering actions by specificity of registration and order of definition.
-
categories
-
filterIds
-
filters
-
-
Constructor Details
-
Action
public Action() -
Action
-
Action
-
-
Method Details
-
getId
Description copied from interface:Descriptor
The descriptor id, descriptors with same id are merged.To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.
To forbid merge use a unique value, non-overriden
toString()
for exemple.- Specified by:
getId
in interfaceDescriptor
-
isEnableSet
Deprecated.since 2025.0 unusedReturns true if the enabled element was set on the descriptor, useful for merging.- Since:
- 5.8
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
getStringProperty
-
getLabel
-
setLabel
-
getIcon
-
setIcon
-
getLink
Returns the link for this action.Since 5.7.3, fallbacks on properties when link is not set and retrieve it using key "link".
-
setLink
-
getCategories
-
getCategoryList
Deprecated.since 2025.0 unusedReturns the categories as a list.- Since:
- 7.2
-
toString
-
getOrder
public int getOrder()Returns the action order.- Returns:
- the action order as an integer value
-
setOrder
public void setOrder(int order) Sets the order of the action.- Parameters:
order
- order of the action
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Action>
-
getFilterIds
-
setFilterIds
Deprecated.since 2025.0 unused -
getFilters
-
setFilters
-
setCategories
Deprecated.since 2025.0 unused -
getConfirm
Returns the confirm javascript for this element.Since 5.7.3, fallbacks on properties when link is not set and retrieve it using key "confirm".
-
setConfirm
-
getAvailable
public boolean getAvailable() -
setAvailable
public void setAvailable(boolean available) -
isFiltered
public boolean isFiltered()- Since:
- 8.2
-
setFiltered
public void setFiltered(boolean filtered) - Since:
- 8.2
-
getHelp
-
setHelp
-
isImmediate
Deprecated.since 2025.0 unused -
setImmediate
Deprecated.since 2025.0 unused -
getType
- Since:
- 5.6
-
setType
- Since:
- 5.6
-
getPropertiesDescriptor
Deprecated.since 2025.0 unused- Since:
- 5.6
-
setPropertiesDescriptor
- Since:
- 5.6
-
setProperties
Sets local properties programmatically- Since:
- 5.6
-
getProperties
Returns an aggregate oflocalProperties
andproperties
set via descriptors.- Since:
- 5.6
-
setAccessKey
Deprecated.since 2025.0 unused- Since:
- 5.6
-
getAccessKey
- Since:
- 5.6
-
equals
-
hashCode
public int hashCode() -
clone
Deprecated.since 2025.0 This is not the purpose of clone. useAction(Action)
instead -
merge
Description copied from interface:Descriptor
Returns a descriptor representingother
merged intothis
Default implementation returns
other
.- Specified by:
merge
in interfaceDescriptor
- Returns:
- the merged descriptor
-
Action(Action)
instead