Interface XPollResource


  • @Unstable
    public interface XPollResource
    Provides the functionality of saving the user's votes and determining the winning proposal in a desired page.
    Since:
    2.1
    Version:
    $Id$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response vote​(String wikiName, String spaces, String pageName, Vote vote)
      Used to create/modify a user's votes and to determine the winning proposal whenever a vote is cast.
    • Method Detail

      • vote

        javax.ws.rs.core.Response vote​(String wikiName,
                                       @Encoded
                                       String spaces,
                                       String pageName,
                                       Vote vote)
                                throws org.xwiki.rest.XWikiRestException
        Used to create/modify a user's votes and to determine the winning proposal whenever a vote is cast.
        Parameters:
        wikiName - the name of the wiki in which the page resides
        spaces - the spaces of the page
        pageName - the name of the page
        vote - the vote sent by the current user
        Returns:
        returns 404 if the page doesn't exist or doesn't have a XPollClass object, 200 otherwise
        Throws:
        org.xwiki.rest.XWikiRestException - when failing to find the document or the document is missing the poll