public class CreateGroupServlet extends AbstractGroupPostServlet implements CreateGroup
Sling Post Servlet implementation for creating a group in the jackrabbit UserManager.
Creates a new group. Maps on to nodes of resourceType sling/groups like
/rep:system/rep:userManager/rep:groups mapped to a resource url
/system/userManager/group. This servlet responds at
/system/userManager/group.create.html
curl -F:name=newGroupA -Fproperty1=value1 http://localhost:8080/system/userManager/group.create.html
PROP_DATE_FORMAT| Constructor and Description |
|---|
CreateGroupServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(Map<String,Object> props) |
protected void |
bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
Overridden since the @Reference annotation is not inherited from the super method
|
org.apache.jackrabbit.api.security.user.Group |
createGroup(javax.jcr.Session jcrSession,
String name,
Map<String,?> properties,
List<org.apache.sling.servlets.post.Modification> changes)
Create a new group for the repository
|
protected void |
deactivate() |
protected 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 void |
unbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
Unbind a post response creator
|
updateGroupMembershipcollectContent, convertToRequestParameterArray, convertToString, convertToStringArray, hasItemPathPrefix, processDeletes, requireItemPathPrefix, writeContentcreateHtmlResponse, doPost, externalizePath, getItemPath, getRedirectUrl, getRedirectUrl, handleOperation, isSetStatusdoDelete, doPut, getAllowedRequestMethods, isMethodValid, mayServicedoGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, serviceprotected void activate(Map<String,Object> props)
activate in class AbstractAuthorizablePostServletprotected void deactivate()
deactivate in class AbstractAuthorizablePostServletprotected void bindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
protected void unbindPostResponseCreator(org.apache.sling.servlets.post.PostResponseCreator creator,
Map<String,Object> properties)
AbstractPostServletunbindPostResponseCreator in class AbstractPostServletprotected 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
AbstractPostServlethandleOperation in class AbstractPostServletrequest - the sling http request to processresponse - the responsechanges - the changes to reportjavax.jcr.RepositoryException - in case of exceptions during the operationpublic org.apache.jackrabbit.api.security.user.Group createGroup(javax.jcr.Session jcrSession,
String name,
Map<String,?> properties,
List<org.apache.sling.servlets.post.Modification> changes)
throws javax.jcr.RepositoryException
CreateGroupcreateGroup in interface CreateGroupjcrSession - the JCR session of the user creating the groupname - The name of the new group (required)properties - Extra properties to update on the group. The entry values should be either a String or String[] (optional)changes - The list of changes for this operation (optional)javax.jcr.RepositoryException - if group can't be createdCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.