Package com.labs64.netlicensing.service
Class BundleService
java.lang.Object
com.labs64.netlicensing.service.BundleService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Bundle
Creates new bundle with given properties.static void
Deletes bundle.static Bundle
Gets bundle by its number.Returns bundles of a vendor.Obtain bundle(create licenses from a bundle license templates).Obtain bundle(create licenses from a bundle license templates).static Bundle
Updates bundle properties.
-
Constructor Details
-
BundleService
public BundleService()
-
-
Method Details
-
create
Creates new bundle with given properties.- Parameters:
context
- determines the vendor on whose behalf the call is performedbundle
- 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
Gets bundle by its number.- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- the bundle number- Returns:
- the bundle
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-
list
Returns bundles 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 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 performednumber
- notification numberbundle
- 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
Deletes bundle.- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- 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, String transactionNumber) throws NetLicensingException Obtain bundle(create licenses from a bundle license templates).- Parameters:
context
- determines the vendor on whose behalf the call is performednumber
- bundle numberlicenseeNumber
- licensee numbertransactionNumber
- transaction number- Returns:
- collection of created licenses.
- 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 performednumber
- bundle numberlicenseeNumber
- licensee number- Returns:
- collection of created licenses.
- Throws:
NetLicensingException
- any subclass of NetLicensingException. These exceptions will be transformed to the corresponding service response messages.
-