Class AbstractSolrFacetConfigAdminWebScript

    • 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 Map<String,​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​(Class<T> clazz,
                                 Object value,
                                 T defaultValue)
                          throws org.json.JSONException
        Throws:
        org.json.JSONException
      • getCustomProperties

        protected 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 Set<String> getScopedSites​(org.json.JSONArray scopedSitesJsonArray)
                                      throws org.json.JSONException
        Throws:
        org.json.JSONException
      • validateFilterID

        protected void validateFilterID​(String filterID)
      • getNonNegativeIntParameter

        protected int getNonNegativeIntParameter​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                 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 Map<String,​Object> unprotectedExecuteImpl​(org.springframework.extensions.webscripts.WebScriptRequest req,
                                                                           org.springframework.extensions.webscripts.Status status,
                                                                           org.springframework.extensions.webscripts.Cache cache)