Package com.authlete.common.assurance
Class Document
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- com.authlete.common.assurance.Document
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class Document extends LinkedHashMap<String,Object>
The class that representsid_document/document
.- Since:
- 2.63
- See Also:
- OpenID Connect for Identity Assurance 1.0, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description Document()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsDateOfExpiry()
Check if this object contains"date_of_expiry"
.boolean
containsDateOfIssuance()
Check if this object contains"date_of_issuance"
.boolean
containsIssuer()
Check if this object contains"issuer"
.boolean
containsNumber()
Check if this object contains"number"
.boolean
containsType()
Check if this object contains"type"
.static Document
extract(Map<?,?> map, String key)
Create aDocument
instance from an object in the given map.String
getDateOfExpiry()
Get the date of expiry of the document.String
getDateOfIssuance()
Get the date of issuance of the document.Issuer
getIssuer()
Get the issuer of the document.String
getNumber()
Get the number of the document.String
getType()
Get the type of the document.String
removeDateOfExpiry()
Remove"date_of_expiry"
from this object.String
removeDateOfIssuance()
Remove"date_of_issuance"
from this object.Issuer
removeIssuer()
Remove"issuer"
from this object.String
removeNumber()
Remove"number"
from this object.String
removeType()
Remove"type"
from this object.Document
setDateOfExpiry(String date)
Set the date of expiry of the document.Document
setDateOfIssuance(String date)
Set the date of issuance of the document.Document
setIssuer(Issuer issuer)
Set the issuer of the document.Document
setNumber(String number)
Set the number of the document.Document
setType(String type)
Set the type of the document.-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
getType
public String getType()
Get the type of the document.- Returns:
- The type of the document.
- See Also:
- OpenID Connect for Identity Assurance 1.0, 11.2. Identity Documents
-
setType
public Document setType(String type)
Set the type of the document.- Parameters:
type
- The type of the document.- Returns:
this
object.- See Also:
- OpenID Connect for Identity Assurance 1.0, 11.2. Identity Documents
-
containsType
public boolean containsType()
Check if this object contains"type"
.- Returns:
true
if this object contains"type"
.
-
removeType
public String removeType()
Remove"type"
from this object.- Returns:
- The old value that may have existed before removal.
-
getNumber
public String getNumber()
Get the number of the document.- Returns:
- The number of the document.
-
setNumber
public Document setNumber(String number)
Set the number of the document.- Parameters:
number
- The number of the document.- Returns:
this
object.
-
containsNumber
public boolean containsNumber()
Check if this object contains"number"
.- Returns:
true
if this object contains"number"
.
-
removeNumber
public String removeNumber()
Remove"number"
from this object.- Returns:
- The old value that may have existed before removal.
-
getIssuer
public Issuer getIssuer()
Get the issuer of the document.- Returns:
- The issuer of the document.
-
setIssuer
public Document setIssuer(Issuer issuer)
Set the issuer of the document.- Parameters:
issuer
- The issuer of the document.- Returns:
this
object.
-
containsIssuer
public boolean containsIssuer()
Check if this object contains"issuer"
.- Returns:
true
if this object contains"issuer"
.
-
removeIssuer
public Issuer removeIssuer()
Remove"issuer"
from this object.- Returns:
- The old value that may have existed before removal.
-
getDateOfIssuance
public String getDateOfIssuance()
Get the date of issuance of the document.- Returns:
- The date of issuance of the document.
-
setDateOfIssuance
public Document setDateOfIssuance(String date)
Set the date of issuance of the document.- Parameters:
date
- The date of issuance of the document.- Returns:
this
object.
-
containsDateOfIssuance
public boolean containsDateOfIssuance()
Check if this object contains"date_of_issuance"
.- Returns:
true
if this object contains"date_of_issuance"
.
-
removeDateOfIssuance
public String removeDateOfIssuance()
Remove"date_of_issuance"
from this object.- Returns:
- The old value that may have existed before removal.
-
getDateOfExpiry
public String getDateOfExpiry()
Get the date of expiry of the document.- Returns:
- The date of expiry of the document.
-
setDateOfExpiry
public Document setDateOfExpiry(String date)
Set the date of expiry of the document.- Parameters:
date
- The date of expiry of the document.- Returns:
this
object.
-
containsDateOfExpiry
public boolean containsDateOfExpiry()
Check if this object contains"date_of_expiry"
.- Returns:
true
if this object contains"date_of_expiry"
.
-
removeDateOfExpiry
public String removeDateOfExpiry()
Remove"date_of_expiry"
from this object.- Returns:
- The old value that may have existed before removal.
-
extract
public static Document extract(Map<?,?> map, String key) throws IdentityAssuranceException
Create aDocument
instance from an object in the given map.- Parameters:
map
- A map that may contain"document"
.key
- The key that identifies the object in the map. In normal cases, the key is"document"
.- Returns:
- A
Document
instance that represents"document"
. If the map does not contain the given key, null is returned. - Throws:
IdentityAssuranceException
- The structure of the map does not conform to the specification (OpenID Connect for Identity Assurance 1.0).
-
-