java.lang.Object
fr.paris.lutece.plugins.extend.modules.rating.service.security.RatingSecurityService
All Implemented Interfaces:
IRatingSecurityService

@ApplicationScoped @Named("extend-rating.ratingSecurityService") public class RatingSecurityService extends Object implements IRatingSecurityService
RatingSecurityService
  • Field Summary

    Fields inherited from interface fr.paris.lutece.plugins.extend.modules.rating.service.security.IRatingSecurityService

    BEAN_SERVICE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canAccess(fr.paris.lutece.portal.service.security.LuteceUser user)
    Check if any user rating process in progress
    boolean
    canDeleteVote(RatingExtenderConfig config, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
    Check if the given user (authenticated) can delete his vote.
    boolean
    canDeleteVote(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
    Check if the given user (authenticated) can delete his vote.
    boolean
    canVote(RatingExtenderConfig config, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
    Check if the given user (authenticated or not) can vote or not.
    boolean
    canVote(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
    Check if the given user (authenticated or not) can vote or not.
    void
    freeAccess(fr.paris.lutece.portal.service.security.LuteceUser user)
    free the user rating process
    boolean
    hasAlreadyVoted(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
    true if the use has already Voted
    boolean
    Check if the Votes are closed

    Methods inherited from class java.lang.Object

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

    • RatingSecurityService

      public RatingSecurityService()
  • Method Details

    • canVote

      public boolean canVote(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType) throws fr.paris.lutece.portal.service.security.UserNotSignedException
      Check if the given user (authenticated or not) can vote or not.
      Specified by:
      canVote in interface IRatingSecurityService
      Parameters:
      user - the LuteceUser
      strIdExtendableResource - the id extendable resource
      strExtendableResourceType - the extendable resource type
      Returns:
      true, if successful
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - the UserNotSignedException
    • canVote

      public boolean canVote(RatingExtenderConfig config, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType) throws fr.paris.lutece.portal.service.security.UserNotSignedException
      Check if the given user (authenticated or not) can vote or not.
      Specified by:
      canVote in interface IRatingSecurityService
      Parameters:
      config - the RatingExtenderConfig
      user - the LuteceUser
      strIdExtendableResource - the id extendable resource
      strExtendableResourceType - the extendable resource type
      Returns:
      true, if successful
      Throws:
      fr.paris.lutece.portal.service.security.UserNotSignedException - the UserNotSignedException
    • canDeleteVote

      public boolean canDeleteVote(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
      Check if the given user (authenticated) can delete his vote.
      Specified by:
      canDeleteVote in interface IRatingSecurityService
      Parameters:
      user - the LuteceUser
      strIdExtendableResource - the id extendable resource
      strExtendableResourceType - the extendable resource type
      Returns:
      true, if successful
    • canDeleteVote

      public boolean canDeleteVote(RatingExtenderConfig config, fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
      Check if the given user (authenticated) can delete his vote.
      Specified by:
      canDeleteVote in interface IRatingSecurityService
      Parameters:
      config - the RatingExtenderConfig
      user - the LuteceUser
      strIdExtendableResource - the id extendable resource
      strExtendableResourceType - the extendable resource type
      Returns:
      true, if successful
    • isVoteClosed

      public boolean isVoteClosed(RatingExtenderConfig config)
      Check if the Votes are closed
      Specified by:
      isVoteClosed in interface IRatingSecurityService
      Parameters:
      config - the rating config
      Returns:
      true if the votes are closed
    • hasAlreadyVoted

      public boolean hasAlreadyVoted(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
      true if the use has already Voted
      Specified by:
      hasAlreadyVoted in interface IRatingSecurityService
      strIdExtendableResource - the str id extendable resource
      strExtendableResourceType - the str extendable resource type
    • canAccess

      public boolean canAccess(fr.paris.lutece.portal.service.security.LuteceUser user)
      Check if any user rating process in progress An anonymous user is never locked.
      Specified by:
      canAccess in interface IRatingSecurityService
      Returns:
      true if no rating in progress, false if User rating in progress
    • freeAccess

      public void freeAccess(fr.paris.lutece.portal.service.security.LuteceUser user)
      free the user rating process
      Specified by:
      freeAccess in interface IRatingSecurityService