@StableMinor(version="12.5", sinceVersion="8.0") @Path(value="/lumis/service/community/rest") public class CommunityResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CommunityResource.MembershipRequestAction
Action parameter values available for use in
#processMembershipRequest(String, String, String) . |
Constructor and Description |
---|
CommunityResource() |
Modifier and Type | Method and Description |
---|---|
void |
deleteCommunityMembership(String communityId,
String userId)
Deletes the membership of a user in a community.
|
void |
deleteCommunityMembershipRequest(String communityId,
String userId)
Deletes a membership request in a community sent by a user.
|
lumis.service.community.CommunityResource.CommunityMembership |
getCommunityMembership(String communityId,
String userId)
Returns information about the membership of a user in a community.
|
lumis.service.community.CommunityMembershipRequest |
getCommunityMembershipRequest(String communityId,
String userId)
Returns information about the request of membership in a community sent by a user.
|
void |
processMembershipRequest(String communityId,
String userId,
CommunityResource.MembershipRequestAction action)
Processes an action on membership request.
|
void |
requestCommunityMembership(String communityId)
Requests a membership in a community, by the current logged in user.
|
lumis.service.community.CommunityResource.CommunityMembership |
updateCommunityMembership(String communityId,
String userId,
lumis.service.community.CommunityResource.CommunityMembership membership)
Updates information about the membership of a user in a community.
|
@GET @Path(value="/communities/{communityId:[A-F0-9]{32}}/memberships/{userId:[A-F0-9]{32}}") @Produces(value="application/json") public lumis.service.community.CommunityResource.CommunityMembership getCommunityMembership(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId) throws PortalException
communityId
- the community identifier.userId
- the user identifier.PortalException
@PUT @Path(value="/communities/{communityId:[A-F0-9]{32}}/memberships/{userId:[A-F0-9]{32}}") @Produces(value="application/json") public lumis.service.community.CommunityResource.CommunityMembership updateCommunityMembership(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId, @NotNull lumis.service.community.CommunityResource.CommunityMembership membership) throws PortalException
Only the community administrator may execute this operation.
communityId
- the community identifier.userId
- the user identifier.membership
- information of the membership to be updated. Sample JSON expected:
{"type":"administrator"}
PortalException
@DELETE @Path(value="/communities/{communityId:[A-F0-9]{32}}/memberships/{userId:[A-F0-9]{32}}") @Produces(value="application/json") public void deleteCommunityMembership(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId) throws PortalException
communityId
- the community identifier.userId
- the user identifier.PortalException
@GET @Path(value="/communities/{communityId:[A-F0-9]{32}}/membershiprequests/{userId:[A-F0-9]{32}}") @Produces(value="application/json") public lumis.service.community.CommunityMembershipRequest getCommunityMembershipRequest(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId) throws PortalException
communityId
- the community identifier.userId
- the user identifier.PortalException
@DELETE @Path(value="/communities/{communityId:[A-F0-9]{32}}/membershiprequests/{userId:[A-F0-9]{32}}") @Produces(value="application/json") public void deleteCommunityMembershipRequest(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId) throws PortalException
communityId
- the community identifier.userId
- the user identifier.PortalException
@POST @Path(value="/communities/{communityId:[A-F0-9]{32}}/membershiprequests") public void requestCommunityMembership(@NotNull @PathParam(value="communityId") String communityId) throws PortalException
If the community is CommunityPrivacy.PRIVATE
, this method must return a not found response.
If the community is CommunityPrivacy.RESTRICTED
, the membership request is created and the user will
become a member of the community when a community administrator approves the request.
If the community is CommunityPrivacy.PUBLIC
, the membership request is automatically accepted and the
user becomes a member of the community.
communityId
- the community identifier.PortalException
@POST @Path(value="/communities/{communityId:[A-F0-9]{32}}/membershiprequests/{userId:[A-F0-9]{32}}") public void processMembershipRequest(@NotNull @PathParam(value="communityId") String communityId, @NotNull @PathParam(value="userId") String userId, @NotNull @QueryParam(value="action") CommunityResource.MembershipRequestAction action) throws PortalException
communityId
- the membership request's community identifier.userId
- the identifier of user who created the membership request.action
- the action to be performed.PortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.