com.esri.core.portal
Class PortalGroup

java.lang.Object
  extended by com.esri.core.portal.PortalGroup

public class PortalGroup
extends Object

This class represents a Group in a Portal. The owner of the group can invite/remove other users to have access to the group. Users can request to join a group. A group object can be obtained from a valid instance of the portal.

Since:
1.0

Method Summary
 boolean equals(Object obj)
          
 boolean fetchAndUpdateMembership()
          Fetches and update the membership details for the group by id.
 byte[] fetchThumbnail()
          Fetches the thumbnail for this group.
 void fetchThumbnail(PortalListener<byte[]> portalListener)
          Deprecated. please use fetchThumbnail() instead
static PortalGroup fromJson(org.codehaus.jackson.JsonParser parser, Portal portal)
          Creates a PortalGroup from the Json parser.
 PortalAccess getAccess()
          Returns the access level of this group.
 List<String> getAdmins()
          Returns the admins of this group.
 long getCreated()
          Returns the date on which this group was created.
 String getDescription()
          Returns the description of this group, this is setup by the owner of the group when the group is created.
 String getGroupId()
          Returns the id of this group, this is created internally when the owner creates a group.
 long getModified()
          Returns the last date on which this group was modified.
 String getOwner()
          Returns the owner of this group, the owner has the ability to add/remove/invite other users.
 Portal getPortal()
          Returns the portal object that contains this group.
 String getSnippet()
          Returns a description snippet for 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, this is set up by the owner of the group when the group is created.
 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.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

fetchAndUpdateMembership

public boolean fetchAndUpdateMembership()
                                 throws Exception
Fetches and update the membership details for the group by id. Returns true if the operation is success. This is a networking call, which fetches the users and admins from the server side.

Returns:
true, if fetch and update membership
Throws:
Exception - if unable to complete the request.
Since:
1.0

fetchThumbnail

@Deprecated
public void fetchThumbnail(PortalListener<byte[]> portalListener)
Deprecated. please use fetchThumbnail() instead

Fetches the thumbnail for this group.

Parameters:
portalListener - - fetches the thumbnail associated with the group

fetchThumbnail

public byte[] fetchThumbnail()
                      throws Exception
Fetches the thumbnail for this group.

Returns:
the byte[]
Throws:
Exception - if unable to complete the request.
Since:
1.0

fromJson

public static PortalGroup fromJson(org.codehaus.jackson.JsonParser parser,
                                   Portal portal)
                            throws Exception
Creates a PortalGroup from the Json parser.

Parameters:
parser - the json to parse the PortalGroup.
portal - the Portal which contains the group.
Returns:
an new PortalGroup or null if the json is invalid.
Throws:
Exception - if unable to complete the request.
Since:
1.0

getPortal

public Portal getPortal()
Returns the portal object that contains this group.

Returns:
The portal that contains this group
Since:
1.0

getGroupId

public String getGroupId()
Returns the id of this group, this is created internally when the owner creates a group.

Returns:
the id of this group
Since:
1.0

getTitle

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:
The title of this group
Since:
1.0

getOwner

public String getOwner()
Returns the owner of this group, the owner has the ability to add/remove/invite other users.

Returns:
The owner of this group
Since:
1.0

getDescription

public String getDescription()
Returns the description of this group, this is setup by the owner of the group when the group is created.

Returns:
The description of this group
Since:
1.0

getSnippet

public String getSnippet()
Returns a description snippet for this group. The character limit is 250.

Returns:
A description snippet for this group
Since:
1.0

getTags

public List<String> getTags()
Returns a list of tags associated with this group. While creating the group the owner has to set up tags, these are useful while searching for a group.

Returns:
A list of tags associated with this group
Since:
1.0

getThumbnailFileName

public String getThumbnailFileName()
Returns the filename of the thumbnail of this group. This is useful while trying to fetch a thumbnail, if the filename is null the user need not proceed.

Returns:
The filename of the thumbnail of this group
Since:
1.0

getCreated

public long getCreated()
Returns the date on which this group was created.

Returns:
The date on which this group was created
Since:
1.0

getModified

public long getModified()
Returns the last date on which this group was modified.

Returns:
The last date on which this group was modified
Since:
1.0

isInvitationOnly

public boolean isInvitationOnly()
Returns whether or not this group requires an invitation to join.

Returns:
Whether or not this group requires an invitation to join
Since:
1.0

getAccess

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:
The access level of this group
Since:
1.0

getUsers

public List<String> getUsers()
Returns the users that belong to this group. Will be null until fetchAndUpdateMembership() is called (and fires the onCallback method successfully).

Returns:
The users that belong to this group
Since:
1.0

getAdmins

public List<String> getAdmins()
Returns the admins of this group. Will be null until fetchAndUpdateMembership() is called (and fires the onCallback method successfully).

Returns:
The admins of this group
Since:
1.0

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.