本文整理了Java中org.geoserver.ows.Request.getService
方法的一些代码示例,展示了Request.getService
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getService
方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:getService
[英]The service requested
[中]服务请求
代码示例来源:origin: geoserver/geoserver
private boolean layerGroupContainmentCheckRequired() {
// first, is it WMS?
Request request = Dispatcher.REQUEST.get();
if (request == null) {
return false;
}
// layer groups are used only in WMS
final String service = request.getService();
return "WMS".equalsIgnoreCase(service) || "gwc".equalsIgnoreCase(service);
}
代码示例来源:origin: geoserver/geoserver
private boolean shouldApplyFilter() {
Request request = Dispatcher.REQUEST.get();
// for the moment, match any recognized OGC request
return request != null && request.getService() != null && request.getRequest() != null;
}
代码示例来源:origin: geoserver/geoserver
@Override
public boolean hideResource(ResourceInfo resource) {
if (isFilterSubject()) {
List<String> disabledServices = disabledServices(resource);
// if any disabled service match with current service -> hide resource
String service = request().getService();
return disabledServices
.stream()
.anyMatch(s -> service.toLowerCase().equals(s.trim().toLowerCase()));
}
return false;
}
代码示例来源:origin: geoserver/geoserver
public String toString() {
return getService() + " " + getVersion() + " " + getRequest();
}
代码示例来源:origin: geoserver/geoserver
public boolean hideLayer(LayerInfo layer) {
PublishedInfo local = LocalPublished.get();
if (local == null) {
return false;
} else if (local instanceof LayerInfo) {
return !local.equals(layer);
} else if (local instanceof LayerGroupInfo) {
LayerGroupInfo lg = (LayerGroupInfo) local;
Request request = Dispatcher.REQUEST.get();
if (request != null
&& "WMS".equalsIgnoreCase(request.getService())
&& "GetCapabilities".equals(request.getRequest())
&& lg.getMode() == Mode.SINGLE) {
return true;
} else {
return !new LayerGroupHelper(lg).allLayers().contains(layer);
}
} else {
throw new RuntimeException("Unknown PublishedInfo of type " + local.getClass());
}
}
代码示例来源:origin: geoserver/geoserver
public Operation operationDispatched(Request request, Operation operation) {
String service = request.getService();
String method = request.getRequest();
代码示例来源:origin: geoserver/geoserver
private boolean isFilterSubject() {
return request() != null
&& request().getService() != null
&& request().getRequest() != null;
}
代码示例来源:origin: geoserver/geoserver
protected Query getReadQuery() {
if (policy.getAccessLevel() == AccessLevel.HIDDEN
|| policy.getAccessLevel() == AccessLevel.METADATA) {
return new Query(null, Filter.EXCLUDE);
} else if (policy.getLimits() == null) {
return Query.ALL;
} else if (policy.getLimits() instanceof VectorAccessLimits) {
VectorAccessLimits val = (VectorAccessLimits) policy.getLimits();
// Ugly hack: during WFS transactions the reads we do are used to count the number of
// features
// we are deleting/updating: use the write filter instead of the read filter
Request request = Dispatcher.REQUEST.get();
if (request != null
&& request.getService().equalsIgnoreCase("WFS")
&& request.getRequest().equalsIgnoreCase("Transaction")) {
return val.getWriteQuery();
} else {
return val.getReadQuery();
}
} else {
throw new IllegalArgumentException(
"SecureFeatureSources has been fed "
+ "with unexpected AccessLimits class "
+ policy.getLimits().getClass());
}
}
代码示例来源:origin: geoserver/geoserver
Request request = Dispatcher.REQUEST.get();
if (request != null
&& "WMS".equalsIgnoreCase(request.getService())
&& "GetCapabilities".equals(request.getRequest())
&& lg.getMode() == Mode.SINGLE) {
代码示例来源:origin: geoserver/geoserver
Request request = Dispatcher.REQUEST.get();
if (request != null
&& "WMS".equalsIgnoreCase(request.getService())
&& "GetCapabilities".equals(request.getRequest())
&& lg.getMode() == Mode.SINGLE) {
代码示例来源:origin: geoserver/geoserver
if (req.getService() == null) {
req.setService(lookupRequestBeanProperty(requestBean, "service", false));
if (req.getService() == null) {
代码示例来源:origin: geoserver/geoserver
String service = req.getService();
req.setRequest(req.getService());
代码示例来源:origin: org.geoserver/gs-wms
@Override
public Response responseDispatched(
Request request, Operation operation, Object result, Response response) {
List<String> warnings = WARNINGS.get();
if ("WMS".equalsIgnoreCase(request.getService())
&& warnings != null
&& !warnings.isEmpty()) {
HttpServletResponse httpResponse = request.getHttpResponse();
for (String warning : warnings) {
httpResponse.addHeader(HttpHeaders.WARNING, warning);
}
return super.responseDispatched(request, operation, result, response);
}
return response;
}
代码示例来源:origin: org.geoserver.extension/control-flow
@Override
boolean matchesRequest(Request request) {
if (!service.equalsIgnoreCase(request.getService()))
return false;
if (method == null)
return true;
else if (!method.equalsIgnoreCase(request.getRequest()))
return false;
if (outputFormat == null)
return true;
else if (!outputFormat.equalsIgnoreCase(request.getOutputFormat()))
return false;
return true;
}
代码示例来源:origin: org.geoserver.community/gs-oseo-core
final Map kvp = request.getKvp();
final Map rawKvp = request.getRawKvp();
if ("oseo".equalsIgnoreCase(request.getService())) {
if (kvp.isEmpty()) {
if ("description".equals(request.getRequest())) {
代码示例来源:origin: org.geoserver.community/gs-geofence
@Override
public Operation operationDispatched(Request gsRequest, Operation operation) {
String service = gsRequest.getService();
String request = gsRequest.getRequest();
代码示例来源:origin: org.geoserver.extension/gs-geofence
@Override
public Operation operationDispatched(Request gsRequest, Operation operation) {
String service = gsRequest.getService();
String request = gsRequest.getRequest();
代码示例来源:origin: org.geoserver.community/gs-nsg-wfs-profile
@Override
public Operation operationDispatched(Request request, Operation operation) {
String version = request.getVersion();
String method = request.getRequest();
long timeout = getTimeoutMilliseconds(operation);
if ("WFS".equalsIgnoreCase(request.getService())
&& (version == null || V_20.compareTo(new Version(version)) <= 0)
&& method != null
&& (method.equalsIgnoreCase("GetFeature")
|| method.equalsIgnoreCase("GetFeatureWithLock")
|| method.equalsIgnoreCase("GetPropertyValue"))
&& timeout > 0
&& operation.getParameters().length > 0
&& operation.getParameters()[0] instanceof BaseRequestType) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Starting to track NSG timeout on this request");
}
// start tracking time
TimeoutVerifier timeoutVerifier =
new TimeoutVerifier((BaseRequestType) operation.getParameters()[0], timeout);
// need to wrap the http response and its output stream
request.setHttpResponse(
new TimeoutCancellingResponse(request.getHttpResponse(), timeoutVerifier));
// set in the thread local for later use
TIMEOUT_VERIFIER.set(timeoutVerifier);
}
return operation;
}
代码示例来源:origin: org.geoserver.community/gs-geofence
Request owsRequest = Dispatcher.REQUEST.get();
if (owsRequest != null) {
service = owsRequest.getService();
request = owsRequest.getRequest();
代码示例来源:origin: org.geoserver.extension/gs-geofence
Request owsRequest = Dispatcher.REQUEST.get();
if (owsRequest != null) {
service = owsRequest.getService();
request = owsRequest.getRequest();
内容来源于网络,如有侵权,请联系作者删除!