本文整理了Java中org.geoserver.platform.Service.getOperations()
方法的一些代码示例,展示了Service.getOperations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Service.getOperations()
方法的具体详情如下:
包路径:org.geoserver.platform.Service
类名称:Service
方法名:getOperations
暂无
代码示例来源:origin: geoserver/geoserver
private boolean operationExists(Request req, Service serviceDescriptor) {
boolean exists = false;
for (String op : serviceDescriptor.getOperations()) {
if (op.equalsIgnoreCase(req.getRequest())) {
exists = true;
break;
}
}
return exists;
}
代码示例来源:origin: org.geoserver.web/web-security
@Override
public List<String> getObject() {
ArrayList<String> result = new ArrayList<String>();
boolean flag = true;
for (Service ows : GeoServerExtensions.extensions(Service.class)) {
String service = rule.getService();
if (service.equals(ows.getId()) && !result.contains(ows.getOperations()) && flag) {
flag = false;
result.addAll(ows.getOperations());
}
}
Collections.sort(result);
result.add(0, "*");
return result;
}
代码示例来源:origin: org.geoserver.web/web-sec-core
@Override
public List<String> getObject() {
ArrayList<String> result = new ArrayList<String>();
boolean flag = true;
for (Service ows : GeoServerExtensions.extensions(Service.class)) {
String service = rule.getService();
if (service.equals(ows.getId()) && !result.contains(ows.getOperations()) && flag) {
flag = false;
result.addAll(ows.getOperations());
}
}
Collections.sort(result);
result.add(0, "*");
return result;
}
代码示例来源:origin: org.geoserver.community/gs-nsg-wfs-profile
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
// configure the extra operation in WFS 2.0
List<Service> services = GeoServerExtensions.extensions(Service.class);
for (Service s : services) {
if ("wfs".equals(s.getId().toLowerCase())
&& Integer.valueOf(2).equals(s.getVersion().getMajor())) {
if (!s.getOperations().contains(PAGE_RESULTS)) {
s.getOperations().add(PAGE_RESULTS);
}
}
}
}
}
代码示例来源:origin: org.geoserver.community/gs-geofence-server
/**
* Returns a sorted list of operation names in the specified service (or * if the workspace is
* *)
*/
protected List<String> getOperationNames(String serviceName) {
SortedSet<String> resultSet = new TreeSet<String>();
boolean flag = true;
if (serviceName != null) {
for (Service ows : GeoServerExtensions.extensions(Service.class)) {
if (serviceName.equalsIgnoreCase(ows.getId()) && flag) {
flag = false;
resultSet.addAll(ows.getOperations());
}
}
}
return new ArrayList<String>(resultSet);
}
代码示例来源:origin: org.geoserver.web/gs-web-sec-core
@Override
public List<String> getObject() {
List<String> result = new ArrayList<String>();
for (Service ows : GeoServerExtensions.extensions(Service.class)) {
String service = rule.getService();
if (ows.getId().equals(service)) {
for (String operation : ows.getOperations()) {
if (!result.contains(operation)) {
result.add(operation);
}
}
}
}
Collections.sort(result);
result.add(0, "*");
return result;
}
代码示例来源:origin: org.geoserver.community/gs-oseo-core
@Override
public int compare(SimpleFeature f1, SimpleFeature f2) {
String off1 = (String) f1.getAttribute("offering");
String code1 = (String) f1.getAttribute("code");
String code2 = (String) f2.getAttribute("code");
// order by the list of operations in the service if possible
if (off1 != null) {
Service service = getServiceFromOffering(off1);
if (service != null) {
int idx1 = service.getOperations().indexOf(code1);
int idx2 = service.getOperations().indexOf(code2);
if (idx1 == -1) {
return idx2 == -1 ? STRING_COMPARATOR.compare(code1, code2) : -1;
} else {
return idx1 - idx2;
}
}
}
// fallback, service not found, order lexicographically
return STRING_COMPARATOR.compare(code1, code2);
}
代码示例来源:origin: org.geoserver.community/gs-nsg-wfs-profile
@Override
public Service serviceDispatched(Request request, Service service) throws ServiceException {
Object req = request.getKvp().get("REQUEST");
if ("wfs".equals(service.getId().toLowerCase()) && PAGE_RESULTS.equals(req)) {
// allow the request to be successfully parsed as a GetFeature (needs at least a
// typename or a featureId)
request.getKvp().put("featureId", Collections.singletonList("dummy"));
// replace the service
return new Service(
service.getId(), this.service, service.getVersion(), service.getOperations());
}
return service;
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData data) throws Exception {
Service service = (Service) GeoServerExtensions.bean("wfsService-1.1.0");
// register fake operation to ease testing
service.getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData systemTestData) throws Exception {
getServiceDescriptor10().getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData data) throws Exception {
getServiceDescriptor20().getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData systemTestData) throws Exception {
getServiceDescriptor11().getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData data) throws Exception {
getServiceDescriptor20().getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void setUpInternal(SystemTestData systemTestData) throws Exception {
getServiceDescriptor11().getOperations().add("ReleaseLock");
}
代码示例来源:origin: org.geoserver.web/gs-web-core
/** @see org.geoserver.web.CapabilitiesHomePageLinkProvider#getCapabilitiesComponent */
public Component getCapabilitiesComponent(final String id) {
List<CapsInfo> serviceInfoLinks = new ArrayList<CapabilitiesHomePagePanel.CapsInfo>();
List<Service> extensions = GeoServerExtensions.extensions(Service.class);
for (Service si : extensions) {
if (si.getCustomCapabilitiesLink() != null) {
String serviceId = si.getId();
String capsLink = si.getCustomCapabilitiesLink();
CapsInfo ci = new CapsInfo(serviceId, si.getVersion(), capsLink);
serviceInfoLinks.add(ci);
} else if (si.getOperations().contains("GetCapabilities")) {
String serviceId = si.getId();
String capsLink =
"../ows?service="
+ serviceId
+ "&version="
+ si.getVersion().toString()
+ "&request=GetCapabilities";
CapsInfo ci = new CapsInfo(serviceId, si.getVersion(), capsLink);
serviceInfoLinks.add(ci);
}
}
return new CapabilitiesHomePagePanel(id, serviceInfoLinks);
}
}
内容来源于网络,如有侵权,请联系作者删除!