public class

PortalUser

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

Class Overview

This class represents a registered user on a Portal.

Summary

Public Methods
boolean equals(Object obj)
PortalUserContent fetchContent()
Fetches the user's content.
PortalUserContent fetchContentInFolder(String folderId)
Fetches the user's content that is in a specific folder.
byte[] fetchThumbnail()
Fetches the user's thumbnail.
static PortalUser fromJson(JsonParser parser, Portal portal)
Creates a PortalUser from a JSON parser.
PortalAccess getAccess()
Returns the access level of this user.
long getCreated()
Returns the creation date of the user's profile.
String getEmail()
Return the email address of the user.
String getFullName()
Return the user's full name.
List<PortalGroup> getGroups()
Returns a list of all the groups that the user belongs to.
long getModified()
Returns the date on which this user was last modified.
String getOrganizationId()
Returns the ID of the organization, if the user belongs to one.
Portal getPortal()
Returns the portal that contains this user.
PortalUserRole getRole()
Gets the role of this user.
List<String> getTags()
Returns a list of tags associated with this user.
String getThumbnailFileName()
Returns the filename of the thumbnail of this user.
String getUsername()
Returns the username.
int hashCode()
static PortalUser newInstance(Portal portal, String username)
Initializes a PortalUser with a Portal and a username.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public PortalUserContent fetchContent ()

Fetches the user's content.

Returns
PortalUserContent portal user content
Throws
Exception if unable to complete the request

public PortalUserContent fetchContentInFolder (String folderId)

Fetches the user's content that is in a specific folder. Performs a network request on the current thread, so do not call this from the UI thread.

Parameters
folderId String: ID of the folder for which to fetch content, or null for the user's root folder
Returns
PortalUserContent PortalUserContent, or null in unable to submit the request
Throws
Exception if unable to complete the request

public byte[] fetchThumbnail ()

Fetches the user's thumbnail. 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 PortalUser fromJson (JsonParser parser, Portal portal)

Creates a PortalUser from a JSON parser.

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

public PortalAccess getAccess ()

Returns the access level of this user.

Returns
PortalAccess access level of this user

public long getCreated ()

Returns the creation date of the user's profile.

Returns
long creation date of the user's profile

public String getEmail ()

Return the email address of the user.

Returns
String email address of the user

public String getFullName ()

Return the user's full name.

Returns
String user's full name

public List<PortalGroup> getGroups ()

Returns a list of all the groups that the user belongs to.

Returns
List<PortalGroup> list of all the groups that the user belongs to

public long getModified ()

Returns the date on which this user was last modified.

Returns
long date on which this user was last modified

public String getOrganizationId ()

Returns the ID of the organization, if the user belongs to one.

Returns
String ID of the organization, if the user belongs to one

public Portal getPortal ()

Returns the portal that contains this user.

Returns
Portal portal that contains this user

public PortalUserRole getRole ()

Gets the role of this user.

Returns
PortalUserRole role of this user

public List<String> getTags ()

Returns a list of tags associated with this user.

Returns
List<String> list of tags associated with this user

public String getThumbnailFileName ()

Returns the filename of the thumbnail of this user.

Returns
String filename of the thumbnail of this user

public String getUsername ()

Returns the username.

Returns
String the username

public int hashCode ()

Returns
int

public static PortalUser newInstance (Portal portal, String username)

Initializes a PortalUser with a Portal and a username. Performs a network request on the current thread, so do not call this from the UI thread.

Parameters
portal Portal: the Portal for which the user is a member
username String: name of user as in the portal
Returns
PortalUser PortalUser, or null if unable to submit the request
Throws
Exception if unable to complete the request

public String toString ()

Returns
String