本文整理了Java中org.geoserver.platform.Service.getService()
方法的一些代码示例,展示了Service.getService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Service.getService()
方法的具体详情如下:
包路径:org.geoserver.platform.Service
类名称:Service
方法名:getService
暂无
代码示例来源:origin: geoserver/geoserver
Object execute(Request req, Operation opDescriptor) throws Throwable {
Service serviceDescriptor = opDescriptor.getService();
Object serviceBean = serviceDescriptor.getService();
Object[] parameters = opDescriptor.getParameters();
// step 5: execute
Object result = null;
try {
if (serviceBean instanceof DirectInvocationService) {
// invokeDirect expects the operation to be called as declared in the operation
// descriptor, although it used to match a method name, lets use the declared
// operation name for contract compliance.
String operationName = opDescriptor.getId();
result =
((DirectInvocationService) serviceBean)
.invokeDirect(operationName, parameters);
} else {
Method operation = opDescriptor.getMethod();
result = operation.invoke(serviceBean, parameters);
}
} catch (Exception e) {
if (e.getCause() != null) {
throw e.getCause();
}
throw e;
}
return fireOperationExecutedCallback(req, opDescriptor, result);
}
代码示例来源:origin: geoserver/geoserver
public Service serviceDispatched(Request request, Service service) {
Object s = service.getService();
代码示例来源:origin: geoserver/geoserver
@Override
public Object operationExecuted(
Request request, Operation operation, Object result) {
Operation op = Dispatcher.REQUEST.get().getOperation();
assertNotNull(op);
assertTrue(op.getService().getService() instanceof HelloWorld);
assertTrue(op.getParameters()[0] instanceof Message);
return result;
}
});
代码示例来源:origin: geoserver/geoserver
Object serviceBean = serviceDescriptor.getService();
Method operation = OwsUtils.method(serviceBean.getClass(), req.getRequest());
代码示例来源:origin: org.geoserver/gs-wms
@Override
protected void qualifyRequest(
WorkspaceInfo ws, PublishedInfo l, Service service, Request request) {
if (WebMapService.class.isInstance(service.getService())) {
String layers = (String) request.getRawKvp().get("LAYERS");
if (layers != null) {
request.getRawKvp().put("LAYERS", qualifyLayerNamesKVP(layers, ws));
}
layers = (String) request.getRawKvp().get("QUERY_LAYERS");
if (layers != null) {
request.getRawKvp().put("QUERY_LAYERS", qualifyLayerNamesKVP(layers, ws));
}
String layer = (String) request.getRawKvp().get("LAYER");
if (layer != null) {
request.getRawKvp().put("LAYER", qualifyName(layer, ws));
}
String styles = (String) request.getRawKvp().get("STYLES");
if (styles != null && !styles.trim().isEmpty()) {
request.getRawKvp().put("STYLES", qualifyStyleNamesKVP(styles, ws));
}
String style = (String) request.getRawKvp().get("STYLE");
if (style != null && !style.trim().isEmpty()) {
request.getRawKvp().put("STYLE", qualifyStyleName(style, ws));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!