Class WikiSuggestionXPage

java.lang.Object
fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
fr.paris.lutece.plugins.wiki.web.AbstractWikiXPage
fr.paris.lutece.plugins.wiki.web.WikiSuggestionXPage
All Implemented Interfaces:
fr.paris.lutece.portal.web.xpages.XPageApplication, Serializable

@RequestScoped @Named("wiki.xpage.wikisuggestion") @Controller(xpageName="wikisuggestion", pageTitleI18nKey="wiki.xpage.suggestion.pageTitle", pagePathI18nKey="wiki.xpage.suggestion.pagePathLabel") public class WikiSuggestionXPage extends AbstractWikiXPage
XPage handling the suggested-revision workflow:
  • propose / doPropose: a user without edit rights submits a proposed modification on a wiki item
  • list: unified list of every suggestion visible to the current user (own history + items they can review), populated client-side via REST
  • viewSuggestion: side-by-side view of the current revision vs the proposal, with approve/reject actions
  • doApprove / doReject: reviewer actions
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fr.paris.lutece.portal.web.xpages.XPage
    doApprove(jakarta.servlet.http.HttpServletRequest request)
    Approves a pending suggestion: creates a real Revision and marks the suggestion APPROVED.
    fr.paris.lutece.portal.web.xpages.XPage
    doDelete(jakarta.servlet.http.HttpServletRequest request)
    Deletes a pending suggestion owned by the current user.
    fr.paris.lutece.portal.web.xpages.XPage
    doPropose(jakarta.servlet.http.HttpServletRequest request)
    Persists a new pending suggestion submitted by the proposer.
    fr.paris.lutece.portal.web.xpages.XPage
    doReject(jakarta.servlet.http.HttpServletRequest request)
    Rejects a pending suggestion.
    fr.paris.lutece.portal.web.xpages.XPage
    list(jakarta.servlet.http.HttpServletRequest request)
    Renders the unified suggestions page.
    fr.paris.lutece.portal.web.xpages.XPage
    propose(jakarta.servlet.http.HttpServletRequest request)
    Displays the form letting a user propose a modification on a wiki item.
    fr.paris.lutece.portal.web.xpages.XPage
    viewSuggestion(jakarta.servlet.http.HttpServletRequest request)
    Displays the side-by-side detail of one suggestion (current revision vs proposal).

    Methods inherited from class fr.paris.lutece.portal.util.mvc.xpage.MVCApplication

    getPage, getRealClass

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WikiSuggestionXPage

      public WikiSuggestionXPage()
  • Method Details

    • propose

      @View(value="propose", defaultView=true) public fr.paris.lutece.portal.web.xpages.XPage propose(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Displays the form letting a user propose a modification on a wiki item.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if the user cannot view the item
      fr.paris.lutece.portal.service.message.SiteMessageException
    • doPropose

      @Action("doPropose") public fr.paris.lutece.portal.web.xpages.XPage doPropose(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Persists a new pending suggestion submitted by the proposer.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage redirecting back to the item view
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if access is denied or the token is invalid
      fr.paris.lutece.portal.service.message.SiteMessageException
    • list

      @View("list") public fr.paris.lutece.portal.web.xpages.XPage list(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException
      Renders the unified suggestions page. The list is populated client-side by a fetch against /rest/wiki/suggestion, so this view only emits the page shell (filters + empty table). Authentication is still enforced server-side to avoid serving the shell to anonymous users.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
    • viewSuggestion

      @View("viewSuggestion") public fr.paris.lutece.portal.web.xpages.XPage viewSuggestion(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Displays the side-by-side detail of one suggestion (current revision vs proposal).
      Parameters:
      request - the HTTP request
      Returns:
      the XPage
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if the user cannot edit the targeted item
      fr.paris.lutece.portal.service.message.SiteMessageException
    • doApprove

      @Action("doApprove") public fr.paris.lutece.portal.web.xpages.XPage doApprove(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Approves a pending suggestion: creates a real Revision and marks the suggestion APPROVED.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage redirecting to the review queue
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if the user cannot edit the targeted item or the token is invalid
      fr.paris.lutece.portal.service.message.SiteMessageException
    • doReject

      @Action("doReject") public fr.paris.lutece.portal.web.xpages.XPage doReject(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Rejects a pending suggestion.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage redirecting to the review queue
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if the user cannot edit the targeted item or the token is invalid
      fr.paris.lutece.portal.service.message.SiteMessageException
    • doDelete

      @Action("doDelete") public fr.paris.lutece.portal.web.xpages.XPage doDelete(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.security.UserNotSignedException, fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.message.SiteMessageException
      Deletes a pending suggestion owned by the current user. Access is restricted to the author and to suggestions still in PENDING status; approved or rejected proposals are immutable audit history.
      Parameters:
      request - the HTTP request
      Returns:
      the XPage redirecting back to the suggestion list
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - if not authenticated
      fr.paris.lutece.portal.service.admin.AccessDeniedException - if the token is invalid or the user is not the owner
      fr.paris.lutece.portal.service.message.SiteMessageException - on access denial