Class DocumentViewResource

    • Constructor Detail

      • DocumentViewResource

        public DocumentViewResource()
    • Method Detail

      • getDocumentView

        @GET
        @Path("{type}/{id}")
        @Produces("application/json")
        public DocumentViewEntity getDocumentView​(@PathParam("id")
                                                  String id,
                                                  @PathParam("type")
                                                  String type,
                                                  @QueryParam("lang")
                                                  String language)
        Gets the JSON representation of document view information. If it doesn't exist, a 404 HTTP code is returned. If the user isn't authenticated, a 401 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.
        Parameters:
        id - the identifier of a resource handled into Silverpeas's context.
        type - the type of the resource.
        language - the language used to select the content to view.
        Returns:
        the response to the HTTP GET request with the JSON representation of document view information.
      • asWebEntity

        protected DocumentViewEntity asWebEntity​(DocumentView documentView)
        Converts the document view into its corresponding web entity.
        Parameters:
        documentView - the view to convert.
        Returns:
        the corresponding view entity.