Package pl.edu.icm.unity.types.authn
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 ofCredentialType
.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
-
-
Field Summary
-
Fields inherited from class pl.edu.icm.unity.types.I18nDescribedObject
description, displayedName
-
-
Constructor Summary
Constructors Constructor Description CredentialDefinition()
CredentialDefinition(com.fasterxml.jackson.databind.node.ObjectNode root)
CredentialDefinition(String typeId, String name)
For tests: the displayed name is set to name (via default value) and description is set empty.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).CredentialDefinition(String typeId, String name, I18nString displayedName, I18nString description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialDefinition
clone()
boolean
equals(Object obj)
String
getConfiguration()
String
getName()
String
getTypeId()
int
hashCode()
boolean
isReadOnly()
void
setConfiguration(String configuration)
void
setName(String name)
void
setReadOnly(boolean readOnly)
void
setTypeId(String typeId)
com.fasterxml.jackson.databind.node.ObjectNode
toJson()
String
toString()
-
Methods inherited from class pl.edu.icm.unity.types.I18nDescribedObject
getDescription, getDisplayedName, setDescription, setDisplayedName
-
-
-
-
Constructor Detail
-
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 Detail
-
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 interfaceNamedObject
- 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()
-
clone
public CredentialDefinition clone()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classI18nDescribedObject
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classI18nDescribedObject
-
-