public class GisResolver
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
static long |
CACHE_RESET_DELAY |
static long |
CACHE_RESET_TIME |
protected Map<String,String> |
cachedGisViewerApplHostname |
protected Map<String,ServerParameters> |
cachedServerParams |
static String |
GIS_UUID |
static String |
PARAM_SEPARATOR_REPLACEMENT_KEY |
static String |
PARAM_SEPARATOR_REPLACEMENT_VALUE |
static String |
SCOPE |
Constructor and Description |
---|
GisResolver() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected ServerParameters |
getCachedServerParameters(String scope)
Gets the cached server parameters.
|
protected String |
getGisViewerApplicationURL(String scope)
Gets the gis viewer application url.
|
protected String |
getLayerWmsRequest(String scope,
String gisUUID,
ServerParameters geonetworkParams)
Gets the layer wms request.
|
static String |
getRequestURL(javax.servlet.http.HttpServletRequest req)
Gets the request url.
|
void |
init() |
protected void |
sendError(javax.servlet.http.HttpServletResponse response,
int status,
String message)
Send error.
|
protected void |
urlRedirect(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse response,
String redirectTo)
Url redirect.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public static final String PARAM_SEPARATOR_REPLACEMENT_VALUE
public static final String PARAM_SEPARATOR_REPLACEMENT_KEY
public static final String GIS_UUID
public static final String SCOPE
protected Map<String,ServerParameters> cachedServerParams
public static final long CACHE_RESET_TIME
public static final long CACHE_RESET_DELAY
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected ServerParameters getCachedServerParameters(String scope) throws Exception
scope
- the scopeException
- the exceptionprotected String getGisViewerApplicationURL(String scope) throws Exception
scope
- the scopeException
- the exceptionprotected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected String getLayerWmsRequest(String scope, String gisUUID, ServerParameters geonetworkParams) throws Exception
scope
- the scopegisUUID
- the gis uuidgeonetworkParams
- the geonetwork paramsException
- the exceptionprotected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void sendError(javax.servlet.http.HttpServletResponse response, int status, String message) throws IOException
response
- the responsestatus
- the statusmessage
- the messageIOException
- Signals that an I/O exception has occurred.protected void urlRedirect(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse response, String redirectTo) throws IOException
req
- the reqresponse
- the responseredirectTo
- the redirect toIOException
- Signals that an I/O exception has occurred.public static String getRequestURL(javax.servlet.http.HttpServletRequest req)
req
- the reqCopyright © 2016. All Rights Reserved.