|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.requests.Request org.vfny.geoserver.requests.WFSRequest org.vfny.geoserver.requests.wfs.LockRequest
Represents a lock request.
Nested Class Summary | |
static class |
LockRequest.Lock
Represents a single Lock element. |
Field Summary | |
protected int |
expiry
Specifies a lock expiration. |
protected boolean |
lockAll
Specifices whether or not to lock all features grabbed in request |
protected java.util.List |
locks
|
Fields inherited from class org.vfny.geoserver.requests.WFSRequest |
WFS_SERVICE_TYPE |
Fields inherited from class org.vfny.geoserver.requests.Request |
httpServletRequest, request, service, version |
Constructor Summary | |
LockRequest()
Empty constructor. |
Method Summary | |
void |
addLock(LockRequest.Lock lock)
Adds a single lock to this request |
void |
addLock(java.lang.String featureType,
org.geotools.filter.Filter filter)
Creates a lock of the given featureType and filter and adds it to the lock list. |
void |
addLock(java.lang.String featureType,
org.geotools.filter.Filter filter,
java.lang.String handle)
Creates a lock of the given featureType, filter and handle and adds it to the lock list. |
boolean |
equals(java.lang.Object obj)
|
int |
getExpiry()
Gets the expiration of the locks (in minutes). |
int |
getExpirySeconds()
|
java.lang.String |
getHandle()
|
boolean |
getLockAll()
Gets whether lock request should fail if not all can be locked |
java.util.List |
getLocks()
Gets a list of the locks held by this request(as LockRequest.Lock objects) |
void |
setExpiry(int expiry)
Sets the expiration of the locks (in minutes). |
void |
setHandle(java.lang.String handle)
|
void |
setLockAll(boolean lockAll)
Sets whether lock request should fail if not all can be locked |
void |
setLocks(java.util.List locks)
Sets the lock list for this request. |
void |
setLocks(java.util.List typeList,
java.util.List filterList)
Sets the locks for this request according to the two lists passed in Little error checking is done, as this is a convenience method for LockKVP Reader, which does its own error checking. |
org.geotools.data.FeatureLock |
toFeatureLock()
Turn this request into a FeatureLock. |
java.lang.String |
toString()
|
Methods inherited from class org.vfny.geoserver.requests.Request |
getBaseUrl, getGeoServer, getHttpServletRequest, getRequest, getRootDir, getService, getValidationProcessor, getVersion, hashCode, isLoggedIn, setHttpServletRequest, setRequest, setService, setVersion |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int expiry
protected boolean lockAll
protected java.util.List locks
Constructor Detail |
public LockRequest()
Method Detail |
public org.geotools.data.FeatureLock toFeatureLock()
You will return FeatureLock.getAuthorization() to your user so they can refer to this lock again.
The getAuthorization() value is based on getHandle(), with a default of "GeoServer" if the user has not provided a handle.
The FeatureLock produced is based on expiry:
public void setHandle(java.lang.String handle)
public java.lang.String getHandle()
public boolean getLockAll()
public void setLockAll(boolean lockAll)
lockAll
- true If the request should fail if all are not
locked.public int getExpiry()
public void setExpiry(int expiry)
expiry
- An int of the expiry in minutes.public int getExpirySeconds()
public java.util.List getLocks()
public void addLock(LockRequest.Lock lock)
lock
- A Lock to be added to this request.public void setLocks(java.util.List locks)
locks
- The list of locks to add.public void setLocks(java.util.List typeList, java.util.List filterList)
typeList
- a list of featureTypes as Strings.filterList
- a list of Filters. Should either be null, in which
case the locks have no filters, or else should be of the same
length as the typeList.public void addLock(java.lang.String featureType, org.geotools.filter.Filter filter, java.lang.String handle)
featureType
- the typeName to lock.filter
- which features of the featureType to lock.handle
- the name to identify this lock, for error reporting.public void addLock(java.lang.String featureType, org.geotools.filter.Filter filter)
featureType
- the typeName to lock.filter
- which features of the featureType to lock.public java.lang.String toString()
public boolean equals(java.lang.Object obj)
equals
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |