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:
  • Field Details

    • EMPTY_CATEGORIES

      public static final String[] EMPTY_CATEGORIES
    • id

      protected String id
    • 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
    • filterIds

      protected List<String> filterIds
    • filters

      protected ActionFilter[] filters
  • Constructor Details

    • Action

      public Action()
    • Action

      public Action(String id, String[] categories)
  • Method Details

    • 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)
    • 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()
    • getCategoryList

      public List<String> getCategoryList()
      Returns the categories as a list.
      Since:
      7.2
    • getId

      public String getId()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 interface Comparable<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
    • 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 of localProperties and properties set via descriptors.
      Since:
      5.6
    • setAccessKey

      public void setAccessKey(String accessKey)
      Since:
      5.6
    • getAccessKey

      public String getAccessKey()
      Since:
      5.6
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Action clone()
      Overrides:
      clone in class Object