Package de.terrestris.shoguncore.service
Class GeoServerInterceptorService
- java.lang.Object
-
- de.terrestris.shoguncore.service.GeoServerInterceptorService
-
@Service public class GeoServerInterceptorService extends Object
- Author:
- Daniel Koch, Kai Volland, terrestris GmbH & Co. KG
-
-
Field Summary
Fields Modifier and Type Field Description protected LayerService<Layer,LayerDao<Layer>>layerService
-
Constructor Summary
Constructors Constructor Description GeoServerInterceptorService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static URIappendQueryString(URI uri, String appendQuery)Returns a new URI with the passed queryString (e.g.URIgetGeoServerBaseURIFromNameSpace(String geoServerNamespace, boolean useWmsReflector, boolean isWMS)PropertiesgetGeoServerNameSpaces()ResponseinterceptGeoServerRequest(javax.servlet.http.HttpServletRequest request)ResponseinterceptGeoServerRequest(javax.servlet.http.HttpServletRequest request, Optional<String> endpoint)ResponseinterceptWmtsRequest(javax.servlet.http.HttpServletRequest request, String serviceId)static ResponsesendRequest(MutableHttpServletRequest request)voidsetGeoServerNameSpaces(Properties geoServerNameSpaces)voidsetInterceptorRuleService(InterceptorRuleService<InterceptorRule,?> interceptorRuleService)voidsetOgcMessageDistributor(OgcMessageDistributor ogcMessageDistributor)
-
-
-
Field Detail
-
layerService
@Autowired @Qualifier("layerService") protected LayerService<Layer,LayerDao<Layer>> layerService
-
-
Method Detail
-
sendRequest
public static Response sendRequest(MutableHttpServletRequest request) throws InterceptorException, org.apache.http.HttpException
- Parameters:
request-- Throws:
InterceptorExceptionorg.apache.http.HttpException
-
appendQueryString
public static URI appendQueryString(URI uri, 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-
-
interceptWmtsRequest
public Response interceptWmtsRequest(javax.servlet.http.HttpServletRequest request, String serviceId) throws UnsupportedEncodingException, InterceptorException, org.apache.http.HttpException, URISyntaxException
- Throws:
UnsupportedEncodingExceptionInterceptorExceptionorg.apache.http.HttpExceptionURISyntaxException
-
interceptGeoServerRequest
public Response interceptGeoServerRequest(javax.servlet.http.HttpServletRequest request) throws InterceptorException, URISyntaxException, org.apache.http.HttpException, IOException
- Parameters:
request-- Returns:
- Throws:
InterceptorExceptionURISyntaxExceptionorg.apache.http.HttpExceptionIOException
-
interceptGeoServerRequest
public Response interceptGeoServerRequest(javax.servlet.http.HttpServletRequest request, Optional<String> endpoint) throws InterceptorException, URISyntaxException, org.apache.http.HttpException, IOException
- Parameters:
request-endpoint-- Returns:
- Throws:
InterceptorExceptionURISyntaxExceptionorg.apache.http.HttpExceptionIOException
-
getGeoServerBaseURIFromNameSpace
public URI getGeoServerBaseURIFromNameSpace(String geoServerNamespace, boolean useWmsReflector, boolean isWMS) throws URISyntaxException, InterceptorException
- Parameters:
geoServerNamespace-useWmsReflector-isWMS-- Throws:
URISyntaxExceptionInterceptorException
-
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 Properties getGeoServerNameSpaces()
- Returns:
- the geoServerNameSpaces
-
setGeoServerNameSpaces
@Autowired @Qualifier("geoServerNameSpaces") public void setGeoServerNameSpaces(Properties geoServerNameSpaces)- Parameters:
geoServerNameSpaces- the geoServerNameSpaces to set
-
-