public class RuntimeLockFactory
extends java.lang.Object
Resource editing is only allowed if DETAIL_CAN_EDIT=true
Modifier and Type | Class and Description |
---|---|
protected static class |
RuntimeLockFactory.MissingOEMLock |
protected static class |
RuntimeLockFactory.SimpleOEMLock
This is the simplest form of a runtime lock we can have.
|
protected static class |
RuntimeLockFactory.SymmetricEncryptedLock |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DETAIL_ENC_KEY
The license details keyname for the encryption key
|
static java.lang.String |
LOCK_ENCRYPTED
The "enhanced" lock uses symmetric encryption to encrypt the resources.
|
static java.lang.String |
LOCK_NONE
A value for license detail "rt-lock" signifying that no locking is allowed.
|
static java.lang.String |
LOCK_SIMPLE
A value for the license detail "rt-lock" signifying that the simple locking mechanism should be used
|
Constructor and Description |
---|
RuntimeLockFactory() |
Modifier and Type | Method and Description |
---|---|
static RuntimeLock |
create(LicenseDetails platformLicense)
Creates an OEMLock based on the parameters defined in license.
|
static RuntimeLock |
createMissingLock(java.lang.String lockId)
Creates an RuntimeLock that represents a missing
|
static RuntimeLock |
decodeLock(java.lang.String encoded)
Takes a previously encoded lock and deserializes it.
|
static java.lang.String |
encodeLock(RuntimeLock lock)
Returns the given lock serialized into a string that can be written to plain-text files in a safe way.
|
public static final java.lang.String LOCK_NONE
public static final java.lang.String LOCK_SIMPLE
public static final java.lang.String LOCK_ENCRYPTED
public static final java.lang.String DETAIL_ENC_KEY
@Nullable public static RuntimeLock create(@Nonnull LicenseDetails platformLicense) throws java.lang.IllegalArgumentException
Throws IllegalArgumentException if a lock is defined, but defined incorrectly.
platformLicense
- not nulljava.lang.IllegalArgumentException
public static RuntimeLock createMissingLock(java.lang.String lockId)
public static java.lang.String encodeLock(RuntimeLock lock)
public static RuntimeLock decodeLock(java.lang.String encoded)