Package software.nectar.java.factory
Class NotificationsFactory
java.lang.Object
software.nectar.java.factory.base.BaseFactory<Notification>
software.nectar.java.factory.NotificationsFactory
public class NotificationsFactory extends BaseFactory<Notification>
-
Nested Class Summary
Nested classes/interfaces inherited from class software.nectar.java.factory.base.BaseFactory
BaseFactory.Http -
Field Summary
Fields inherited from class software.nectar.java.factory.base.BaseFactory
BASE_PATH, JSON_CONTENT_TYPE, key, secret -
Constructor Summary
Constructors Constructor Description NotificationsFactory(java.lang.String key, java.lang.String secret) -
Method Summary
Modifier and Type Method Description NotificationextractFrom(org.json.JSONObject responseObj)java.util.List<Notification>extractMultipleFrom(org.json.JSONObject responseObj)java.util.List<Notification>getNotifications()voidsetNotificationReadStatus(java.lang.String notificationRef, boolean status, long timestamp)Methods inherited from class software.nectar.java.factory.base.BaseFactory
createPayload, delete, generateHMACAuth, generateNonce, get, getKey, gets, getSecret, initiateMultipleResponseRequest, initiateRequest, md5, post, put, setKey, setSecret
-
Constructor Details
-
NotificationsFactory
public NotificationsFactory(java.lang.String key, java.lang.String secret)
-
-
Method Details
-
getNotifications
public java.util.List<Notification> getNotifications() throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
setNotificationReadStatus
public void setNotificationReadStatus(java.lang.String notificationRef, boolean status, long timestamp) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
extractMultipleFrom
public java.util.List<Notification> extractMultipleFrom(org.json.JSONObject responseObj) throws ApiResponseException- Specified by:
extractMultipleFromin classBaseFactory<Notification>- Throws:
ApiResponseException
-
extractFrom
- Specified by:
extractFromin classBaseFactory<Notification>- Throws:
ApiResponseException
-