Package com.composum.sling.nodes.servlet
Class SourceUpdateServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.api.servlets.SlingAllMethodsServlet
-
- com.composum.sling.nodes.servlet.SourceUpdateServlet
-
- All Implemented Interfaces:
RestrictedService
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class SourceUpdateServlet extends org.apache.sling.api.servlets.SlingAllMethodsServlet implements RestrictedService
Modifies JCR content according to a given XML or ZIP of XMLs while preserving / updating metadata like versioning information and metadata. This is a kind of opposite operation as theSourceServlet
: the nodes like jcr:lastModified, which are removed there, will just be updated here - if they occur in our input, they'll be ignored. This is somewhat in beta stage - use at your own risk.TODO: perhaps keep special nodes like cpp:MetaData (used for statistics) unchanged
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.framework.BundleContext
bundleContext
protected NodesConfiguration
nodesConfig
static String
SERVLET_PATH
protected SourceUpdateService
sourceUpdateService
-
Constructor Summary
Constructors Constructor Description SourceUpdateServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doPost(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response)
ServiceRestrictions.Key
getServiceKey()
-
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
-
-
-
-
Field Detail
-
SERVLET_PATH
public static final String SERVLET_PATH
- See Also:
- Constant Field Values
-
nodesConfig
protected NodesConfiguration nodesConfig
-
sourceUpdateService
protected SourceUpdateService sourceUpdateService
-
bundleContext
protected org.osgi.framework.BundleContext bundleContext
-
-
Method Detail
-
getServiceKey
@NotNull public ServiceRestrictions.Key getServiceKey()
- Specified by:
getServiceKey
in interfaceRestrictedService
-
doPost
protected void doPost(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull org.apache.sling.api.SlingHttpServletResponse response) throws IOException
- Overrides:
doPost
in classorg.apache.sling.api.servlets.SlingAllMethodsServlet
- Throws:
IOException
-
-