Class AbstractSolrFacetConfigAdminWebScript

    • Nested Class Summary

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

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

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Map<java.lang.String,​java.lang.Object> executeImpl​(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)  
      protected java.util.Set<org.alfresco.repo.search.impl.solr.facet.SolrFacetProperties.CustomProperties> getCustomProperties​(org.json.JSONObject customPropsJsonObj)  
      protected int getNonNegativeIntParameter​(org.springframework.extensions.webscripts.WebScriptRequest req, java.lang.String paramName, int defaultValue)
      Retrieves the named parameter as an integer, if the parameter is not present the default value is returned.
      protected java.util.Set<java.lang.String> getScopedSites​(org.json.JSONArray scopedSitesJsonArray)  
      protected <T> T getValue​(java.lang.Class<T> clazz, java.lang.Object value, T defaultValue)  
      void setFacetService​(org.alfresco.repo.search.impl.solr.facet.SolrFacetService facetService)  
      void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)  
      protected abstract java.util.Map<java.lang.String,​java.lang.Object> unprotectedExecuteImpl​(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)  
      protected void validateCurrentUser()  
      protected void validateFilterID​(java.lang.String filterID)  
      • 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 Detail

      • PARAM_FILTER_ID

        protected static final java.lang.String PARAM_FILTER_ID
        See Also:
        Constant Field Values
      • PARAM_FACET_QNAME

        protected static final java.lang.String PARAM_FACET_QNAME
        See Also:
        Constant Field Values
      • PARAM_DISPLAY_NAME

        protected static final java.lang.String PARAM_DISPLAY_NAME
        See Also:
        Constant Field Values
      • PARAM_DISPLAY_CONTROL

        protected static final java.lang.String PARAM_DISPLAY_CONTROL
        See Also:
        Constant Field Values
      • PARAM_MAX_FILTERS

        protected static final java.lang.String PARAM_MAX_FILTERS
        See Also:
        Constant Field Values
      • PARAM_HIT_THRESHOLD

        protected static final java.lang.String PARAM_HIT_THRESHOLD
        See Also:
        Constant Field Values
      • PARAM_MIN_FILTER_VALUE_LENGTH

        protected static final java.lang.String PARAM_MIN_FILTER_VALUE_LENGTH
        See Also:
        Constant Field Values
      • PARAM_SCOPED_SITES

        protected static final java.lang.String PARAM_SCOPED_SITES
        See Also:
        Constant Field Values
      • PARAM_IS_ENABLED

        protected static final java.lang.String PARAM_IS_ENABLED
        See Also:
        Constant Field Values
      • PARAM_CUSTOM_PROPERTIES

        protected static final java.lang.String PARAM_CUSTOM_PROPERTIES
        See Also:
        Constant Field Values
      • CUSTOM_PARAM_NAME

        protected static final java.lang.String CUSTOM_PARAM_NAME
        See Also:
        Constant Field Values
      • CUSTOM_PARAM_VALUE

        protected static final java.lang.String CUSTOM_PARAM_VALUE
        See Also:
        Constant Field Values
      • FILTER_ID_PATTERN

        protected static final java.util.regex.Pattern FILTER_ID_PATTERN
      • facetService

        protected org.alfresco.repo.search.impl.solr.facet.SolrFacetService facetService
      • namespaceService

        protected org.alfresco.service.namespace.NamespaceService namespaceService
    • Constructor Detail

      • AbstractSolrFacetConfigAdminWebScript

        public AbstractSolrFacetConfigAdminWebScript()
    • Method Detail

      • setFacetService

        public void setFacetService​(org.alfresco.repo.search.impl.solr.facet.SolrFacetService facetService)
        Parameters:
        facetService - the facetService to set
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
        Parameters:
        namespaceService - the namespaceService to set
      • executeImpl

        protected java.util.Map<java.lang.String,​java.lang.Object> executeImpl​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                                                     org.springframework.extensions.webscripts.Status status,
                                                                                     org.springframework.extensions.webscripts.Cache cache)
        Overrides:
        executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScript
      • validateCurrentUser

        protected void validateCurrentUser()
      • getValue

        protected <T> T getValue​(java.lang.Class<T> clazz,
                                 java.lang.Object value,
                                 T defaultValue)
                          throws org.json.JSONException
        Throws:
        org.json.JSONException
      • getCustomProperties

        protected java.util.Set<org.alfresco.repo.search.impl.solr.facet.SolrFacetProperties.CustomProperties> getCustomProperties​(org.json.JSONObject customPropsJsonObj)
                                                                                                                            throws org.json.JSONException
        Throws:
        org.json.JSONException
      • getScopedSites

        protected java.util.Set<java.lang.String> getScopedSites​(org.json.JSONArray scopedSitesJsonArray)
                                                          throws org.json.JSONException
        Throws:
        org.json.JSONException
      • validateFilterID

        protected void validateFilterID​(java.lang.String filterID)
      • getNonNegativeIntParameter

        protected int getNonNegativeIntParameter​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                 java.lang.String paramName,
                                                 int defaultValue)
        Retrieves the named parameter as an integer, if the parameter is not present the default value is returned.
        Parameters:
        req - The WebScript request
        paramName - The name of parameter to look for.
        defaultValue - The default value that should be returned if parameter is not present in request or is negative.
        Returns:
        The request parameter or default value
        Throws:
        org.springframework.extensions.webscripts.WebScriptException - if the named parameter cannot be converted to int (HTTP rsp 400).
      • unprotectedExecuteImpl

        protected abstract java.util.Map<java.lang.String,​java.lang.Object> unprotectedExecuteImpl​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                                                                         org.springframework.extensions.webscripts.Status status,
                                                                                                         org.springframework.extensions.webscripts.Cache cache)