Package com.composum.sling.core.servlet
Class SystemServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.api.servlets.SlingAllMethodsServlet
-
- com.composum.sling.core.servlet.AbstractServiceServlet
-
- com.composum.sling.core.servlet.SystemServlet
-
- All Implemented Interfaces:
RestrictedService,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class SystemServlet extends AbstractServiceServlet
The service servlet to retrieve all general system settings.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSystemServlet.ExtensionclassSystemServlet.GetMixinTypesthe 'system.mixinTypes.json' operation send a JSON array with available mixin types a 'query' parameter is used to restrict the result to type names with the query stringclassSystemServlet.GetNodeTypesthe general node types Query and Caching implementationclassSystemServlet.GetPrimaryTypesthe 'system.primaryTypes.json' operation send a JSON array with available primary types a 'query' parameter is used to restrict the result to type names with the query stringclassSystemServlet.GetPropertyTypesclassSystemServlet.JsonTypeaheadstatic classSystemServlet.MixinTypesFilterthe general filter for mixin typesstatic classSystemServlet.Operationstatic classSystemServlet.PrimaryTypesFilterthe general filter for primary types is a inversion ot the mixin types filter
-
Field Summary
Fields Modifier and Type Field Description static StringALL_QUERY_KEYprotected org.apache.commons.collections4.map.LRUMapMIXIN_TYPE_CACHEthe static cache for mixin type queries and their resultsprotected ResourceFilterMIXIN_TYPE_FILTERthe general filter for mixin typesstatic StringNODE_TYPES_PATHprotected ServletOperationSet<SystemServlet.Extension,SystemServlet.Operation>operationsprotected org.apache.commons.collections4.map.LRUMapPRIMARY_TYPE_CACHEthe cache for primary type queries and their resultsprotected ResourceFilterPRIMARY_TYPE_FILTERthe general filter for primary typesstatic StringPROP_IS_MIXINstatic String[]PROPERTY_TYPESstatic StringSERVICE_KEYstatic StringSERVLET_PATH-
Fields inherited from class com.composum.sling.core.servlet.AbstractServiceServlet
DATE_FORMAT, PARAM_BEFORE, PARAM_CMD, PARAM_FILE, PARAM_FILTER, PARAM_ID, PARAM_INDEX, PARAM_JCR_CONTENT, PARAM_LABEL, PARAM_MIME_TYPE, PARAM_NAME, PARAM_PATH, PARAM_QUERY, PARAM_RESOURCE_TYPE, PARAM_TITLE, PARAM_TYPE, PARAM_URL, PARAM_VALUE, PARAM_VERSION
-
-
Constructor Summary
Constructors Constructor Description SystemServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull ServletOperationSet<SystemServlet.Extension,SystemServlet.Operation>getOperations()Each servlet implementation must provide access to its operation set for request delegation.ServiceRestrictions.KeygetServiceKey()voidinit()setup of the servlet operation set for this servlet instance-
Methods inherited from class com.composum.sling.core.servlet.AbstractServiceServlet
deactivate, doDelete, doGet, doPost, doPut, getJsonObject, getJsonObject, getJsonObject, getPath, getResource, getRestrictions, isEnabled, jsonAnswerItemExists, jsonValue, methodDeletePermission, methodGetPermission, methodPostPermission, methodPutPermission, setNoCacheHeaders, tryToUseRawSuffix
-
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
getAllowedRequestMethods, isMethodValid, mayService
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
-
-
-
-
Field Detail
-
SERVICE_KEY
public static final String SERVICE_KEY
- See Also:
- Constant Field Values
-
SERVLET_PATH
public static final String SERVLET_PATH
- See Also:
- Constant Field Values
-
NODE_TYPES_PATH
public static final String NODE_TYPES_PATH
- See Also:
- Constant Field Values
-
PROP_IS_MIXIN
public static final String PROP_IS_MIXIN
- See Also:
- Constant Field Values
-
ALL_QUERY_KEY
public static final String ALL_QUERY_KEY
- See Also:
- Constant Field Values
-
operations
protected ServletOperationSet<SystemServlet.Extension,SystemServlet.Operation> operations
-
PROPERTY_TYPES
public static final String[] PROPERTY_TYPES
-
PRIMARY_TYPE_FILTER
protected ResourceFilter PRIMARY_TYPE_FILTER
the general filter for primary types
-
PRIMARY_TYPE_CACHE
protected org.apache.commons.collections4.map.LRUMap PRIMARY_TYPE_CACHE
the cache for primary type queries and their results
-
MIXIN_TYPE_FILTER
protected ResourceFilter MIXIN_TYPE_FILTER
the general filter for mixin types
-
MIXIN_TYPE_CACHE
protected org.apache.commons.collections4.map.LRUMap MIXIN_TYPE_CACHE
the static cache for mixin type queries and their results
-
-
Method Detail
-
getServiceKey
@NotNull public ServiceRestrictions.Key getServiceKey()
- Specified by:
getServiceKeyin interfaceRestrictedService- Overrides:
getServiceKeyin classAbstractServiceServlet
-
getOperations
@NotNull protected @NotNull ServletOperationSet<SystemServlet.Extension,SystemServlet.Operation> getOperations()
Description copied from class:AbstractServiceServletEach servlet implementation must provide access to its operation set for request delegation.- Specified by:
getOperationsin classAbstractServiceServlet
-
init
public void init() throws javax.servlet.ServletExceptionsetup of the servlet operation set for this servlet instance- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
-