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
|
updateGroupMembership
collectContent, convertToRequestParameterArray, convertToString, convertToStringArray, hasItemPathPrefix, processDeletes, requireItemPathPrefix, writeContent
createHtmlResponse, doPost, externalizePath, getItemPath, getRedirectUrl, getRedirectUrl, handleOperation, isSetStatus
doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService
doGeneric, doGet, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
protected void activate(Map<String,Object> props)
activate
in class AbstractAuthorizablePostServlet
protected void deactivate()
deactivate
in class AbstractAuthorizablePostServlet
protected 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)
AbstractPostServlet
unbindPostResponseCreator
in class AbstractPostServlet
protected 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
AbstractPostServlet
handleOperation
in class AbstractPostServlet
request
- 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
CreateGroup
createGroup
in interface CreateGroup
jcrSession
- 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.