Class GraphServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- com.composum.sling.core.usermanagement.servlet.GraphServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class GraphServlet extends org.apache.sling.api.servlets.SlingSafeMethodsServleta servlet to render authorizable graphs built from scratch to support extraction for external resuse- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorizablesauthorizablesServicestatic StringBROWSER_PATHstatic StringCOMPONENT_BASEstatic StringMANAGER_PATHstatic StringSERVLET_PATHstatic org.apache.commons.codec.net.URLCodecURL_CODECprotected org.apache.sling.xss.XSSFilterxssFilter
-
Constructor Summary
Constructors Constructor Description GraphServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response)protected @NotNull StringgetComponentBase(@NotNull org.apache.sling.api.resource.ResourceResolver resolver)protected AuthorizablesGraphgetGraph(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response)protected AuthorizablesPathsgetPaths(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response)protected StringnodeUrl(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull String option, @NotNull AuthorizableModel node)protected StringpathUrl(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull String option, @NotNull AuthorizableModel node, @NotNull String path)-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
-
-
-
-
Field Detail
-
BROWSER_PATH
public static final String BROWSER_PATH
- See Also:
- Constant Field Values
-
MANAGER_PATH
public static final String MANAGER_PATH
- See Also:
- Constant Field Values
-
SERVLET_PATH
public static final String SERVLET_PATH
- See Also:
- Constant Field Values
-
COMPONENT_BASE
public static final String COMPONENT_BASE
- See Also:
- Constant Field Values
-
URL_CODEC
public static final org.apache.commons.codec.net.URLCodec URL_CODEC
-
xssFilter
protected org.apache.sling.xss.XSSFilter xssFilter
-
authorizablesService
protected Authorizables authorizablesService
-
-
Method Detail
-
getComponentBase
@NotNull protected @NotNull String getComponentBase(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resolver)
-
doGet
protected void doGet(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classorg.apache.sling.api.servlets.SlingSafeMethodsServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getGraph
protected AuthorizablesGraph getGraph(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull org.apache.sling.api.SlingHttpServletResponse response) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
getPaths
protected AuthorizablesPaths getPaths(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull org.apache.sling.api.SlingHttpServletResponse response) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
nodeUrl
protected String nodeUrl(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull String option, @NotNull @NotNull AuthorizableModel node)
-
pathUrl
protected String pathUrl(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull String option, @NotNull @NotNull AuthorizableModel node, @NotNull @NotNull String path)
-
-