Package com.composum.sling.nodes.servlet
Class ServletResourceType
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- com.composum.sling.nodes.servlet.ServletResourceType
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class ServletResourceType extends javax.servlet.GenericServlet
maps a Sling resource type to an existing servlet service implementation (e.g. for forwarding to webconsole plugins)- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ServletResourceType.Config
protected class
ServletResourceType.ServletResponseWrapper
protected class
ServletResourceType.ServletWrapper
protected class
ServletResourceType.SuffixRequest
protected class
ServletResourceType.WebconsoleWrapper
-
Field Summary
Fields Modifier and Type Field Description static String
SERVLET_LABEL
static String
WEBCONSOLE_TYPE
-
Constructor Summary
Constructors Constructor Description ServletResourceType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.osgi.service.component.ComponentContext context, ServletResourceType.Config config)
protected boolean
isEnabled(@NotNull org.apache.sling.api.SlingHttpServletRequest request, ServiceRestrictions.Permission needed)
void
service(@NotNull javax.servlet.ServletRequest servletRequest, @NotNull javax.servlet.ServletResponse response)
protected ServletResourceType.ServletWrapper
wrapServlet(@NotNull javax.servlet.Servlet servlet, @NotNull Map<String,Object> properties)
protected ServletResourceType.ServletWrapper
wrapServlet(@NotNull org.osgi.framework.BundleContext bundleContext, @NotNull org.osgi.framework.ServiceReference<javax.servlet.Servlet> reference)
-
-
-
Field Detail
-
SERVLET_LABEL
public static final String SERVLET_LABEL
- See Also:
- Constant Field Values
-
WEBCONSOLE_TYPE
public static final String WEBCONSOLE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
protected void activate(org.osgi.service.component.ComponentContext context, ServletResourceType.Config config)
-
isEnabled
protected boolean isEnabled(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull ServiceRestrictions.Permission needed)
-
wrapServlet
protected ServletResourceType.ServletWrapper wrapServlet(@NotNull @NotNull org.osgi.framework.BundleContext bundleContext, @NotNull @NotNull org.osgi.framework.ServiceReference<javax.servlet.Servlet> reference)
-
wrapServlet
protected ServletResourceType.ServletWrapper wrapServlet(@NotNull @NotNull javax.servlet.Servlet servlet, @NotNull @NotNull Map<String,Object> properties)
-
service
public void service(@NotNull @NotNull javax.servlet.ServletRequest servletRequest, @NotNull @NotNull javax.servlet.ServletResponse response) throws javax.servlet.ServletException, IOException
- Specified by:
service
in interfacejavax.servlet.Servlet
- Specified by:
service
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
IOException
-
-