Package com.composum.sling.core.servlet
Class AbstractConsoleServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- com.composum.sling.core.servlet.AbstractConsoleServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
BrowserServlet,CodeEditorServlet,PackagesServlet,UserManagerServlet
public abstract class AbstractConsoleServlet extends org.apache.sling.api.servlets.SlingSafeMethodsServletA base class for a general hook (servlet) for a console view.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.framework.BundleContextbundleContext
-
Constructor Summary
Constructors Constructor Description AbstractConsoleServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.framework.BundleContext bundleContext)protected booleancheckConsoleAccess(BeanContext context)Check access rights to the servlets path - is checking ACLs of the console pathprotected BeanContextcreateContext(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)protected voiddoGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)protected StringgetConsolePath(BeanContext context)extension point to check access rights for a console feature by feature pathprotected abstract PatterngetPathPattern(BeanContext context)protected StringgetRequestPath(org.apache.sling.api.SlingHttpServletRequest request)protected abstract StringgetResourceType(BeanContext context)ServiceRestrictions.KeygetServiceKey()protected abstract StringgetServletPath(BeanContext context)protected voidprepareForward(BeanContext context, org.apache.sling.api.request.RequestDispatcherOptions options)-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
-
-
-
-
Method Detail
-
activate
protected void activate(org.osgi.framework.BundleContext bundleContext)
-
getServletPath
protected abstract String getServletPath(BeanContext context)
-
getPathPattern
protected abstract Pattern getPathPattern(BeanContext context)
-
getResourceType
protected abstract String getResourceType(BeanContext context)
-
getConsolePath
protected String getConsolePath(BeanContext context)
extension point to check access rights for a console feature by feature path- Returns:
- the path to the console feature (content); 'null' if no check supported or check switched off
-
getServiceKey
public ServiceRestrictions.Key getServiceKey()
-
getRequestPath
protected String getRequestPath(org.apache.sling.api.SlingHttpServletRequest request)
-
createContext
protected BeanContext createContext(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
-
doGet
protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classorg.apache.sling.api.servlets.SlingSafeMethodsServlet- Throws:
javax.servlet.ServletExceptionIOException
-
prepareForward
protected void prepareForward(BeanContext context, org.apache.sling.api.request.RequestDispatcherOptions options)
-
checkConsoleAccess
protected boolean checkConsoleAccess(BeanContext context)
Check access rights to the servlets path - is checking ACLs of the console path- Parameters:
context- the current request- Returns:
- 'true' if access granted or access check switched off
-
-