Package org.apache.sling.serviceuser.webconsole.impl

# Class ServiceUserWebConsolePlugin

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.felix.webconsole.servlet.AbstractServlet
org.apache.sling.serviceuser.webconsole.impl.ServiceUserWebConsolePlugin

All Implemented Interfaces:
  `jakarta.servlet.Servlet`, `jakarta.servlet.ServletConfig`, `Serializable`

public class ServiceUserWebConsolePlugin extends org.apache.felix.webconsole.servlet.AbstractServlet
Web console plugin to test configuration resolution.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`COMPONENT_NAME`
`static final String`
`LABEL`
`static final String`
`PN_ACTION`
`static final String`
`PN_ALERT`
`static final String`
`PN_APP_PATH`
`static final String`
`PN_BUNDLE`
`static final String`
`PN_CONFIGURATION_INSTANCE_IDENTIFIER`
`static final String`
`PN_NAME`
`static final String`
`PN_SUB_SERVICE`
`static final String`
`PN_USER`
`static final String`
`PN_USER_PATH`
`static final String`
`TITLE`

### Fields inherited from class jakarta.servlet.http.HttpServlet

`LEGACY_DO_HEAD`

## Constructor Summary

Constructors
Constructor
Description
`ServiceUserWebConsolePlugin(org.osgi.service.component.ComponentContext context, org.apache.sling.xss.XSSAPI xss, org.apache.sling.api.resource.ResourceResolverFactory resolverFactory, org.apache.sling.serviceusermapping.ServiceUserMapper mapper, org.osgi.service.cm.ConfigurationAdmin configAdmin)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
`protected URL`
`getResource(String path)`
Called internally by `AbstractServlet` to load resources.
`void`
`renderContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`

### Methods inherited from class org.apache.felix.webconsole.servlet.AbstractServlet

`doGet, getVariableResolver, readTemplateFile, setNoCache, spoolResource`

### Methods inherited from class jakarta.servlet.http.HttpServlet

`doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service`

### Methods inherited from class jakarta.servlet.GenericServlet

`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### COMPONENT_NAME

public static final String COMPONENT_NAME

See Also:
  - Constant Field Values

### LABEL

public static final String LABEL

See Also:
  - Constant Field Values

### TITLE

public static final String TITLE

See Also:
  - Constant Field Values

### PN_ACTION

public static final String PN_ACTION

See Also:
  - Constant Field Values

### PN_ALERT

public static final String PN_ALERT

See Also:
  - Constant Field Values

### PN_APP_PATH

public static final String PN_APP_PATH

See Also:
  - Constant Field Values

### PN_BUNDLE

public static final String PN_BUNDLE

See Also:
  - Constant Field Values

### PN_NAME

public static final String PN_NAME

See Also:
  - Constant Field Values

### PN_SUB_SERVICE

public static final String PN_SUB_SERVICE

See Also:
  - Constant Field Values

### PN_CONFIGURATION_INSTANCE_IDENTIFIER

public static final String PN_CONFIGURATION_INSTANCE_IDENTIFIER

See Also:
  - Constant Field Values

### PN_USER

public static final String PN_USER

See Also:
  - Constant Field Values

### PN_USER_PATH

public static final String PN_USER_PATH

See Also:
  - Constant Field Values

## Constructor Details

### ServiceUserWebConsolePlugin

public ServiceUserWebConsolePlugin(org.osgi.service.component.ComponentContext context, org.apache.sling.xss.XSSAPI xss, org.apache.sling.api.resource.ResourceResolverFactory resolverFactory, org.apache.sling.serviceusermapping.ServiceUserMapper mapper, org.osgi.service.cm.ConfigurationAdmin configAdmin)

## Method Details

### doPost

protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException

Overrides:
  `doPost` in class `jakarta.servlet.http.HttpServlet`
Throws:
  `jakarta.servlet.ServletException`
  `IOException`

### getResource

protected URL getResource(String path)
Called internally by `AbstractServlet` to load resources. This particular implementation depends on the label. As example, if the plugin is accessed as `/system/console/abc`, and the plugin resources are accessed like `/system/console/abc/res/logo.gif`, the code here will try load resource `/res/logo.gif` from the bundle, providing the plugin.

Overrides:
  `getResource` in class `org.apache.felix.webconsole.servlet.AbstractServlet`
Parameters:
  `path` - the path to read.
Returns:
  the URL of the resource or `null` if not found.

### renderContent

public void renderContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException

Overrides:
  `renderContent` in class `org.apache.felix.webconsole.servlet.AbstractServlet`
Throws:
  `jakarta.servlet.ServletException`
  `IOException`