Package com.composum.sling.core.servlet
Class TranslationServlet
- 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.TranslationServlet
-
- All Implemented Interfaces:
RestrictedService
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class TranslationServlet extends AbstractServiceServlet
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TranslationServlet.Extension
static class
TranslationServlet.Operation
protected class
TranslationServlet.TranslateObject
Translates (i18n) all strings in a given JSON.protected class
TranslationServlet.TranslateStatus
Translates (i18n) status-like information into a Status.
-
Field Summary
Fields Modifier and Type Field Description static String
BOOTSTRAP_ERROR
static String
CONTEXT
static String
DATA
static String
HINT
static String
LABEL
static String
LEVEL
static String
MESSAGES
protected ServletOperationSet<TranslationServlet.Extension,TranslationServlet.Operation>
operations
static String
SERVICE_KEY
static String
SERVLET_PATH
static String
STATUS
static String
SUCCESS
static String
TEXT
static String
TITLE
static String
WARNING
-
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 TranslationServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull ServletOperationSet<TranslationServlet.Extension,TranslationServlet.Operation>
getOperations()
Each servlet implementation must provide access to its operation set for request delegation.ServiceRestrictions.Key
getServiceKey()
void
init()
protected ServiceRestrictions.Permission
methodPutPermission(@NotNull org.apache.sling.api.SlingHttpServletRequest request)
-
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, 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
-
STATUS
public static final String STATUS
- See Also:
- Constant Field Values
-
SUCCESS
public static final String SUCCESS
- See Also:
- Constant Field Values
-
WARNING
public static final String WARNING
- See Also:
- Constant Field Values
-
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
-
MESSAGES
public static final String MESSAGES
- See Also:
- Constant Field Values
-
LEVEL
public static final String LEVEL
- See Also:
- Constant Field Values
-
CONTEXT
public static final String CONTEXT
- See Also:
- Constant Field Values
-
LABEL
public static final String LABEL
- See Also:
- Constant Field Values
-
TEXT
public static final String TEXT
- See Also:
- Constant Field Values
-
HINT
public static final String HINT
- See Also:
- Constant Field Values
-
DATA
public static final String DATA
- See Also:
- Constant Field Values
-
BOOTSTRAP_ERROR
public static final String BOOTSTRAP_ERROR
- See Also:
- Constant Field Values
-
operations
protected ServletOperationSet<TranslationServlet.Extension,TranslationServlet.Operation> operations
-
-
Method Detail
-
getOperations
@NotNull protected @NotNull ServletOperationSet<TranslationServlet.Extension,TranslationServlet.Operation> getOperations()
Description copied from class:AbstractServiceServlet
Each servlet implementation must provide access to its operation set for request delegation.- Specified by:
getOperations
in classAbstractServiceServlet
-
getServiceKey
@NotNull public ServiceRestrictions.Key getServiceKey()
- Specified by:
getServiceKey
in interfaceRestrictedService
- Overrides:
getServiceKey
in classAbstractServiceServlet
-
methodPutPermission
@NotNull protected ServiceRestrictions.Permission methodPutPermission(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request)
- Overrides:
methodPutPermission
in classAbstractServiceServlet
-
init
public void init() throws javax.servlet.ServletException
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
-