Class CommunitiesEntity


  • public class CommunitiesEntity
    extends java.lang.Object
    • Constructor Detail

      • CommunitiesEntity

        public CommunitiesEntity​(CommunitiesEntityType type,
                                 java.lang.String id,
                                 boolean isFollower,
                                 int followersCount,
                                 java.lang.String title,
                                 java.lang.String avatarUrl,
                                 java.util.Map<CommunitiesAction,​java.lang.Boolean> availableActions)
    • Method Detail

      • isFollowedByMe

        public boolean isFollowedByMe()
        If current user follows the entity.
        Returns:
        true, if current user is entity follower, false otherwise.
      • getFollowersCount

        public int getFollowersCount()
        Number of followers of the entity.
        Returns:
        total followers count of this entity.
      • getTitle

        public java.lang.String getTitle()
        Title of the topic. Display name of the user. Null string otherwise.
        Returns:
        title/name of the entity.
      • getAvatarUrl

        public java.lang.String getAvatarUrl()
        Get avatar URL of the topic/user. Null if not set. Null for everything else.
        Returns:
        avatar URL of entity if present.
      • isActionAllowed

        public boolean isActionAllowed​(CommunitiesAction action)
        Check if current user is allowed to perform a certain action.
        Parameters:
        action - action to be checked.
        Returns:
        true, if current user is allowed to perform action, false otherwise.