public class

PortalInfo

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

Class Overview

Class used to hold some information about the Portal such as default basemap, featured groups, etc. If the user is not logged in this call will return some defaults. If the user is logged in, the account information returned will be specific to the user's account.

Summary

Nested Classes
class PortalInfo.GeocodeServiceInfo Information about a geocode service that is provided by the Portal. 
class PortalInfo.HelperServices Container for helper services that are provided by the Portal. 
Public Methods
byte[] fetchOrganizationThumbnail()
Fetches the organization thumbnail from the portal.
byte[] fetchPortalThumbnail()
Fetches the portal thumbnail from the portal.
static PortalInfo fromJson(JsonParser parser, Portal portal)
Creates a PortalInfo from a JSON Parser.
PortalAccess getAccess()
Returns the access level of the Portal or Organization.
String getBasemapGalleryGroupQuery()
Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing web maps to display in the basemap gallery.
String getBingKey()
Gets the Bing key to use for web maps that use Bing Maps.
String getCustomBaseURL()
Gets the custom base URL for the portal.
BaseMap getDefaultBaseMap()
Returns the default basemap to be used by the client application when creating new maps (if applicable).
MapGeometry getDefaultExtent()
Returns the default extent to be used by the client application when creating new maps (if applicable).
List<String> getFeaturedGroupsQueries()
Returns a list of Query Strings that can be used to setup PortalQueryParams objects, which can then be used to find the featured groups for the organization.
String getFeaturedItemsGroupQuery()
Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing featured items.
PortalInfo.HelperServices getHelperServices()
Gets the helper services information.
String getHomepageFeaturedContentGroupQuery()
Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing featured content to be displayed on the home page.
String getIpCountryCode()
Gets the country code of the calling IP.
LicenseInfo getLicenseInfo()
If the user is logged in to the portal, this property can be used to retrieve a LicenseInfo instance that can be used to authenticate the ArcGIS Runtime.
String getOrganizationDescription()
Returns the description of the organization.
String getOrganizationId()
Returns the id of the organization, if the user belongs to one.
String getOrganizationName()
Returns the name of the organization.
String getOrganizationThumbnailFileName()
Returns the filename of the thumbnail for the organization.
Portal getPortal()
Returns the Portal from which this PortalInfo was generated.
PortalMode getPortalMode()
Indicates whether the portal is single or multi tenant mode of the Portal.
String getPortalName()
Returns the name of the Portal.
String getPortalThumbnailFileName()
Returns the filename of the thumbnail for the portal.
String getUrlKey()
Gets the urlKey of the PortalInfo.
boolean isAllSSL()
Returns whether or not resources on this portal should be accessed over SSL.
boolean isCanSearchPublic()
Includes or excludes public items, groups, and users in search queries.
boolean isCanShareBingPublic()
Indicates if the Bing key can be shared to the public.
boolean isCanSharePublic()
Allows or disallows an organization to share groups or items publicly.
boolean isCommentsEnabled()
Indicates if users are allowed to add comments to portal items.
boolean isShowHomePageDescription()
Returns whether or not the organization description should be shown on the home page.
boolean isSupportsOAuth()
Indicates if OAuth is supported.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public byte[] fetchOrganizationThumbnail ()

Fetches the organization thumbnail from the portal. 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 byte[] fetchPortalThumbnail ()

Fetches the portal thumbnail from the portal. 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 PortalInfo fromJson (JsonParser parser, Portal portal)

Creates a PortalInfo from a JSON Parser.

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

public PortalAccess getAccess ()

Returns the access level of the Portal or Organization.

Returns
PortalAccess access level of the Portal or Organization

public String getBasemapGalleryGroupQuery ()

Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing web maps to display in the basemap gallery.

Returns
String query string to find the basemap gallery group

public String getBingKey ()

Gets the Bing key to use for web maps that use Bing Maps.

Returns
String the Bing key

public String getCustomBaseURL ()

Gets the custom base URL for the portal. This is the portion of the host component of the URL that identifies a specific organization subscription within a portal. It can be used together with the urlKey to build a complete URL, for example http://<urlKey>.<customBaseUrl>/

