public abstract class AbstractAccessPostServlet
extends org.apache.sling.api.servlets.SlingAllMethodsServlet
| Constructor and Description |
|---|
AbstractAccessPostServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
Bind a new post response creator
|
protected org.apache.sling.servlets.post.AbstractPostResponse |
createHtmlResponse(org.apache.sling.api.SlingHttpServletRequest req)
Deprecated.
use
createPostResponse(SlingHttpServletRequest) instead |
protected void |
doPost(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse httpResponse) |
protected String |
externalizePath(org.apache.sling.api.SlingHttpServletRequest request,
String path)
Returns an external form of the given path prepending the context path
and appending a display extension.
|
protected javax.jcr.security.AccessControlList |
getAccessControlList(javax.jcr.security.AccessControlManager accessControlManager,
String resourcePath,
boolean mayCreate)
Returns an
AccessControlList to edit for the node at the
given resourcePath. |
protected javax.jcr.security.AccessControlList |
getAccessControlListOrNull(javax.jcr.security.AccessControlManager accessControlManager,
String resourcePath,
boolean mayCreate)
Returns an
AccessControlList to edit for the node at the
given resourcePath. |
protected String |
getItemPath(org.apache.sling.api.SlingHttpServletRequest request)
Returns the path of the resource of the request as the item path.
|
protected String |
getRedirectUrl(javax.servlet.http.HttpServletRequest request,
org.apache.sling.servlets.post.AbstractPostResponse ctx)
Deprecated.
use
getRedirectUrl(HttpServletRequest, PostResponse) instead |
protected String |
getRedirectUrl(javax.servlet.http.HttpServletRequest request,
org.apache.sling.servlets.post.PostResponse ctx)
compute redirect URL (SLING-126)
|
protected void |
handleOperation(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.servlets.post.AbstractPostResponse response,
List<org.apache.sling.servlets.post.Modification> changes)
Deprecated.
|
protected abstract void |
handleOperation(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.servlets.post.PostResponse response,
List<org.apache.sling.servlets.post.Modification> changes)
Extending Servlet should implement this operation to do the work
|
protected boolean |
isSetStatus(org.apache.sling.api.SlingHttpServletRequest request) |
protected void |
unbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
Unbind a post response creator
|
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayServicedoGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, serviceprotected void doPost(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse httpResponse)
throws javax.servlet.ServletException,
IOException
doPost in class org.apache.sling.api.servlets.SlingAllMethodsServletjavax.servlet.ServletExceptionIOException@Deprecated protected org.apache.sling.servlets.post.AbstractPostResponse createHtmlResponse(org.apache.sling.api.SlingHttpServletRequest req)
createPostResponse(SlingHttpServletRequest) insteadreq - The request being servicedJSONResponse if any of these conditions are true:
HtmlResponse otherwise@Deprecated protected void handleOperation(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.servlets.post.AbstractPostResponse response, List<org.apache.sling.servlets.post.Modification> changes) throws javax.jcr.RepositoryException
handleOperation(SlingHttpServletRequest, PostResponse, List) insteadrequest - the sling http request to processresponse - the responsechanges - the changes to reportjavax.jcr.RepositoryException - if any errors applying the changesprotected abstract void handleOperation(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.servlets.post.PostResponse response,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
request - the sling http request to processresponse - the responsechanges - the changes to reportjavax.jcr.RepositoryException - if any errors applying the changes@Deprecated protected String getRedirectUrl(javax.servlet.http.HttpServletRequest request, org.apache.sling.servlets.post.AbstractPostResponse ctx)
getRedirectUrl(HttpServletRequest, PostResponse) insteadrequest - the sling http request to processctx - the post processornullprotected String getRedirectUrl(javax.servlet.http.HttpServletRequest request, org.apache.sling.servlets.post.PostResponse ctx)
request - the sling http request to processctx - the post processornullprotected boolean isSetStatus(org.apache.sling.api.SlingHttpServletRequest request)
protected String getItemPath(org.apache.sling.api.SlingHttpServletRequest request)
This method may be overwritten by extension if the operation has different requirements on path processing.
request - the sling http request to processprotected final String externalizePath(org.apache.sling.api.SlingHttpServletRequest request, String path)
request - the sling http request to processpath - the path to externalizeprotected javax.jcr.security.AccessControlList getAccessControlList(javax.jcr.security.AccessControlManager accessControlManager,
String resourcePath,
boolean mayCreate)
throws javax.jcr.RepositoryException
AccessControlList to edit for the node at the
given resourcePath.accessControlManager - The manager providing access control listsresourcePath - The node path for which to return an access control
listmayCreate - true if an access control list should be
created if the node does not have one yet.AccessControlList to modify to control access to
the node.javax.jcr.RepositoryException - If the access control manager does not
provide a AccessControlPolicy which is an
AccessControlList.protected javax.jcr.security.AccessControlList getAccessControlListOrNull(javax.jcr.security.AccessControlManager accessControlManager,
String resourcePath,
boolean mayCreate)
throws javax.jcr.RepositoryException
AccessControlList to edit for the node at the
given resourcePath.accessControlManager - The manager providing access control listsresourcePath - The node path for which to return an access control
listmayCreate - true if an access control list should be
created if the node does not have one yet.AccessControlList to modify to control access to
the node or null if one could not be located or createdjavax.jcr.RepositoryException - if any errors reading the informationprotected void bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
creator - the response creator service referenceproperties - the component properties for the service referenceprotected void unbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
creator - the response creator service referenceproperties - the component properties for the service referenceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.