Class ActionModelImpl

java.lang.Object
ch.tocco.nice2.netui.impl.actions.ActionModelImpl
All Implemented Interfaces:
ActionModel, Serializable
Direct Known Subclasses:
ActionGroupModelImpl, SeparatorModelImpl

public class ActionModelImpl extends Object implements Serializable, ActionModel
See Also:
  • Constructor Details

    • ActionModelImpl

      public ActionModelImpl(String id, String name)
    • ActionModelImpl

      public ActionModelImpl(ActionModelImpl a)
      Copy constructor.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ActionModel
      Used for the text-resource key for the label.
      Specified by:
      getName in interface ActionModel
      Returns:
      The label key.
    • setName

      public void setName(String name)
      Specified by:
      setName in interface ActionModel
    • getShortDescription

      public String getShortDescription()
      Specified by:
      getShortDescription in interface ActionModel
    • setShortDescription

      public void setShortDescription(@Nullable @Nullable String descr)
      Specified by:
      setShortDescription in interface ActionModel
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface ActionModel
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface ActionModel
    • isToggle

      public boolean isToggle()
      Specified by:
      isToggle in interface ActionModel
    • setToggle

      public void setToggle(boolean toggle)
      Specified by:
      setToggle in interface ActionModel
    • getIcon

      public String getIcon()
      Specified by:
      getIcon in interface ActionModel
    • setIcon

      public void setIcon(String icon)
      Specified by:
      setIcon in interface ActionModel
    • isGroup

      public boolean isGroup()
    • getId

      public String getId()
      Description copied from interface: ActionModel
      A *non-unique* id of the action. This id is used to map the serverside action representation (button) to the clientside action (perform method).

      For example the export actions (about 5 buttons) share the same action id, and have different properties. They are all handled by the same clientside action (perform).

      In xml this attribute is called 'path' for historical reasons.

      The id is also used for the netuiactions security.

      The id may also used for the jabsorb action in the BackportAction.js (legacy code).

      Specified by:
      getId in interface ActionModel
    • setPosition

      public void setPosition(@Nullable @Nullable Integer pos)
      Specified by:
      setPosition in interface ActionModel
    • getPosition

      @Nullable public @Nullable Integer getPosition()
      Specified by:
      getPosition in interface ActionModel
    • setRelativePosition

      public void setRelativePosition(@Nullable @Nullable String relativePosition, String propertyName)
      Description copied from interface: ActionModel
      Set the relative position of this action model, it will be placed before or after another action model with the given property-value for this property.
      Specified by:
      setRelativePosition in interface ActionModel
      Parameters:
      relativePosition - a string in the form "[BEFORE|AFTER]:[property-value]"
      propertyName - the property name, can be any of the java beans property of the action model or one of the properties in the property map
    • getRelativePosition

      @Nullable public @Nullable String getRelativePosition()
      Specified by:
      getRelativePosition in interface ActionModel
    • getRelativePositionProperty

      public String getRelativePositionProperty()
      Specified by:
      getRelativePositionProperty in interface ActionModel
    • deepCopy

      public ActionModelImpl deepCopy()
      Specified by:
      deepCopy in interface ActionModel
    • setProperty

      public void setProperty(String key, Object value)
      Specified by:
      setProperty in interface ActionModel
    • getProperty

      public Object getProperty(String key)
      Specified by:
      getProperty in interface ActionModel
    • getProperties

      public Map<String,Object> getProperties()
    • setProperties

      public void setProperties(Map<String,Object> properties)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object