03-07-2013 08:21 AM
Create group——————-
Creates a new group.
Request: POST /group
{
"id": "admin",
"name": "System administrator",
"type": "security-role"
}
API: identityService.newGroup(); identityService.saveGroup();
if (identityService.createGroupQuery().groupId(groupInfo.getId()).count() == 0) {
Group group = identityService.newGroup(groupInfo.getId());
group.setName(groupInfo.getName());
if (groupInfo.getType() != null) {
group.setType(groupInfo.getType());
} else {
group.setType("assignment");
}
identityService.saveGroup(group);
} else {
throw new ActivitiException("group id must be unique");
}
return new StateResponse().setSuccess(true);
CRUD HTTP
Create POST
Retrieve GET
Update PUT
Delete DELETE
CRUD HTTP2
Create PUT
Retrieve GET
Update PUT
Delete DELETE
After that discussion, a more realistic mapping would seem to be:
Create = PUT iff you are sending the full content of the specified resource (URL).
Create = POST if you are sending a command to the server to create a subordinate of the specified resource, using some server-side algorithm.
Retrieve = GET.
Update = PUT iff you are updating the full content of the specified resource.
Update = POST if you are requesting the server to update one or more subordinates of the specified resource.
Delete = DELETE.
03-07-2013 10:08 AM
05-20-2013 05:48 PM
05-21-2013 03:47 AM
05-22-2013 01:59 AM
05-22-2013 06:46 AM
05-22-2013 11:13 AM
05-23-2013 04:02 AM
05-23-2013 08:38 AM
05-23-2013 09:59 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.