Package io.mosip.mimoto.util
Class Utilities
- java.lang.Object
-
- io.mosip.mimoto.util.Utilities
-
@Component public class Utilities extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_SEPARATORThe Constant FILE_SEPARATOR.com.fasterxml.jackson.databind.ObjectMapperobjectMapper
-
Constructor Summary
Constructors Constructor Description Utilities()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodegetDecryptedVC(String requestId)com.fasterxml.jackson.databind.JsonNodegetEvent(String requestId, String individualId)StringgetIdentityMappingJson(String configServerFileStorageURL, String uri)StringgetJson(String configServerFileStorageURL, String uri)Gets the json.StringgetMappingJsonValue(String key)StringgetPrintTextFileJson(String configServerFileStorageURL, String uri)org.json.simple.JSONObjectgetRegistrationProcessorMappingJson()Gets registration processor mapping json from config and maps to RegistrationProcessorIdentity java class.org.json.simple.JSONObjectgetTemplate()com.fasterxml.jackson.databind.JsonNodegetVC(String requestId)voidremoveCacheData(String requestId)org.json.simple.JSONObjectretrieveIdrepoJson(String uin)retrieving identity json ffrom id repo by UIN.org.json.simple.JSONObjectretrieveUIN(String regId)retrieve UIN from IDRepo by registration id.
-
-
-
Field Detail
-
objectMapper
public com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
FILE_SEPARATOR
public static final String FILE_SEPARATOR
The Constant FILE_SEPARATOR.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTemplate
public org.json.simple.JSONObject getTemplate() throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
getEvent
public com.fasterxml.jackson.databind.JsonNode getEvent(String requestId, String individualId) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
getVC
public com.fasterxml.jackson.databind.JsonNode getVC(String requestId) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
getDecryptedVC
public com.fasterxml.jackson.databind.JsonNode getDecryptedVC(String requestId) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
removeCacheData
public void removeCacheData(String requestId) throws IOException
- Throws:
IOException
-
getJson
public String getJson(String configServerFileStorageURL, String uri)
Gets the json.- Parameters:
configServerFileStorageURL- the config server file storage URLuri- the uri- Returns:
- the json
-
getPrintTextFileJson
public String getPrintTextFileJson(String configServerFileStorageURL, String uri)
-
getIdentityMappingJson
public String getIdentityMappingJson(String configServerFileStorageURL, String uri)
-
retrieveIdrepoJson
public org.json.simple.JSONObject retrieveIdrepoJson(String uin) throws ApisResourceAccessException, IdRepoAppException, IOException
retrieving identity json ffrom id repo by UIN.- Parameters:
uin- the uin- Returns:
- the JSON object
- Throws:
ApisResourceAccessException- the apis resource access exceptionIdRepoAppException- the id repo app exceptionIOException- Signals that an I/O exception has occurred.
-
getRegistrationProcessorMappingJson
public org.json.simple.JSONObject getRegistrationProcessorMappingJson() throws IOExceptionGets registration processor mapping json from config and maps to RegistrationProcessorIdentity java class.- Returns:
- the registration processor identity json
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getMappingJsonValue
public String getMappingJsonValue(String key) throws IOException
- Throws:
IOException
-
retrieveUIN
public org.json.simple.JSONObject retrieveUIN(String regId) throws ApisResourceAccessException, IdRepoAppException, IOException
retrieve UIN from IDRepo by registration id.- Parameters:
regId- the reg id- Returns:
- the JSON object
- Throws:
ApisResourceAccessException- the apis resource access exceptionIdRepoAppException- the id repo app exceptionIOException- Signals that an I/O exception has occurred.
-
-