public class PageLock
extends java.lang.Object
implements java.io.Serializable
The PageLock keeps no reference to a WikiPage because otherwise it could keep a reference to a page for a long time.
Constructor and Description |
---|
PageLock(WikiPage page,
java.lang.String locker,
java.util.Date acquired,
java.util.Date expiry)
Creates a new PageLock.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAcquisitionTime()
Returns the timestamp on which this lock was acquired.
|
java.util.Date |
getExpiryTime()
Returns the timestamp on which this lock will expire.
|
java.lang.String |
getLocker()
Returns the locker name.
|
java.lang.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).
|
public PageLock(WikiPage page, java.lang.String locker, java.util.Date acquired, java.util.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.public java.lang.String getPage()
public java.lang.String getLocker()
public java.util.Date getAcquisitionTime()
public java.util.Date getExpiryTime()
public long getTimeLeft()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.