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
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
-
Field Summary
Fields inherited from class pl.edu.icm.unity.types.I18nDescribedObject
description, displayedName
-
Constructor Summary
ConstructorDescriptionCredentialDefinition
(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
Modifier and TypeMethodDescriptionclone()
boolean
getName()
int
hashCode()
boolean
void
setConfiguration
(String configuration) void
void
setReadOnly
(boolean readOnly) void
com.fasterxml.jackson.databind.node.ObjectNode
toJson()
toString()
Methods inherited from class pl.edu.icm.unity.types.I18nDescribedObject
getDescription, getDisplayedName, setDescription, setDisplayedName
-
Constructor Details
-
CredentialDefinition
public CredentialDefinition() -
CredentialDefinition
For tests: the displayed name is set to name (via default value) and description is set empty.- Parameters:
typeId
-name
-
-
CredentialDefinition
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
-
setTypeId
-
getConfiguration
-
setConfiguration
-
getName
- Specified by:
getName
in interfaceNamedObject
- Returns:
- human readable name of the object. Must be unique for the object class.
-
setName
-
isReadOnly
public boolean isReadOnly() -
setReadOnly
public void setReadOnly(boolean readOnly) -
toJson
public com.fasterxml.jackson.databind.node.ObjectNode toJson() -
toString
-
clone
-
hashCode
public int hashCode()- Overrides:
hashCode
in classI18nDescribedObject
-
equals
- Overrides:
equals
in classI18nDescribedObject
-