Class UsersRelationshipsRestResourcesV1

java.lang.Object
org.exoplatform.social.rest.impl.userrelationship.UsersRelationshipsRestResourcesV1
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer, SocialRest, UsersRelationshipsRestResources

public class UsersRelationshipsRestResourcesV1 extends Object implements UsersRelationshipsRestResources
  • Constructor Details

    • UsersRelationshipsRestResourcesV1

      public UsersRelationshipsRestResourcesV1(org.exoplatform.social.core.manager.RelationshipManager relationshipManager)
  • Method Details

    • getUsersRelationships

      @RolesAllowed("users") public javax.ws.rs.core.Response getUsersRelationships(@Context javax.ws.rs.core.UriInfo uriInfo, String status, String user, String others, int offset, int limit, boolean returnSize, String expand) throws Exception
      Description copied from interface: UsersRelationshipsRestResources
      Get relationships of an user
      Specified by:
      getUsersRelationships in interface UsersRelationshipsRestResources
      status - Specific status of relationships: pending, confirmed or all
      user - User name to get relationships
      others - Usernames of the others users to get relationships with the given user
      offset - Offset
      limit - Limit
      returnSize - Returning the number of relationships or not
      expand - Asking for a full representation of a specific subresource, ex: sender or receiver
      Returns:
      The relationships of the given user
      Throws:
      Exception
    • createUsersRelationships

      @RolesAllowed("users") public javax.ws.rs.core.Response createUsersRelationships(@Context javax.ws.rs.core.UriInfo uriInfo, String expand, RelationshipEntity model) throws Exception
      Description copied from interface: UsersRelationshipsRestResources
      Create a relationship between 2 users
      Specified by:
      createUsersRelationships in interface UsersRelationshipsRestResources
      expand - Asking for a full representation of a specific subresource, ex: sender or receiver
      model - Relationship entity to create
      Returns:
      Throws:
      Exception
    • getUsersRelationshipsById

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response getUsersRelationshipsById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand) throws Exception
      Deprecated.
      Description copied from interface: UsersRelationshipsRestResources
      Get a relationship by id
      Specified by:
      getUsersRelationshipsById in interface UsersRelationshipsRestResources
      id - Id of the relationship
      expand - Asking for a full representation of a specific subresource, ex: sender or receiver
      Returns:
      Throws:
      Exception
    • updateUsersRelationshipsById

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response updateUsersRelationshipsById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, RelationshipEntity model) throws Exception
      Deprecated.
      Description copied from interface: UsersRelationshipsRestResources
      Update a relationship by id
      Specified by:
      updateUsersRelationshipsById in interface UsersRelationshipsRestResources
      id - Id of the relationship to update
      expand - Asking for a full representation of a specific subresource, ex: sender or receiver
      model - Relationship entity to create
      Returns:
      Throws:
      Exception
    • deleteUsersRelationshipsById

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response deleteUsersRelationshipsById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand) throws Exception
      Deprecated.
      Description copied from interface: UsersRelationshipsRestResources
      Delete a relationship by id
      Specified by:
      deleteUsersRelationshipsById in interface UsersRelationshipsRestResources
      id - Id of the relationship to delete
      expand - Asking for a full representation of a specific subresource, ex: sender or receiver
      Returns:
      Throws:
      Exception
    • getUsersRelationship

      @RolesAllowed("users") public javax.ws.rs.core.Response getUsersRelationship(@Context javax.ws.rs.core.UriInfo uriInfo, String sender, String receiver, String expand)
    • updateUsersRelationship

      @RolesAllowed("users") public javax.ws.rs.core.Response updateUsersRelationship(@Context javax.ws.rs.core.UriInfo uriInfo, RelationshipEntity model, String expand)
    • deleteUsersRelationship

      @RolesAllowed("users") public javax.ws.rs.core.Response deleteUsersRelationship(@Context javax.ws.rs.core.UriInfo uriInfo, String sender, String receiver, String expand)