Class PortalInfo

java.lang.Object
com.esri.arcgisruntime.portal.PortalInfo
All Implemented Interfaces:
JsonSerializable

public final class PortalInfo extends Object implements JsonSerializable
Provides information about a Portal as seen by the current user, anonymous or logged in. If no user is logged in, it provides a default view of the portal. If a user is logged in, it provides a view that is specific to the organization to which the user belongs.
Since:
100.0.0
  • Method Details

    • fromJson

      public static PortalInfo fromJson(String json, Portal portal)
      Creates a PortalInfo instance from a JSON string.
      Parameters:
      json - a JSON string that represents a PortalInfo
      portal - the Portal object for use by the PortalInfo
      Returns:
      a PortalInfo instance
      Throws:
      IllegalArgumentException - if portal is null or json is null or empty
      Since:
      100.0.0
    • toJson

      public String toJson()
      Description copied from interface: JsonSerializable
      Serializes this object to a JSON string. Note that unknown JSON is omitted from the serialized string.
      Specified by:
      toJson in interface JsonSerializable
      Returns:
      a JSON string
    • getUnknownJson

      public Map<String,Object> getUnknownJson()
      Description copied from interface: JsonSerializable
      Gets unknown data from the source JSON.

      Unknown JSON is a Map of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.

      Specified by:
      getUnknownJson in interface JsonSerializable
      Returns:
      an unmodifiable Map containing unknown data from the source JSON
    • getUnsupportedJson

      public Map<String,Object> getUnsupportedJson()
      Description copied from interface: JsonSerializable
      Gets unsupported data from the source JSON.

      Unsupported JSON is a Map of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.

      Specified by:
      getUnsupportedJson in interface JsonSerializable
      Returns:
      an unmodifiable Map containing unsupported data from the source JSON
    • getAccess

      public PortalInfo.Access getAccess()
      Gets the level of access to this portal or organization for anonymous users.
      Returns:
      the access level of this portal or organization
      Since:
      100.0.0
      See Also:
    • getBasemapGalleryGroupQuery

      public String getBasemapGalleryGroupQuery()
      Gets a query string that can be used to find the group containing web maps for display in a gallery of basemaps.

      This query is intended for use when useVectorBasemaps() is false.

      Returns:
      query string to find the basemap gallery group
      Since:
      100.0.0
    • getBingKey

      public String getBingKey()
      Gets the Bing key to use for web maps that use Bing Maps.
      Returns:
      the Bing key
      Since:
      100.0.0
    • getCreated

      public Calendar getCreated()
      Gets the date the organization was created.
      Returns:
      the date the organization was created; always a GregorianCalendar using UTC time zone and English locale, or null if no user is logged in
      Since:
      100.0.0
    • getCulture

      public String getCulture()
      Gets locale information for the organization (language-country, for example "en-us").
      Returns:
      locale information for the organization
      Since:
      100.0.0
    • getCustomBaseUrl

      public String getCustomBaseUrl()
      Gets the custom base URL for this portal. This is the portion of the host component of the URL that identifies a specific organization subscription within the portal. The getUrl() method combines this with the urlKey to provide a complete URL.
      Returns:
      the custom base URL
      Since:
      100.0.0
    • getDefaultBasemap

      public Basemap getDefaultBasemap()
      Gets default basemap of the portal/organization.
      Returns:
      a Basemap object containing the default basemap, or null if none
      Since:
      100.0.0
      See Also:
    • getDefaultExtent

      public Envelope getDefaultExtent()
      Gets the default extent to be used by the client application when creating new maps.
      Returns:
      an Envelope object containing the default extent for new maps, or null if none
      Since:
      100.0.0
      See Also:
    • getDeveloperBasemapGalleryGroupQuery

      public String getDeveloperBasemapGalleryGroupQuery()
      Gets a query that identifies the group containing developer basemaps.

      This expression can be used as the query string parameter to find the group that contains the developer basemaps of the Portal. Developer basemaps are basemaps that are accessible and metered via API keys.

      Returns:
      a query that identifies the group containing developer basemaps
      Since:
      100.12.0
      See Also:
    • getFeaturedGroupsQueries

      public List<String> getFeaturedGroupsQueries()
      Gets a list of query strings that can be used to find the featured groups for the organization. Each string specifies the title and owner of a group and sometimes also the ID of the group.
      Returns:
      an unmodifiable list of query strings to find the featured groups. This will throw an UnsupportedOperationException if an attempt is made to modify it.
      Since:
      100.0.0
      See Also:
    • getFeaturedItemsGroupQuery

      public String getFeaturedItemsGroupQuery()
      Gets a query string that can be used to find the group containing featured items.
      Returns:
      query string to find the featured items group
      Since:
      100.0.0
      See Also:
    • getHelperServices

      public HelperServices getHelperServices()
      Gets information about helper services that are provided by the Portal.
      Returns:
      helper services information
      Since:
      100.0.0
      See Also:
    • getHomePageFeaturedContentGroupQuery

      @Deprecated(since="200.4.0", forRemoval=true) public String getHomePageFeaturedContentGroupQuery()
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of 200.4.0. This method uses the legacy home page which has been phased out of use in the ArcGIS Online home app. All legacy home pages are no longer live on ArcGIS Online and at a future release of ArcGIS Enterprise this property will no longer be supported.
      Gets a query string that can be used to find the group containing featured content to be displayed on the home page.
      Returns:
      query string to find the home page featured content group
      Since:
      100.0.0
      See Also:
    • getHomePageFeaturedContentCount

      @Deprecated(since="200.4.0", forRemoval=true) public int getHomePageFeaturedContentCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of 200.4.0. This method uses the legacy home page which has been phased out of use in the ArcGIS Online home app. All legacy home pages are no longer live on ArcGIS Online and at a future release of ArcGIS Enterprise this property will no longer be supported.
      Gets the number of items to show per page for the featured content screens (max=100).
      Returns:
      the number of featured items to show per page
      Since:
      100.0.0
    • getEueiEnabled

      public boolean getEueiEnabled()
      Gets a boolean value indicating whether the organization allows ArcGIS Online to collect usage information from its members to improve the user experience.
      Returns:
      a boolean value indicating whether the organization allows ArcGIS Online to collect usage information from its members to improve the user experience
      Since:
      200.0.0
    • getIpCountryCode

      public String getIpCountryCode()
      Gets the country code of the calling IP.
      Returns:
      the IP country code
      Since:
      100.0.0
    • getLivingAtlasGroupQuery

      public String getLivingAtlasGroupQuery()
      Gets the query that identifies the group containing the Living Atlas layers. This expression should be used as the query string parameter to find the group.
      Returns:
      the query string that identifies the Living Atlas group
      Since:
      100.7.0
      See Also:
    • getModified

      public Calendar getModified()
      Gets the date the organization was last modified.
      Returns:
      the date the organization was last modified; always a GregorianCalendar using UTC time zone and English locale, or null if no user is logged in
      Since:
      100.0.0
    • getOrganizationDescription

      public String getOrganizationDescription()
      Gets 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:
      the description of the organization, or null in the case of non-organizational users of ArcGIS Online or a multi-tenant portal
      Since:
      100.0.0
    • getOrganizationId

      public String getOrganizationId()
      Gets the ID of the organization, if the user belongs to one.
      Returns:
      the ID of the organization, or null if the user does not belong to one
      Since:
      100.0.0
    • getOrganizationName

      public String getOrganizationName()
      Gets 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:
      the name of the organization, or null in the case of non-organizational users of ArcGIS Online or a multi-tenant portal
      Since:
      100.0.0
    • getOrganizationThumbnailFileName

      public String getOrganizationThumbnailFileName()
      Gets the filename of the thumbnail for the organization.
      Returns:
      the filename of the organization thumbnail, or null if there is none
      Since:
      100.0.0
    • getPortal

      public Portal getPortal()
      Gets the portal this object belongs to.
      Returns:
      the portal this object belongs to
      Since:
      100.0.0
    • getPortalHostname

      public String getPortalHostname()
      Gets the portal's hostname.
      Returns:
      the portal's hostname
      Since:
      200.0.0
    • getPortalMode

      public Portal.Mode getPortalMode()
      Gets the tenancy mode of this portal.
      Returns:
      the tenancy mode of this portal
      Since:
      100.0.0
      See Also:
    • getPortalName

      public String getPortalName()
      Gets the name of this portal.
      Returns:
      the name of this portal
      Since:
      100.0.0
    • getPortalThumbnailFileName

      public String getPortalThumbnailFileName()
      Gets the filename of the thumbnail for this portal.
      Returns:
      the filename of the portal thumbnail, or null if there is none
      Since:
      100.0.0
    • getReadOnlyMessage

      public String getReadOnlyMessage()
      Gets the read-only message. If the portal is currently in read-only mode, this is an explanatory message that can be displayed to the user. It will be null if isReadOnly() is false.
      Returns:
      the read-only message, or null if none
      Since:
      100.9.0
    • getStylesGroupQuery

      public String getStylesGroupQuery()
      Gets a query that identifies a group of styles. Each style contains references to symbols that can be used across ArcGIS products.

      This expression can be used as the query string parameter to find the styles group. Instead of providing your own query, you can use the helper method Portal.fetchStylesAsync() to fetch the items in the styles group.

      Returns:
      a query that identifies a group of styles
      Since:
      100.12.0
      See Also:
    • getSubscriptionInfo

      public SubscriptionInfo getSubscriptionInfo()
      Gets information about the portal user's subscription.
      Returns:
      the subscription information, or null if the portal is accessed anonymously
      Since:
      100.9.0
    • getSymbolSetsGroupQuery

      public String getSymbolSetsGroupQuery()
      Gets a query that identifies the symbol sets group.

      This expression can be used as the query string parameter to find the symbol sets group. Instead of providing your own query, you can use the helper method Portal.fetchSymbolSetsAsync() to fetch the items in the symbol sets group.

      Returns:
      a query that identifies the symbol sets group
      Since:
      100.12.0
      See Also:
    • getUrl

      public String getUrl()
      Gets the complete URL of this portal. This includes the urlKey and the customBaseUrl, giving a complete URL such as http://&lt;urlKey&gt;.&lt;customBaseUrl&gt;/
      Returns:
      the complete URL of this portal
      Since:
      100.0.0
    • getUrlKey

      public String getUrlKey()
      Gets the urlKey of this portal. This is the prefix selected by the organization administrator to be used with the customBaseUrl. The getUrl() method combines this with the customBaseUrl to provide a complete URL.
      Returns:
      the urlKey of this portal
      Since:
      100.0.0
    • getDefaultVectorBasemap

      public Basemap getDefaultVectorBasemap()
      Gets the default vector basemap of the portal/organization.
      Returns:
      a Basemap object containing the default vector basemap, or null if none
      Since:
      100.6.0
    • getVectorBasemapGalleryGroupQuery

      public String getVectorBasemapGalleryGroupQuery()
      Gets a query string that can be used to find the group containing web maps for display in a gallery of vector basemaps.

      This query is intended for use when useVectorBasemaps() is true.

      Returns:
      query string to find the vector basemap gallery group
      Since:
      100.6.0
    • useVectorBasemaps

      public boolean useVectorBasemaps()
      Indicates if the organization uses the Esri vector basemaps in supported ArcGIS apps.
      Returns:
      true if the organization uses Esri vector basemaps
      Since:
      100.6.0
    • isAllSsl

      public boolean isAllSsl()
      Indicates if the organization is using SSL. If true, all calls made against resources that belong to the organization will require SSL.
      Returns:
      true if access should be made over SSL
      Since:
      100.0.0
    • isCanSearchPublic

      public boolean isCanSearchPublic()
      Indicates if members of the organization can search outside of the organization. When true, public items, groups and users are included in search queries. When false, no items outside of the organization are included. However, public items which are part of the organization are included.
      Returns:
      true if public items outside of the organization are included in search queries
      Since:
      100.0.0
    • isCanShareBingPublic

      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:
      true if Bing key can be shared to the public
      Since:
      100.0.0
    • isCanSharePublic

      public boolean isCanSharePublic()
      Indicates if members of the organization can share resources outside of the organization.
      Returns:
      returns true if public sharing is allowed
      Since:
      100.0.0
    • isCommentsEnabled

      public boolean isCommentsEnabled()
      Indicates if users are allowed to view and add comments on portal items.
      Returns:
      true if users are allowed to view and add comments on portal items
      Since:
      100.0.0
    • isPortal

      public boolean isPortal()
      Indicates if this portal is on premise or online.
      Returns:
      true for an on premise portal
      Since:
      100.0.0
    • isReadOnly

      public boolean isReadOnly()
      Indicates if the portal is currently in read-only mode.
      Returns:
      true if the portal is currently in read-only mode
      Since:
      100.9.0
      See Also:
    • isShowHomePageDescription

      @Deprecated(since="200.4.0", forRemoval=true) public boolean isShowHomePageDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
      As of 200.4.0. This method uses the legacy home page which has been phased out of use in the ArcGIS Online home app. All legacy home pages are no longer live on ArcGIS Online and at a future release of ArcGIS Enterprise this property will no longer be supported.
      Indicates if the organization description should be shown on the home page.
      Returns:
      true if organization description should be shown on the home page
      Since:
      100.0.0
    • isSupportsOAuth

      public boolean isSupportsOAuth()
      Indicates if this portal supports OAuth authentication.
      Returns:
      true if OAuth authentication is supported
      Since:
      100.0.0
    • fetchOrganizationThumbnailAsync

      public ListenableFuture<byte[]> fetchOrganizationThumbnailAsync()
      Executes an asynchronous operation to fetch the thumbnail for the organization. The result is a byte[] containing the thumbnail data, or null if there is no thumbnail for the organization.
      Returns:
      a ListenableFuture for tracking when the operation is done and getting the result; also allows cancellation. Calling get() on the returned future may throw an ExecutionException with its cause set to an exception as follows:
      Since:
      100.0.0
    • fetchPortalThumbnailAsync

      public ListenableFuture<byte[]> fetchPortalThumbnailAsync()
      Executes an asynchronous operation to fetch the thumbnail for this portal. The result is a byte[] containing the thumbnail data, or null if there is no thumbnail for this portal.
      Returns:
      a ListenableFuture for tracking when the operation is done and getting the result; also allows cancellation. Calling get() on the returned future may throw an ExecutionException with its cause set to an exception as follows:
      Since:
      100.0.0
    • getCurrentVersion

      public String getCurrentVersion()
      Returns the current version property specified with this PortalInfo's JSON.
      Returns:
      portal's current version
      Since:
      100.12.0
    • isPKCESupported

      public boolean isPKCESupported()
      Returns a boolean that defines if PKCE (proof key code exchange) is supported with this portal. PKCE is supported for portal version 10.9 and higher if OAuth is supported.
      Returns:
      a boolean that defines if PKCE is supported with this portal
      Since:
      100.12.0