org.geoserver.ows.Request.setService()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(165)

本文整理了Java中org.geoserver.ows.Request.setService方法的一些代码示例,展示了Request.setService的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setService方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:setService

Request.setService介绍

[英]Allows call backs to override the service
[中]允许回调覆盖服务

代码示例

代码示例来源:origin: geoserver/geoserver

req.setService(normalize(KvpUtils.getSingleValue(req.getKvp(), "service")));
req.setVersion(
    normalizeVersion(normalize(KvpUtils.getSingleValue(req.getKvp(), "version"))));
Map xml = readOpPost(req.getInput());
if (xml.get("service") != null) {
  req.setService(normalize((String) xml.get("service")));
    req.setService(service);
      req.setRequest(req.getService());
    req.setService(req.getContext());
    req.setContext(null);

代码示例来源:origin: geoserver/geoserver

req.setService(lookupRequestBeanProperty(requestBean, "service", false));

代码示例来源:origin: geoserver/geoserver

protected void setUp() throws Exception {
  super.setUp();
  HelloWorld helloWorld = new HelloWorld();
  Service service =
      new Service(
          "hello",
          helloWorld,
          new Version("1.0.0"),
          Collections.singletonList("hello"));
  request =
      new MockHttpServletRequest() {
        public int getServerPort() {
          return 8080;
        }
      };
  request.setScheme("http");
  request.setServerName("localhost");
  request.setContextPath("geoserver");
  response = new MockHttpServletResponse();
  handler = new DefaultServiceExceptionHandler();
  requestInfo = new Request();
  requestInfo.setHttpRequest(request);
  requestInfo.setHttpResponse(response);
  requestInfo.setService("hello");
  requestInfo.setVersion("1.0.0");
}

代码示例来源:origin: geoserver/geoserver

request.setService("WMS");
request.setRequest("GetCapabilities");
Dispatcher.REQUEST.set(request);

代码示例来源:origin: geoserver/geoserver

request.setService("WMS");
request.setRequest("GetCapabilities");
Dispatcher.REQUEST.set(request);

代码示例来源:origin: geoserver/geoserver

request.setService("WMS");
request.setRequest("GetCapabilities");
Dispatcher.REQUEST.set(request);

代码示例来源:origin: org.geoserver.security/gs-security-tests

protected void setupRequestThreadLocal(String service) {
  Request request = new Request();
  request.setService(service);
  Dispatcher.REQUEST.set(request);
}

代码示例来源:origin: org.geoserver.extension/control-flow

Request buildRequest(String service, String request, String outputFormat) {
    Request r = new Request();
    r.setService(service);
    r.setRequest(request);
    r.setOutputFormat(outputFormat);

    return r;
  }
}

代码示例来源:origin: org.geoserver.community/gs-geofence

@Test
public void testWmsLimited() {
  if (!IS_GEOFENCE_AVAILABLE) {
    return;
  }
  UsernamePasswordAuthenticationToken user =
      new UsernamePasswordAuthenticationToken("wmsuser", "wmsuser");
  // check layer in the sf workspace with a wfs request
  Request request = new Request();
  request.setService("WFS");
  request.setRequest("GetFeature");
  Dispatcher.REQUEST.set(request);
  LayerInfo generic = catalog.getLayerByName(getLayerId(MockData.GENERICENTITY));
  VectorAccessLimits vl = (VectorAccessLimits) accessManager.getAccessLimits(user, generic);
  assertEquals(Filter.EXCLUDE, vl.getReadFilter());
  assertEquals(Filter.EXCLUDE, vl.getWriteFilter());
  // now fake a getmap request (using a service and request with a different case than the
  // geofenceService)
  request = new Request();
  request.setService("wms");
  Dispatcher.REQUEST.set(request);
  vl = (VectorAccessLimits) accessManager.getAccessLimits(user, generic);
  assertEquals(Filter.INCLUDE, vl.getReadFilter());
  assertEquals(Filter.INCLUDE, vl.getWriteFilter());
}

代码示例来源:origin: org.geoserver.extension/gs-geofence

@Test
public void testWmsLimited() {
  if (!IS_GEOFENCE_AVAILABLE) {
    return;
  }
  UsernamePasswordAuthenticationToken user =
      new UsernamePasswordAuthenticationToken("wmsuser", "wmsuser");
  // check layer in the sf workspace with a wfs request
  Request request = new Request();
  request.setService("WFS");
  request.setRequest("GetFeature");
  Dispatcher.REQUEST.set(request);
  LayerInfo generic = catalog.getLayerByName(getLayerId(MockData.GENERICENTITY));
  if (generic != null) {
    VectorAccessLimits vl =
        (VectorAccessLimits) accessManager.getAccessLimits(user, generic);
    assertEquals(Filter.INCLUDE, vl.getReadFilter());
    assertEquals(Filter.INCLUDE, vl.getWriteFilter());
    // now fake a getmap request (using a service and request with a different case than the
    // geofenceService)
    request = new Request();
    request.setService("wms");
    Dispatcher.REQUEST.set(request);
    vl = (VectorAccessLimits) accessManager.getAccessLimits(user, generic);
    assertEquals(Filter.INCLUDE, vl.getReadFilter());
    assertEquals(Filter.INCLUDE, vl.getWriteFilter());
  }
}

代码示例来源:origin: org.geoserver.extension/gs-geofence

request.setService("WFS");
request.setRequest("GetFeature");
Dispatcher.REQUEST.set(request);
request.setService("WmS");
request.setRequest("gETmAP");
Dispatcher.REQUEST.set(request);

代码示例来源:origin: org.geoserver.community/gs-geofence

request.setService("WFS");
request.setRequest("GetFeature");
Dispatcher.REQUEST.set(request);
request.setService("WmS");
request.setRequest("gETmAP");
Dispatcher.REQUEST.set(request);

相关文章