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 Stringprotected booleanprotected String[]protected Stringstatic final String[]protected Booleanprotected booleanprotected ActionFilter[]protected Stringprotected Stringprotected Stringprotected Booleanprotected Stringprotected Stringprotected Map<String, Serializable> Extra set of properties to be used by API, when creating actions on the fly without contributions to the service.protected intProvides a hint for action ordering.protected ActionPropertiesDescriptorprotected Map<String, Serializable> protected StringFields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated.intbooleanbooleanString[]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.intgetOrder()Returns the action order.Returns an aggregate oflocalPropertiesandpropertiesset via descriptors.Deprecated.since 2025.0 unusedprotected StringgetStringProperty(String prop) getType()inthashCode()booleanbooleanDeprecated.since 2025.0 unusedbooleanbooleanDeprecated.since 2025.0 unusedmerge(Descriptor o) Returns a descriptor representingothermerged intothisvoidsetAccessKey(String accessKey) Deprecated.since 2025.0 unusedvoidsetAvailable(boolean available) voidsetCategories(String[] categories) Deprecated.since 2025.0 unusedvoidsetConfirm(String confirm) voidsetEnabled(boolean enabled) voidsetFiltered(boolean filtered) voidsetFilterIds(List<String> filterIds) Deprecated.since 2025.0 unusedvoidsetFilters(ActionFilter[] filters) voidvoidvoidsetImmediate(boolean immediate) Deprecated.since 2025.0 unusedvoidvoidvoidsetOrder(int order) Sets the order of the action.voidsetProperties(Map<String, Serializable> localProperties) Sets local properties programmaticallyvoidsetPropertiesDescriptor(ActionPropertiesDescriptor properties) voidtoString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:DescriptorThe 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:
getIdin 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:
compareToin 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 oflocalPropertiesandpropertiesset 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:DescriptorReturns a descriptor representingothermerged intothisDefault implementation returns
other.- Specified by:
mergein interfaceDescriptor- Returns:
- the merged descriptor
-
Action(Action)instead