Class ExtCommand

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

public abstract class ExtCommand extends Object
  • Constructor Details

    • ExtCommand

      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

    • canExecute

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

      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

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

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

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

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

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

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

      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: