private boolean isGetCapabilitiesSupported( SupportedEncodings supportedEncodings ) { return supportedEncodings.isEncodingSupported( GetCapabilities, "SOAP" ) || supportedEncodings.isEncodingSupported( capabilities, "SOAP" ); }
/** * Add enabled encodings for a request type. * * @param requestType * the type of the request to add enabled requests for, never <code>null</code> * @param enabledEncodingsPerRequestType * a list of encodings enabled for the request type. May be empty (all encodings are disabled), but never * <code>null</code>. */ public void addEnabledEncodings( E requestType, Set<String> enabledEncodingsPerRequestType ) { this.getEnabledEncodingsPerRequestType().put( requestType, enabledEncodingsPerRequestType ); }
private LimitedSupportedEncodings parseEncodingWithSupportedEncodings( List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WMSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); for ( WMSRequestType type : WMSRequestType.values() ) { limitedSupportedEncodings.addEnabledEncodings( type, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); } return limitedSupportedEncodings; }
SupportedEncodings parseEncodings( DeegreeWFS jaxbConfig ) { SupportedRequests supportedRequests = jaxbConfig.getSupportedRequests(); if ( supportedRequests != null ) { if ( isAtLeastOneRequestTypeConfigured( supportedRequests ) || isGlobalSupportedEncodingsConfigured( supportedRequests ) ) return parseEncodings( supportedRequests ); } return new UnlimitedSupportedEncodings(); }
private LimitedSupportedEncodings parseEncodingWithSupportedEncodings( List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( ListStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( LockFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( Transaction, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); return limitedSupportedEncodings; }
private boolean isGetFeatureInfoSupported( SupportedEncodings supportedEncodings ) { return supportedEncodings.isEncodingSupported( GetFeatureInfo, "SOAP" ); }
/** * Parse the supported request and encodings from DeegreeWMS configuration * * @param jaxbConfig * the DeegreeWMS configuration to parse the encoding from, never <code>null</code> * @return the parsed supported requests and encodings, never <code>null</code> */ public SupportedEncodings parseEncodings( DeegreeWMS jaxbConfig ) { SupportedRequests supportedRequests = jaxbConfig.getSupportedRequests(); if ( supportedRequests != null ) { if ( isAtLeastOneRequestTypeConfigured( supportedRequests ) || isGlobalSupportedEncodingsConfigured( supportedRequests ) ) return parseEncodings( supportedRequests ); } return new UnlimitedSupportedEncodings(); }
@Override public boolean isEncodingSupported( E requestType, String encoding ) { if ( getEnabledEncodingsPerRequestType().containsKey( requestType ) ) { Set<String> enabledEncodings = getEnabledEncodingsPerRequestType().get( requestType ); for ( String enabledEncoding : enabledEncodings ) { if ( enabledEncoding.equalsIgnoreCase( encoding ) ) return true; } } return false; }
private LimitedSupportedEncodings parseEncodingsWithSpecifiedRequestTypes( SupportedRequests supportedRequests, List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WMSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); for ( WMSRequestType type : WMSRequestType.values() ) { RequestType requestType = retrieveEncodings( supportedRequests, type ); Set<String> enabledEncodingsPerRequestType = collectEnabledEncodings( requestType, supportedEncodingsForAllRequestTypes ); limitedSupportedEncodings.addEnabledEncodings( type, enabledEncodingsPerRequestType ); } return limitedSupportedEncodings; }
private boolean isGetMapSupported( SupportedEncodings supportedEncodings ) { return supportedEncodings.isEncodingSupported( GetMap, "SOAP" ) || supportedEncodings.isEncodingSupported( map, "SOAP" ); }
private LimitedSupportedEncodings parseEncodingsWithSpecifiedRequestTypes( SupportedRequests supportedRequests, List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedRequests.getCreateStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedRequests.getDescribeFeatureType(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedRequests.getDescribeStoredQueries(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedRequests.getDropStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedRequests.getGetCapabilities(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedRequests.getGetFeature(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedRequests.getGetFeatureWithLock(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedRequests.getGetGmlObject(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedRequests.getGetPropertyValue(), supportedEncodingsForAllRequestTypes ) );
private boolean isPostSupported( WFSRequestType requestType ) { return supportedEncodings.isEncodingSupported( requestType, "XML" ) || supportedEncodings.isEncodingSupported( requestType, "SOAP" ); }
private boolean isGetSupported( WFSRequestType requestType ) { return supportedEncodings.isEncodingSupported( requestType, "KVP" ); }
private boolean isPostSupported( WMSRequestType requestType ) { return controller.getSupportedEncodings().isEncodingSupported( requestType, "XML" ); }
private boolean isGetSupported( WMSRequestType requestType ) { return controller.getSupportedEncodings().isEncodingSupported( requestType, "KVP" ); }
private boolean isGetSupported( WMSConstants.WMSRequestType requestType ) { return controller.getSupportedEncodings().isEncodingSupported( requestType, "KVP" ); }
if ( !supportedEncodings.isEncodingSupported( req, "KVP" ) ) { throw new OWSException( "GET/KVP is not supported for " + requestName + " requests.", OWSException.OPERATION_NOT_SUPPORTED );
WMSRequestType requestType = detectWmsRequestType( requestName ); if ( !supportedEncodings.isEncodingSupported( requestType, "XML" ) ) { throw new OWSException( "POST/XML is not supported for " + requestName + " requests.", OWSException.OPERATION_NOT_SUPPORTED );
WMSRequestType requestType = detectWmsRequestType( requestName ); if ( !supportedEncodings.isEncodingSupported( requestType, "SOAP" ) ) { throw new OWSException( "POST/SOAP is not supported for " + requestName + " requests.", OWSException.OPERATION_NOT_SUPPORTED );
WFSRequestType requestType = getRequestTypeByName( requestName ); if ( !supportedEncodings.isEncodingSupported( requestType, "KVP" ) ) { throw new OWSException( "GET/KVP is not supported for " + requestName + " requests.", OWSException.OPERATION_NOT_SUPPORTED );