Class AbstractSolrFacetConfigAdminWebScript

java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
org.alfresco.repo.web.scripts.facet.AbstractSolrFacetConfigAdminWebScript
All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
Direct Known Subclasses:
FacetablePropertiesGet, SolrFacetConfigAdminDelete, SolrFacetConfigAdminGet, SolrFacetConfigAdminPost, SolrFacetConfigAdminPut

public abstract class AbstractSolrFacetConfigAdminWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScript
This class is an abstract base class for the various web script controllers in the SolrFacetService.
Author:
Jamal Kaabi-Mofrad
  • Field Details

  • Constructor Details

    • AbstractSolrFacetConfigAdminWebScript

      public AbstractSolrFacetConfigAdminWebScript()
  • Method Details

    • setFacetService

      public void setFacetService(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<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)