Class CredentialDefinition

java.lang.Object
pl.edu.icm.unity.types.I18nDescribedObject
pl.edu.icm.unity.types.authn.CredentialDefinition
All Implemented Interfaces:
NamedObject

public class CredentialDefinition extends I18nDescribedObject implements NamedObject
Configured instance of CredentialType.

Note: configuration is stored as a plain String. This is not JsonObject as while credentials typically use JSON for configuration, verificators use often properties format, and local verificator configuration is the same as its local credential's one. Therefore to have uniform handling we use universal string also here.

Author:
K. Benedyczak
  • Constructor Details

    • CredentialDefinition

      public CredentialDefinition()
    • CredentialDefinition

      public CredentialDefinition(String typeId, String name)
      For tests: the displayed name is set to name (via default value) and description is set empty.
      Parameters:
      typeId -
      name -
    • CredentialDefinition

      public CredentialDefinition(String typeId, String name, I18nString description, MessageSource msg)
      Creates a standard CredentialDefinition with displayed name loaded from message bundle (using the typeId as key).
      Parameters:
      typeId -
      name -
      msg -
    • CredentialDefinition

      public CredentialDefinition(String typeId, String name, I18nString displayedName, I18nString description)
    • CredentialDefinition

      public CredentialDefinition(com.fasterxml.jackson.databind.node.ObjectNode root)
  • Method Details

    • getTypeId

      public String getTypeId()
    • setTypeId

      public void setTypeId(String typeId)
    • getConfiguration

      public String getConfiguration()
    • setConfiguration

      public void setConfiguration(String configuration)
    • getName

      public String getName()
      Specified by:
      getName in interface NamedObject
      Returns:
      human readable name of the object. Must be unique for the object class.
    • setName

      public void setName(String name)
    • isReadOnly

      public boolean isReadOnly()
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • toJson

      public com.fasterxml.jackson.databind.node.ObjectNode toJson()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public CredentialDefinition clone()
      Overrides:
      clone in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class I18nDescribedObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class I18nDescribedObject