@Immutable public class V1LicenseManagementContext extends BasicLicenseManagementContext
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 V1LicenseManagementContext("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 |
|---|
V1LicenseManagementContext(String subject)
Constructs a V1 license management context.
|
| Modifier and Type | Method and Description |
|---|---|
X500PrincipalXmlCodec |
codec()
Returns the codec.
|
Transformation |
compression()
Returns a compression.
|
Encryption |
encryption(PbeParameters parameters)
Returns an encryption for the given PBE parameters.
|
LicenseContent |
license()
Returns a new license content.
|
String |
pbeAlgorithm()
Returns the name of the default Password Based Encryption (PBE)
algorithm for the license key format.
|
GenericCertificate |
repository()
Returns a new repository to use for
licenses.
|
String |
storeType()
Returns the name of the default key store type,
for example
"JCEKS" or "JKS". |
authentication, authorization, cachePeriodMillis, classLoader, consumer, initialization, now, policy, subject, validation, vendorpublic V1LicenseManagementContext(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 X500PrincipalXmlCodec codec()
The implementation in the class V1LicenseManagementContext
returns an X500PrincipalXmlCodec.
public final Transformation compression()
The implementation in the class V1LicenseManagementContext
returns a compression for V1 format license keys.
public final Encryption encryption(PbeParameters parameters)
The implementation in the class V1LicenseManagementContext
returns an encryption for V1 format license keys with the given PBE
parameters.
parameters - the PBE parameters.public LicenseContent license()
public final String pbeAlgorithm()
The implementation in the class V1LicenseManagementContext
returns "PBEWithMD5AndDES".
This was the only supported PBE algorithm in TrueLicense 1 and its
not possible to use another one.
public final GenericCertificate repository()
The implementation in the class V1LicenseManagementContext
returns a new GenericCertificate.
repository in interface RepositoryProviderrepository in class BasicLicenseManagementContextpublic final String storeType()
"JCEKS" or "JKS".
You can override this default value when configuring the key store based
authentication with the license vendor context or the license consumer
context.
The implementation in the class V1LicenseManagementContext
returns "JKS".
LicenseVendorContext.keyStore(net.java.truelicense.core.io.Source, java.lang.String, net.java.truelicense.obfuscate.ObfuscatedString, java.lang.String, net.java.truelicense.obfuscate.ObfuscatedString),
LicenseConsumerContext.keyStore(net.java.truelicense.core.io.Source, java.lang.String, net.java.truelicense.obfuscate.ObfuscatedString, java.lang.String),
LicenseConsumerContext.ftpKeyStore(net.java.truelicense.core.io.Source, java.lang.String, net.java.truelicense.obfuscate.ObfuscatedString, java.lang.String, net.java.truelicense.obfuscate.ObfuscatedString),
LicenseApplicationContext.KsbaInjection.storeType(java.lang.String)Copyright © 2005–2017 Schlichtherle IT Services. All rights reserved.