Class ProductModuleService

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

public class ProductModuleService extends Object
Provides product module handling routines.

Product may comprise of multiple product modules, but must have at least one. Each product module is licensed using one of the licensing models offered by NetLicensing service. Licensing within a product module is independent of other product modules, however all product modules of a single product are visible to every licensee of the product.

  • Constructor Details

    • ProductModuleService

      public ProductModuleService()
  • Method Details

    • create

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

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

      public static Page<ProductModule> list(Context context, String filter) throws NetLicensingException
      Returns all product modules 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:
      list of product modules (of all products) 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 ProductModule update(Context context, String number, ProductModule productModule) throws NetLicensingException
      Updates product module properties.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - product module number
      productModule - non-null properties will be updated to the provided values, null properties will stay unchanged.
      Returns:
      updated product module.
      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, boolean forceCascade) throws NetLicensingException
      Deletes product module.
      Parameters:
      context - determines the vendor on whose behalf the call is performed
      number - product module number
      forceCascade - if true, any entities that depend on the one being deleted will be deleted too
      Throws:
      NetLicensingException - any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.