@Immutable public class V2JsonLicenseManagementContext 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 V2JsonLicenseManagementContext("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 |
|---|
V2JsonLicenseManagementContext(String subject)
Constructs a V2/JSON license management context.
|
| Modifier and Type | Method and Description |
|---|---|
JsonCodec |
codec()
The implementation in the class
V2JsonLicenseManagementContext
returns a new JsonCodec. |
com.fasterxml.jackson.databind.ObjectMapper |
mapper()
Returns the object mapper to use for
codec(). |
protected com.fasterxml.jackson.databind.ObjectMapper |
newMapper()
Returns a new object mapper for use with licenses
and repositories.
|
compression, encryption, license, pbeAlgorithm, repository, storeTypeauthentication, authorization, cachePeriodMillis, classLoader, consumer, initialization, now, policy, subject, validation, vendorpublic V2JsonLicenseManagementContext(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 JsonCodec codec()
The implementation in the class V2JsonLicenseManagementContext
returns a new JsonCodec.
public com.fasterxml.jackson.databind.ObjectMapper mapper()
codec().
The implementation in the class V2JsonLicenseManagementContext
lazily resolves this property by calling newMapper().
protected com.fasterxml.jackson.databind.ObjectMapper newMapper()
Copyright © 2005–2017 Schlichtherle IT Services. All rights reserved.