Class IdentityProviderListModel

java.lang.Object
javax.swing.AbstractListModel<ProjectIdentityProvider>
com.inductiveautomation.ignition.designer.gui.idp.IdentityProviderListModel
All Implemented Interfaces:
Serializable, ListModel<ProjectIdentityProvider>

@NullMarked public class IdentityProviderListModel extends AbstractListModel<ProjectIdentityProvider>
An ordered list of a project's Identity Providers. Order is significant: it is the order the authentication-list UI offers them in.
See Also:
  • Constructor Details

    • IdentityProviderListModel

      public IdentityProviderListModel()
  • Method Details

    • getSize

      public int getSize()
    • getElementAt

      public ProjectIdentityProvider getElementAt(int index)
    • getIdps

      public List<ProjectIdentityProvider> getIdps()
    • setIdps

      public void setIdps(@Nullable List<@Nullable ProjectIdentityProvider> newIdps)
      Replaces the entire list, preserving the supplied order and dropping entries this list can't represent, on the same terms add(String) enforces: one with no name of its own — including a null entry, which the XMLSerializer's no-arg constructor path can produce — and one whose name repeats an earlier entry's without regard to case.
    • add

      public int add(@Nullable String name)
      Appends an IdP by name, unless it is blank or already present.
      Returns:
      the index of the newly added IdP, or -1 if nothing was added
    • removeAt

      public void removeAt(int index)
    • move

      public int move(int index, int offset)
      Moves the entry at index by offset positions.
      Returns:
      the entry's new index, unchanged if the move would carry it off either end
    • contains

      public boolean contains(@Nullable String name)
      Returns:
      whether an IdP with this name is already present, without regard to case
    • isEmpty

      public boolean isEmpty()
    • addChangeListener

      public void addChangeListener(Runnable onChange)
      Registers a callback fired on any change to the list's contents.