Class RestDocumentClient

    • Constructor Detail

      • RestDocumentClient

        public RestDocumentClient​(String endpoint,
                                  String username,
                                  String password)
      • RestDocumentClient

        public RestDocumentClient​(String endpoint,
                                  String username,
                                  String password,
                                  int timeout)
    • Method Detail

      • getContent

        public javax.activation.DataHandler getContent​(long docId)
                                                throws Exception
        Throws:
        Exception
      • getVersionContent

        public javax.activation.DataHandler getVersionContent​(long docId,
                                                              String version)
                                                       throws Exception
        Throws:
        Exception
      • deleteNote

        public void deleteNote​(long noteId)
                        throws Exception
        Adds a new note for the given document
        Parameters:
        noteId - identifier of the note
        Throws:
        Exception - error in the server application
      • deleteVersion

        public void deleteVersion​(long docId,
                                  String version)
                           throws Exception
        Adds a new note for the given document
        Parameters:
        docId - identifier of the document
        version - document's version
        Throws:
        Exception - error in the server application
      • getNotes

        public WSNote[] getNotes​(long docId)
                          throws Exception
        Gets the notes for the given document
        Parameters:
        docId - identifier of the document
        Returns:
        array of ratings
        Throws:
        Exception - error in the server application
      • rateDocument

        public WSRating rateDocument​(long docId,
                                     int vote)
                              throws Exception
        Puts a new rating on the given document
        Parameters:
        docId - identifier of the document
        vote - the vote
        Returns:
        the rating
        Throws:
        Exception - error in the server application
      • getRatings

        public WSRating[] getRatings​(long docId)
                              throws Exception
        Gets all the ratings of the given document
        Parameters:
        docId - identifier of the document
        Returns:
        array of ratings
        Throws:
        Exception - error in the server application