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 booleancontainsDateOfExpiry()Check if this object contains"date_of_expiry".booleancontainsDateOfIssuance()Check if this object contains"date_of_issuance".booleancontainsIssuer()Check if this object contains"issuer".booleancontainsNumber()Check if this object contains"number".booleancontainsType()Check if this object contains"type".static Documentextract(Map<?,?> map, String key)Create aDocumentinstance from an object in the given map.StringgetDateOfExpiry()Get the date of expiry of the document.StringgetDateOfIssuance()Get the date of issuance of the document.IssuergetIssuer()Get the issuer of the document.StringgetNumber()Get the number of the document.StringgetType()Get the type of the document.StringremoveDateOfExpiry()Remove"date_of_expiry"from this object.StringremoveDateOfIssuance()Remove"date_of_issuance"from this object.IssuerremoveIssuer()Remove"issuer"from this object.StringremoveNumber()Remove"number"from this object.StringremoveType()Remove"type"from this object.DocumentsetDateOfExpiry(String date)Set the date of expiry of the document.DocumentsetDateOfIssuance(String date)Set the date of issuance of the document.DocumentsetIssuer(Issuer issuer)Set the issuer of the document.DocumentsetNumber(String number)Set the number of the document.DocumentsetType(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:
thisobject.- See Also:
- OpenID Connect for Identity Assurance 1.0, 11.2. Identity Documents
-
containsType
public boolean containsType()
Check if this object contains"type".- Returns:
trueif 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:
thisobject.
-
containsNumber
public boolean containsNumber()
Check if this object contains"number".- Returns:
trueif 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:
thisobject.
-
containsIssuer
public boolean containsIssuer()
Check if this object contains"issuer".- Returns:
trueif 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:
thisobject.
-
containsDateOfIssuance
public boolean containsDateOfIssuance()
Check if this object contains"date_of_issuance".- Returns:
trueif 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:
thisobject.
-
containsDateOfExpiry
public boolean containsDateOfExpiry()
Check if this object contains"date_of_expiry".- Returns:
trueif 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 aDocumentinstance 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
Documentinstance 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).
-
-