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 String
accessKey
protected boolean
available
protected String[]
categories
protected String
confirm
static String[]
EMPTY_CATEGORIES
protected Boolean
enabled
protected boolean
filtered
protected List<String>
filterIds
protected ActionFilter[]
filters
protected String
help
protected String
icon
protected String
id
protected Boolean
immediate
protected String
label
protected String
link
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.protected int
order
Attribute that provides a hint for action ordering.protected ActionPropertiesDescriptor
properties
protected Map<String,Serializable>
propertiesCache
protected String
type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
clone()
int
compareTo(Action anotherAction)
boolean
equals(Object other)
String
getAccessKey()
boolean
getAvailable()
String[]
getCategories()
List<String>
getCategoryList()
Returns the categories as a list.String
getConfirm()
Returns the confirm javascript for this element.List<String>
getFilterIds()
ActionFilter[]
getFilters()
String
getHelp()
String
getIcon()
String
getId()
String
getLabel()
String
getLink()
Returns the link for this action.int
getOrder()
Returns the action order.Map<String,Serializable>
getProperties()
Returns an aggregate oflocalProperties
andproperties
set via descriptors.ActionPropertiesDescriptor
getPropertiesDescriptor()
protected String
getStringProperty(String prop)
String
getType()
int
hashCode()
boolean
isEnabled()
boolean
isEnableSet()
Returns true if the enabled element was set on the descriptor, useful for merging.boolean
isFiltered()
boolean
isImmediate()
void
setAccessKey(String accessKey)
void
setAvailable(boolean available)
void
setCategories(String[] categories)
void
setConfirm(String confirm)
void
setEnabled(boolean enabled)
void
setFiltered(boolean filtered)
void
setFilterIds(List<String> filterIds)
void
setFilters(ActionFilter[] filters)
void
setHelp(String title)
void
setIcon(String icon)
void
setImmediate(boolean immediate)
void
setLabel(String label)
void
setLink(String link)
void
setOrder(int order)
Sets the order of the action.void
setProperties(Map<String,Serializable> localProperties)
Sets local properties programaticallyvoid
setPropertiesDescriptor(ActionPropertiesDescriptor properties)
void
setType(String type)
String
toString()
-
-
-
Field Detail
-
EMPTY_CATEGORIES
public static final String[] EMPTY_CATEGORIES
-
id
protected String id
-
link
protected String link
-
enabled
protected Boolean enabled
-
label
protected String label
-
icon
protected String icon
-
confirm
protected String confirm
-
help
protected String help
-
immediate
protected Boolean immediate
-
accessKey
protected String accessKey
-
type
protected String type
- Since:
- 5.6
-
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)
-
getLabel
public String getLabel()
-
setLabel
public void setLabel(String label)
-
getIcon
public String getIcon()
-
setIcon
public void setIcon(String icon)
-
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".
-
setLink
public void setLink(String link)
-
getCategories
public String[] getCategories()
-
getId
public String getId()
-
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:
compareTo
in interfaceComparable<Action>
-
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
-
getHelp
public String getHelp()
-
setHelp
public void setHelp(String title)
-
isImmediate
public boolean isImmediate()
-
setImmediate
public void setImmediate(boolean immediate)
-
getType
public String getType()
- Since:
- 5.6
-
setType
public void setType(String type)
- Since:
- 5.6
-
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 oflocalProperties
andproperties
set via descriptors.- Since:
- 5.6
-
setAccessKey
public void setAccessKey(String accessKey)
- Since:
- 5.6
-
getAccessKey
public String getAccessKey()
- Since:
- 5.6
-
-