Class RatingApp
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.paris.lutece.portal.web.xpages.XPagedoCancelRating(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.XPagedoRating(jakarta.servlet.http.HttpServletRequest request) Records a vote, then redirects to the page of the resource.fr.paris.lutece.portal.web.xpages.XPagegetHome(jakarta.servlet.http.HttpServletRequest request) Redirects to the portal home: this application has no page of its own.static StringgetSessionKeyUrlRedirect(String strIdResource, String strResourceType) Get the session key of the URL to redirect the user to after he has voted for the resourceMethods inherited from class fr.paris.lutece.portal.util.mvc.xpage.MVCApplication
getPage, getRealClass
-
Field Details
-
XPAGE_NAME
- See Also:
-
BEAN_NAME
- See Also:
-
-
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 refusedfr.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 refusedfr.paris.lutece.portal.service.security.UserNotSignedException- if no user is signed in
-
getSessionKeyUrlRedirect
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 resourcestrResourceType- The type of the resource- Returns:
- The session key
-