Class ExtCommand

java.lang.Object
PamController.command.ExtCommand
Direct Known Subclasses:
BatchCommand, BatchStatusCommand, ExitCommand, ExitNoSaveCommand, FindGUICommand, GetXMLSettings, HelpCommand, KillCommand, NotifyCommand, PingCommand, SetSerializedSettingsCommand, SetXMLSettings, StartCommand, StatusCommand, StopCommand, SummaryCommand, TellModuleCommand

public abstract class ExtCommand extends Object
  • Constructor Details Link icon

    • ExtCommand Link icon

      public ExtCommand(String name, boolean immediate)
      Parameters:
      name - Name of command (must be a single word)
      immediate - immediate execution. If false, then the command will be queued in the AWT thread for later execution (SwingUtilitiies.invokeLater(...)
  • Method Details Link icon

    • canExecute Link icon

      public boolean canExecute()
      Returns:
      true if the command can be executed (may depend on PAMGuard status)
    • executeCommand Link icon

      public final String executeCommand(String commandString)
      Execute the command.

      Note that if immediate is set false, then the command will be executed later in the AWT thread and this function will return true.

      Returns:
      true if the command executed OK, or if it was sent off to execute in a later thread.
    • execute Link icon

      public abstract String execute(String command)
      Execute the command
      Parameters:
      commandWords -
      Returns:
      true if command executed correctly.
    • getName Link icon

      public String getName()
      Returns:
      the name of the command
    • setName Link icon

      public void setName(String name)
      Parameters:
      name - the name to set
    • isImmediate Link icon

      public boolean isImmediate()
      Returns:
      true if execution is immediate (i.e. not later in the swing thread).
    • setImmediate Link icon

      public void setImmediate(boolean immediate)
      Parameters:
      immediate - : true if execution should be immediate (i.e. not later in the swing thread).
    • getHint Link icon

      public String getHint()
      Get a hint text for the help command.
      Returns:
      hint text.
    • findControlledUnits Link icon

      public ArrayList<PamControlledUnit> findControlledUnits(String unitType, String unitName)
      Find a set of controlled units, allowing for wild cards or nulls.
      Parameters:
      unitType - unit type, can be null or * for wildcards
      unitName - unit name, can be null or * for wildcards
      Returns: