protected static class RuntimeLockFactory.SymmetricEncryptedLock extends java.lang.Object implements RuntimeLock
DETAIL_CAN_EDIT, LICENSE_DETAIL, LOCK_OWNER_NAME| Constructor and Description |
|---|
SymmetricEncryptedLock(java.lang.String lockOwner,
java.lang.String licenseKey,
boolean canEdit)
Creates a symmetric lock with the provided key.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLockId()
Should return a short string identifying this particular lock.
|
protected static org.apache.log4j.Logger |
getLogger() |
byte[] |
lockResource(byte[] data)
Takes some data and returns a locked version of it.
|
boolean |
supportsEditing()
Returns whether this lock has the ability to edit resources (ie lock) resources.
|
byte[] |
unlockResource(byte[] data)
Takes a locked version of data and returns it in unlocked form.
|
public SymmetricEncryptedLock(java.lang.String lockOwner,
java.lang.String licenseKey,
boolean canEdit)
throws java.lang.Exception
lockOwner - The company who owns this locklicenseKey - The symmetric encryption key. Should be a Base64'd version of a GatewaySec encrypted DESede
keycanEdit - Whether or not this lock is allowed to edit locked projectsjava.lang.Exceptionprotected static org.apache.log4j.Logger getLogger()
public java.lang.String getLockId()
RuntimeLockgetLockId in interface RuntimeLockpublic boolean supportsEditing()
RuntimeLocksupportsEditing in interface RuntimeLockpublic byte[] lockResource(byte[] data)
throws java.lang.Exception
RuntimeLocklockResource in interface RuntimeLockUnlicensedFeatureException - if the write lock isn't present, other exceptions for normal stuff.java.lang.Exceptionpublic byte[] unlockResource(byte[] data)
throws java.lang.Exception
RuntimeLockunlockResource in interface RuntimeLockjava.lang.Exception