Class NotificationService

java.lang.Object
com.labs64.netlicensing.service.NotificationService

public class NotificationService extends Object
  • 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 performed
      notification - 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

      public static Notification get(Context context, String number) throws NetLicensingException
      Gets notification by its number.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - the notification number
      Returns:
      the notification
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
    • list

      public static Page<Notification> list(Context context, String filter) throws NetLicensingException
      Returns notifications of a vendor.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      filter - 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 performed
      number - notification number
      notification - 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

      public static void delete(Context context, String number) throws NetLicensingException
      Deletes notification.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - notification number
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.