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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected SolrFacetService
protected static final Pattern
protected org.alfresco.service.namespace.NamespaceService
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteImpl
(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) protected Set<SolrFacetProperties.CustomProperties>
getCustomProperties
(org.json.JSONObject customPropsJsonObj) 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.getScopedSites
(org.json.JSONArray scopedSitesJsonArray) protected <T> T
void
setFacetService
(SolrFacetService facetService) void
setNamespaceService
(org.alfresco.service.namespace.NamespaceService namespaceService) unprotectedExecuteImpl
(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) protected void
protected void
validateFilterID
(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
-
Field Details
-
PARAM_FILTER_ID
- See Also:
-
PARAM_FACET_QNAME
- See Also:
-
PARAM_DISPLAY_NAME
- See Also:
-
PARAM_DISPLAY_CONTROL
- See Also:
-
PARAM_MAX_FILTERS
- See Also:
-
PARAM_HIT_THRESHOLD
- See Also:
-
PARAM_MIN_FILTER_VALUE_LENGTH
- See Also:
-
PARAM_SORT_BY
- See Also:
-
PARAM_SCOPE
- See Also:
-
PARAM_SCOPED_SITES
- See Also:
-
PARAM_INDEX
- See Also:
-
PARAM_IS_ENABLED
- See Also:
-
PARAM_CUSTOM_PROPERTIES
- See Also:
-
CUSTOM_PARAM_NAME
- See Also:
-
CUSTOM_PARAM_VALUE
- See Also:
-
FILTER_ID_PATTERN
-
facetService
-
namespaceService
protected org.alfresco.service.namespace.NamespaceService namespaceService
-
-
Constructor Details
-
AbstractSolrFacetConfigAdminWebScript
public AbstractSolrFacetConfigAdminWebScript()
-
-
Method Details
-
setFacetService
- 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 classorg.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
-
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 requestparamName
- 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
-