Package fr.paris.lutece.plugins.wiki.web
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 itemlist: unified list of every suggestion visible to the current user (own history + items they can review), populated client-side via RESTviewSuggestion: side-by-side view of the current revision vs the proposal, with approve/reject actionsdoApprove/doReject: reviewer actions
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.paris.lutece.portal.web.xpages.XPagedoApprove(jakarta.servlet.http.HttpServletRequest request) Approves a pending suggestion: creates a real Revision and marks the suggestion APPROVED.fr.paris.lutece.portal.web.xpages.XPagedoDelete(jakarta.servlet.http.HttpServletRequest request) Deletes a pending suggestion owned by the current user.fr.paris.lutece.portal.web.xpages.XPagedoPropose(jakarta.servlet.http.HttpServletRequest request) Persists a new pending suggestion submitted by the proposer.fr.paris.lutece.portal.web.xpages.XPagedoReject(jakarta.servlet.http.HttpServletRequest request) Rejects a pending suggestion.fr.paris.lutece.portal.web.xpages.XPagelist(jakarta.servlet.http.HttpServletRequest request) Renders the unified suggestions page.fr.paris.lutece.portal.web.xpages.XPagepropose(jakarta.servlet.http.HttpServletRequest request) Displays the form letting a user propose a modification on a wiki item.fr.paris.lutece.portal.web.xpages.XPageviewSuggestion(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
-
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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if the user cannot view the itemfr.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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if access is denied or the token is invalidfr.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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if the user cannot edit the targeted itemfr.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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if the user cannot edit the targeted item or the token is invalidfr.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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if the user cannot edit the targeted item or the token is invalidfr.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 authenticatedfr.paris.lutece.portal.service.admin.AccessDeniedException- if the token is invalid or the user is not the ownerfr.paris.lutece.portal.service.message.SiteMessageException- on access denial
-