Class AutoCompleteWebScript

java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
fr.becpg.repo.autocomplete.web.scripts.AutoCompleteWebScript
All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript

public class AutoCompleteWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScript
The Class AutoCompleteWebScript.
Version:
$Id: $Id
Author:
querephi
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript

    org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    private static final org.apache.commons.logging.Log
    Constant logger
    private static final String
    Constant MODEL_KEY_NAME_SUGGESTIONS="suggestions"
    private static final String
    Constant MODEL_PAGE_SIZE="pageSize"
    private static final String
    Constant PARAM_AND_PROPS="andProps"
    private static final String
    Constant PARAM_ATTRIBUTE_NAME="attributeName"
    private static final String
    Constant PARAM_CLASS_NAME="className"
    private static final String
    Constant PARAM_CLASS_NAMES="classNames"
    private static final String
    Constant PARAM_ENTITY_NODEREF="entityNodeRef"
    private static final String
    Constant PARAM_EXCLUDE_CLASS_NAMES="excludeClassNames"
    private static final String
    Constant PARAM_EXCLUDE_PROPS="excludeProps"
    private static final String
    Constant PARAM_FILTER="filter"
    private static final String
    Constant PARAM_IS_SEARCH="isSearch"
    private static final String
    Constant PARAM_PAGE="page"
    private static final String
    Constant PARAM_PAGE_SIZE="pageSize"
    private static final String
    Constant PARAM_PARENT="parent"
    private static final String
    Constant PARAM_PATH="path"
    private static final String
    Constant PARAM_PRODUCT_TYPE="productType"
    private static final String
    Constant PARAM_QUERY="q"
    private static final String
    Constant PARAM_SOURCE_TYPE="sourcetype"
    private static final String
    Constant PROP_EXCLUDE_SOURCES="excludeSources"
    private static final String
    Constant PROP_FIELD_NAME="fieldName"
    private static final String
    Constant PROP_ITEM_ID="itemId"
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Map<String,Object>
    executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
    Suggest values according to query url : becpg/autocomplete/{sourcetype}/{path}?
    getExtraParams(org.springframework.extensions.webscripts.WebScriptRequest req)
    getExtraParams.
    void
    Setter for the field AutoCompleteService.

    Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript

    execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate

    Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript

    addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • PARAM_SOURCE_TYPE

      private static final String PARAM_SOURCE_TYPE
      Constant PARAM_SOURCE_TYPE="sourcetype"
      See Also:
    • PARAM_CLASS_NAME

      private static final String PARAM_CLASS_NAME
      Constant PARAM_CLASS_NAME="className"
      See Also:
    • PARAM_CLASS_NAMES

      private static final String PARAM_CLASS_NAMES
      Constant PARAM_CLASS_NAMES="classNames"
      See Also:
    • PARAM_ATTRIBUTE_NAME

      private static final String PARAM_ATTRIBUTE_NAME
      Constant PARAM_ATTRIBUTE_NAME="attributeName"
      See Also:
    • PARAM_FILTER

      private static final String PARAM_FILTER
      Constant PARAM_FILTER="filter"
      See Also:
    • PARAM_EXCLUDE_CLASS_NAMES

      private static final String PARAM_EXCLUDE_CLASS_NAMES
      Constant PARAM_EXCLUDE_CLASS_NAMES="excludeClassNames"
      See Also:
    • PARAM_EXCLUDE_PROPS

      private static final String PARAM_EXCLUDE_PROPS
      Constant PARAM_EXCLUDE_PROPS="excludeProps"
      See Also:
    • PROP_EXCLUDE_SOURCES

      private static final String PROP_EXCLUDE_SOURCES
      Constant PROP_EXCLUDE_SOURCES="excludeSources"
      See Also:
    • PROP_ITEM_ID

      private static final String PROP_ITEM_ID
      Constant PROP_ITEM_ID="itemId"
      See Also:
    • PROP_FIELD_NAME

      private static final String PROP_FIELD_NAME
      Constant PROP_FIELD_NAME="fieldName"
      See Also:
    • PARAM_AND_PROPS

      private static final String PARAM_AND_PROPS
      Constant PARAM_AND_PROPS="andProps"
      See Also:
    • PARAM_PAGE_SIZE

      private static final String PARAM_PAGE_SIZE
      Constant PARAM_PAGE_SIZE="pageSize"
      See Also:
    • PARAM_PATH

      private static final String PARAM_PATH
      Constant PARAM_PATH="path"
      See Also:
    • PARAM_PARENT

      private static final String PARAM_PARENT
      Constant PARAM_PARENT="parent"
      See Also:
    • PARAM_ENTITY_NODEREF

      private static final String PARAM_ENTITY_NODEREF
      Constant PARAM_ENTITY_NODEREF="entityNodeRef"
      See Also:
    • PARAM_QUERY

      private static final String PARAM_QUERY
      Constant PARAM_QUERY="q"
      See Also:
    • PARAM_PRODUCT_TYPE

      private static final String PARAM_PRODUCT_TYPE
      Constant PARAM_PRODUCT_TYPE="productType"
      See Also:
    • MODEL_KEY_NAME_SUGGESTIONS

      private static final String MODEL_KEY_NAME_SUGGESTIONS
      Constant MODEL_KEY_NAME_SUGGESTIONS="suggestions"
      See Also:
    • PARAM_PAGE

      private static final String PARAM_PAGE
      Constant PARAM_PAGE="page"
      See Also:
    • MODEL_PAGE_SIZE

      private static final String MODEL_PAGE_SIZE
      Constant MODEL_PAGE_SIZE="pageSize"
      See Also:
    • logger

      private static final org.apache.commons.logging.Log logger
      Constant logger
    • autoCompleteService

      private AutoCompleteService autoCompleteService
  • Constructor Details

    • AutoCompleteWebScript

      public AutoCompleteWebScript()
  • Method Details

    • setAutoCompleteService

      public void setAutoCompleteService(AutoCompleteService autoCompleteService)

      Setter for the field AutoCompleteService.

      Parameters:
      autoCompleteService - a AutoCompleteService object
    • executeImpl

      protected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
      Suggest values according to query url : becpg/autocomplete/{sourcetype}/{path}?q=&parent=.
      Overrides:
      executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScript
    • getExtraParams

      private HashMap<String,String> getExtraParams(org.springframework.extensions.webscripts.WebScriptRequest req)

      getExtraParams.

      Parameters:
      req - a WebScriptRequest object
      Returns:
      a HashMap object