Class RatingValidationManagementService

java.lang.Object
fr.paris.lutece.plugins.extend.modules.rating.service.validator.RatingValidationManagementService

public final class RatingValidationManagementService extends Object
Service to manage ration validation
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    canCancelRating(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)
    check if the rating can be done
    static boolean
    canRating(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)
    check if the rating can be done
    static String
    validateRating(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdResource, String strResourceTypeKey, float fRatingValue)
    Check if a user is allowed to validate a resource

    Methods inherited from class java.lang.Object

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

    • validateRating

      public static String validateRating(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdResource, String strResourceTypeKey, float fRatingValue)
      Check if a user is allowed to validate a resource
      Parameters:
      request - The request
      user - The user that wants to rate a resource
      strIdResource - the id of the resource
      strResourceTypeKey - The resource type key
      fRatingValue - 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(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)
      check if the rating can be done
      Parameters:
      strIdResource - the id of the resource
      strResourceTypeKey - The resource type key
      user - The user that wants to rate a resource
      Returns:
      true if the rating can be done
    • canCancelRating

      public static boolean canCancelRating(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.security.LuteceUser user)
      check if the rating can be done
      Parameters:
      strIdResource - the id of the resource
      strResourceTypeKey - The resource type key
      user - The user that wants to rate a resource
      Returns:
      true if the rating can be done