Returns
String the customBaseURL

public BaseMap getDefaultBaseMap ()

Returns the default basemap to be used by the client application when creating new maps (if applicable).

Returns
BaseMap default basemap to be used by the client application when creating new maps (if applicable)

public MapGeometry getDefaultExtent ()

Returns the default extent to be used by the client application when creating new maps (if applicable).

Returns
MapGeometry default extent to be used by the client application when creating new maps (if applicable)

public List<String> getFeaturedGroupsQueries ()

Returns a list of Query Strings that can be used to setup PortalQueryParams objects, which can then be used to find the featured groups for the organization. Each string specifies the title and owner of a group.

Returns
List<String> list of query strings to find featured groups

public String getFeaturedItemsGroupQuery ()

Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing featured items.

Returns
String query string to find the featured items group

public PortalInfo.HelperServices getHelperServices ()

Gets the helper services information.

Returns
PortalInfo.HelperServices helper services information

public String getHomepageFeaturedContentGroupQuery ()

Returns a Query String that can be used to setup a PortalQueryParams object, which can then be used to find the group containing featured content to be displayed on the home page.

Returns
String query string to find the homepage featured content group

public String getIpCountryCode ()

Gets the country code of the calling IP.

Returns
String the IP country code

public LicenseInfo getLicenseInfo ()

If the user is logged in to the portal, this property can be used to retrieve a LicenseInfo instance that can be used to authenticate the ArcGIS Runtime.

Returns
LicenseInfo a LicenseInfo instance

public String getOrganizationDescription ()

Returns the description of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal, this will be null.

Returns
String description of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal, this will be null.

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 String getOrganizationName ()

Returns the name of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal this will be null.

Returns
String name of the organization

public String getOrganizationThumbnailFileName ()

Returns the filename of the thumbnail for the organization.

Returns
String filename of organization thumbnail

public Portal getPortal ()

Returns the Portal from which this PortalInfo was generated.

Returns
Portal the Portal from which this PortalInfo was generated

public PortalMode getPortalMode ()

Indicates whether the portal is single or multi tenant mode of the Portal. A multi tenant portal supports organization subscriptions, but a single tenant does not.

Returns
PortalMode tenancy mode of the Portal

public String getPortalName ()

Returns the name of the Portal.

Returns
String name of the portal

public String getPortalThumbnailFileName ()

Returns the filename of the thumbnail for the portal.

Returns
String filename of portal thumbnail

public String getUrlKey ()

Gets the urlKey of the PortalInfo. The urlKey is the prefix selected by the organization administrator to be used with the customBaseURL. It can be used together with the customBaseURL to build a complete URL, for example http://<urlKey>.<customBaseUrl>/

Returns
String the urlKey

public boolean isAllSSL ()

Returns whether or not resources on this portal should be accessed over SSL. If true, client requests should be made via HTTPS.

Returns
boolean true if access should be made over SSL

public boolean isCanSearchPublic ()

Includes or excludes public items, groups, and users in search queries. When canSearchPublic is false, no public items outside of the organization are included in searches. However, public items which are part of the organization are returned. This property is set by the organization administrator. The default value is true.

Returns
boolean true if public items included in search queries

public boolean isCanShareBingPublic ()

Indicates if the Bing key can be shared to the public. If the portal is accessed anonymously, this property will always be false.

Returns
boolean true if Bing key can be shared to the public

public boolean isCanSharePublic ()

Allows or disallows an organization to share groups or items publicly. false denotes that content can not be shared with everyone. This property is set by the organization administrator. The default value is true.

Returns
boolean returns true if public sharing is allowed

public boolean isCommentsEnabled ()

Indicates if users are allowed to add comments to portal items. This property is set by the organization administrator.

Returns
boolean true if users can add comments to portal items

public boolean isShowHomePageDescription ()

Returns whether or not the organization description should be shown on the home page.

Returns
boolean true if organization description should be shown on home page

public boolean isSupportsOAuth ()

Indicates if OAuth is supported.

Returns
boolean true if OAuth is supported

public String toString ()

Returns
String