org.exoplatform.services.organization.rest.json
Class RESTOrganizationServiceJSONImpl

java.lang.Object
  extended by org.exoplatform.services.organization.rest.json.RESTOrganizationServiceJSONImpl
All Implemented Interfaces:
ResourceContainer

public class RESTOrganizationServiceJSONImpl
extends java.lang.Object
implements ResourceContainer

Created by The eXo Platform SAS.

Version:
$Id:$ REST operations and appropriate HTTP methods
Author:
Gennady Azarenkov

Field Summary
protected static java.lang.String JSON_CONTENT_TYPE
          type of content.
 
Constructor Summary
RESTOrganizationServiceJSONImpl(org.exoplatform.services.organization.OrganizationService organizationService)
           
 
Method Summary
 Response createGroup(java.lang.String baseURI, org.exoplatform.services.organization.impl.GroupImpl groupBean)
           
 Response createMembership(java.lang.String baseURI, org.exoplatform.services.organization.impl.MembershipImpl membershipBean)
           
 Response createUser(java.lang.String baseURI, org.exoplatform.services.organization.impl.UserImpl userBean)
           
 Response deleteGroup(java.lang.String groupId)
           
 Response deleteMembership(java.lang.String membershipId)
           
 Response deleteUser(java.lang.String username)
           
 Response deleteUserFromGroup(java.lang.String groupId, java.lang.String username)
           
 Response findMembership(java.lang.String membershipId)
           
 Response findMemberships(org.exoplatform.services.organization.impl.MembershipImpl membership)
           
 Response findUsers(org.exoplatform.services.organization.impl.UserImpl user)
           
 Response findUsersRange(java.lang.Integer offset, java.lang.Integer amount, org.exoplatform.services.organization.impl.UserImpl user)
           
 Response getAllGroup()
           
 Response getFilteredGroup(java.lang.String filteredname)
           
 Response getGroup(java.lang.String groupId)
           
 Response getGroups(java.lang.String parentId)
           
 Response getGroupsCount()
           
 Response getGroupsOfUser(java.lang.String userId)
           
 Response getGroupsRange(java.lang.String parentId, java.lang.Integer offset, java.lang.Integer amount)
           
 Response getMembershipTypes()
           
 Response getRootGroups()
           
 Response getUser(java.lang.String userId)
           
 Response getUsers()
           
 Response getUsersCount()
           
 Response getUsersRange(java.lang.Integer offset, java.lang.Integer amount)
           
 Response updateGroup(org.exoplatform.services.organization.impl.GroupImpl group)
           
 Response updateUser(org.exoplatform.services.organization.impl.UserImpl user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSON_CONTENT_TYPE

protected static final java.lang.String JSON_CONTENT_TYPE
type of content.

See Also:
Constant Field Values
Constructor Detail

RESTOrganizationServiceJSONImpl

public RESTOrganizationServiceJSONImpl(org.exoplatform.services.organization.OrganizationService organizationService)
Parameters:
organizationService - implementation of OrganizationService.
Method Detail

createGroup

public Response createGroup(java.lang.String baseURI,
                            org.exoplatform.services.organization.impl.GroupImpl groupBean)
Parameters:
baseURI - the base URI
groupBean - the object with information for new Group
Returns:
Response object with HTTP status. Response object with HTTP status.

createMembership

public Response createMembership(java.lang.String baseURI,
                                 org.exoplatform.services.organization.impl.MembershipImpl membershipBean)
Parameters:
baseURI - the base URI
membershipBean - the object with information for new Membership
Returns:
Response object with HTTP status.

createUser

public Response createUser(java.lang.String baseURI,
                           org.exoplatform.services.organization.impl.UserImpl userBean)
Parameters:
baseURI - the base URI
userBean - the object with information for new User
Returns:
Response object with HTTP status.

deleteGroup

public Response deleteGroup(java.lang.String groupId)
Parameters:
groupId - the group ID
Returns:
Response object with HTTP status.

deleteMembership

public Response deleteMembership(java.lang.String membershipId)
Parameters:
membershipId - the membership ID
Returns:
Response object with HTTP status.

deleteUser

public Response deleteUser(java.lang.String username)
Parameters:
username - the user name
Returns:
Response object with HTTP status.

deleteUserFromGroup

public Response deleteUserFromGroup(java.lang.String groupId,
                                    java.lang.String username)
Parameters:
groupId - the group ID
username - the user ID
Returns:
Response object with HTTP status.

findMembership

public Response findMembership(java.lang.String membershipId)
Parameters:
membershipId - the membership ID
Returns:
Response object with HTTP status.

findMemberships

public Response findMemberships(org.exoplatform.services.organization.impl.MembershipImpl membership)
Parameters:
membership - the object with information for search
Returns:
Response object with HTTP status.

findUsers

public Response findUsers(org.exoplatform.services.organization.impl.UserImpl user)
Parameters:
user - the object with information for search
Returns:
Response object with HTTP status.

findUsersRange

public Response findUsersRange(java.lang.Integer offset,
                               java.lang.Integer amount,
                               org.exoplatform.services.organization.impl.UserImpl user)
Parameters:
offset - the down limit
amount - the top limit
user - the object with information for search
Returns:
Response object with HTTP status.

getAllGroup

public Response getAllGroup()
Returns:
Response object with HTTP status.

getFilteredGroup

public Response getFilteredGroup(java.lang.String filteredname)
Parameters:
filteredname - the filter for group id
Returns:
Response object with HTTP status.

getGroup

public Response getGroup(java.lang.String groupId)
Parameters:
groupId - the group ID
Returns:
Response object with HTTP status.

getGroups

public Response getGroups(java.lang.String parentId)
Parameters:
parentId - the id of parent node
Returns:
Response object with HTTP status.

getGroupsCount

public Response getGroupsCount()
Returns:
Response object with HTTP status.

getGroupsOfUser

public Response getGroupsOfUser(java.lang.String userId)
Parameters:
userId - the user id
Returns:
Response object with HTTP status.

getGroupsRange

public Response getGroupsRange(java.lang.String parentId,
                               java.lang.Integer offset,
                               java.lang.Integer amount)
Parameters:
parentId - the id of parent node
offset - the down limit
amount - the top limit
Returns:
Response object with HTTP status.

getMembershipTypes

public Response getMembershipTypes()
Returns:
Response object with HTTP status.

getRootGroups

public Response getRootGroups()
Returns:
Response object with HTTP status.

getUser

public Response getUser(java.lang.String userId)
Parameters:
userId - the user id
Returns:
Response object with HTTP status.

getUsers

public Response getUsers()
Returns:
Response object with HTTP status.

getUsersCount

public Response getUsersCount()
Returns:
Response object with HTTP status.

getUsersRange

public Response getUsersRange(java.lang.Integer offset,
                              java.lang.Integer amount)
Parameters:
offset - the down limit
amount - the top limit
Returns:
Response object with HTTP status.

updateGroup

public Response updateGroup(org.exoplatform.services.organization.impl.GroupImpl group)
Parameters:
group - the update object
Returns:
Response object with HTTP status.

updateUser

public Response updateUser(org.exoplatform.services.organization.impl.UserImpl user)
Parameters:
user - the update object
Returns:
Response object with HTTP status.


Copyright © 2010 eXo Platform SAS. All Rights Reserved.