Package org.apache.wiki.pages
Class PageLock
java.lang.Object
org.apache.wiki.pages.PageLock
- All Implemented Interfaces:
Serializable
Describes a lock acquired by an user on a page. For the most part, the regular developer does not have to instantiate this class.
The PageLock keeps no reference to a WikiPage because otherwise it could keep a reference to a page for a long time.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the timestamp on which this lock was acquired.Returns the timestamp on which this lock will expire.Returns the locker name.getPage()
Returns the name of the page which is locked.long
Returns the amount of time left in minutes, rounded up to the nearest minute (so you get a zero only at the last minute).boolean
-
Constructor Details
-
PageLock
Creates a new PageLock. The lock is not attached to any objects at this point.- Parameters:
page
- WikiPage which is locked.locker
- The username who locked this page (for display purposes).acquired
- The timestamp when the lock is acquiredexpiry
- The timestamp when the lock expires.
-
-
Method Details
-
getPage
Returns the name of the page which is locked.- Returns:
- The name of the page.
-
getLocker
Returns the locker name.- Returns:
- The name of the locker.
-
getAcquisitionTime
Returns the timestamp on which this lock was acquired.- Returns:
- The acquisition time.
-
getExpiryTime
Returns the timestamp on which this lock will expire.- Returns:
- The expiry date.
-
getTimeLeft
Returns the amount of time left in minutes, rounded up to the nearest minute (so you get a zero only at the last minute).- Returns:
- Time left in minutes.
-
isExpired
-