Class PortalInfo

  • All Implemented Interfaces:
    JsonSerializable

    public final class PortalInfo
    extends java.lang.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 Detail

      • fromJson

        public static PortalInfo fromJson​(java.lang.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:
        java.lang.IllegalArgumentException - if portal is null or json is null or empty
        Since:
        100.0.0
      • toJson

        public java.lang.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 java.util.Map<java.lang.String,​java.lang.Object> getUnknownJson()
        Description copied from interface: JsonSerializable
        If this object was created from JSON, this method gets unknown data from the source JSON. Unknown JSON is a Map of values that were in the source JSON but are not known by the Runtime and therefore not exposed in the API.
        Specified by:
        getUnknownJson in interface JsonSerializable
        Returns:
        an unmodifiable Map containing unknown JSON data. The keys are Strings containing names. The types of the values depend on the types of tokens within the JSON as follows:
        • a Map<String, Object> represents an object in the JSON
        • a List<Object> represents an array in the JSON
        • a String represents a string in the JSON
        • a Double represents a number in the JSON
        • a Boolean represents true or false in the JSON
        • null represents null in the JSON
      • getUnsupportedJson

        public java.util.Map<java.lang.String,​java.lang.Object> getUnsupportedJson()
        Description copied from interface: JsonSerializable
        If this object was created from JSON, this method gets unsupported data from the source JSON. Unsupported JSON is a Map of values that are supported by webmaps and known to the version of the webmap specification the API supports (see system requirements), but are not explicitly exposed through the Runtime API.
        Specified by:
        getUnsupportedJson in interface JsonSerializable
        Returns:
        an unmodifiable Map containing unsupported JSON data. The keys are Strings containing names. The types of the values depend on the types of tokens within the JSON as follows:
        • a Map<String, Object> represents an object in the JSON
        • a List<Object> represents an array in the JSON
        • a String represents a string in the JSON
        • a Double represents a number in the JSON
        • a Boolean represents true or false in the JSON
        • null represents null in the 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:
        PortalInfo.Access
      • getBasemapGalleryGroupQuery

        public java.lang.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 java.lang.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 java.util.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 java.lang.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 java.lang.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:
        Basemap
      • 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:
        Envelope
      • getDeveloperBasemapGalleryGroupQuery

        public java.lang.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:
        Portal.fetchDeveloperBasemapsAsync()
      • getFeaturedGroupsQueries

        public java.util.List<java.lang.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:
        PortalQueryParameters
      • getFeaturedItemsGroupQuery

        public java.lang.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:
        PortalQueryParameters
      • 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:
        HelperServices
      • getHomePageFeaturedContentGroupQuery

        public java.lang.String getHomePageFeaturedContentGroupQuery()
        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:
        PortalQueryParameters
      • getHomePageFeaturedContentCount

        public int getHomePageFeaturedContentCount()
        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
      • getIpCountryCode

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

        @Deprecated
        public LicenseInfo getLicenseInfo()
        Deprecated.
        As of 100.7.0, the LicenseInfo should be retrieved from Portal.fetchLicenseInfoAsync() to ensure that the LicenseInfo has the correct user entitlements and extensions.
        Gets a LicenseInfo object that can be used to authenticate the ArcGIS Runtime.
        Returns:
        a LicenseInfo object, or null if no user is logged in or there is no license information available
        Since:
        100.0.0
        See Also:
        LicenseInfo
      • getModified

        public java.util.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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
      • 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:
        Portal.Mode
      • getPortalName

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

        public java.lang.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 java.lang.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 java.lang.String getStylesGroupQuery()
        Gets a query that identifies a group of styles. Each style contains references to symbols that can be used in the ArcGIS platform.

        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:
        Portal.findGroupsAsync(PortalQueryParameters), PortalQueryParameters
      • 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 java.lang.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:
        Portal.findGroupsAsync(PortalQueryParameters), PortalQueryParameters
      • getUrl

        public java.lang.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 java.lang.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 java.lang.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:
        getReadOnlyMessage()
      • isShowHomePageDescription

        public boolean isShowHomePageDescription()
        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:
        • IOException if the network request fails
        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:
        • IOException if the network request fails
        Since:
        100.0.0
      • getCurrentVersion

        public java.lang.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