public class

PortalGroup

extends Object
java.lang.Object
   ↳ com.esri.core.portal.PortalGroup

Class Overview

This class represents a Group in a Portal. A group object can be obtained from a valid instance of the portal.

Summary

Public Methods
boolean equals(Object obj)
boolean fetchAndUpdateMembership()
Fetches and updates the membership details for the group.
byte[] fetchThumbnail()
Fetches the thumbnail for this group.
static PortalGroup fromJson(JsonParser parser, Portal portal)
Creates a PortalGroup from a JSON parser.
PortalAccess getAccess()
Returns the access level of this group.
List<String> getAdmins()
Returns the administrators of this group.
long getCreated()
Returns the date on which this group was created.
String getDescription()
Returns the description of this group.
String getGroupId()
Returns the id of this group.
long getModified()
Returns the last date on which this group was modified.
String getOwner()
Returns the owner of this group.
Portal getPortal()
Returns the portal object that contains this group.
String getSnippet()
Returns a description snippet for this group.
String getSortField()
Returns the name of the field that items in this group are sorted by.
String getSortOrder()
Returns the sort order for items in this group.
List<String> getTags()
Returns a list of tags associated with this group.
String getThumbnailFileName()
Returns the filename of the thumbnail of this group.
String getTitle()
Returns the title of this group.
List<String> getUsers()
Returns the users that belong to this group.
int hashCode()
boolean isInvitationOnly()
Returns whether or not this group requires an invitation to join.
boolean isViewOnly()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public boolean fetchAndUpdateMembership ()

Fetches and updates the membership details for the group. Subsequently you can call getUsers() and getAdmins() to retrieve these. Performs a network request on the current thread, so do not call this from the UI thread.

Returns
boolean true if the operation was successful, false if unable to submit the request
Throws
Exception if unable to complete the request

public byte[] fetchThumbnail ()

Fetches the thumbnail for this group. Performs a network request on the current thread, so do not call this from the UI thread.

Returns
byte[] byte[] containing the thumbnail data, or null if there is no thumbnail
Throws
Exception if unable to complete the request

public static PortalGroup fromJson (JsonParser parser, Portal portal)

Creates a PortalGroup from a JSON parser.

Parameters
parser JsonParser: contains the JSON to parse
portal Portal: the Portal which contains the group
Returns
PortalGroup a new PortalGroup or null if the JSON is invalid
Throws
Exception if unable to complete the request

public PortalAccess getAccess ()

Returns the access level of this group. Determines who can access the content of this group. Can be private, public or organization.

Returns
PortalAccess the access level of this group

public List<String> getAdmins ()

Returns the administrators of this group. Will be null until fetchAndUpdateMembership() is called

Returns
List<String> the usernames of administrators of this group, or null if membership data has not been fetched

public long getCreated ()

Returns the date on which this group was created.

Returns
long the date on which this group was created

public String getDescription ()

Returns the description of this group. This is set by the owner of the group when the group is created.

Returns
String the description of this group

public String getGroupId ()

Returns the id of this group. This is created internally when the owner creates a group.

Returns
String the id of this group

public long getModified ()

Returns the last date on which this group was modified.

Returns
long the last date on which this group was modified

public String getOwner ()

Returns the owner of this group.

Returns
String the owner of this group

public Portal getPortal ()

Returns the portal object that contains this group.

Returns
Portal the portal that contains this group

public String getSnippet ()

Returns a description snippet for this group. The character limit is 250.

Returns
String a description snippet for this group

public String getSortField ()

Returns the name of the field that items in this group are sorted by. This is set by the owner of the group when the group is created.

Returns
String the name of the sort field for this group

public String getSortOrder ()

Returns the sort order for items in this group. This is set by the owner of the group when the group is created.

Returns
String sort order - "asc" if sorted in ascending alphanumeric order, or "desc" if sorted in descending alphanumeric order

public List<String> getTags ()

Returns a list of tags associated with this group. When creating the group the owner has to specify some tags. Queries can then use the 'tags' field to find groups with particular tags.

Returns
List<String> a list of tags associated with this group

public String getThumbnailFileName ()

Returns the filename of the thumbnail of this group.

Returns
String the filename of the thumbnail of this group

public String getTitle ()

Returns the title of this group. This is set up by the owner of the group when the group is created.

Returns
String the title of this group

public List<String> getUsers ()

Returns the users that belong to this group. Will be null until fetchAndUpdateMembership() is called.

Returns
List<String> the usernames of users that belong to this group, or null if membership data has not been fetched

public int hashCode ()

Returns
int

public boolean isInvitationOnly ()

Returns whether or not this group requires an invitation to join.

Returns
boolean whether or not this group requires an invitation to join

public boolean isViewOnly ()

Returns
boolean

public String toString ()

Returns
String