Package org.opencms.repository
Class CmsRepositoryLockInfo
- java.lang.Object
-
- org.opencms.repository.CmsRepositoryLockInfo
-
public class CmsRepositoryLockInfo extends java.lang.Object
The class represents a lock to aI_CmsRepositoryItem
.- Since:
- 6.2.4
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_SCOPE
The default scope for locks.static java.lang.String
DEFAULT_TYPE
The default type for locks.static int
DEPTH_INFINITY_VALUE
Default depth is infinite.static java.lang.String
SCOPE_EXCLUSIVE
The lock scope "exclusive".static java.lang.String
SCOPE_SHARED
The lock scope "shared".static int
TIMEOUT_INFINITE_VALUE
Infinite timeout for the lock.static java.lang.String
TYPE_WRITE
The lock type "write".
-
Constructor Summary
Constructors Constructor Description CmsRepositoryLockInfo()
Empty default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getCreationDate()
Returns the creationDate.int
getDepth()
Returns the depth.long
getExpiresAt()
Returns the expiresAt.java.lang.String
getOwner()
Returns the owner.java.lang.String
getPath()
Returns the path.java.lang.String
getScope()
Returns the scope.java.lang.String
getType()
Returns the type.java.lang.String
getUsername()
Returns the username.boolean
hasExpired()
Return true if the lock has expired.boolean
isExclusive()
Return true if the lock is exclusive.void
setDepth(int depth)
Sets the depth.void
setExpiresAt(long expiresAt)
Sets the expiresAt.void
setOwner(java.lang.String owner)
Sets the owner.void
setPath(java.lang.String path)
Sets the path.void
setScope(java.lang.String scope)
Sets the scope.void
setType(java.lang.String type)
Sets the type.void
setUsername(java.lang.String username)
Sets the username.java.lang.String
toString()
Get a string representation of this lock info.
-
-
-
Field Detail
-
SCOPE_EXCLUSIVE
public static final java.lang.String SCOPE_EXCLUSIVE
The lock scope "exclusive".- See Also:
- Constant Field Values
-
DEFAULT_SCOPE
public static final java.lang.String DEFAULT_SCOPE
The default scope for locks.- See Also:
- Constant Field Values
-
TIMEOUT_INFINITE_VALUE
public static final int TIMEOUT_INFINITE_VALUE
Infinite timeout for the lock.- See Also:
- Constant Field Values
-
TYPE_WRITE
public static final java.lang.String TYPE_WRITE
The lock type "write".- See Also:
- Constant Field Values
-
DEFAULT_TYPE
public static final java.lang.String DEFAULT_TYPE
The default type for locks.- See Also:
- Constant Field Values
-
DEPTH_INFINITY_VALUE
public static final int DEPTH_INFINITY_VALUE
Default depth is infinite.- See Also:
- Constant Field Values
-
SCOPE_SHARED
public static final java.lang.String SCOPE_SHARED
The lock scope "shared".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsRepositoryLockInfo
public CmsRepositoryLockInfo()
Empty default constructor.
-
-
Method Detail
-
getCreationDate
public java.util.Date getCreationDate()
Returns the creationDate.- Returns:
- the creationDate
-
getDepth
public int getDepth()
Returns the depth.- Returns:
- the depth
-
getExpiresAt
public long getExpiresAt()
Returns the expiresAt.- Returns:
- the expiresAt
-
getOwner
public java.lang.String getOwner()
Returns the owner.- Returns:
- the owner
-
getPath
public java.lang.String getPath()
Returns the path.- Returns:
- the path
-
getScope
public java.lang.String getScope()
Returns the scope.- Returns:
- the scope
-
getType
public java.lang.String getType()
Returns the type.- Returns:
- the type
-
getUsername
public java.lang.String getUsername()
Returns the username.- Returns:
- the username
-
hasExpired
public boolean hasExpired()
Return true if the lock has expired.- Returns:
- true if the lock has expired
-
isExclusive
public boolean isExclusive()
Return true if the lock is exclusive.- Returns:
- true if the lock is exclusive
-
setDepth
public void setDepth(int depth)
Sets the depth.- Parameters:
depth
- the depth to set
-
setExpiresAt
public void setExpiresAt(long expiresAt)
Sets the expiresAt.- Parameters:
expiresAt
- the expiresAt to set
-
setOwner
public void setOwner(java.lang.String owner)
Sets the owner.- Parameters:
owner
- the owner to set
-
setPath
public void setPath(java.lang.String path)
Sets the path.- Parameters:
path
- the path to set
-
setScope
public void setScope(java.lang.String scope)
Sets the scope.- Parameters:
scope
- the scope to set
-
setType
public void setType(java.lang.String type)
Sets the type.- Parameters:
type
- the type to set
-
setUsername
public void setUsername(java.lang.String username)
Sets the username.- Parameters:
username
- the username to set
-
toString
public java.lang.String toString()
Get a string representation of this lock info.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this lock
-
-