Package de.terrestris.shoguncore.service
Class GeoServerInterceptorService
- java.lang.Object
-
- de.terrestris.shoguncore.service.GeoServerInterceptorService
-
@Service public class GeoServerInterceptorService extends java.lang.Object- Author:
- Daniel Koch, Kai Volland, terrestris GmbH & Co. KG
-
-
Constructor Summary
Constructors Constructor Description GeoServerInterceptorService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.net.URIappendQueryString(java.net.URI uri, java.lang.String appendQuery)Returns a new URI with the passed queryString (e.g.java.net.URIgetGeoServerBaseURIFromNameSpace(java.lang.String geoServerNamespace, boolean useWmsReflector, boolean isWMS)java.util.PropertiesgetGeoServerNameSpaces()ResponseinterceptGeoServerRequest(javax.servlet.http.HttpServletRequest request)ResponseinterceptGeoServerRequest(javax.servlet.http.HttpServletRequest request, java.util.Optional<java.lang.String> endpoint)ResponseinterceptWmtsRequest(javax.servlet.http.HttpServletRequest request, java.lang.String serviceId)static ResponsesendRequest(MutableHttpServletRequest request)voidsetGeoServerNameSpaces(java.util.Properties geoServerNameSpaces)voidsetInterceptorRuleService(InterceptorRuleService<InterceptorRule,?> interceptorRuleService)voidsetOgcMessageDistributor(OgcMessageDistributor ogcMessageDistributor)
-
-
-
Method Detail
-
interceptWmtsRequest
public Response interceptWmtsRequest(javax.servlet.http.HttpServletRequest request, java.lang.String serviceId) throws java.io.UnsupportedEncodingException, InterceptorException, org.apache.http.HttpException, java.net.URISyntaxException
- Throws:
java.io.UnsupportedEncodingExceptionInterceptorExceptionorg.apache.http.HttpExceptionjava.net.URISyntaxException
-
interceptGeoServerRequest
public Response interceptGeoServerRequest(javax.servlet.http.HttpServletRequest request) throws InterceptorException, java.net.URISyntaxException, org.apache.http.HttpException, java.io.IOException
- Parameters:
request-- Returns:
- Throws:
InterceptorExceptionjava.net.URISyntaxExceptionorg.apache.http.HttpExceptionjava.io.IOException
-
interceptGeoServerRequest
public Response interceptGeoServerRequest(javax.servlet.http.HttpServletRequest request, java.util.Optional<java.lang.String> endpoint) throws InterceptorException, java.net.URISyntaxException, org.apache.http.HttpException, java.io.IOException
- Parameters:
request-endpoint-- Returns:
- Throws:
InterceptorExceptionjava.net.URISyntaxExceptionorg.apache.http.HttpExceptionjava.io.IOException
-
getGeoServerBaseURIFromNameSpace
public java.net.URI getGeoServerBaseURIFromNameSpace(java.lang.String geoServerNamespace, boolean useWmsReflector, boolean isWMS) throws java.net.URISyntaxException, InterceptorException- Parameters:
geoServerNamespace-useWmsReflector-isWMS-- Throws:
java.net.URISyntaxExceptionInterceptorException
-
sendRequest
public static Response sendRequest(MutableHttpServletRequest request) throws InterceptorException, org.apache.http.HttpException
- Parameters:
request-- Throws:
InterceptorExceptionorg.apache.http.HttpException
-
appendQueryString
public static java.net.URI appendQueryString(java.net.URI uri, java.lang.String appendQuery)Returns a new URI with the passed queryString (e.g. foo=bar&baz=123) appended to the passed URI. Adjusted from http://stackoverflow.com/a/26177982.- Parameters:
uri-appendQuery-
-
setOgcMessageDistributor
public void setOgcMessageDistributor(OgcMessageDistributor ogcMessageDistributor)
- Parameters:
ogcMessageDistributor- the ogcMessageDistributor to set
-
setInterceptorRuleService
public void setInterceptorRuleService(InterceptorRuleService<InterceptorRule,?> interceptorRuleService)
- Parameters:
interceptorRuleService- the interceptorRuleService to set
-
getGeoServerNameSpaces
public java.util.Properties getGeoServerNameSpaces()
- Returns:
- the geoServerNameSpaces
-
setGeoServerNameSpaces
@Autowired @Qualifier("geoServerNameSpaces") public void setGeoServerNameSpaces(java.util.Properties geoServerNameSpaces)- Parameters:
geoServerNameSpaces- the geoServerNameSpaces to set
-
-