Package io.jans.notify.service
Class ApplicationService
- java.lang.Object
-
- io.jans.notify.service.ApplicationService
-
@ApplicationScoped @Named public class ApplicationService extends Object
- Version:
- September 15, 2017
- Author:
- Yuriy Movchan
-
-
Constructor Summary
Constructors Constructor Description ApplicationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asJson(Object p_object)
String
asJsonSilently(Object obj)
String
asPrettyJson(Object p_object)
void
create()
com.fasterxml.jackson.databind.ObjectMapper
createJsonMapper()
ClientConfiguration
getAccessClient(String accessKeyId, String secretAccessKey)
ClientData
getClientDataByPlatformId(String platformId)
void
init()
<T> T
jsonToObject(String json, Class<T> clazz)
-
-
-
Method Detail
-
create
@PostConstruct public void create()
-
init
public void init()
-
getAccessClient
public ClientConfiguration getAccessClient(String accessKeyId, String secretAccessKey)
-
getClientDataByPlatformId
public ClientData getClientDataByPlatformId(String platformId)
-
asPrettyJson
public String asPrettyJson(Object p_object) throws IOException
- Throws:
IOException
-
asJson
public String asJson(Object p_object) throws IOException
- Throws:
IOException
-
jsonToObject
public <T> T jsonToObject(String json, Class<T> clazz) throws com.fasterxml.jackson.databind.JsonMappingException, IOException
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
IOException
-
createJsonMapper
public com.fasterxml.jackson.databind.ObjectMapper createJsonMapper()
-
-