Package pl.edu.icm.unity.types.basic
Class VerifiableElementBase
- java.lang.Object
-
- pl.edu.icm.unity.types.basic.VerifiableElementBase
-
- All Implemented Interfaces:
VerifiableElement
- Direct Known Subclasses:
VerifiableEmail
,VerifiableMobileNumber
public class VerifiableElementBase extends Object implements VerifiableElement
Base for all VerifiableElements. Contains value and relatedConfirmationInfo
- Author:
- P.Piernik
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfirmationInfo
confirmationInfo
protected String
value
-
Constructor Summary
Constructors Constructor Description VerifiableElementBase()
VerifiableElementBase(com.fasterxml.jackson.databind.JsonNode jsonN)
VerifiableElementBase(String value)
VerifiableElementBase(String value, ConfirmationInfo confirmationData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ConfirmationInfo
getConfirmationInfo()
String
getValue()
int
hashCode()
boolean
isConfirmed()
Shorter version of getConfirmationInfo().isConfirmed(), also checking if the CI is not null.void
setConfirmationInfo(ConfirmationInfo confirmationData)
com.fasterxml.jackson.databind.JsonNode
toJson()
String
toJsonString()
String
toString()
-
-
-
Field Detail
-
value
protected String value
-
confirmationInfo
protected ConfirmationInfo confirmationInfo
-
-
Constructor Detail
-
VerifiableElementBase
public VerifiableElementBase()
-
VerifiableElementBase
public VerifiableElementBase(String value)
-
VerifiableElementBase
public VerifiableElementBase(String value, ConfirmationInfo confirmationData)
-
VerifiableElementBase
public VerifiableElementBase(com.fasterxml.jackson.databind.JsonNode jsonN) throws InternalException
- Throws:
InternalException
-
-
Method Detail
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson()
-
toJsonString
public String toJsonString()
-
getConfirmationInfo
public ConfirmationInfo getConfirmationInfo()
- Specified by:
getConfirmationInfo
in interfaceVerifiableElement
-
setConfirmationInfo
public void setConfirmationInfo(ConfirmationInfo confirmationData)
- Specified by:
setConfirmationInfo
in interfaceVerifiableElement
-
getValue
public String getValue()
- Specified by:
getValue
in interfaceVerifiableElement
-
isConfirmed
public boolean isConfirmed()
Description copied from interface:VerifiableElement
Shorter version of getConfirmationInfo().isConfirmed(), also checking if the CI is not null.- Specified by:
isConfirmed
in interfaceVerifiableElement
- Returns:
- true if element is properly verified
-
-