protected static class RuntimeLockFactory.SimpleOEMLock extends java.lang.Object implements RuntimeLock
Useful for testing, and possible in the case that we don't want to encrypt on the resource level.
DETAIL_CAN_EDIT, LICENSE_DETAIL, LOCK_OWNER_NAME| Constructor and Description |
|---|
SimpleOEMLock(java.lang.String lockOwner,
boolean canEdit) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLockId()
Should return a short string identifying this particular lock.
|
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 java.lang.String getLockId()
RuntimeLockgetLockId in interface RuntimeLockpublic boolean supportsEditing()
RuntimeLocksupportsEditing in interface RuntimeLockpublic byte[] lockResource(byte[] data)
throws UnlicensedFeatureException
RuntimeLocklockResource in interface RuntimeLockUnlicensedFeatureException - if the write lock isn't present, other exceptions for normal stuff.public byte[] unlockResource(byte[] data)
RuntimeLockunlockResource in interface RuntimeLock