Java Doc for CmsLock.java in  » Content-Management-System » opencms » org » opencms » lock » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » opencms » org.opencms.lock 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.opencms.lock.CmsLock

CmsLock
public class CmsLock (Code)
Represents the lock state of a VFS resource.

The lock state is combination of how, by whom and in which project a resource is currently locked.


author:
   Thomas Weckert
author:
   Andreas Zahner
author:
   Michael Moossen
version:
   $Revision: 1.31 $
since:
   6.0.0
See Also:   org.opencms.file.CmsObject.getLock(org.opencms.file.CmsResource)
See Also:   org.opencms.lock.CmsLockManager




Constructor Summary
public  CmsLock(String resourceName, CmsUUID userId, CmsProject project, CmsLockType type)
    

Method Summary
protected  Objectclone()
    
public  booleanequals(Object obj)
    
public  CmsLockgetEditionLock()
    
public static  CmsLockgetNullLock()
    
public  CmsProjectgetProject()
    
public  CmsUUIDgetProjectId()
    
protected  CmsLockgetRelatedLock()
    
public  StringgetResourceName()
    
public  CmsLockgetSystemLock()
    
public  CmsLockTypegetType()
    
public  CmsUUIDgetUserId()
    
public  inthashCode()
    
public  booleanisDirectlyInherited()
    
public  booleanisExclusive()
    
public  booleanisExclusiveOwnedBy(CmsUser user)
    
public  booleanisExclusiveOwnedInProjectBy(CmsUser user, CmsProject project)
    
public  booleanisInProject(CmsProject project)
    
public  booleanisInherited()
    
public  booleanisLockableBy(CmsUser user)
    
public  booleanisNullLock()
    
public  booleanisOwnedBy(CmsUser user)
    
public  booleanisOwnedInProjectBy(CmsUser user, CmsProject project)
    
public  booleanisPersistent()
    
public  booleanisPublish()
    
public  booleanisShared()
    
public  booleanisSystemLock()
    
public  booleanisTemporary()
    
public  booleanisUnlocked()
    
protected  voidsetRelatedLock(CmsLock relatedLock)
    
public  StringtoString()
    


Constructor Detail
CmsLock
public CmsLock(String resourceName, CmsUUID userId, CmsProject project, CmsLockType type)(Code)
Constructor for a new Cms lock.


Parameters:
  resourceName - the full resource name including the site root
Parameters:
  userId - the ID of the user who locked the resource
Parameters:
  project - the project where the resource is locked
Parameters:
  type - flag indicating how the resource is locked





Method Detail
clone
protected Object clone()(Code)

See Also:   java.lang.Object.clone



equals
public boolean equals(Object obj)(Code)
Compares this lock to the specified object.


Parameters:
  obj - the object to compare to true if and only if member values of this CmsLock are the same with the compared CmsLock




getEditionLock
public CmsLock getEditionLock()(Code)
Returns the edition lock.

the edition lock




getNullLock
public static CmsLock getNullLock()(Code)
Returns the shared Null CmsLock.

the shared Null CmsLock




getProject
public CmsProject getProject()(Code)
Returns the project where the resource is currently locked.

the project where the resource is currently locked




getProjectId
public CmsUUID getProjectId()(Code)
Returns the ID of the project where the resource is currently locked.

the ID of the project




getRelatedLock
protected CmsLock getRelatedLock()(Code)
Returns the related Lock.

the related Lock




getResourceName
public String getResourceName()(Code)
Returns the name of the locked resource.

the name of the locked resource




getSystemLock
public CmsLock getSystemLock()(Code)
Returns the system lock.

the system lock




getType
public CmsLockType getType()(Code)
Returns the type about how the resource is locked.

the type of the lock




getUserId
public CmsUUID getUserId()(Code)
Returns the ID of the user who currently locked the resource.

the ID of the user




hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode



isDirectlyInherited
public boolean isDirectlyInherited()(Code)
Returns true if this is an directly inherited lock.

true if this is an directly inherited lock




isExclusive
public boolean isExclusive()(Code)
Returns true if this is an exclusive (or temporary exclusive) lock.

true if this is an exclusive (or temporary exclusive) lock




isExclusiveOwnedBy
public boolean isExclusiveOwnedBy(CmsUser user)(Code)
Returns true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner of this lock.


Parameters:
  user - the user to compare to the owner of this lock true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner of this lock




isExclusiveOwnedInProjectBy
public boolean isExclusiveOwnedInProjectBy(CmsUser user, CmsProject project)(Code)
Returns true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner and the given project is the project of this lock.


Parameters:
  user - the user to compare to the owner of this lock
Parameters:
  project - the project to compare to the project of this lock true if this is an exclusive (or temporary exclusive) lock, and the given user is the owner and the given project is the project of this lock




isInProject
public boolean isInProject(CmsProject project)(Code)
Returns true if the given project is the project of this lock.


Parameters:
  project - the project to compare to the project of this lock true if the given project is the project of this lock




isInherited
public boolean isInherited()(Code)
Returns true if this is an inherited lock, which may either be directly or shared inherited.

true if this is an inherited lock, which may either be directly or shared inherited




isLockableBy
public boolean isLockableBy(CmsUser user)(Code)
Checks if a resource can be locked by a user.

The resource is not lockable if it already has a lock of type CmsLockType.PUBLISH .

The resource is lockable either - if it is currently unlocked - if it has a lock of another type set and the user is the lock owner
Parameters:
  user - the user to test lockeability for true if this lock blocks any operation on the locked resource until it is unlocked




isNullLock
public boolean isNullLock()(Code)
Returns true if this lock is the NULL lock which can be obtained by CmsLock.getNullLock() .

Only for the NULL lock, CmsLock.isUnlocked() is true.

true if this lock is the NULL lock




isOwnedBy
public boolean isOwnedBy(CmsUser user)(Code)
Returns true if the given user is the owner of this lock.


Parameters:
  user - the user to compare to the owner of this lock true if the given user is the owner of this lock




isOwnedInProjectBy
public boolean isOwnedInProjectBy(CmsUser user, CmsProject project)(Code)
Returns true if the given user is the owner of this lock, and this lock belongs to the given project.


Parameters:
  user - the user to compare to the owner of this lock
Parameters:
  project - the project to compare to the project of this lock true if the given user is the owner of this lock,and this lock belongs to the given project




isPersistent
public boolean isPersistent()(Code)
Returns true if this is a persistent lock that should be saved when the systems shuts down.

true if this is a persistent lock that should be saved when the systems shuts down




isPublish
public boolean isPublish()(Code)
Returns true if this is a publish lock.

true if this is a publish lock




isShared
public boolean isShared()(Code)
Returns true if this is a shared lock.

true if this is a shared lock




isSystemLock
public boolean isSystemLock()(Code)
Returns true if this is a system (2nd level) lock.

true if this is a system (2nd level) lock




isTemporary
public boolean isTemporary()(Code)
Returns true if this is a temporary lock.

true if this is a temporary lock




isUnlocked
public boolean isUnlocked()(Code)
Returns true if this lock is in fact unlocked.

Only if this is true, the result lock is equal to the NULL lock, which can be obtained by CmsLock.getNullLock() .

true if this lock is in fact unlocked




setRelatedLock
protected void setRelatedLock(CmsLock relatedLock)(Code)
Sets the related Lock.


Parameters:
  relatedLock - the related Lock to set




toString
public String toString()(Code)
Builds a string representation of the current state.


See Also:   java.lang.Object.toString




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.