Class AuditLogBuilderImpl

    • Method Detail

      • setObjectId

        public void setObjectId​(@NotNull
                                String objectId)
        Description copied from interface: AuditLogBuilder
        Sets object id we are interested in
        Specified by:
        setObjectId in interface AuditLogBuilder
        Parameters:
        objectId - id of the object
      • setUserId

        public void setUserId​(long userId)
        Description copied from interface: AuditLogBuilder
        Sets user id we are interested in
        Specified by:
        setUserId in interface AuditLogBuilder
        Parameters:
        userId - id of the user
      • setUserAction

        public void setUserAction​(boolean userAction)
        Description copied from interface: AuditLogBuilder
        Only retrieve actions performed by users
        Specified by:
        setUserAction in interface AuditLogBuilder
        Parameters:
        userAction - if true, only users actions are returned, if false all actions are returned
      • setCommentId

        public void setCommentId​(long commentId)
        Description copied from interface: AuditLogBuilder
        Sets comment id we are interested in
        Specified by:
        setCommentId in interface AuditLogBuilder
        Parameters:
        commentId - id of the comment
      • setActionTypes

        public void setActionTypes​(ActionType... actionTypes)
        Description copied from interface: AuditLogBuilder
        Sets a set of action types we are interested in
        Specified by:
        setActionTypes in interface AuditLogBuilder
        Parameters:
        actionTypes - action types
      • addFilter

        public void addFilter​(@NotNull
                              AuditLogFilter filter)
        Description copied from interface: AuditLogBuilder
        Adds a filter for log actions. Action will be accepted if all the filters accept it.
        Specified by:
        addFilter in interface AuditLogBuilder
        Parameters:
        filter - filter
      • getAllObjectIds

        @NotNull
        public Set<String> getAllObjectIds​(@NotNull
                                           ObjectType objectType)
        Description copied from interface: AuditLogBuilder
        Returns set of all distinct ids for objects of the specified type
        Specified by:
        getAllObjectIds in interface AuditLogBuilder
        Returns:
        set of all distinct ids for objects of the specified type
      • getLogActions

        @NotNull
        public List<AuditLogAction> getLogActions​(int maxActions)
        Description copied from interface: AuditLogBuilder
        Returns built list of the audit log actions according to all filters.
        Specified by:
        getLogActions in interface AuditLogBuilder
        Parameters:
        maxActions - if -1 returns all actions, otherwise returns no more than specified number of actions
        Returns:
        built list of the audit log actions according to all filters
      • findLastAction

        @Nullable
        public AuditLogAction findLastAction()
        Specified by:
        findLastAction in interface AuditLogBuilder
        Returns:
        the last action corresponding to specified filters or null, if there is no such action