Package jmri

Interface SignalGroupManager

    • Method Detail

      • getSignalGroup

        @CheckForNull
        SignalGroup getSignalGroup​(@Nonnull
                                   java.lang.String name)
        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
      • newSignalGroupWithUserName

        @Nonnull
        SignalGroup newSignalGroupWithUserName​(@Nonnull
                                               java.lang.String userName)
                                        throws java.lang.IllegalArgumentException
        Create a new Signal group if the group does not exist.

        Intended for use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.

        Parameters:
        userName - User name for the new group
        Returns:
        a Signal Group with the same userName if already exists
        Throws:
        java.lang.IllegalArgumentException - if there is trouble creating a new Group
      • provideSignalGroup

        @Nonnull
        SignalGroup provideSignalGroup​(@Nonnull
                                       java.lang.String systemName,
                                       java.lang.String userName)
                                throws java.lang.IllegalArgumentException
        Create a new SignalGroup if the group does not exist.
        Parameters:
        systemName - the system name for the group
        userName - the user name for the group
        Returns:
        a Signal Group with the same systemName or userName if already exists or
        Throws:
        java.lang.IllegalArgumentException - if there is trouble creating a new Group.
      • deleteSignalGroup

        void deleteSignalGroup​(@Nonnull
                               SignalGroup s)
        Delete Group by removing it from the manager. The Group must first be deactivated so it stops processing.
        Parameters:
        s - the group to remove