Interface UsersRelationshipsRestResources

    • Method Detail

      • getUsersRelationships

        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
        Get relationships of an user
        Parameters:
        uriInfo -
        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

        javax.ws.rs.core.Response createUsersRelationships​(@Context
                                                           javax.ws.rs.core.UriInfo uriInfo,
                                                           String expand,
                                                           RelationshipEntity model)
                                                    throws Exception
        Create a relationship between 2 users
        Parameters:
        uriInfo -
        expand - Asking for a full representation of a specific subresource, ex: sender or receiver
        model - Relationship entity to create
        Returns:
        Throws:
        Exception
      • getUsersRelationshipsById

        javax.ws.rs.core.Response getUsersRelationshipsById​(@Context
                                                            javax.ws.rs.core.UriInfo uriInfo,
                                                            String id,
                                                            String expand)
                                                     throws Exception
        Get a relationship by id
        Parameters:
        uriInfo -
        id - Id of the relationship
        expand - Asking for a full representation of a specific subresource, ex: sender or receiver
        Returns:
        Throws:
        Exception
      • updateUsersRelationshipsById

        javax.ws.rs.core.Response updateUsersRelationshipsById​(@Context
                                                               javax.ws.rs.core.UriInfo uriInfo,
                                                               String id,
                                                               String expand,
                                                               RelationshipEntity model)
                                                        throws Exception
        Update a relationship by id
        Parameters:
        uriInfo -
        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

        javax.ws.rs.core.Response deleteUsersRelationshipsById​(@Context
                                                               javax.ws.rs.core.UriInfo uriInfo,
                                                               String id,
                                                               String expand)
                                                        throws Exception
        Delete a relationship by id
        Parameters:
        uriInfo -
        id - Id of the relationship to delete
        expand - Asking for a full representation of a specific subresource, ex: sender or receiver
        Returns:
        Throws:
        Exception