org.vfny.geoserver.util.requests.CapabilitiesRequest Maven / Gradle / Ivy
/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
* This code is licensed under the GPL 2.0 license, availible at the root
* application directory.
*/
package org.vfny.geoserver.util.requests;
import org.vfny.geoserver.Request;
import org.vfny.geoserver.servlets.AbstractService;
/**
* This class enforces a standard interface for GetCapabilities requests.
*
* @author Rob Hranac, TOPP
* @author Chris Holmes, TOPP
* @version $Id: CapabilitiesRequest.java 8406 2008-02-14 19:49:39Z saul.farber $
*/
public class CapabilitiesRequest extends Request {
private String updateSequence;
/**
* Creates a new capabilities request object.
*
* @param serviceType The id of the service being handled.
* @param service The service handing the request.
*/
public CapabilitiesRequest(String serviceType, AbstractService service) {
this(serviceType, service, null);
}
/**
* Creates a new capabilities request object.
*
* @param serviceType The id of the service being handled.
* @param service The service handing the request.
* @param updateSequence The updateSequence number from the GetCapabilities request
*/
public CapabilitiesRequest(String serviceType, AbstractService service, String updateSequence) {
super(serviceType, "GetCapabilities", service);
this.updateSequence = updateSequence;
}
/**
* Returns a string representation of this CapabilitiesRequest.
*
* @return a string of with the service and version.
*/
public String toString() {
return "GetCapabilities [service: " + service + ", version: " + version + "]";
}
/**
* Override of equals. Just calls super.equals, since there are no extra
* fields here that aren't in Request.
*
* @param o the object to test against.
*
* @return true if o is equal to this request.
*/
public boolean equals(Object o) {
return super.equals(o);
}
/**
* @return the updateSequence
*/
public String getUpdateSequence() {
return updateSequence;
}
/**
* @param updateSequence the updateSequence to set
*/
public void setUpdateSequence(String updateSequence) {
this.updateSequence = updateSequence;
}
}