org.vfny.geoserver.requests.wfs
Class FeatureWithLockRequest

java.lang.Object
  extended byorg.vfny.geoserver.requests.Request
      extended byorg.vfny.geoserver.requests.WFSRequest
          extended byorg.vfny.geoserver.requests.wfs.FeatureRequest
              extended byorg.vfny.geoserver.requests.wfs.FeatureWithLockRequest

public class FeatureWithLockRequest
extends FeatureRequest

Implements the WFS GetFeatureWithLock interface, which responds to requests for GML and locks the features. It extends GetFeature with the ability to turn itself into a lock request, and with an expiry element. The lockAction didn't make it in to the 1.0 spec, as far as I can tell, but will likely be a part of the next one, so that will have to be added, but should be trivial, as it's already a part of lockRequest.


Field Summary
protected  int expiry
          The time to hold the lock for
 
Fields inherited from class org.vfny.geoserver.requests.wfs.FeatureRequest
featureVersion, handle, maxFeatures, outputFormat, queries
 
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
FeatureWithLockRequest()
           
 
Method Summary
 LockRequest asLockRequest()
          Turns this request into a lock request.
 int getExpiry()
          Gets the expiration of the locks (in minutes).
 void setExpiry(int expiry)
          Sets the expiration of the locks (in minutes).
 org.geotools.data.FeatureLock toFeatureLock()
          Turn this request into a FeatureLock.
 java.lang.String toString()
          Standard override of toString()
 
Methods inherited from class org.vfny.geoserver.requests.wfs.FeatureRequest
addQuery, equals, getFeatureVersion, getHandle, getMaxFeatures, getOutputFormat, getQueries, getQuery, getQueryCount, hashCode, setFeatureVersion, setHandle, setMaxFeatures, setMaxFeatures, setOutputFormat, setQueries
 
Methods inherited from class org.vfny.geoserver.requests.Request
getBaseUrl, getGeoServer, getHttpServletRequest, getRequest, getRootDir, getService, getValidationProcessor, getVersion, isLoggedIn, setHttpServletRequest, setRequest, setService, setVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

expiry

protected int expiry
The time to hold the lock for

Constructor Detail

FeatureWithLockRequest

public FeatureWithLockRequest()
Method Detail

toFeatureLock

public org.geotools.data.FeatureLock toFeatureLock()
Turn this request into a FeatureLock.

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:

Returns:

asLockRequest

public LockRequest asLockRequest()
Turns this request into a lock request.

Returns:
the LockRequest equivalent of this request.

getExpiry

public int getExpiry()
Gets the expiration of the locks (in minutes).

Returns:
How many minutes till the lock should expire.

setExpiry

public void setExpiry(int expiry)
Sets the expiration of the locks (in minutes).

Parameters:
expiry - How many minutes till the lock should expire.

toString

public java.lang.String toString()
Description copied from class: FeatureRequest
Standard override of toString()

Overrides:
toString in class FeatureRequest
Returns:
a String representation of this request.