Module platform

Class CommandItem

All Implemented Interfaces:
Manageable, PersistenceCapable, Shareable, RegistryContext, Command, UIItem, UserFields, XObject, Described, EventListener, Map, Serializable, Runnable, EventListener
Direct Known Subclasses:
XLMacro

public class CommandItem extends Executable implements Command, UIItem, EventListener, Runnable
See Also:
  • Field Details

  • Constructor Details

    • CommandItem

      public CommandItem(String key)
    • CommandItem

      public CommandItem(String key, Command command)
    • CommandItem

      public CommandItem(String key, Runnable listener)
  • Method Details

    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class Item
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class Item
      Returns:
      new instance of class of this node
    • getUINodeType

      public int getUINodeType()
      Specified by:
      getUINodeType in interface UIItem
    • getCommandName

      public String getCommandName()
      Description copied from interface: Command
      Returns a name which can be used in the graphical user interface to represent this command.
      Specified by:
      getCommandName in interface Command
      Returns:
      this commands's name
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • run

      public void run(Object info, Context ctx)
      Description copied from interface: Command
      Performs the actions of this command. This method is invoked by the JobManager after the command has been submitted to the job manager by one of execute, runAt, or runLater-methods. The arguments info and context are the arguments which have been provided as arguments to the JobManager-methods.
      Specified by:
      run in interface Command
      Parameters:
      info - an argument
      ctx - a context
    • invoke

      public Object invoke(Context ctx, String method, Object arg)
      Specified by:
      invoke in interface UIItem
    • run

      public void run(RegistryContext ctx, StringMap args)
      Specified by:
      run in class Executable
    • isAvailable

      public boolean isAvailable(Context ctx)
      Specified by:
      isAvailable in interface UIItem
    • isEnabled

      public boolean isEnabled(Context ctx)
      Specified by:
      isEnabled in interface UIItem
    • eventOccured

      public void eventOccured(EventObject e)
      Description copied from interface: EventListener
      This method is invoked on registered event listeners when event has occured. This general listener interface does not restrict the possible kinds of events. Concrete sources of events should specify which events they may fire.
      Specified by:
      eventOccured in interface EventListener
      Parameters:
      e - an event
    • readAttribute

      protected boolean readAttribute(String uri, String name, String value) throws SAXException
      Overrides:
      readAttribute in class Item
      Throws:
      SAXException