Class CommunityMembershipResource
java.lang.Object
org.silverpeas.core.web.rs.RESTWebService
org.silverpeas.components.community.web.CommunityWebResource
org.silverpeas.components.community.web.CommunityMembershipResource
- All Implemented Interfaces:
org.silverpeas.core.web.rs.ProtectedWebResource,org.silverpeas.core.web.rs.WebAuthenticationValidation,org.silverpeas.core.web.rs.WebAuthorizationValidation,org.silverpeas.core.web.SilverpeasWebResource
@WebService
@Path("community/{componentInstanceId}/memberships")
@Authorized
public class CommunityMembershipResource
extends CommunityWebResource
The memberships to a community of users exposed as a resource through the Web. If the community
of users for which memberships are asked doesn't exist, then
NotFoundException is
thrown.- Author:
- mmoquillon
-
Nested Class Summary
Nested classes/interfaces inherited from class org.silverpeas.components.community.web.CommunityWebResource
CommunityWebResource.WebFunction<R> -
Field Summary
FieldsFields inherited from class org.silverpeas.components.community.web.CommunityWebResource
NO_PAGINATIONFields inherited from class org.silverpeas.core.web.rs.RESTWebService
RESPONSE_HEADER_ARRAYSIZEFields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActualMemberships(String page) Gets all the actual memberships to the community of users.getAllMemberships(String page) Gets all the memberships to the community of users, whatever the status of them.getMembership(String memberId) Gets a given existing membership to the community of users or throwNotFoundExceptionif no such membership exists.getPendingMemberships(String page) Gets all the memberships to the community of users pending for validation.protected StringGets the relative base path at which are all exposed the resources in the community application.getUserMembership(String userId) Gets the membership of the specified user or throwNotFoundExceptionif no such membership to the community of users exists.protected org.silverpeas.core.web.WebResourceUriMethods inherited from class org.silverpeas.components.community.web.CommunityWebResource
getUserRoles, getWebManager, initURIBuilder, processMethods inherited from class org.silverpeas.core.web.rs.RESTWebService
createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getLanguage, getOrganisationController, getSilverpeasContext, getUri, getUser, getUserPreferences, identifiedBy, identifiedBy, initContext, isUserDefined, processMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorizationMethods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation
validateUserAuthentication
-
Field Details
-
RESOURCE_NAME
- See Also:
-
-
Constructor Details
-
CommunityMembershipResource
public CommunityMembershipResource()
-
-
Method Details
-
getComponentId
-
getResourceBasePath
Description copied from class:CommunityWebResourceGets the relative base path at which are all exposed the resources in the community application.- Overrides:
getResourceBasePathin classCommunityWebResource- Returns:
- the base path of the resource relative to the URI at which are all exposed the REST-based web services in Silverpeas.
-
initWebResourceUri
protected org.silverpeas.core.web.WebResourceUri initWebResourceUri()- Overrides:
initWebResourceUriin classorg.silverpeas.core.web.rs.RESTWebService
-
getAllMemberships
@GET @Path("all") @Produces("application/json") public CommunityMembershipEntities getAllMemberships(@QueryParam("page") String page) Gets all the memberships to the community of users, whatever the status of them.- Parameters:
page- a pagination page to restrict the memberships to get.- Returns:
- a web entity representing a paginated collection of memberships.
-
getPendingMemberships
@GET @Path("pending") @Produces("application/json") public CommunityMembershipEntities getPendingMemberships(@QueryParam("page") String page) Gets all the memberships to the community of users pending for validation.- Parameters:
page- a pagination page to restrict the memberships to get.- Returns:
- a web entity representing a paginated collection of memberships.
-
getActualMemberships
@GET @Path("members") @Produces("application/json") public CommunityMembershipEntities getActualMemberships(@QueryParam("page") String page) Gets all the actual memberships to the community of users. These memberships are those they are committed; in other term, the memberships of the members of the community of users.- Parameters:
page- a pagination page to restrict the memberships to get.- Returns:
- a web entity representing a paginated collection of memberships.
-
getUserMembership
@GET @Path("users/{userId}") @Produces("application/json") public CommunityMembershipEntity getUserMembership(@PathParam("userId") String userId) Gets the membership of the specified user or throwNotFoundExceptionif no such membership to the community of users exists.- Parameters:
userId- the unique identifier of the user.- Returns:
- the web entity representing a membership to the community of users.
-
getMembership
@GET @Path("all/{membershipId}") @Produces("application/json") public CommunityMembershipEntity getMembership(@PathParam("membershipId") String memberId) Gets a given existing membership to the community of users or throwNotFoundExceptionif no such membership exists.- Parameters:
memberId- the unique identifier of a membership.- Returns:
- the web entity representing a membership to the community of users.
-