java.lang.Object
fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
fr.paris.lutece.plugins.extend.modules.rating.web.RatingApp
All Implemented Interfaces:
fr.paris.lutece.portal.web.xpages.XPageApplication, Serializable

@RequestScoped @Named("extend-rating.xpage.extend-rating") @Controller(xpageName="extend-rating", securityTokenEnabled=true) public class RatingApp extends fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
Front office application receiving the votes and the vote cancellations.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fr.paris.lutece.portal.web.xpages.XPage
    doCancelRating(jakarta.servlet.http.HttpServletRequest request)
    Cancels a vote of the signed-in user, then redirects to the page of the resource.
    fr.paris.lutece.portal.web.xpages.XPage
    doRating(jakarta.servlet.http.HttpServletRequest request)
    Records a vote, then redirects to the page of the resource.
    fr.paris.lutece.portal.web.xpages.XPage
    getHome(jakarta.servlet.http.HttpServletRequest request)
    Redirects to the portal home: this application has no page of its own.
    static String
    getSessionKeyUrlRedirect(String strIdResource, String strResourceType)
    Get the session key of the URL to redirect the user to after he has voted for the resource

    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
  • Field Details

  • Constructor Details

    • RatingApp

      public RatingApp()
  • Method Details

    • getHome

      @View(value="home", defaultView=true) public fr.paris.lutece.portal.web.xpages.XPage getHome(jakarta.servlet.http.HttpServletRequest request)
      Redirects to the portal home: this application has no page of its own.
      Parameters:
      request - The HTTP request
      Returns:
      the redirection
    • doRating

      @Action("doRating") public fr.paris.lutece.portal.web.xpages.XPage doRating(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.message.SiteMessageException, fr.paris.lutece.portal.service.security.UserNotSignedException
      Records a vote, then redirects to the page of the resource.
      Parameters:
      request - The HTTP request
      Returns:
      the redirection
      Throws:
      fr.paris.lutece.portal.service.message.SiteMessageException - if the vote is refused
      fr.paris.lutece.portal.service.security.UserNotSignedException - if the vote requires a signed-in user
    • doCancelRating

      @Action("doCancelRating") public fr.paris.lutece.portal.web.xpages.XPage doCancelRating(jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.message.SiteMessageException, fr.paris.lutece.portal.service.security.UserNotSignedException
      Cancels a vote of the signed-in user, then redirects to the page of the resource.
      Parameters:
      request - The HTTP request
      Returns:
      the redirection
      Throws:
      fr.paris.lutece.portal.service.message.SiteMessageException - if the cancellation is refused
      fr.paris.lutece.portal.service.security.UserNotSignedException - if no user is signed in
    • getSessionKeyUrlRedirect

      public static String getSessionKeyUrlRedirect(String strIdResource, String strResourceType)
      Get the session key of the URL to redirect the user to after he has voted for the resource
      Parameters:
      strIdResource - The id of the resource
      strResourceType - The type of the resource
      Returns:
      The session key