Class RatingSecurityService

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      Check if the given user (authenticated) can delete his vote.
      boolean canDeleteVote​(fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      Check if the given user (authenticated) can delete his vote.
      boolean canVote​(RatingExtenderConfig config, fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      Check if the given user (authenticated or not) can vote or not.
      boolean canVote​(fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdExtendableResource, java.lang.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, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      true if the use has already Voted
      boolean isVoteClosed​(RatingExtenderConfig config)
      Check if the Votes are closed
      • Methods inherited from class java.lang.Object

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

      • RatingSecurityService

        public RatingSecurityService()
    • Method Detail

      • canVote

        public boolean canVote​(fr.paris.lutece.portal.service.security.LuteceUser user,
                               java.lang.String strIdExtendableResource,
                               java.lang.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,
                               java.lang.String strIdExtendableResource,
                               java.lang.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,
                                     java.lang.String strIdExtendableResource,
                                     java.lang.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,
                                     java.lang.String strIdExtendableResource,
                                     java.lang.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
      • hasAlreadyVoted

        public boolean hasAlreadyVoted​(fr.paris.lutece.portal.service.security.LuteceUser user,
                                       java.lang.String strIdExtendableResource,
                                       java.lang.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)
        Description copied from interface: IRatingSecurityService
        Check if any user rating process in progress
        Specified by:
        canAccess in interface IRatingSecurityService
        Returns:
        true if no rating in progress, false if User rating in progress