public class Action extends Object implements Serializable, Cloneable, Comparable<Action>
Modifier and Type | Field and 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 |
Constructor and Description |
---|
Action() |
Action(String id,
String[] categories) |
Modifier and Type | Method and 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 of
localProperties and properties 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 programatically
|
void |
setPropertiesDescriptor(ActionPropertiesDescriptor properties) |
void |
setType(String type) |
String |
toString() |
public static final String[] EMPTY_CATEGORIES
protected ActionPropertiesDescriptor properties
protected Map<String,Serializable> localProperties
protected Map<String,Serializable> propertiesCache
protected boolean available
protected boolean filtered
protected int order
: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.
protected String[] categories
protected ActionFilter[] filters
public boolean isEnableSet()
public boolean isEnabled()
public void setEnabled(boolean enabled)
protected String getStringProperty(String prop)
public String getLink()
Since 5.7.3, fallbacks on properties when link is not set and retrieve it using key "link".
public String[] getCategories()
public List<String> getCategoryList()
public int getOrder()
public void setOrder(int order)
order
- order of the actionpublic int compareTo(Action anotherAction)
compareTo
in interface Comparable<Action>
public List<String> getFilterIds()
public void setFilterIds(List<String> filterIds)
public ActionFilter[] getFilters()
public void setFilters(ActionFilter[] filters)
public void setCategories(String[] categories)
public String getConfirm()
Since 5.7.3, fallbacks on properties when link is not set and retrieve it using key "confirm".
public void setConfirm(String confirm)
public boolean getAvailable()
public void setAvailable(boolean available)
public boolean isFiltered()
public void setFiltered(boolean filtered)
public boolean isImmediate()
public void setImmediate(boolean immediate)
public ActionPropertiesDescriptor getPropertiesDescriptor()
public void setPropertiesDescriptor(ActionPropertiesDescriptor properties)
public void setProperties(Map<String,Serializable> localProperties)
public Map<String,Serializable> getProperties()
localProperties
and properties
set via descriptors.public void setAccessKey(String accessKey)
public String getAccessKey()
Copyright © 2018 Nuxeo. All rights reserved.