public void checkValidity(TransactionElement element, Map featureTypeInfos) throws WFSTransactionException { if (!getInfo().getServiceLevel().getOps().contains(WFSInfo.Operation.TRANSACTION_REPLACE)) { throw new WFSException(element, "Transaction REPLACE support is not enabled"); } if (featureTypeInfos.size() != 1) { throw new WFSException( element, "Transaction REPLACE must only specify features from a" + " single feature type"); } }
public void checkValidity( TransactionElement element, Map<QName, FeatureTypeInfo> featureTypeInfos) throws WFSTransactionException { if (!getInfo().getServiceLevel().getOps().contains(WFSInfo.Operation.TRANSACTION_INSERT)) { throw new WFSException(element, "Transaction INSERT support is not enabled"); } }
public void checkValidity(TransactionElement delete, Map featureTypeInfos) throws WFSTransactionException { if (!getInfo().getServiceLevel().getOps().contains(WFSInfo.Operation.TRANSACTION_DELETE)) { throw new WFSException(delete, "Transaction Delete support is not enabled"); } Filter f = delete.getFilter(); if ((f == null) || Filter.INCLUDE.equals(f)) { throw new WFSTransactionException( "Must specify filter for delete", "MissingParameterValue"); } }
@Override protected void wrapInternal(Map properties, SimpleHash model, WFSInfo wfsInfo) { WorkspaceInfo workspaceInfo = wfsInfo.getWorkspace(); properties.put("workspaceName", workspaceInfo != null ? workspaceInfo.getName() : "NO_WORKSPACE"); properties.put("enabled", wfsInfo.isEnabled() ? "true" : "false"); properties.put("name", wfsInfo.getName()); properties.put("title", wfsInfo.getTitle()); properties.put("maintainer", wfsInfo.getMaintainer()); properties.put("abstract", wfsInfo.getAbstract()); properties.put("accessConstraints", wfsInfo.getAccessConstraints()); properties.put("fees", wfsInfo.getFees()); properties.put("versions", wfsInfo.getVersions()); properties.put("keywords", wfsInfo.getKeywords()); properties.put("metadataLink", wfsInfo.getMetadataLink()); properties.put("citeCompliant", wfsInfo.isCiteCompliant() ? "true" : "false"); properties.put("onlineResource", wfsInfo.getOnlineResource()); properties.put("schemaBaseURL", wfsInfo.getSchemaBaseURL()); properties.put("verbose", wfsInfo.isVerbose() ? "true" : "false"); properties.put("maxFeatures", String.valueOf(wfsInfo.getMaxFeatures())); properties.put("isFeatureBounding", wfsInfo.isFeatureBounding() ? "true" : "false"); properties.put("serviceLevel", wfsInfo.getServiceLevel()); properties.put("isCanonicalSchemaLocation", wfsInfo.isCanonicalSchemaLocation() ? "true" : "false"); properties.put("encodeFeatureMember", wfsInfo.isEncodeFeatureMember() ? "true" : "false"); } });
if ((wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.BASIC))) { element("Operation", "Query"); if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_INSERT))) { if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_UPDATE))) { if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_DELETE))) { if ((wfs.getServiceLevel().getOps().contains(WFSInfo.Operation.LOCKFEATURE))) { element("Operation", "Lock");
protected void operationsMetadata() { start("ows:OperationsMetadata"); // setup basic operations List<OperationMetadata> operations = new ArrayList<>(); operations.add(getCapabilities()); operations.add(describeFeatureType()); operations.add(getFeature()); operations.add(getPropertyValue()); operations.add(listStoredQueries()); operations.add(describeStoredQueries()); operations.add(createStoredQuery()); operations.add(dropStoredQuery()); if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.COMPLETE)) { operations.add(lockFeature()); operations.add(getFeatureWithLock()); } if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.TRANSACTIONAL)) { operations.add(transaction()); } // allow extension points to manipulate/modify the list for (WFSExtendedCapabilitiesProvider provider : extCapsProviders) { provider.updateOperationMetadata(VERSION_20, operations); } // declare metadata for each operation operations.forEach(o -> operation(o)); constraints(); delegate.extendedCapabilities(); end("ows:OperationsMetadata"); }
List<DomainType> constraints = new ArrayList<>(); constraints.add(new DomainType("ImplementsBasicWFS", TRUE)); WFSInfo.ServiceLevel serviceLevel = wfs.getServiceLevel(); constraints.add( new DomainType(
operations.add(getGmlObject()); if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.COMPLETE)) { operations.add(lockFeature()); operations.add(getFeatureWithLock()); if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.TRANSACTIONAL)) { operations.add(transaction());
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof WFSInfo)) return false; final WFSInfo other = (WFSInfo) obj; if (gml == null) { if (other.getGML() != null) return false; } else if (!gml.equals(other.getGML())) return false; if (maxFeatures != other.getMaxFeatures()) return false; if (featureBounding != other.isFeatureBounding()) return false; if (canonicalSchemaLocation != other.isCanonicalSchemaLocation()) return false; if (serviceLevel == null) { if (other.getServiceLevel() != null) return false; } else if (!serviceLevel.equals(other.getServiceLevel())) return false; if (encodeFeatureMember != other.isEncodeFeatureMember()) return false; if (hitsIgnoreMaxFeatures != other.isHitsIgnoreMaxFeatures()) return false; if (srs == null) { if (other.getSRS() != null) return false; } else if (!srs.equals(other.getSRS())) return false; return true; } }
start("Operations"); if ((wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.BASIC))) { element("Query", null); if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_INSERT))) { if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_UPDATE))) { if ((wfs.getServiceLevel() .getOps() .contains(WFSInfo.Operation.TRANSACTION_DELETE))) { if ((wfs.getServiceLevel().getOps().contains(WFSInfo.Operation.LOCKFEATURE))) { element("Lock", null);
public TransactionResponse transaction(TransactionRequest request) throws WFSException { // make sure server is supporting transactions if (!wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.TRANSACTIONAL)) { throw new WFSException(request, "Transaction support is not enabled"); } try { return execute(request); } catch (WFSException e) { abort(request); // release any locks throw e; } catch (Throwable t) { abort(request); // release any locks throw new WFSException(request, t); } }
if (!getInfo().getServiceLevel().getOps().contains(WFSInfo.Operation.TRANSACTION_UPDATE)) { throw new WFSException(element, "Transaction Update support is not enabled");
handleGetFeature(); if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.TRANSACTIONAL)) { handleTransaction(); if (wfs.getServiceLevel().contains(WFSInfo.ServiceLevel.COMPLETE)) { handleLock(); handleFeatureWithLock();
if (!wfs.getServiceLevel().getOps().contains(WFSInfo.Operation.LOCKFEATURE)) { throw new WFSException(request, "Lock support is not enabled");