Class BundleService

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

public class BundleService extends Object
  • Constructor Details

    • BundleService

      public BundleService()
  • Method Details

    • create

      public static Bundle create(Context context, Bundle bundle) throws NetLicensingException
      Creates new bundle with given properties.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      bundle - non-null properties will be taken for the new bundle, null properties will either stay null, or will be set to a default value, depending on property.
      Returns:
      the newly created bundle object
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
    • get

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

      public static Page<Bundle> list(Context context, String filter) throws NetLicensingException
      Returns bundles 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 bundle 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 Bundle update(Context context, String number, Bundle bundle) throws NetLicensingException
      Updates bundle properties.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - notification number
      bundle - non-null properties will be updated to the provided values, null properties will stay unchanged.
      Returns:
      updated bundle.
      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 bundle.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - bundle number
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
    • obtain

      public static Page<License> obtain(Context context, String number, String licenseeNumber) throws NetLicensingException
      Obtain bundle(create licenses from a bundle license templates).
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - bundle number
      licenseeNumber - licensee number
      Returns:
      collection of created licenses.
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.