@Immutable public class V2XmlLicenseManagementContext extends BasicV2LicenseManagementContext
Use this context to create a LicenseVendorContext or a
LicenseConsumerContext.
Here's an example for verifying the installed license key in a consumer
application:
LicenseConsumerManager manager = new V2XmlLicenseManagementContext("MyApp 1")
.consumer()
.manager()
...
.build();
manager.verify();
DO NOT COPY-PASTE THIS CODE! Instead, use the TrueLicense Maven Archetype to generate a sample project for you.
Where required, you should subclass this class to customize its properties, e.g. its encoding, clock, class loader etc.
Note that this class is immutable. Unless stated otherwise, all no-argument methods need to return consistent objects so that caching them is not required. A returned object is considered to be consistent if it compares equal or at least behaves identical to any previously returned object.
| Constructor and Description |
|---|
V2XmlLicenseManagementContext(String subject)
Constructs a V2/XML license management context.
|
| Modifier and Type | Method and Description |
|---|---|
JaxbCodec |
codec()
Returns the codec.
|
JAXBContext |
context()
Returns the JAXB context to use for
codec(). |
protected JAXBContext |
newContext()
Returns a new JAXB context for use with licenses
and repositories.
|
compression, encryption, license, pbeAlgorithm, repository, storeTypeauthentication, authorization, cachePeriodMillis, classLoader, consumer, initialization, now, policy, subject, validation, vendorpublic V2XmlLicenseManagementContext(String subject)
Obfuscate annotation and processing it with the
TrueLicense Maven Plugin.subject - the licensing subject, i.e. a product name with an
optional version range, e.g. MyApp 1.public JaxbCodec codec()
The implementation in the class V2XmlLicenseManagementContext
returns a JaxbCodec.
public JAXBContext context()
codec().
The implementation in the class V2XmlLicenseManagementContext
lazily resolves this property by calling newContext().
protected JAXBContext newContext()
The implementation in the class V2XmlLicenseManagementContext
constructs a new JAXBContext for the root element classes
License and BasicRepository.
Copyright © 2005–2017 Schlichtherle IT Services. All rights reserved.