|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.repository.infomodel.bean.Lock
public class Lock
A lock on a specific logical resource. Repository locking is modeled after the WEBDAV locking specification. Locks are either shared or exclusive. Only one exclusive lock may exist on a logical resource at a time, while multiple shared locks may exist on the same logical resource.
Field Summary | |
---|---|
static int |
ATTRIBUTE_DEPTH
Contains the attribute identifier value which represents the depth. |
static int |
ATTRIBUTE_EXPIRY_DATE
Contains the attribute identifier value which represents the expiration date. |
static int |
ATTRIBUTE_LOCK_TOKEN
Contains the attribute identifier value which represents the lock token. |
static int |
ATTRIBUTE_OWNER_ID
Contains the attribute identifier value which represents the owner. |
static int |
ATTRIBUTE_OWNER_USER_ID
Contains the attribute identifier value which represents the owner's user identifier. |
static int |
ATTRIBUTE_RESOURCE_ID
Contains the attribute identifier value which represents Lock
instances. |
static int |
ATTRIBUTE_TYPE
Contains the attribute identifier value which represents the Lock type. |
static short |
DEPTH_INFINITE
Depth constant indicating that a lock/unlock operation should apply to a resource or a resource collection and all members, or immediate children. |
static short |
DEPTH_ONE
Depth constant indicating that a lock/unlock operation should apply to a resource or a resource collection and its internal members, or immediate children. |
static short |
DEPTH_ZERO
Depth constant indicating that a lock/unlock operation should apply to a resource or a resource collection only and none of its internal members, or immediate children. |
static int |
NEVER_EXPIRE
Constant used to indicate that the lock will never expire. |
static int |
OBJECT_TYPE_LOCK
Contains the object type value which represents Lock instances. |
static short |
SCOPE_EXCLUSIVE
Constant used to indicated exclusive lock scope. |
static short |
SCOPE_SHARED
Constant used to indicated shared lock scope. |
Constructor Summary | |
---|---|
Lock()
Default constructor. |
Method Summary | |
---|---|
java.util.Date |
getCreateTime()
Retrieves the time at which this lock was first created. |
short |
getDepth()
Retrieves the lock's depth. |
long |
getExpiryDate()
Retrieves the timestamp at which this lock will expire. |
java.lang.String |
getLockToken()
Retrieves this lock's token, which must be supplied during unlockResource() calls, in order to successfully remove this lock. |
long |
getOid()
Do not use this method. |
java.lang.String |
getOwnerId()
Retrieves the User Manager object identifier of the user who owns this lock. |
java.lang.String |
getOwnerUserId()
Retrieves the user identifier of the User Manager principal who owns this lock. |
Id |
getResourceId()
Retrieves the identifier of the resource on which this lock exists. |
short |
getType()
Retrieves the lock scope. |
java.util.Date |
getUpdateTime()
Retrieves the time at which this lock was last modified. |
boolean |
isProjected(int attribute)
Determines whether the supplied attribute or composed object is projected. |
void |
setCreateTime(java.util.Date createTime)
Sets the time at which this lock was first created. |
void |
setDepth(short depth)
Sets the lock depth. |
void |
setExpiryDate(long expiryDate)
Sets this lock's expiration date. |
void |
setLockToken(java.lang.String lockToken)
Sets this lock's token. |
void |
setOid(long oid)
Sets this lock's numerical object identifier. |
void |
setOwnerId(java.lang.String ownerId)
Sets the lock's owner. |
void |
setOwnerUserId(java.lang.String ownerUserId)
Sets the user identifier of the User Manager principal who owns this lock. |
void |
setRepositoryLoadProfile(RepositoryLoadProfile loadProfile)
Sets the Repository load profile for this lock. |
void |
setResourceId(Id resourceId)
Sets the identifier of the resource on which this lock exists. |
void |
setType(short type)
Sets this lock's scope. |
void |
setUpdateTime(java.util.Date updateTime)
Sets the time at which this lock was last modified. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short DEPTH_ZERO
public static final short DEPTH_ONE
public static final short DEPTH_INFINITE
public static final short SCOPE_SHARED
public static final short SCOPE_EXCLUSIVE
public static final int NEVER_EXPIRE
public static final int OBJECT_TYPE_LOCK
public static final int ATTRIBUTE_RESOURCE_ID
Lock
instances.
public static final int ATTRIBUTE_OWNER_ID
public static final int ATTRIBUTE_OWNER_USER_ID
public static final int ATTRIBUTE_TYPE
Lock
type.
public static final int ATTRIBUTE_DEPTH
public static final int ATTRIBUTE_LOCK_TOKEN
public static final int ATTRIBUTE_EXPIRY_DATE
Constructor Detail |
---|
public Lock()
Method Detail |
---|
public void setRepositoryLoadProfile(RepositoryLoadProfile loadProfile)
RepositoryLoadProfile
.
loadProfile
- The Repository load profile for this lock.public boolean isProjected(int attribute)
attribute
- The attribute or composed object, which can be any one of
the LOAD_*
constants.
true
if the supplied attribute or composed object is
projected, false
otherwise.public long getOid()
Retrieves this lock's numerical object identifier.
public void setOid(long oid)
oid
- A positive number representing this lock's numerical object
identifier.public Id getResourceId()
public void setResourceId(Id resourceId)
resourceId
- The identifier of the resource on which this lock exists.public java.lang.String getOwnerId()
"04B307F4-87B3-4517-E1C1-151AFB9982C1"
.
public void setOwnerId(java.lang.String ownerId)
lockResource()
calls (see ResourceRepository
).
ownerId
- The lock owner's User Manager object identifier.public java.lang.String getOwnerUserId()
"juser"
.
public void setOwnerUserId(java.lang.String ownerUserId)
lockResource()
calls (see ResourceRepository
).
ownerUserId
- The user identifier of the principal who owns this lock.public short getType()
getScope()
method.
Lock.SCOPE_SHARED
or Lock.SCOPE_EXCLUSIVE
.public void setType(short type)
lockResource()
calls (see ResourceRepository
).
type
- This lock's scope. It can be Lock.SCOPE_SHARED
or Lock.SCOPE_EXCLUSIVE
.public short getDepth()
Lock.DEPTH_ZERO
, Lock.DEPTH_ONE
, or Lock.DEPTH_INFINITE
.public void setDepth(short depth)
lockResource()
calls (see ResourceRepository
).
depth
- The lock depth, which can be Lock.DEPTH_ZERO
, Lock.DEPTH_ONE
, or Lock.DEPTH_INFINITE
.public java.lang.String getLockToken()
unlockResource()
calls, in order to successfully remove this lock.
This is not required to unlock a resource.
public void setLockToken(java.lang.String lockToken)
lockResource()
calls (see ResourceRepository
).
lockToken
- This lock's token.public long getExpiryDate()
System.currentTimeMillis()
.public void setExpiryDate(long expiryDate)
lockResource()
calls
(see ResourceRepository
).
expiryDate
- This lock's expiration date, which is a timestamp that is
preferably greater than System.currentTimeMillis()
.public java.util.Date getUpdateTime()
public void setUpdateTime(java.util.Date updateTime)
updateTime
- The time at which this lock was last modified.public java.util.Date getCreateTime()
public void setCreateTime(java.util.Date createTime)
createTime
- The time at which this lock was first created.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |