Interface SubscriptionService

    • Method Detail

      • getSubscriptionCount

        @NotAuditable
        int getSubscriptionCount​(String userId,
                                 SubscriptionItemTypeEnum type)
        Returns how many nodes the given user has subscribed to.
        Parameters:
        userId - the id of the user
        type - the type of the nodes
      • subscribe

        @Auditable(parameters={"userId","node"})
        void subscribe​(String userId,
                       NodeRef node)
        Subscribes to a node.
        Parameters:
        userId - id of the user
        node - the node
      • unsubscribe

        @Auditable(parameters={"userId","node"})
        void unsubscribe​(String userId,
                         NodeRef node)
        Unsubscribes from a node.
        Parameters:
        userId - id of the user
        node - the node
      • hasSubscribed

        @NotAuditable
        boolean hasSubscribed​(String userId,
                              NodeRef node)
        Returns if the user has subscribed to the given node.
        Parameters:
        userId - id of the user
        node - the node
      • getFollowingCount

        @NotAuditable
        int getFollowingCount​(String userId)
        Returns how many users the given user follows.
        Parameters:
        userId - the id of the user
      • getFollowersCount

        @NotAuditable
        int getFollowersCount​(String userId)
        Returns how many users follow the given user.
        Parameters:
        userId - the id of the user
      • follow

        @Auditable(parameters={"userId","userToFollow"})
        void follow​(String userId,
                    String userToFollow)
        Follows a user.
        Parameters:
        userId - the id of the user
        userToFollow - the id of the user to follow
      • unfollow

        @Auditable(parameters={"userId","userToUnfollow"})
        void unfollow​(String userId,
                      String userToUnfollow)
        Unfollows a user.
        Parameters:
        userId - the id of the user
        userToUnfollow - the id of the user to unfollow
      • follows

        @NotAuditable
        boolean follows​(String userId,
                        String userToFollow)
        Returns if the user follows to the given other user.
        Parameters:
        userId - id of the user
        userToFollow - the id of the other user
      • setSubscriptionListPrivate

        @Auditable(parameters={"userId","isPrivate"})
        void setSubscriptionListPrivate​(String userId,
                                        boolean isPrivate)
        Sets or unsets the subscription list of the given user to private.
        Parameters:
        userId - the id of the user
        isPrivate - true - set list private, false - set list public
      • isSubscriptionListPrivate

        @NotAuditable
        boolean isSubscriptionListPrivate​(String userId)
        Returns if the subscription list of the given user is set to private.
        Parameters:
        userId - the id of the user
      • isActive

        @NotAuditable
        boolean isActive()
        Returns if subscription are enabled for this system.
        Specified by:
        isActive in interface ActivateableBean
        Returns:
        true if this bean is active