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
  • Field Details

  • Constructor Details

    • CommunityMembershipResource

      public CommunityMembershipResource()
  • Method Details

    • getComponentId

      public String getComponentId()
    • getResourceBasePath

      protected String getResourceBasePath()
      Description copied from class: CommunityWebResource
      Gets the relative base path at which are all exposed the resources in the community application.
      Overrides:
      getResourceBasePath in class CommunityWebResource
      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:
      initWebResourceUri in class org.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 throw NotFoundException if 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 throw NotFoundException if no such membership exists.
      Parameters:
      memberId - the unique identifier of a membership.
      Returns:
      the web entity representing a membership to the community of users.