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.Exception
protected static org.apache.log4j.Logger getLogger()
public java.lang.String getLockId()
RuntimeLock
getLockId
in interface RuntimeLock
public boolean supportsEditing()
RuntimeLock
supportsEditing
in interface RuntimeLock
public byte[] lockResource(byte[] data) throws java.lang.Exception
RuntimeLock
lockResource
in interface RuntimeLock
UnlicensedFeatureException
- if the write lock isn't present, other exceptions for normal stuff.java.lang.Exception
public byte[] unlockResource(byte[] data) throws java.lang.Exception
RuntimeLock
unlockResource
in interface RuntimeLock
java.lang.Exception