com.gisgraphy.webapp.action

## Class GeolocSearchAction

- java.lang.Object
- - com.opensymphony.xwork2.ActionSupport
  - - com.gisgraphy.webapp.action.SearchAction
    - - com.gisgraphy.webapp.action.GeolocSearchAction

- All Implemented Interfaces:
    com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable

      public class GeolocSearchAction
      extends SearchAction

  Geolocalisation search Action
  Author:
    David Masclet
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `String` | `lat`
    `String` | `lng`
    `String` | `radius`

    - ### Fields inherited from class com.gisgraphy.webapp.action.SearchAction

      `DEFAULT_NUMBER_OF_RESULTS_PER_PAGE, errorMessage, POPUP_VIEW`

    - ### Fields inherited from class com.opensymphony.xwork2.ActionSupport

      `LOG`

    - ### Fields inherited from interface com.opensymphony.xwork2.Action

      `ERROR, INPUT, LOGIN, NONE, SUCCESS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeolocSearchAction()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.gisgraphy.serializer.common.OutputFormat[]` | `getFormats()`
    `String` | `getLat()`
    `String` | `getLng()`
    `String` | `getPlacetype()`
    `String` | `getRadius()`
    `com.gisgraphy.geoloc.GeolocResultsDto` | `getResponseDTO()`
    `boolean` | `isDisplayResults()`
    `boolean` | `isDistance()`
    `String` | `search()` Execute a GeolocSearch from the request parameters
    `String` | `searchpopup()` Execute a geolocSearch from the request parameters
    `void` | `setDistance(boolean distance)`
    `void` | `setGeolocSearchEngine(com.gisgraphy.geocoloc.IGeolocSearchEngine geolocSearchEngine)`
    `void` | `setLat(String lat)`
    `void` | `setLng(String lng)`
    `void` | `setPlacetype(String placetype)`
    `void` | `setRadius(String radius)`

    - ### Methods inherited from class com.gisgraphy.webapp.action.SearchAction

      `getDefaultNumberOfResultsPerPage, getErrorMessage, getFormat, getFrom, getPlacetypes, getTo, isAdvancedSearch, isIndent, setAdvancedSearch, setFormat, setFrom, setIndent, setTo`

    - ### Methods inherited from class com.opensymphony.xwork2.ActionSupport

      `addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate`

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

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

- - ### Field Detail

    - #### lat

          public String lat

    - #### lng

          public String lng

    - #### radius

          public String radius

  - ### Constructor Detail

    - #### GeolocSearchAction

          public GeolocSearchAction()

  - ### Method Detail

    - #### isDistance

          public boolean isDistance()

    - #### setDistance

          public void setDistance(boolean distance)

    - #### isDisplayResults

          public boolean isDisplayResults()

      Returns:
        Wether the search has been done and the results should be displayed

    - #### search

          public String search()
                        throws Exception

      Execute a GeolocSearch from the request parameters
      Returns:
        SUCCESS if the search is successful
      Throws:
        `Exception` - in case of errors

    - #### searchpopup

          public String searchpopup()
                             throws Exception

      Execute a geolocSearch from the request parameters
      Returns:
        POPUPVIEW if the search is successfull The view will not be decorated by sitemesh (see decorators.xml)
      Throws:
        `Exception` - in case of errors

    - #### getFormats

          public com.gisgraphy.serializer.common.OutputFormat[] getFormats()

      Returns:
        the available formats for fulltext

    - #### setGeolocSearchEngine

          public void setGeolocSearchEngine(com.gisgraphy.geocoloc.IGeolocSearchEngine geolocSearchEngine)

      Parameters:
        `geolocSearchEngine` - the geolocSearchEngine to set

    - #### getLat

          public String getLat()

      Returns:
        the lat

    - #### setLat

          public void setLat(String lat)

      Parameters:
        `lat` - the lat to set

    - #### getLng

          public String getLng()

      Returns:
        the lng

    - #### setLng

          public void setLng(String lng)

      Parameters:
        `lng` - the lng to set

    - #### getRadius

          public String getRadius()

      Returns:
        the radius

    - #### setRadius

          public void setRadius(String radius)

      Parameters:
        `radius` - the radius to set

    - #### setPlacetype

          public void setPlacetype(String placetype)

      Parameters:
        `placetype` - the placetype to set

    - #### getPlacetype

          public String getPlacetype()

      Returns:
        the placetype

    - #### getResponseDTO

          public com.gisgraphy.geoloc.GeolocResultsDto getResponseDTO()

      Returns:
        the response

Copyright © 2015. All rights reserved.