Class Group


  • public class Group
    extends AppEntity
    Created by adityagokula on 12/09/18.
    • Constructor Summary

      Constructors 
      Constructor Description
      Group()  
      Group​(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password)  
      Group​(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password, java.lang.String icon, java.lang.String description)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      static Group fromJson​(java.lang.String json)  
      static java.util.List<Group> fromJSONArray​(java.lang.String response)  
      long getCreatedAt()
      Get timestamp of group creation
      java.lang.String getDescription()
      Get description of the Group
      java.lang.String getGroupType()
      Get type of the group types of th group : GROUP_TYPE_PUBLIC GROUP_TYPE_PASSWORD GROUP_TYPE_PRIVATE
      java.lang.String getGuid()
      Get unique identifier of the Group
      java.lang.String getIcon()
      Get URL of the icon
      long getJoinedAt()
      Get join at timestamp of logged in user in a particular group
      int getMembersCount()
      Get number of members that are a part of the group
      JSONObject getMetadata()
      Get JSONObject of data set by developer
      java.lang.String getName()
      Get name of the group
      java.lang.String getOwner()
      Get UID of the owner of the Group
      java.lang.String getPassword()
      Get password of the password protected group
      java.lang.String getScope()
      Get scope of logged in user in a particular group
      java.util.List<java.lang.String> getTags()
      Get the tags that are specified for the group
      long getUpdatedAt()
      Get timestamp of group update
      int hashCode()  
      boolean isJoined()
      Get join information of logged in user in a particular group
      void setCreatedAt​(long createdAt)  
      void setDescription​(java.lang.String description)  
      void setGroupType​(java.lang.String groupType)  
      void setGuid​(java.lang.String guid)  
      void setHasJoined​(boolean hasJoined)  
      void setIcon​(java.lang.String icon)  
      void setJoinedAt​(long joinedAt)  
      void setMembersCount​(int membersCount)  
      void setMetadata​(JSONObject metadata)  
      void setName​(java.lang.String name)  
      void setOwner​(java.lang.String owner)  
      void setPassword​(java.lang.String password)  
      void setScope​(java.lang.String scope)  
      void setTags​(java.util.List<java.lang.String> tags)  
      void setUpdatedAt​(long updatedAt)  
      java.util.HashMap<java.lang.String,​java.lang.String> toMap()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Group

        public Group​(java.lang.String guid,
                     java.lang.String name,
                     java.lang.String groupType,
                     java.lang.String password)
      • Group

        public Group​(java.lang.String guid,
                     java.lang.String name,
                     java.lang.String groupType,
                     java.lang.String password,
                     java.lang.String icon,
                     java.lang.String description)
      • Group

        public Group()
    • Method Detail

      • getGuid

        public java.lang.String getGuid()
        Get unique identifier of the Group
        Returns:
        GUID of the group
        Since:
        v1
      • setGuid

        public void setGuid​(java.lang.String guid)
      • getName

        public java.lang.String getName()
        Get name of the group
        Returns:
        name of the Group
        Since:
        v1
      • setName

        public void setName​(java.lang.String name)
      • getIcon

        public java.lang.String getIcon()
        Get URL of the icon
        Returns:
        URL of the icon
        Since:
        v1
      • setIcon

        public void setIcon​(java.lang.String icon)
      • getDescription

        public java.lang.String getDescription()
        Get description of the Group
        Returns:
        description of the group
        Since:
        v1
      • setDescription

        public void setDescription​(java.lang.String description)
      • getOwner

        public java.lang.String getOwner()
        Get UID of the owner of the Group
        Returns:
        UID of the user
        Since:
        v1
      • setOwner

        public void setOwner​(java.lang.String owner)
      • getGroupType

        public java.lang.String getGroupType()
        Get type of the group types of th group :
        • GROUP_TYPE_PUBLIC
        • GROUP_TYPE_PASSWORD
        • GROUP_TYPE_PRIVATE
          Returns:
          type of the Group
          Since:
          v1
          See Also:
          CometChatConstants.GroupTypes
        • setGroupType

          public void setGroupType​(java.lang.String groupType)
        • getPassword

          public java.lang.String getPassword()
          Get password of the password protected group
          Returns:
          password of the group
          Since:
          v1
        • setPassword

          public void setPassword​(java.lang.String password)
        • getMetadata

          public JSONObject getMetadata()
          Get JSONObject of data set by developer
          Returns:
          JSONObject of custom data set by developer
          Since:
          v1
        • setMetadata

          public void setMetadata​(JSONObject metadata)
        • getCreatedAt

          public long getCreatedAt()
          Get timestamp of group creation
          Returns:
          creation timestamp
          Since:
          v1
        • setCreatedAt

          public void setCreatedAt​(long createdAt)
        • getUpdatedAt

          public long getUpdatedAt()
          Get timestamp of group update
          Returns:
          updated timestamp
          Since:
          v1
        • setUpdatedAt

          public void setUpdatedAt​(long updatedAt)
        • isJoined

          public boolean isJoined()
          Get join information of logged in user in a particular group
          Returns:
          true if logged in user is part of the group else false
          Since:
          v1
        • setHasJoined

          public void setHasJoined​(boolean hasJoined)
        • getJoinedAt

          public long getJoinedAt()
          Get join at timestamp of logged in user in a particular group
          Returns:
          timestamp of joined at of logged in user
          Since:
          v1
        • setJoinedAt

          public void setJoinedAt​(long joinedAt)
        • getScope

          public java.lang.String getScope()
          Get scope of logged in user in a particular group
          Returns:
          scope of logged in user
          Since:
          v1
        • setScope

          public void setScope​(java.lang.String scope)
        • getMembersCount

          public int getMembersCount()
          Get number of members that are a part of the group
          Returns:
          number of participants for the group
          Since:
          v1
        • setMembersCount

          public void setMembersCount​(int membersCount)
        • getTags

          public java.util.List<java.lang.String> getTags()
          Get the tags that are specified for the group
          Returns:
          number of participants for the group
          Since:
          v2.1.6
        • setTags

          public void setTags​(java.util.List<java.lang.String> tags)
        • toMap

          public java.util.HashMap<java.lang.String,​java.lang.String> toMap()
        • fromJson

          public static Group fromJson​(java.lang.String json)
        • fromJSONArray

          public static java.util.List<Group> fromJSONArray​(java.lang.String response)
                                                     throws JSONException
          Throws:
          JSONException
        • toString

          public java.lang.String toString()
          Overrides:
          toString in class java.lang.Object
        • hashCode

          public int hashCode()
          Overrides:
          hashCode in class java.lang.Object
        • equals

          public boolean equals​(java.lang.Object obj)
          Overrides:
          equals in class java.lang.Object