REPO-1301: Retrieve a group

- first commit

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133709 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Cristian Turlica
2016-12-15 10:33:41 +00:00
parent f5a9b78ed6
commit 27c10ab1d7
5 changed files with 134 additions and 8 deletions

View File

@@ -28,6 +28,7 @@ package org.alfresco.rest.api.groups;
import org.alfresco.rest.api.Groups;
import org.alfresco.rest.api.model.Group;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
import org.alfresco.rest.framework.resource.EntityResource;
import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
@@ -41,7 +42,7 @@ import org.springframework.beans.factory.InitializingBean;
* @author cturlica
*/
@EntityResource(name = "groups", title = "Groups")
public class GroupsEntityResource implements EntityResourceAction.Read<Group>, InitializingBean
public class GroupsEntityResource implements EntityResourceAction.Read<Group>, EntityResourceAction.ReadById<Group>, InitializingBean
{
private Groups groups;
@@ -62,4 +63,11 @@ public class GroupsEntityResource implements EntityResourceAction.Read<Group>, I
{
return groups.getGroups(params);
}
@Override
@WebApiDescription(title="Returns group information for group id")
public Group readById(String groupId, Parameters parameters) throws EntityNotFoundException
{
return groups.getGroup(groupId, parameters);
}
}