Class RatingValidationManagementService
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.modules.rating.service.validator.RatingValidationManagementService
-
public final class RatingValidationManagementService extends java.lang.ObjectService to manage ration validation
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanCancelRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)check if the rating can be donestatic booleancanRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)check if the rating can be donestatic java.lang.StringvalidateRating(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdResource, java.lang.String strResourceTypeKey, float fRatingValue)Check if a user is allowed to validate a resource
-
-
-
Method Detail
-
validateRating
public static java.lang.String validateRating(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdResource, java.lang.String strResourceTypeKey, float fRatingValue)Check if a user is allowed to validate a resource- Parameters:
request- The requestuser- The user that wants to rate a resourcestrIdResource- the id of the resourcestrResourceTypeKey- The resource type keyfRatingValue- The rating value- Returns:
- The URL to redirect the user if he is not allowed to rate the resource, or null if he is allowed
-
canRating
public static boolean canRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)check if the rating can be done- Parameters:
strIdResource- the id of the resourcestrResourceTypeKey- The resource type keyuser- The user that wants to rate a resource- Returns:
- true if the rating can be done
-
canCancelRating
public static boolean canCancelRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)check if the rating can be done- Parameters:
strIdResource- the id of the resourcestrResourceTypeKey- The resource type keyuser- The user that wants to rate a resource- Returns:
- true if the rating can be done
-
-