Class MultiCredentialsComponent

java.lang.Object
velox.api.layer0.credentialscomponents.MultiCredentialsComponent
All Implemented Interfaces:
CredentialsComponent
Direct Known Subclasses:
BaseCredentialsComponent

public abstract class MultiCredentialsComponent
extends java.lang.Object
implements CredentialsComponent
An abstract implementation of CredentialsComponent. It serves as a basis for a multi-value component (e.g. dependent fields)
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,​java.lang.String>> aliases
    The older name(s) for this CredentialsComponent
    protected java.util.List<javax.swing.JComponent> components
    Contains the list of instances of JComponent subclasses that make up the MultiCredentialsComponent (e.g.
    protected javax.swing.JPanel panel
    The panel typically populated and returned by CredentialsComponent.getCompoundComponent() method
  • Constructor Summary

    Constructors 
    Constructor Description
    MultiCredentialsComponent()  
  • Method Summary

    Modifier and Type Method Description
    void addAlias​(java.lang.String legacyName, java.lang.String actualName)
    Adds pair(s) of legacy name and actual name for this credentials element see CredentialsComponent.getAliases() for details.
    java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,​java.lang.String>> getAliases()
    Provide pair(s) of legacy name and current name for this credentials element if there are any.
    java.awt.Container getCompoundComponent()
    Returns the component itself.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface velox.api.layer0.credentialscomponents.CredentialsComponent

    addSettingsChangedListener, getValues, setValues
  • Field Details

  • Constructor Details

  • Method Details

    • getCompoundComponent

      public java.awt.Container getCompoundComponent()
      Description copied from interface: CredentialsComponent
      Returns the component itself. Compound here means that a typical CredentialsComponent will contain one or more elements like a JTextField or a JComboBox and optionally a JLabel or anything else
      Specified by:
      getCompoundComponent in interface CredentialsComponent
    • getAliases

      public java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,​java.lang.String>> getAliases()
      Description copied from interface: CredentialsComponent

      Provide pair(s) of legacy name and current name for this credentials element if there are any. Used for compatibility with an older credentials element names. If "current name" (second element in a pair) does not have a corresponding value stored in the settings yet, value will be taken from "legacy name". There might be multiple pairs mapping to the same "current name", in which case only the first matched one will have effect.

      If an adapter is switched to extended credentials for the first time common old names for login, password and demo check box are found in CredentialsComponentUtil

      Specified by:
      getAliases in interface CredentialsComponent
    • addAlias

      public void addAlias​(java.lang.String legacyName, java.lang.String actualName)
      Adds pair(s) of legacy name and actual name for this credentials element see CredentialsComponent.getAliases() for details.
      Parameters:
      legacyName - an older credentials element's name
      actualName - an actual credentials element's name