Interface LogixNG_Manager

All Superinterfaces:
Manager<LogixNG>, PropertyChangeProvider, SilenceablePropertyChangeProvider, VetoableChangeProvider
All Known Implementing Classes:
DefaultLogixNGManager

public interface LogixNG_Manager extends Manager<LogixNG>
Manager for LogixNG
  • Field Details

  • Method Details

    • createLogixNG

      Create a new LogixNG if the LogixNG does not exist.
      Parameters:
      systemName - the system name
      userName - the user name
      Returns:
      a new LogixNG or null if unable to create
      Throws:
      IllegalArgumentException - when needed
    • createLogixNG

      LogixNG createLogixNG(String systemName, String userName, boolean inline) throws IllegalArgumentException
      Create a new LogixNG if the LogixNG does not exist.
      Parameters:
      systemName - the system name
      userName - the user name
      inline - true if this LogixNG is an inline LogixNG
      Returns:
      a new LogixNG or null if unable to create
      Throws:
      IllegalArgumentException - when needed
    • createLogixNG

      For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.
      Parameters:
      userName - the user name
      Returns:
      a new LogixNG or null if unable to create
      Throws:
      IllegalArgumentException - when needed
    • createLogixNG

      LogixNG createLogixNG(String userName, boolean inline) throws IllegalArgumentException
      For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.
      Parameters:
      userName - the user name
      inline - true if this LogixNG is an inline LogixNG
      Returns:
      a new LogixNG or null if unable to create
      Throws:
      IllegalArgumentException - when needed
    • getLogixNG

      Locate via user name, then system name if needed. Does not create a new one if nothing found
      Parameters:
      name - User name or system name to match
      Returns:
      null if no match found
    • getByUserName

      Locate an existing instance based on a user name.
      Specified by:
      getByUserName in interface Manager<LogixNG>
      Parameters:
      name - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • getBySystemName

      Locate an existing instance based on a system name.
      Specified by:
      getBySystemName in interface Manager<LogixNG>
      Parameters:
      name - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • getAutoSystemName

      Create a new system name for a LogixNG.
      Returns:
      a new system name
    • setLoadDisabled

      void setLoadDisabled(boolean value)
      Should the LogixNGs be disabled when the configuration file is loaded?
      Parameters:
      value - true if they should be disabled, false otherwise.
    • startLogixNGsOnLoad

      void startLogixNGsOnLoad(boolean value)
      Should the LogixNGs be started when the configuration file is loaded?
      Parameters:
      value - true if they should be started, false otherwise.
    • isStartLogixNGsOnLoad

      Should the LogixNGs not be started when the configuration file is loaded?
      Returns:
      true if they should be started, false otherwise.
    • setupAllLogixNGs

      Setup all LogixNGs. This method is called after a configuration file is loaded.
    • activateAllLogixNGs

      Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.

      A LogixNG must be activated before it will calculate any of its ConditionalNGs.

    • activateAllLogixNGs

      void activateAllLogixNGs(boolean runDelayed, boolean runOnSeparateThread)
      Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.

      A LogixNG must be activated before it will calculate any of its ConditionalNGs.

      Parameters:
      runDelayed - true if execute() should run on LogixNG thread delayed, false otherwise.
      runOnSeparateThread - true if the activation should run on a separate thread, false otherwise
    • deActivateAllLogixNGs

      DeActivate all LogixNGs, stops LogixNG processing by disconnecting all inputs that are included the ConditionalNGs in this LogixNG.

      A LogixNG must be activated before it will calculate any of its ConditionalNGs.

    • isActive

      boolean isActive()
      Is LogixNGs active?
      Returns:
      true if LogixNGs are active, false otherwise
    • deleteLogixNG

      Delete LogixNG by removing it from the manager. The LogixNG must first be deactivated so it stops processing.
      Parameters:
      x - the LogixNG to delete
    • printTree

      default void printTree(PrintWriter writer, String indent, MutableInt lineNumber)
      Print the tree to a stream.
      Parameters:
      writer - the stream to print the tree to
      indent - the indentation of each level
      lineNumber - the line number
    • printTree

      void printTree(Base.PrintTreeSettings settings, PrintWriter writer, String indent, MutableInt lineNumber)
      Print the tree to a stream.
      Parameters:
      settings - settings for what to print
      writer - the stream to print the tree to
      indent - the indentation of each level
      lineNumber - the line number
    • printTree

      default void printTree(Locale locale, PrintWriter writer, String indent, MutableInt lineNumber)
      Print the tree to a stream.
      Parameters:
      locale - The locale to be used
      writer - the stream to print the tree to
      indent - the indentation of each level
      lineNumber - the line number
    • printTree

      void printTree(Base.PrintTreeSettings settings, Locale locale, PrintWriter writer, String indent, MutableInt lineNumber)
      Print the tree to a stream.
      Parameters:
      settings - settings for what to print
      locale - The locale to be used
      writer - the stream to print the tree to
      indent - the indentation of each level
      lineNumber - the line number
    • validSystemNameFormat

      static Manager.NameValidity validSystemNameFormat(String subSystemNamePrefix, String systemName)
      Test if parameter is a properly formatted system name.

      This method should only be used by the managers of the LogixNG system.

      Parameters:
      subSystemNamePrefix - the sub system prefix
      systemName - the system name
      Returns:
      enum indicating current validity, which might be just as a prefix
    • getClipboard

      Get the clipboard
      Returns:
      the clipboard
    • registerManager

      void registerManager(Manager<? extends MaleSocket> manager)
      Register a manager for later retrieval by getManager()
      Parameters:
      manager - the manager
    • getManager

      Manager<? extends MaleSocket> getManager(String className)
      Get manager by class name
      Parameters:
      className - the class name of the manager
      Returns:
      the manager
    • registerSetupTask

      Register a task to be run when setup LogixNGs
      Parameters:
      task - the task
    • executeModule

      void executeModule(Module module, Object parameter) throws IllegalArgumentException
      Executes a LogixNG Module. Note that the module must be a Digital Action Module.
      Parameters:
      module - The module to be executed
      parameter - The parameter. The module must have exactly one parameter.
      Throws:
      IllegalArgumentException - If module is null or if module is not a DigitalActionModule.
    • executeModule

      void executeModule(Module module, Map<String,Object> parameters) throws IllegalArgumentException
      Executes a LogixNG Module. Note that the module must be a Digital Action Module.
      Parameters:
      module - The module to be executed
      parameters - The parameters
      Throws:
      IllegalArgumentException - If module or parameters is null or if module is not a DigitalActionModule.
    • getErrorHandlingModuleSocket

      Get the female socket of the error handling module.
      Returns:
      the socket.
    • isErrorHandlingModuleEnabled

      Is the error handling module enabled? It's enabled if it exists and the root socket is connected.
      Returns:
      true if it's in use, false otherwise.