Class 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 Detail

      • 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
        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 Map<String,​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 String getBasemapGalleryGroupQuery()
        Gets a query string that can be used to find the group containing web maps to display in the basemap gallery.
        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 the default basemap to be used by the client application when creating new maps.
        Returns:
        a Basemap object containing the default basemap for new maps, 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
      • 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:
        PortalQueryParameters
      • 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:
        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 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 String getIpCountryCode()
        Gets the country code of the calling IP.
        Returns:
        the IP country code
        Since:
        100.0.0
      • getLicenseInfo

        public LicenseInfo getLicenseInfo()
        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 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
      • 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 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
      • 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
      • 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
      • 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:
        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