Interface ICommentListener

  • Type Parameters:
    A -

    public interface ICommentListener
    Interface of listeners of comments
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canComment​(fr.paris.lutece.portal.service.security.LuteceUser user, java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
      Check if user can comment
      java.lang.String checkComment​(java.lang.String comment, java.lang.String uidUser)
      Notify the check comment
      java.lang.String checkComment​(java.lang.String comment, java.lang.String uidUser, java.lang.String strResourceType, java.lang.String strResourceId)
      Notify the check comment
      void createComment​(java.lang.String strIdExtendableResource, boolean bPublished)
      Notify the creation of a comment
      void createComment​(java.lang.String strIdExtendableResource, boolean bPublished, javax.servlet.http.HttpServletRequest request)
      Notify the creation of a comment
      void deleteComment​(java.lang.String strIdExtendableResource, java.util.List<java.lang.Integer> listIdRemovedComment)
      Notify the removal of a comment
      void publishComment​(java.lang.String strIdExtendableResource, boolean bPublished)
      Notify the publication or unpublication of a comment
    • Method Detail

      • createComment

        void createComment​(java.lang.String strIdExtendableResource,
                           boolean bPublished)
        Notify the creation of a comment
        Parameters:
        strIdExtendableResource - The id of the extendable resource associated with the created comment
        bPublished - True if the created comment is published, false otherwise
      • createComment

        void createComment​(java.lang.String strIdExtendableResource,
                           boolean bPublished,
                           javax.servlet.http.HttpServletRequest request)
        Notify the creation of a comment
        Parameters:
        strIdExtendableResource - The id of the extendable resource associated with the created comment
        bPublished - True if the created comment is published, false otherwise request HttpServletRequest the Http request
      • publishComment

        void publishComment​(java.lang.String strIdExtendableResource,
                            boolean bPublished)
        Notify the publication or unpublication of a comment
        Parameters:
        strIdExtendableResource - The id of the extendable resource associated with the modified comment
        bPublished - True if the comment was published, false if it was unpublished
      • deleteComment

        void deleteComment​(java.lang.String strIdExtendableResource,
                           java.util.List<java.lang.Integer> listIdRemovedComment)
        Notify the removal of a comment
        Parameters:
        strIdExtendableResource - The id of the extendable resource associated with the removed comment
        listIdRemovedComment - The list of ids of removed comments
      • checkComment

        java.lang.String checkComment​(java.lang.String comment,
                                      java.lang.String uidUser)
        Notify the check comment
        Parameters:
        listErrors -
        Returns:
      • checkComment

        java.lang.String checkComment​(java.lang.String comment,
                                      java.lang.String uidUser,
                                      java.lang.String strResourceType,
                                      java.lang.String strResourceId)
        Notify the check comment
        Parameters:
        comment -
        uidUser -
        strResourceType -
        strResourceId -
        Returns:
      • canComment

        boolean canComment​(fr.paris.lutece.portal.service.security.LuteceUser user,
                           java.lang.String strIdExtendableResource,
                           java.lang.String strExtendableResourceType)
        Check if user can comment
        Parameters:
        user - The lutece user
        strIdExtendableResource - The id of the extendable resource
        strExtendableResourceType - The type of the resource
        Returns:
        true when the user has the rights, otherwise false