java.lang.Object
com.esri.arcgisruntime.portal.Portal
All Implemented Interfaces:
RemoteResource, Loadable

public final class Portal extends Object implements Loadable, RemoteResource
The entry point into the ArcGIS portal services hosted by ArcGIS Online and ArcGIS Enterprise.

ArcGIS portals are geospatial content management systems from ESRI that customers can use to securely store, manage, and access different types of content. There are two types of portals:

  • ArcGIS Online portal - a service hosted by Esri that you can access with a ArcGIS Developer account or ArcGIS Online account.
  • ArcGIS Enterprise portal - a service hosted by ArcGIS Enterprise that you can access with an ArcGIS Enterprise account.

The Portal class is the main entry point into the ArcGIS Portal Directory REST API that allows you to work with users, groups and content hosted within ArcGIS Online or ArcGIS Enterprise portals. Once instantiated, you can use the Portal to search for items and groups and see portal content, such as services, layers, and so on.

For more information about authenticating your app or its users with a portal, see the Introduction to security and authentication.

Since:
100.0.0
  • Property Details

  • Constructor Details

    • Portal

      public Portal(String portalUrl)
      Creates a Portal for anonymous access using the portal URL. If the portal does not support anonymous access, an AuthenticationChallenge will be issued to obtain credentials. If valid credentials are not supplied, the portal will fail to load. This is the same as calling new Portal(url, false). If the app knows the credential to use in advance, it can avoid an AuthenticationChallenge by calling setCredential(Credential) after this constructor and before loading this Portal.

      The supported URL formats are:

      • The URL of the portal (Example: https://www.arcgis.com)
      • The URL of the portal REST endpoint (Example: https://www.arcgis.com/sharing/rest)
      • The URL of the deprecated portal REST endpoint (Example: https://www.arcgis.com/sharing).
      Parameters:
      portalUrl - the portal URL. For example https://www.arcgis.com for ArcGIS Online, or https://<host>:<port>/arcgis for an on-premises portal.
      Throws:
      IllegalArgumentException - if the portalUrl is null or empty
      Since:
      100.0.0
    • Portal

      public Portal(String portalUrl, boolean loginRequired)
      Creates a Portal for anonymous or authenticated access using the portal URL, depending on the value of the loginRequired parameter. If true is passed, then the user will be required to log in to the portal in order to use it at all (this will be done using the AuthenticationChallengeHandler, so the credential does not need to be known in advance). If it is false, then the user will only be required to log in if the portal does not support anonymous access (that is, if the PortalAccess is PRIVATE). If the app knows the credential to use in advance, it can avoid an AuthenticationChallenge by calling setCredential(Credential) after this constructor and before loading this Portal.

      The supported URL formats are:

      • The URL of the portal (Example: https://www.arcgis.com
      • The URL of the portal REST endpoint (Example: https://www.arcgis.com/sharing/rest)
      • The URL of the deprecated portal REST endpoint (Example: https://www.arcgis.com/sharing)
      Parameters:
      portalUrl - the portal URL. For example https://www.arcgis.com for ArcGIS Online, or https://<host>:<port>/arcgis for an on-premises portal.
      loginRequired - true indicates that the user must log in. False indicates that the user must only log in if required by the portal.
      Throws:
      IllegalArgumentException - if the portalUrl is null or empty
      Since:
      100.0.0
  • Method Details

    • isLoginRequired

      public boolean isLoginRequired()
      Indicates if loginRequired was specified when this Portal object was constructed. True indicates that the user must log in. False indicates that the user must only log in if required by the portal.
      Returns:
      true if login is required, false if anonymous access is allowed
      Since:
      100.0.0
    • setCredential

      public void setCredential(Credential credential)
      Sets the credential used to authenticate the user with the Portal. If set after a Portal is loaded anonymously, the credential will be used for subsequent requests but the PortalInfo will remain the anonymous info. To obtain a privileged PortalInfo, the credential must be set before the instance is loaded.

      If the credential being set is different from the portal's current credential (or the portal's current credential is null), this will trigger any CredentialChangedListeners that were added with addCredentialChangedListener(CredentialChangedListener).

      Do not set new credentials while the portal is still loading as that can lead the portal to be in an undetermined state.

      Specified by:
      setCredential in interface RemoteResource
      Parameters:
      credential - the credential used to authenticate the user with the portal
      Throws:
      IllegalArgumentException - if the Credential is null
      IllegalStateException - if the credential cannot be set because the Portal has been loaded and already has a credential for a different user from that of the given credential
      Since:
      100.0.0
    • getCredential

      public Credential getCredential()
      Gets the credential set on this portal instance.
      Specified by:
      getCredential in interface RemoteResource
      Returns:
      the credential, or null if none has been set
      Since:
      100.0.0
    • getPortalInfo

      public PortalInfo getPortalInfo()
      Gets the PortalInfo object for this portal.

      Details about the Portal instance, such as its name, logo, featured items, and supported protocols (http vs https).

      Returns:
      the PortalInfo object for this portal, or null if the portal is not loaded yet
      Since:
      100.0.0
      See Also:
    • getUser

      public PortalUser getUser()
      Gets a PortalUser object describing the user currently signed in to this portal.
      Returns:
      a PortalUser object, or null if no user is signed in due to anonymous access or portal not loaded yet
      Since:
      100.0.0
      See Also:
    • getSharingUrl

      public String getSharingUrl()
      Gets the sharing URL, that is, the URL of the root REST resource for the portal. For example http://www.arcgis.com/sharing/rest for ArcGIS Online, or http://<host>:<port>/arcgis/sharing/rest for an on-premises portal.
      Returns:
      the sharing URL
      Since:
      100.0.0
    • setCulture

      public void setCulture(String culture)
      Sets a code that specifies the culture-specific formatting to use when accessing portal content.

      The culture code provides localized content when viewing featured groups or items, adding or updating an item, and so on. If not explicitly set, the culture used by the device/machine is used. Set it to null if you want to see portal content in the language corresponding to the culture set in the portal/organization settings.

      The format for culture code is based on a language code and a country code separated by a dash. Example: "en-US". For the list of cultures, see Supported languages.

      Parameters:
      culture - the culture code to use, or null to see portal content in the language corresponding to the culture set in the portal/organization settings
      Since:
      100.9.0
    • getCulture

      public String getCulture()
      Gets a code that specifies the culture-specific formatting to use when accessing portal content.

      The culture code provides localized content when viewing featured groups or items, adding or updating an item, and so on. If not explicitly set, the culture used by the device/machine is used.

      The format for culture code is based on a language code and a country code separated by a dash. Example: "en-US". For the list of cultures, see Supported languages.

      Returns:
      the culture code currently in use, or null if none
      Since:
      100.9.0
    • getUri

      public String getUri()
      Gets the portal URL.
      Specified by:
      getUri in interface RemoteResource
      Returns:
      the portal URL
      Since:
      100.0.0
    • setRequestConfiguration

      public void setRequestConfiguration(RequestConfiguration requestConfiguration)
      Sets configuration parameters used for network requests sent using this Portal object. The global RequestConfiguration is used if no RequestConfiguration is set or null is set (see RequestConfiguration.getGlobalRequestConfiguration()).
      Specified by:
      setRequestConfiguration in interface RemoteResource
      Parameters:
      requestConfiguration - object containing the parameters to use
      Since:
      100.0.0
    • getRequestConfiguration

      public RequestConfiguration getRequestConfiguration()
      Gets the RequestConfiguration object in use by this Portal. If null is returned, then that indicates that the global RequestConfiguration is used instead.
      Specified by:
      getRequestConfiguration in interface RemoteResource
      Returns:
      the RequestConfiguration object or null if none is set
      Since:
      100.0.0
      See Also:
    • addCredentialChangedListener

      public void addCredentialChangedListener(CredentialChangedListener credentialChangedListener)
      Adds a CredentialChangedListener to be called when the Portal's Credential is changed. If the Credential is changed the app may want to create and load a new Portal object using the new Credential.
      Parameters:
      credentialChangedListener - the CredentialChangedListener to add
      Throws:
      IllegalArgumentException - if the listener is null
      Since:
      100.0.0
    • removeCredentialChangedListener

      public boolean removeCredentialChangedListener(CredentialChangedListener credentialChangedListener)
      Attempts to remove a CredentialChangedListener. Returns true if the listener is successfully found and removed.
      Parameters:
      credentialChangedListener - the listener to be removed
      Returns:
      true if the listener is removed
      Throws:
      IllegalArgumentException - if the listener is null
      Since:
      100.0.0
    • fetchLoginTypeForUrlAsync

      public static ListenableFuture<Portal.LoginType> fetchLoginTypeForUrlAsync(String url)
      Executes an asynchronous operation to determine the login type for a given portal URL. The result is a LoginType enum.
      Parameters:
      url - the URL
      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:
      Throws:
      IllegalArgumentException - if url is null or empty
      Since:
      100.0.0
    • fetchBasemapsAsync

      public ListenableFuture<List<Basemap>> fetchBasemapsAsync()
      Executes an asynchronous operation to fetch the basemaps using the PortalInfo.getBasemapGalleryGroupQuery() query string. The result is an unmodifiable list of Basemaps. The Basemaps are not loaded, but their PortalItem metadata are available using Basemap.getItem().

      Note: the size of the resultant list is limited to 25. If a portal has more than 25 basemaps, they can all be fetched by using PortalInfo.getBasemapGalleryGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.1.0
    • fetchDeveloperBasemapsAsync

      public ListenableFuture<List<Basemap>> fetchDeveloperBasemapsAsync()
      Executes an asynchronous operation to fetch the portal's developer basemaps using the PortalInfo.getDeveloperBasemapGalleryGroupQuery() query string.

      Note: the size of the resultant list is limited to 25. If a portal has more than 25 developer basemaps, they can all be fetched by using PortalInfo.getDeveloperBasemapGalleryGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      A Portal instance may contain a set of associated basemaps, called developer basemaps, which are accessible and metered via API keys. These are equivalent to basemaps constructed via a BasemapStyle.

      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.12.0
    • fetchFeaturedGroupsAsync

      public ListenableFuture<List<PortalGroup>> fetchFeaturedGroupsAsync()
      Executes an asynchronous operation to fetch the featured groups for the organization. The result is an unmodifiable list of PortalGroup objects. These are fully populated and have a load status of LoadStatus.LOADED.

      Note: the size of the resultant list is limited to 25. If an organization has more than 25 featured groups, they can all be fetched by using PortalInfo.getFeaturedGroupsQueries() and findGroupsAsync(PortalQueryParameters).

      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.1.0
    • fetchFeaturedItemsAsync

      public ListenableFuture<List<PortalItem>> fetchFeaturedItemsAsync()
      Executes an asynchronous operation to fetch the featured items for the organization. The result is an unmodifiable list of PortalItems.

      Note: the size of the resultant list is limited to 25. If an organization has more than 25 featured items, they can all be fetched by using PortalInfo.getFeaturedItemsGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.1.0
    • fetchHomePageFeaturedContentAsync

      public ListenableFuture<List<PortalItem>> fetchHomePageFeaturedContentAsync()
      Executes an asynchronous operation to fetch the featured content for display on the organization's home page. The result is an unmodifiable list of PortalItems.

      Note: the size of the resultant list is limited to 25. If an organization has more than 25 home page featured items, they can all be fetched by using PortalInfo.getHomePageFeaturedContentGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.1.0
    • fetchVectorBasemapsAsync

      public ListenableFuture<List<Basemap>> fetchVectorBasemapsAsync()
      Executes an asynchronous operation to fetch the vector basemaps using the PortalInfo.getVectorBasemapGalleryGroupQuery() query string. The result is an unmodifiable list of Basemaps. The Basemaps are not loaded, but their PortalItem metadata is available using Basemap.getItem().

      Note: the size of the resultant list is limited to 25. If a portal has more than 25 vector basemaps, they can all be fetched by using PortalInfo.getVectorBasemapGalleryGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.6.0
      See Also:
    • fetchLicenseInfoAsync

      public ListenableFuture<LicenseInfo> fetchLicenseInfoAsync()
      Executes an asynchronous operation to fetch the current user's LicenseInfo including its entitlements and extensions.
      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.7.0
    • fetchStylesAsync

      public ListenableFuture<List<PortalItem>> fetchStylesAsync()
      Executes an asynchronous operation to fetch the styles using the PortalInfo.getStylesGroupQuery() query string. The result is an unmodifiable list of PortalItem.

      Note: the size of the resultant list is limited to 25. If a portal has more than 25 styles, they can all be fetched by using PortalInfo.getStylesGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.12.0
    • fetchSymbolSetsAsync

      public ListenableFuture<List<PortalItem>> fetchSymbolSetsAsync()
      Executes an asynchronous operation to fetch the symbol sets using the PortalInfo.getSymbolSetsGroupQuery() query string. The result is an unmodifiable list of PortalItem.

      Note: the size of the resultant list is limited to 25. If a portal has more than 25 symbol sets, they can all be fetched by using PortalInfo.getSymbolSetsGroupQuery(), findGroupsAsync(PortalQueryParameters) and findItemsAsync(PortalQueryParameters).

      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.12.0
    • findItemsAsync

      public ListenableFuture<PortalQueryResultSet<PortalItem>> findItemsAsync(PortalQueryParameters queryParameters)
      Finds portal items that match the specified query parameters.

      This method obtains a PortalQueryResultSet object that contains PortalItem objects. Use PortalQueryResultSet.getResults() to obtain the collection of PortalItem objects that match the query parameters. Since portal items can be maps, layers, applications or tools, use the PortalQueryParameters to restrict which items are returned. If you provide a simple keyword string for the search, such as "florida", this method searches a default set of high performance index fields, such as title, tags, snippet, description, type, and typekeywords.

      For more advanced searches, you can preface your simple keyword strings with ArcGIS Portal Directory REST named fields followed by a colon (:). These advanced searches can take advantage of Boolean operators (AND, NOT, OR, -) and a range of special characters. For a more information, see the Search reference document in the ArcGIS Portal Directory REST API. Here are some examples of advanced search strings:

      • To find one specific portal item by its Id: "id:00e5e70929e14055ab686df16c842ec1"
      • To find all WebMap portal items with the word 'florida' in the Title field: "title:florida AND type:web map"
      • To find all Layer Package portal items with the word 'florida' in the Title field: "title:florida AND type:layer package"
      • To find all portal items with the word 'florida' in the Title field and the word 'esri' in the LicenseInfo field: "title:florida AND licenseinfo:esri"
      • To find all portal items with the word 'florida' in the Title field and not have the word 'esri' in the LicenseInfo field: "title:florida NOT licenseinfo:esri"
      • To find all portal items with located within a specific spatial extent and the word 'esri' in the LicenseInfo: "extent:[-114.3458, 21.7518] - [-73.125, 44.0658] AND licenseinfo:esri"
      • To find all portal items with a SpatialReference.WKID of 4267: "spatialreference:4267"
      • To find all portal items with a SpatialReference.WKID of 4267 or have the word 'cancer' in the Title field: "spatialreference:4267 OR title:cancer"

      If you want to find items that belong to a group, then use PortalGroup.findItemsAsync(PortalGroupContentSearchParameters) to search group content.

      Parameters:
      queryParameters - parameters used to search the 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:
      Throws:
      IllegalArgumentException - if queryParameters is null
      Since:
      100.0.0
    • findGroupsAsync

      public ListenableFuture<PortalQueryResultSet<PortalGroup>> findGroupsAsync(PortalQueryParameters queryParameters)
      Executes an asynchronous operation to find groups in this portal with a query using the specified portal query parameters.

      This method obtains a PortalQueryResultSet object containing a collection of PortalGroup objects. Use PortalQueryResultSet.getResults() to obtain the collection of PortalGroup objects that match the query parameters. The PortalGroup objects are fully populated and have a load status of LoadStatus.LOADED. Use the PortalQueryParameters to restrict the items returned by this method. If you provide a simple keyword string for the search, such as "federal", this method searches the default set of high performance index fields, such as id, title, description, snippet, tags, and owner.

      For more advanced searches, you can preface your simple keyword strings with ArcGIS Portal Directory REST named fields followed by a colon (:). These advanced searches can take advantage of Boolean operators (AND, NOT, OR, -) and a range of special characters. For a more information, see the Search reference document in the ArcGIS Portal Directory REST API. Here are some examples of advanced search strings:

      • To find one specific portal group by its ID: "id:1db70a32f5f84ea9a88f5f460f22557b"
      • To find all private portal groups with the word 'federal' in the Title field: "title:federal AND access:private"
      • To find all portal groups with the word 'federal' in the Title field and the word 'restricted' in the Description field: "title:federal AND description:restricted"
      • To find all portal groups with the word 'state' in the Title field and not have the word 'restricted' in the Description field: "title:state NOT description:restricted".
      Parameters:
      queryParameters - parameters used to search the 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:
      Throws:
      IllegalArgumentException - if queryParameters is null
      Since:
      100.0.0
    • postRequestAsync

      public ListenableFuture<String> postRequestAsync(String requestUrl)
      Executes an asynchronous operation to send a customized request and let the caller handle the response. The request will be sent using the "POST" method. The result is a String object containing JSON.
      Parameters:
      requestUrl - the URL of the request
      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
    • sendRequestAsync

      public ListenableFuture<String> sendRequestAsync(String requestUrl)
      Executes an asynchronous operation to send a customized request and let the caller handle the response. The request will be sent using the "POST" or "GET" method based on the length of the URL. The result is a String object containing JSON.
      Parameters:
      requestUrl - the URL of the request
      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
    • getLoadStatus

      public LoadStatus getLoadStatus()
      Gets the value of the property loadStatus.
      Specified by:
      getLoadStatus in interface Loadable
      Property description:
      Returns:
      the LoadStatus of the loadable resource
    • getLoadError

      public ArcGISRuntimeException getLoadError()
      Gets the value of the property loadError.
      Specified by:
      getLoadError in interface Loadable
      Property description:
      Returns:
      the most recent error that was encountered when the loadable resource transitioned to the LoadStatus.FAILED_TO_LOAD state.
    • cancelLoad

      public void cancelLoad()
      Description copied from interface: Loadable
      Cancels loading metadata for the object.

      Cancels loading the metadata if the object is loading, and always invokes the done loading listener.

      A load operation that is in progress (LoadStatus.LOADING state) can be cancelled by calling this method and the resource will transition from LoadStatus.LOADING to LoadStatus.FAILED_TO_LOAD state. If the load operation was successfully cancelled, a CancellationException will be returned from Loadable.getLoadError().

      Cancellation should be used carefully because all enqueued done loading listeners for that resource instance will get invoked with an error stating that the operation was cancelled. Thus, one component in the application can cancel the load operation initiated by other components.

      This method does nothing if the resource is not in LoadStatus.LOADING state.

      Specified by:
      cancelLoad in interface Loadable
    • loadAsync

      public void loadAsync()
      Description copied from interface: Loadable
      Loads the metadata of the loadable resource asynchronously.

      The load status changes from LoadStatus.NOT_LOADED to LoadStatus.LOADING. A listener can be added via Loadable.addDoneLoadingListener(java.lang.Runnable) that is invoked upon completion of the asynchronous load operation.

      If the load operation completes successfully, the load status will be LoadStatus.LOADED, which means the resource has loaded its metadata.

      If the load operation failed, the load status will be LoadStatus.FAILED_TO_LOAD and the error can be retrieved by calling Loadable.getLoadError().

      This method can be called concurrently and repeatedly, but only one attempt is ever made to perform the load operation. If a load operation is already in progress (LoadStatus.LOADING state) when loadAsync is called, it simply piggy-backs on the outstanding operation and the done loading listener added to the loadable resource is enqueued to be invoked when that operation completes. If the operation has already completed (LoadStatus.LOADED or LoadStatus.FAILED_TO_LOAD state) when loadAsync is called, the done loading listener is immediately invoked when added to the loadable resource.

      If a loadable resource has failed to load, calling loadAsync on it subsequently will not change its state. The done loading listener will be invoked immediately when added to the loadable resource. In order to retry loading the resource, Loadable.retryLoadAsync() needs to be used.

      A load operation that is in progress (LoadStatus.LOADING state) can be cancelled by calling Loadable.cancelLoad().

      Specified by:
      loadAsync in interface Loadable
    • retryLoadAsync

      public void retryLoadAsync()
      Description copied from interface: Loadable
      Loads or retries loading metadata for the object asynchronously.

      Will retry loading the metadata if the object's load status is LoadStatus.FAILED_TO_LOAD. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded.

      For more details on the load process see Loadable.loadAsync().

      Specified by:
      retryLoadAsync in interface Loadable
    • addDoneLoadingListener

      public void addDoneLoadingListener(Runnable listener)
      Description copied from interface: Loadable
      Adds a listener to the loadable resource that is invoked when loading has completed.

      The listener may be added at any point, whether the loadable resource has already completed loading or not.

      • For resources that are not loaded when the listener is added (LoadStatus is NOT_LOADED or LOADING): When the resource completes loading, the listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.
      • For resources that are already loaded when the listener is added (LoadStatus is LOADED or FAILED_TO_LOAD): The listener will be called immediately, on the current thread.

      Alternatively, to be notified when there is any change in the load status, add a listener to the Loadable.loadStatusProperty() instead.

      Specified by:
      addDoneLoadingListener in interface Loadable
      Parameters:
      listener - a Runnable that is invoked upon completion of the load operation
    • removeDoneLoadingListener

      public boolean removeDoneLoadingListener(Runnable listener)
      Description copied from interface: Loadable
      Removes a done loading listener from the loadable resource.
      Specified by:
      removeDoneLoadingListener in interface Loadable
      Parameters:
      listener - the listener to be removed
      Returns:
      true if the listener was removed, otherwise false
    • addLoadStatusChangedListener

      public void addLoadStatusChangedListener(LoadStatusChangedListener listener)
      Description copied from interface: Loadable
      Adds a LoadStatusChangedListener to the loadable resource that is invoked whenever the load status changes.

      Adding this listener on the UI thread will cause it to be invoked on the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

      The listener will not be called if added to a loadable resource that has already completed loading. To be notified when a loadable resource has completed loading, including if the resource is already loaded when the listener is added, use the Loadable.addDoneLoadingListener(Runnable) method.

      Specified by:
      addLoadStatusChangedListener in interface Loadable
      Parameters:
      listener - the LoadStatusChangedListener to be added
    • removeLoadStatusChangedListener

      public boolean removeLoadStatusChangedListener(LoadStatusChangedListener listener)
      Description copied from interface: Loadable
      Removes a LoadStatusChangedListener from the loadable resource.
      Specified by:
      removeLoadStatusChangedListener in interface Loadable
      Parameters:
      listener - the LoadStatusChangedListener to be removed
      Returns:
      true if the listener was removed, otherwise false
    • loadStatusProperty

      public ReadOnlyObjectProperty<LoadStatus> loadStatusProperty()
      Description copied from interface: Loadable
      The load status.
      Specified by:
      loadStatusProperty in interface Loadable
      See Also:
    • loadErrorProperty

      public ReadOnlyObjectProperty<ArcGISRuntimeException> loadErrorProperty()
      Description copied from interface: Loadable
      The load error.
      Specified by:
      loadErrorProperty in interface Loadable
      See Also:
    • 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