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 thisCredentialsComponent
protected java.util.List<javax.swing.JComponent>
components
Contains the list of instances ofJComponent
subclasses that make up theMultiCredentialsComponent
(e.g.protected javax.swing.JPanel
panel
The panel typically populated and returned byCredentialsComponent.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 seeCredentialsComponent.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
-
panel
protected javax.swing.JPanel panelThe panel typically populated and returned byCredentialsComponent.getCompoundComponent()
method -
components
protected java.util.List<javax.swing.JComponent> componentsContains the list of instances ofJComponent
subclasses that make up theMultiCredentialsComponent
(e.g. labels/textFields/comboBoxes etc) -
aliases
protected java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>> aliasesThe older name(s) for thisCredentialsComponent
-
-
Constructor Details
-
MultiCredentialsComponent
public MultiCredentialsComponent()
-
-
Method Details
-
getCompoundComponent
public java.awt.Container getCompoundComponent()Description copied from interface:CredentialsComponent
Returns the component itself. Compound here means that a typicalCredentialsComponent
will contain one or more elements like aJTextField
or aJComboBox
and optionally aJLabel
or anything else- Specified by:
getCompoundComponent
in interfaceCredentialsComponent
-
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 interfaceCredentialsComponent
-
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 seeCredentialsComponent.getAliases()
for details.- Parameters:
legacyName
- an older credentials element's nameactualName
- an actual credentials element's name
-