Class Action

    • Field Detail

      • EMPTY_CATEGORIES

        public static final String[] EMPTY_CATEGORIES
      • enabled

        protected Boolean enabled
      • label

        protected String label
      • confirm

        protected String confirm
      • immediate

        protected Boolean immediate
      • accessKey

        protected String accessKey
      • type

        protected String type
        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
      • 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
    • Constructor Detail

      • Action

        public Action()
      • Action

        public Action​(String id,
                      String[] categories)
    • 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)
      • 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()
      • 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
      • getFilterIds

        public List<String> getFilterIds()
      • setFilterIds

        public void setFilterIds​(List<String> filterIds)
      • 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
      • setProperties

        public void setProperties​(Map<String,​Serializable> localProperties)
        Sets local properties programatically
        Since:
        5.6
      • setAccessKey

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

        public String getAccessKey()
        Since:
        5.6
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object