com.esri.core.portal
Class PortalUser

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

public class PortalUser
extends Object

This class represents a registered user on a Portal.

Since:
1.0

Method Summary
 boolean equals(Object obj)
           
 PortalUserContent fetchContent()
          Fetches the user's content.
 void fetchContent(PortalListener<PortalUserContent> portalListener)
          Deprecated. please use fetchContent() instead.
 PortalUserContent fetchContentInFolder(String folderId)
          Fetches the user's content that is in a specific folder.
 void fetchContentInFolder(String folderId, PortalListener<PortalUserContent> portalListener)
          Deprecated. please use fetchContentInFolder(String) instead.
 byte[] fetchThumbnail()
          Fetches the user's thumbnail.
 void fetchThumbnail(PortalListener<byte[]> portalListener)
          Deprecated. please use fetchThumbnail() instead.
static PortalUser fromJson(org.codehaus.jackson.JsonParser parser, Portal portal)
          From json.
 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 all the groups that the user belongs to.
 long getModified()
          Returns the last date the user was 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 the Portal user.
 List<String> getTags()
          Returns a list of search tags associated with this user.
 String getThumbnailFileName()
          Returns the filename of the thumbnail of this user.
 String getUsername()
          Returns the user name.
 int hashCode()
           
static PortalUser newInstance(Portal portal, String username)
          Initializes a portal user with a portal and a username.
static void newInstance(Portal portal, String username, PortalListener<PortalUser> portalListener)
          Deprecated. please use newInstance(Portal, String) instead.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

@Deprecated
public static void newInstance(Portal portal,
                                          String username,
                                          PortalListener<PortalUser> portalListener)
Deprecated. please use newInstance(Portal, String) instead.

Initializes a portal user with a portal and a username.

Parameters:
portal - - portal for which the user is a member
username - - username as in the portal
portalListener - - callback listener that returns a portal

newInstance

public static PortalUser newInstance(Portal portal,
                                     String username)
                              throws Exception
Initializes a portal user with a portal and a username.

Parameters:
portal - - portal for which the user is a member
username - - username as in the portal
Returns:
the portal user
Throws:
Exception - If unable to complete the request.
Since:
1.0

fetchContent

@Deprecated
public void fetchContent(PortalListener<PortalUserContent> portalListener)
Deprecated. please use fetchContent() instead.

Fetches the user's content.

Parameters:
portalListener - - in the callback the content published by the user is returned
Since:
1.0

fetchContentInFolder

@Deprecated
public void fetchContentInFolder(String folderId,
                                            PortalListener<PortalUserContent> portalListener)
Deprecated. please use fetchContentInFolder(String) instead.

Fetches the user's content that is in a specific folder.

Parameters:
folderId - - id of the folder for which content must be fetched
portalListener - - in the callback the folder content published by the user is returned
Since:
1.0

fetchContent

public PortalUserContent fetchContent()
                               throws Exception
Fetches the user's content.

Returns:
the portal user content
Throws:
Exception - If unable to complete the request.
Since:
1.0

fetchContentInFolder

public PortalUserContent fetchContentInFolder(String folderId)
                                       throws Exception
Fetches the user's content that is in a specific folder.

Parameters:
folderId - - id of the folder for which content must be fetched, or null if not sure.
Returns:
the portal user content
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 user's thumbnail.

Parameters:
portalListener - - the callback returns the thumbnail associated with the portal
Since:
1.0

fetchThumbnail

public byte[] fetchThumbnail()
                      throws Exception
Fetches the user's thumbnail.

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

fromJson

public static PortalUser fromJson(org.codehaus.jackson.JsonParser parser,
                                  Portal portal)
                           throws Exception
From json.

Parameters:
parser - the parser
portal - the portal
Returns:
the portal user
Throws:
Exception - the exception
Since:
1.0

getPortal

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

Returns:
The portal that contains this user
Since:
1.0

getUsername

public String getUsername()
Returns the user name.

Returns:
The user name
Since:
1.0

getFullName

public String getFullName()
Return the user's full name.

Returns:
The user's full name
Since:
1.0

getThumbnailFileName

public String getThumbnailFileName()
Returns the filename of the thumbnail of this user.

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

getEmail

public String getEmail()
Return the email address of the user.

Returns:
The email address of the user
Since:
1.0

getTags

public List<String> getTags()
Returns a list of search tags associated with this user.

Returns:
A list of search tags associated with this user
Since:
1.0

getCreated

public long getCreated()
Returns the creation date of the user's profile.

Returns:
The creation date of the user's profile
Since:
1.0

getModified

public long getModified()
Returns the last date the user was modified.

Returns:
The last date the user was modified
Since:
1.0

getGroups

public List<PortalGroup> getGroups()
Returns all the groups that the user belongs to.

Returns:
All the groups that the user belongs to
Since:
1.0

getAccess

public PortalAccess getAccess()
Returns the access level of this user.

Returns:
The access level of this user
Since:
1.0

getRole

public PortalUserRole getRole()
Gets the role of the Portal user.

Returns:
Returns the role.

getOrganizationId

public String getOrganizationId()
Returns the id of the organization, if the user belongs to one.

Returns:
The id of the organization, if the user belongs to one
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.