com.esri.core.portal
Class Portal

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

public class Portal
extends Object

This class is used for connecting to a Portal and searching for items, users and groups.


Method Summary
 boolean equals(Object obj)
          
 InputStream fetchTxtFileContents()
          Returns properties from arcgismobile.txt config file.
 void findGroups(PortalQueryParams queryParams, PortalListener<PortalQueryResultSet<PortalGroup>> portalListener)
          Finds groups with a query.
 void findItems(PortalQueryParams queryParams, PortalListener<PortalQueryResultSet<PortalItem>> portalListener)
          Finds items with a query.
 UserCredentials getCredentials()
          Returns the user credentials set on this portal object.
 String getCulture()
          Returns the culture in the form of language-country.
 PortalInfo getPortalInfo()
          Returns the portal information.
 String getSharingUrl()
          Returns the portal's sharing url.
 String getUrl()
          Returns the portal's url.
 PortalUser getUser()
          Returns the PortalUser set on this portal object.
 String getVersion()
          Returns the version of the portal.
 int hashCode()
          
 boolean isLoaded()
          Returns whether or not the portal has completed loading successfully.
static void newInstance(String portalUrl, PortalListener<Portal> portalListener)
          Creates a portal without an authenticated user.
static void newInstance(String portalUrl, UserCredentials credentials, PortalListener<Portal> portalListener)
          Creates a portal with a user.
 void setCulture(String culture)
          Sets the culture.
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public static void newInstance(String portalUrl,
                               PortalListener<Portal> portalListener)
Creates a portal without an authenticated user.

Parameters:
portalUrl - - url to the portal
portalListener - - portal listener that returns the portal

newInstance

public static void newInstance(String portalUrl,
                               UserCredentials credentials,
                               PortalListener<Portal> portalListener)
Creates a portal with a user.

Parameters:
portalUrl - - url to the portal
credentials - - username and password must be passed
portalListener - - portal listener that returns the portal

fetchTxtFileContents

public InputStream fetchTxtFileContents()
Returns properties from arcgismobile.txt config file. Should be called from a thread.

Returns:
Properties from arcgismobile.txt config file

findItems

public void findItems(PortalQueryParams queryParams,
                      PortalListener<PortalQueryResultSet<PortalItem>> portalListener)
Finds items with a query.

Parameters:
queryParams - - the query that is passed to the portal
portalListener - - portal listener that returns the portal

findGroups

public void findGroups(PortalQueryParams queryParams,
                       PortalListener<PortalQueryResultSet<PortalGroup>> portalListener)
Finds groups with a query.

Parameters:
queryParams - - query parameters used to search the portal
portalListener - - portal listener that returns the portal

isLoaded

public boolean isLoaded()
Returns whether or not the portal has completed loading successfully.

Returns:
Whether or not the portal has completed loading successfully

getUrl

public String getUrl()
Returns the portal's url.

Returns:
The portal's url

getSharingUrl

public String getSharingUrl()
Returns the portal's sharing url. i.e., https://www.arcgis.com/sharing/rest

Returns:
The portal's sharing url

getVersion

public String getVersion()
Returns the version of the portal.

Returns:
The version of the portal

getCredentials

public UserCredentials getCredentials()
Returns the user credentials set on this portal object.

Returns:
The user credentials

getUser

public PortalUser getUser()
Returns the PortalUser set on this portal object.

Returns:
The PortalUser

getPortalInfo

public PortalInfo getPortalInfo()
Returns the portal information.

Returns:
The portal information

getCulture

public String getCulture()
Returns the culture in the form of language-country. e.g., en-US.

Returns:
The culture

setCulture

public void setCulture(String culture)
Sets the culture. Should be in the form of language-country. e.g., en-US.

Parameters:
culture -

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.