Class InvitationResource

  • All Implemented Interfaces:
    ProtectedWebResource, WebAuthenticationValidation, WebAuthorizationValidation, SilverpeasWebResource

    @RequestScoped
    @Path("invitations")
    @Authenticated
    public class InvitationResource
    extends RESTWebService
    It represents a resource published in the WEB that represents an invitation emitted by a user to another one in the Silverpeas platform. The WEB resource belongs always to the current user in the session underlying at the HTTP request. Then, it represents an invitation either sent or received by him. With a such policy, the invitations belonging to another user cannot be fetched by him.
    • Constructor Detail

      • InvitationResource

        public InvitationResource()
    • Method Detail

      • getReceivedInvitations

        @Path("inbox")
        @GET
        @Produces("application/json")
        public List<InvitationEntity> getReceivedInvitations()
      • getSentInvitations

        @Path("outbox")
        @GET
        @Produces("application/json")
        public List<InvitationEntity> getSentInvitations()
      • getInvitation

        @Path("{id}")
        @GET
        @Produces("application/json")
        public InvitationEntity getInvitation​(@PathParam("id")
                                              Integer id)
      • cancelInvitation

        @DELETE
        @Path("{id}")
        @Produces("application/json")
        public javax.ws.rs.core.Response cancelInvitation​(@PathParam("id")
                                                          Integer id)
      • acceptInvitation

        @PUT
        @Path("{id}")
        @Produces("application/json")
        public javax.ws.rs.core.Response acceptInvitation​(@PathParam("id")
                                                          Integer id)
      • createInvitation

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response createInvitation​(InvitationEntity invitationEntity)
      • getComponentId

        public String getComponentId()
        Description copied from interface: SilverpeasWebResource
        Gets the identifier of the component instance to which the requested resource belongs to.
        Returns:
        the identifier of the Silverpeas component instance.