GisResolver (uri-resolver 1.5.0-SNAPSHOT API)
Date: 2016-01-29

org.gcube.datatransfer.resolver.gis

## Class GisResolver

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.gcube.datatransfer.resolver.gis.GisResolver

- All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

      public class GisResolver
      extends javax.servlet.http.HttpServlet

  The Class GisResolver.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 7, 2016
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    Constructor and Description
    `GisResolver()`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PARAM_SEPARATOR_REPLACEMENT_VALUE

          public static final String PARAM_SEPARATOR_REPLACEMENT_VALUE

      See Also:
        Constant Field Values

    - #### PARAM_SEPARATOR_REPLACEMENT_KEY

          public static final String PARAM_SEPARATOR_REPLACEMENT_KEY

      See Also:
        Constant Field Values

    - #### GIS_UUID

          public static final String GIS_UUID

      See Also:
        Constant Field Values

    - #### SCOPE

          public static final String SCOPE

      See Also:
        Constant Field Values

    - #### cachedServerParams

          protected Map<String,ServerParameters> cachedServerParams

    - #### cachedGisViewerApplHostname

          protected Map<String,String> cachedGisViewerApplHostname

    - #### CACHE_RESET_TIME

          public static final long CACHE_RESET_TIME

      See Also:
        Constant Field Values

    - #### CACHE_RESET_DELAY

          public static final long CACHE_RESET_DELAY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GisResolver

          public GisResolver()

  - ### Method Detail

    - #### init

          public void init()
                    throws javax.servlet.ServletException

      Overrides:
        `init` in class `javax.servlet.GenericServlet`
      Throws:
        `javax.servlet.ServletException`

    - #### getCachedServerParameters

          protected ServerParameters getCachedServerParameters(String scope)
                                                        throws Exception

      Gets the cached server parameters.
      Parameters:
        `scope` - the scope
      Returns:
        the cached server parameters
      Throws:
        `Exception` - the exception

    - #### getGisViewerApplicationURL

          protected String getGisViewerApplicationURL(String scope)
                                               throws Exception

      Gets the gis viewer application url.
      Parameters:
        `scope` - the scope
      Returns:
        the gis viewer application url
      Throws:
        `Exception` - the exception

    - #### doGet

          protected void doGet(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp)
                        throws javax.servlet.ServletException,
                               IOException

      Overrides:
        `doGet` in class `javax.servlet.http.HttpServlet`
      Throws:
        `javax.servlet.ServletException`
        `IOException`

    - #### getLayerWmsRequest

          protected String getLayerWmsRequest(String scope,
                                  String gisUUID,
                                  ServerParameters geonetworkParams)
                                       throws Exception

      Gets the layer wms request.
      Parameters:
        `scope` - the scope
        `gisUUID` - the gis uuid
        `geonetworkParams` - the geonetwork params
      Returns:
        the layer wms request
      Throws:
        `Exception` - the exception

    - #### doPost

          protected void doPost(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse resp)
                         throws javax.servlet.ServletException,
                                IOException

      Overrides:
        `doPost` in class `javax.servlet.http.HttpServlet`
      Throws:
        `javax.servlet.ServletException`
        `IOException`

    - #### sendError

          protected void sendError(javax.servlet.http.HttpServletResponse response,
                       int status,
                       String message)
                            throws IOException

      Send error.
      Parameters:
        `response` - the response
        `status` - the status
        `message` - the message
      Throws:
        `IOException` - Signals that an I/O exception has occurred.

    - #### urlRedirect

          protected void urlRedirect(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse response,
                         String redirectTo)
                              throws IOException

      Url redirect.
      Parameters:
        `req` - the req
        `response` - the response
        `redirectTo` - the redirect to
      Throws:
        `IOException` - Signals that an I/O exception has occurred.

    - #### getRequestURL

          public static String getRequestURL(javax.servlet.http.HttpServletRequest req)

      Gets the request url.
      Parameters:
        `req` - the req
      Returns:
        the request url

Copyright © 2016. All Rights Reserved.