Search in sources :

Example 6 with Groups

use of org.jbei.ice.lib.group.Groups in project ice by JBEI.

the class GroupResource method getGroups.

@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getGroups(@DefaultValue("PRIVATE") @QueryParam("type") String type, @QueryParam("offset") int offset, @QueryParam("limit") int limit) {
    String userId = getUserId();
    GroupType groupType = GroupType.valueOf(type.toUpperCase());
    Groups groups = new Groups(userId);
    return super.respond(groups.get(groupType, offset, limit));
}
Also used : GroupType(org.jbei.ice.lib.dto.group.GroupType) Groups(org.jbei.ice.lib.group.Groups)

Aggregations

Groups (org.jbei.ice.lib.group.Groups)6 PermissionException (org.jbei.ice.lib.access.PermissionException)1 GroupType (org.jbei.ice.lib.dto.group.GroupType)1