|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wiki.PageLock
public class PageLock
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.
Constructor Summary | |
---|---|
PageLock(WikiPage page,
String locker,
Date acquired,
Date expiry)
Creates a new PageLock. |
Method Summary | |
---|---|
Date |
getAcquisitionTime()
Returns the timestamp on which this lock was acquired. |
Date |
getExpiryTime()
Returns the timestamp on which this lock will expire. |
String |
getLocker()
Returns the locker name. |
String |
getPage()
Returns the name of the page which is locked. |
long |
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). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageLock(WikiPage page, String locker, Date acquired, Date expiry)
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 Detail |
---|
public String getPage()
public String getLocker()
public Date getAcquisitionTime()
public Date getExpiryTime()
public long getTimeLeft()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |