Class ContributionContentResource

    • Constructor Detail

      • ContributionContentResource

        public ContributionContentResource()
    • Method Detail

      • 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.
      • getFormContent

        @GET
        @Path("form")
        @Produces("application/json")
        public FormEntity getFormContent​(@QueryParam("lang")
                                         String lang)
        Gets the JSON representation of contribution template. If it doesn't exist, a 404 HTTP code is returned. If the user isn't authentified, a 401 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.
        Returns:
        the response to the HTTP GET request with the JSON representation of form informations.
      • getFormContent

        @GET
        @Path("form/{formId}")
        @Produces("application/json")
        public FormEntity getFormContent​(@PathParam("formId")
                                         String formId,
                                         @QueryParam("lang")
                                         String lang,
                                         @QueryParam("renderView")
                                         boolean renderView)
        Gets the JSON representation of contribution template. If it doesn't exist, a 404 HTTP code is returned. If the user isn't authentified, a 401 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.
        Parameters:
        formId - the form identifier
        lang - the language
        Returns:
        the response to the HTTP GET request with the JSON representation of form informations.