Package com.labs64.netlicensing.service
Class NotificationService
java.lang.Object
com.labs64.netlicensing.service.NotificationService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Notification
create
(Context context, Notification notification) Creates new notification with given properties.static void
Deletes notification.static Notification
Gets notification by its number.static Page<Notification>
Returns notifications of a vendor.static Notification
update
(Context context, String number, Notification notification) Updates notification properties.
-
Constructor Details
-
NotificationService
public NotificationService()
-
-
Method Details
-
create
public static Notification create(Context context, Notification notification) throws NetLicensingException Creates new notification with given properties.- Parameters:
context
- determines the vendor on whose behalf the call is performednotification
- non-null properties will be taken for the new notification, null properties will either stay null, or will be set to a default value, depending on property.- Returns:
- the newly created notification object
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-
get
Gets notification by its number.- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- the notification number- Returns:
- the notification
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-
list
Returns notifications of a vendor.- Parameters:
context
- determines the vendor on whose behalf the call is performedfilter
- reserved for the future use, must be omitted / set to NULL- Returns:
- collection of notification entities or null/empty list if nothing found.
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-
update
public static Notification update(Context context, String number, Notification notification) throws NetLicensingException Updates notification properties.- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- notification numbernotification
- non-null properties will be updated to the provided values, null properties will stay unchanged.- Returns:
- updated notification.
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-
delete
Deletes notification.- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- notification number- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-