Package org.exoplatform.social.rest.api
Interface UsersRelationshipsRestResources
- All Superinterfaces:
org.exoplatform.services.rest.resource.ResourceContainer,SocialRest
- All Known Implementing Classes:
UsersRelationshipsRestResourcesV1
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecreateUsersRelationships(javax.ws.rs.core.UriInfo uriInfo, String expand, RelationshipEntity model) Create a relationship between 2 usersjavax.ws.rs.core.ResponsedeleteUsersRelationshipsById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand) Delete a relationship by idjavax.ws.rs.core.ResponsegetUsersRelationships(javax.ws.rs.core.UriInfo uriInfo, String status, String user, String others, int offset, int limit, boolean returnSize, String expand) Get relationships of an userjavax.ws.rs.core.ResponsegetUsersRelationshipsById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand) Get a relationship by idjavax.ws.rs.core.ResponseupdateUsersRelationshipsById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, RelationshipEntity model) Update a relationship by id
-
Method Details
-
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 alluser- User name to get relationshipsothers- Usernames of the others users to get relationships with the given useroffset- Offsetlimit- LimitreturnSize- Returning the number of relationships or notexpand- 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 receivermodel- 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 relationshipexpand- 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 updateexpand- Asking for a full representation of a specific subresource, ex: sender or receivermodel- 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 deleteexpand- Asking for a full representation of a specific subresource, ex: sender or receiver- Returns:
- Throws:
Exception
-