Package org.nuxeo.ecm.platform.actions
Class Action
- java.lang.Object
-
- org.nuxeo.ecm.platform.actions.Action
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Action>
public class Action extends Object implements Serializable, Cloneable, Comparable<Action>
Descriptor for action.- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringaccessKeyprotected booleanavailableprotected String[]categoriesprotected Stringconfirmstatic String[]EMPTY_CATEGORIESprotected Booleanenabledprotected booleanfilteredprotected List<String>filterIdsprotected ActionFilter[]filtersprotected Stringhelpprotected Stringiconprotected Stringidprotected Booleanimmediateprotected Stringlabelprotected Stringlinkprotected Map<String,Serializable>localPropertiesExtra set of properties to be used by API, when creating actions on the fly without contributions to the service.protected intorderAttribute that provides a hint for action ordering.protected ActionPropertiesDescriptorpropertiesprotected Map<String,Serializable>propertiesCacheprotected Stringtype
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actionclone()intcompareTo(Action anotherAction)booleanequals(Object other)StringgetAccessKey()booleangetAvailable()String[]getCategories()List<String>getCategoryList()Returns the categories as a list.StringgetConfirm()Returns the confirm javascript for this element.List<String>getFilterIds()ActionFilter[]getFilters()StringgetHelp()StringgetIcon()StringgetId()StringgetLabel()StringgetLink()Returns the link for this action.intgetOrder()Returns the action order.Map<String,Serializable>getProperties()Returns an aggregate oflocalPropertiesandpropertiesset via descriptors.ActionPropertiesDescriptorgetPropertiesDescriptor()protected StringgetStringProperty(String prop)StringgetType()inthashCode()booleanisEnabled()booleanisEnableSet()Returns true if the enabled element was set on the descriptor, useful for merging.booleanisFiltered()booleanisImmediate()voidsetAccessKey(String accessKey)voidsetAvailable(boolean available)voidsetCategories(String[] categories)voidsetConfirm(String confirm)voidsetEnabled(boolean enabled)voidsetFiltered(boolean filtered)voidsetFilterIds(List<String> filterIds)voidsetFilters(ActionFilter[] filters)voidsetHelp(String title)voidsetIcon(String icon)voidsetImmediate(boolean immediate)voidsetLabel(String label)voidsetLink(String link)voidsetOrder(int order)Sets the order of the action.voidsetProperties(Map<String,Serializable> localProperties)Sets local properties programaticallyvoidsetPropertiesDescriptor(ActionPropertiesDescriptor properties)voidsetType(String type)StringtoString()
-
-
-
Field Detail
-
EMPTY_CATEGORIES
public static final String[] EMPTY_CATEGORIES
-
properties
protected ActionPropertiesDescriptor properties
- Since:
- 5.6
-
localProperties
protected Map<String,Serializable> 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
protected Map<String,Serializable> propertiesCache
- Since:
- 5.6
-
available
protected boolean available
-
filtered
protected boolean filtered
- Since:
- 8.2
-
order
protected int order
Attribute that provides 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
protected String[] categories
-
filters
protected ActionFilter[] filters
-
-
Method Detail
-
isEnableSet
public boolean isEnableSet()
Returns 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
protected String getStringProperty(String prop)
-
getLink
public String 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".
-
getCategories
public String[] getCategories()
-
getCategoryList
public List<String> getCategoryList()
Returns the categories as a list.- Since:
- 7.2
-
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
public int compareTo(Action anotherAction)
- Specified by:
compareToin interfaceComparable<Action>
-
getFilterIds
public List<String> getFilterIds()
-
setFilterIds
public void setFilterIds(List<String> filterIds)
-
getFilters
public ActionFilter[] getFilters()
-
setFilters
public void setFilters(ActionFilter[] filters)
-
setCategories
public void setCategories(String[] categories)
-
getConfirm
public String 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
public void setConfirm(String confirm)
-
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
-
isImmediate
public boolean isImmediate()
-
setImmediate
public void setImmediate(boolean immediate)
-
getPropertiesDescriptor
public ActionPropertiesDescriptor getPropertiesDescriptor()
- Since:
- 5.6
-
setPropertiesDescriptor
public void setPropertiesDescriptor(ActionPropertiesDescriptor properties)
- Since:
- 5.6
-
setProperties
public void setProperties(Map<String,Serializable> localProperties)
Sets local properties programatically- Since:
- 5.6
-
getProperties
public Map<String,Serializable> getProperties()
Returns an aggregate oflocalPropertiesandpropertiesset via descriptors.- Since:
- 5.6
-
setAccessKey
public void setAccessKey(String accessKey)
- Since:
- 5.6
-
getAccessKey
public String getAccessKey()
- Since:
- 5.6
-
-