ccc.api.jaxrs
Class GroupsImpl

java.lang.Object
  extended by ccc.api.jaxrs.JaxrsCollection
      extended by ccc.api.jaxrs.GroupsImpl
All Implemented Interfaces:
Groups

public class GroupsImpl
extends JaxrsCollection
implements Groups

JAX-RS implementation of the Groups interface.

Author:
Civic Computing Ltd.

Field Summary
 
Fields inherited from interface ccc.api.core.Groups
NAME
 
Constructor Summary
GroupsImpl(Groups groups)
          Constructor.
 
Method Summary
 Group create(Group delta)
          Create a new group in the system.
 PagedCollection<Group> query(java.lang.String name, int pageNo, int pageSize)
          List available groups.
 Group retrieve(java.util.UUID id)
          Find the group for a given ID.
 Group update(java.util.UUID id, Group group)
          Update an existing group in the system.
 
Methods inherited from class ccc.api.jaxrs.JaxrsCollection
convertException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupsImpl

public GroupsImpl(Groups groups)
Constructor.

Parameters:
groups - The groups implementation delegated to.
Method Detail

create

public Group create(Group delta)
Create a new group in the system.

Specified by:
create in interface Groups
Parameters:
delta - The new group details.
Returns:
A DTO describing the new group.

retrieve

public Group retrieve(java.util.UUID id)
Find the group for a given ID.

Specified by:
retrieve in interface Groups
Parameters:
id - The group ID.
Returns:
Returns the corresponding group.

update

public Group update(java.util.UUID id,
                    Group group)
Update an existing group in the system.

Specified by:
update in interface Groups
Parameters:
id - The ID of the group to update.
group - The updated group details.
Returns:
A DTO describing the updated group.

query

public PagedCollection<Group> query(java.lang.String name,
                                    int pageNo,
                                    int pageSize)
List available groups.

Specified by:
query in interface Groups
Parameters:
name - Filter based on group name. NULL disables filter.
pageNo - The page to display.
pageSize - The number of results per page.
Returns:
Returns paged list of groups.


Copyright © 2010. All Rights Reserved.