Class Portal
- java.lang.Object
- 
- com.esri.arcgisruntime.portal.Portal
 
- 
- All Implemented Interfaces:
- RemoteResource,- Loadable
 
 public final class Portal extends Object implements Loadable, RemoteResource Represents an information portal such as ArcGIS Online or Portal for ArcGIS. Supports the following operations:- sign in to the portal
- get metadata describing the portal
- search the portal for content such as portal items and groups
- fetch items from the portal
 Note that if a Portal is initially loaded anonymously and attempts to access a secured resource, an AuthenticationChallenge will be issued. If the challenge results in a Credential object that satisfies the secure resource, that Credential will be set back on the Portal. At this point, subsequent requests will use that Credential for authentication. The PortalInfo and PortalUser, however, will remain as the anonymous versions as they were initially loaded. If these objects are desired to have privileged information, then a new Portal instance needs to be constructed and the Credential needs to be set using setCredential(Credential)before loading the new Portal instance.- Since:
- 100.0.0
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPortal.LoginTypeSignifies the login type for a portal.static classPortal.ModeSignifies the tenancy mode of a portal.
 - 
Constructor SummaryConstructors Constructor Description Portal(String portalUrl)Creates a Portal for anonymous access using the portal URL.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.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCredentialChangedListener(CredentialChangedListener credentialChangedListener)Adds a CredentialChangedListener to be called when the Portal's Credential is changed.voidaddDoneLoadingListener(Runnable listener)Adds a listener to the loadable resource that is invoked when loading has completed.voidaddLoadStatusChangedListener(LoadStatusChangedListener listener)Adds aLoadStatusChangedListenerto the loadable resource that is invoked whenever the load status changes.voidcancelLoad()Cancels loading metadata for the object.ListenableFuture<List<Basemap>>fetchBasemapsAsync()Executes an asynchronous operation to fetch the basemaps using thePortalInfo.getBasemapGalleryGroupQuery()query string.ListenableFuture<List<Basemap>>fetchDeveloperBasemapsAsync()Executes an asynchronous operation to fetch the developer basemaps using thePortalInfo.getDeveloperBasemapGalleryGroupQuery()query string.ListenableFuture<List<PortalGroup>>fetchFeaturedGroupsAsync()Executes an asynchronous operation to fetch the featured groups for the organization.ListenableFuture<List<PortalItem>>fetchFeaturedItemsAsync()Executes an asynchronous operation to fetch the featured items for the organization.ListenableFuture<List<PortalItem>>fetchHomePageFeaturedContentAsync()Executes an asynchronous operation to fetch the featured content for display on the organization's home page.ListenableFuture<LicenseInfo>fetchLicenseInfoAsync()Executes an asynchronous operation to fetch the current user's LicenseInfo including the entitlements and extensions.static ListenableFuture<Portal.LoginType>fetchLoginTypeForUrlAsync(String url)Executes an asynchronous operation to determine the login type for a given portal URL.ListenableFuture<List<PortalItem>>fetchStylesAsync()Executes an asynchronous operation to fetch the styles using thePortalInfo.getStylesGroupQuery()query string.ListenableFuture<List<PortalItem>>fetchSymbolSetsAsync()Executes an asynchronous operation to fetch the symbol sets using thePortalInfo.getSymbolSetsGroupQuery()query string.ListenableFuture<List<Basemap>>fetchVectorBasemapsAsync()Executes an asynchronous operation to fetch the vector basemaps using thePortalInfo.getVectorBasemapGalleryGroupQuery()query string.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.ListenableFuture<PortalQueryResultSet<PortalItem>>findItemsAsync(PortalQueryParameters queryParameters)Executes an asynchronous operation to find items in this portal with a query using the specified portal query parameters.CredentialgetCredential()Gets the credential set on this portal instance.StringgetCulture()Gets a code that specifies the culture-specific formatting to use when accessing portal content.ArcGISRuntimeExceptiongetLoadError()Returns the most recent error that was encountered when the loadable resource transitioned to theLoadStatus.FAILED_TO_LOADstate, either due to calling theLoadable.loadAsync()orLoadable.retryLoadAsync()method.LoadStatusgetLoadStatus()Returns theLoadStatusof the loadable resource.PortalInfogetPortalInfo()Gets the PortalInfo object for this portal.RequestConfigurationgetRequestConfiguration()Gets the RequestConfiguration object in use by this Portal.StringgetSharingUrl()Gets the sharing URL, that is, the URL of the root REST resource for the portal.StringgetUri()Gets the portal URL.PortalUsergetUser()Gets a PortalUser object describing the user currently signed in to this portal.booleanisLoginRequired()Indicates if loginRequired was specified when this Portal object was constructed.booleanisPKCESupported()Returns a boolean that defines if PKCE (proof key code exchange) is supported with this portal.voidloadAsync()Loads the metadata of the loadable resource asynchronously.ListenableFuture<String>postRequestAsync(String requestUrl)Executes an asynchronous operation to send a customized request and let the caller handle the response.booleanremoveCredentialChangedListener(CredentialChangedListener credentialChangedListener)Attempts to remove a CredentialChangedListener.booleanremoveDoneLoadingListener(Runnable listener)Removes a done loading listener from the loadable resource.booleanremoveLoadStatusChangedListener(LoadStatusChangedListener listener)Removes aLoadStatusChangedListenerfrom the loadable resource.voidretryLoadAsync()Loads or retries loading metadata for the object asynchronously.ListenableFuture<String>sendRequestAsync(String requestUrl)Executes an asynchronous operation to send a customized request and let the caller handle the response.voidsetCredential(Credential credential)Sets the credential used to authenticate the user with the Portal.voidsetCulture(String culture)Sets a code that specifies the culture-specific formatting to use when accessing portal content.voidsetRequestConfiguration(RequestConfiguration requestConfiguration)Sets configuration parameters used for network requests sent using this Portal object.
 
- 
- 
- 
Constructor Detail- 
Portalpublic 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 callingsetCredential(Credential)after this constructor and before loading this Portal.- Parameters:
- portalUrl- the portal URL. For example- https://www.arcgis.comfor ArcGIS Online, or- https://<host>:<port>/arcgisfor an on-premises portal.
- Throws:
- IllegalArgumentException- if the portalUrl is null or empty
- Since:
- 100.0.0
 
 - 
Portalpublic 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 login 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 login 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 callingsetCredential(Credential)after this constructor and before loading this Portal.- Parameters:
- portalUrl- the portal URL. For example- https://www.arcgis.comfor ArcGIS Online, or- https://<host>:<port>/arcgisfor an on-premises portal.
- loginRequired- true to force user login, false to only login if required by the portal
- Throws:
- IllegalArgumentException- if the portalUrl is null or empty
- Since:
- 100.0.0
 
 
- 
 - 
Method Detail- 
isLoginRequiredpublic boolean isLoginRequired() Indicates if loginRequired was specified when this Portal object was constructed.- Returns:
- true if login is required, false if anonymous access is allowed
- Since:
- 100.0.0
 
 - 
setCredentialpublic 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:
- setCredentialin 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
- Since:
- 100.0.0
 
 - 
getCredentialpublic Credential getCredential() Gets the credential set on this portal instance.- Specified by:
- getCredentialin interface- RemoteResource
- Returns:
- the credential, or null if none has been set
- Since:
- 100.0.0
 
 - 
getPortalInfopublic PortalInfo getPortalInfo() Gets the PortalInfo object for this portal.- Returns:
- the PortalInfo object for this portal, or null if the portal is not loaded yet
- Since:
- 100.0.0
- See Also:
- PortalInfo
 
 - 
getUserpublic 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:
- PortalUser
 
 - 
getSharingUrlpublic String getSharingUrl() Gets the sharing URL, that is, the URL of the root REST resource for the portal. For examplehttps://www.arcgis.com/sharing/restfor ArcGIS Online, orhttps://<host>:<port>/arcgis/sharing/restfor an on-premises portal.- Returns:
- the sharing URL
- Since:
- 100.0.0
 
 - 
setCulturepublic 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
 
 - 
getCulturepublic 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
 
 - 
getUripublic String getUri() Gets the portal URL.- Specified by:
- getUriin interface- RemoteResource
- Returns:
- the portal URL
- Since:
- 100.0.0
 
 - 
setRequestConfigurationpublic 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 (seeRequestConfiguration.getGlobalRequestConfiguration()).- Specified by:
- setRequestConfigurationin interface- RemoteResource
- Parameters:
- requestConfiguration- object containing the parameters to use
- Since:
- 100.0.0
 
 - 
getRequestConfigurationpublic 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:
- getRequestConfigurationin interface- RemoteResource
- Returns:
- the RequestConfiguration object or null if none is set
- Since:
- 100.0.0
- See Also:
- RequestConfiguration
 
 - 
addCredentialChangedListenerpublic 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.This 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. - Parameters:
- credentialChangedListener- the CredentialChangedListener to add
- Throws:
- IllegalArgumentException- if the listener is null
- Since:
- 100.0.0
 
 - 
removeCredentialChangedListenerpublic 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
 
 - 
fetchLoginTypeForUrlAsyncpublic 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:- IOExceptionif a network request fails
 
- Throws:
- IllegalArgumentException- if url is null or empty
- Since:
- 100.0.0
 
 - 
fetchBasemapsAsyncpublic ListenableFuture<List<Basemap>> fetchBasemapsAsync() Executes an asynchronous operation to fetch the basemaps using thePortalInfo.getBasemapGalleryGroupQuery()query string. The result is an unmodifiable list of Basemaps. The Basemaps are not loaded, but their PortalItem metadata are available usingBasemap.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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.1.0
 
 - 
fetchDeveloperBasemapsAsyncpublic ListenableFuture<List<Basemap>> fetchDeveloperBasemapsAsync() Executes an asynchronous operation to fetch the developer basemaps using thePortalInfo.getDeveloperBasemapGalleryGroupQuery()query string. The result is an unmodifiable list of Basemaps.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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.12.0
 
 - 
fetchFeaturedGroupsAsyncpublic 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 ofLoadStatus.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()andfindGroupsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.1.0
 
 - 
fetchFeaturedItemsAsyncpublic 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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.1.0
 
 - 
fetchHomePageFeaturedContentAsyncpublic 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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.1.0
 
 - 
fetchVectorBasemapsAsyncpublic ListenableFuture<List<Basemap>> fetchVectorBasemapsAsync() Executes an asynchronous operation to fetch the vector basemaps using thePortalInfo.getVectorBasemapGalleryGroupQuery()query string. The result is an unmodifiable list of Basemaps. The Basemaps are not loaded, but their PortalItem metadata is available usingBasemap.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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.6.0
- See Also:
- fetchBasemapsAsync()
 
 - 
fetchLicenseInfoAsyncpublic ListenableFuture<LicenseInfo> fetchLicenseInfoAsync() Executes an asynchronous operation to fetch the current user's LicenseInfo including the 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:- IOExceptionif a network request fails
 
- Since:
- 100.7.0
 
 - 
fetchStylesAsyncpublic ListenableFuture<List<PortalItem>> fetchStylesAsync() Executes an asynchronous operation to fetch the styles using thePortalInfo.getStylesGroupQuery()query string. The result is an unmodifiable list of PortalItems.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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.12.0
 
 - 
fetchSymbolSetsAsyncpublic ListenableFuture<List<PortalItem>> fetchSymbolSetsAsync() Executes an asynchronous operation to fetch the symbol sets using thePortalInfo.getSymbolSetsGroupQuery()query string. The result is an unmodifiable list of PortalItems.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)andfindItemsAsync(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:- IOExceptionif a network request fails
 
- Since:
- 100.12.0
 
 - 
findItemsAsyncpublic ListenableFuture<PortalQueryResultSet<PortalItem>> findItemsAsync(PortalQueryParameters queryParameters) Executes an asynchronous operation to find items in this portal with a query using the specified portal query parameters. The result is a PortalQueryResultSet object containing a set of portal items.If you are considering using this method to find items that belong to a group, see PortalGroup.findItemsAsync(PortalGroupContentSearchParameters)for a description of how that method, which uses a Group Content Search operation that's designed specifically for finding items that belong to a group, differs from this method which uses a general-purpose Search operation.- 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:- IOExceptionif the network request fails
 
- Throws:
- IllegalArgumentException- if queryParameters is null
- Since:
- 100.0.0
 
 - 
findGroupsAsyncpublic 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. The result is a PortalQueryResultSet object containing a collection of PortalGroup objects. These are fully populated and have a load status ofLoadStatus.LOADED.- 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:- IOExceptionif the network request fails
 
- Throws:
- IllegalArgumentException- if queryParameters is null
- Since:
- 100.0.0
 
 - 
postRequestAsyncpublic 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:- IOExceptionif the network request fails
 
- Since:
- 100.0.0
 
 - 
sendRequestAsyncpublic 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:- IOExceptionif the network request fails
 
- Since:
- 100.0.0
 
 - 
getLoadStatuspublic LoadStatus getLoadStatus() Description copied from interface:LoadableReturns theLoadStatusof the loadable resource.- Specified by:
- getLoadStatusin interface- Loadable
- Returns:
- the LoadStatus of the loadable resource
 
 - 
getLoadErrorpublic ArcGISRuntimeException getLoadError() Description copied from interface:LoadableReturns the most recent error that was encountered when the loadable resource transitioned to theLoadStatus.FAILED_TO_LOADstate, either due to calling theLoadable.loadAsync()orLoadable.retryLoadAsync()method.If the resource subsequently transitions to LoadStatus.LOADED(for example, if a call toretryLoadAsynccompletes successfully) the error is cleared out.- Specified by:
- getLoadErrorin interface- Loadable
- Returns:
- the most recent error that was encountered when the loadable resource transitioned to the
         LoadStatus.FAILED_TO_LOADstate.
 
 - 
cancelLoadpublic void cancelLoad() Description copied from interface:LoadableCancels 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.LOADINGstate) can be cancelled by calling this method and the resource will transition fromLoadStatus.LOADINGtoLoadStatus.FAILED_TO_LOADstate. If the load operation was successfully cancelled, a CancellationException will be returned fromLoadable.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.LOADINGstate.- Specified by:
- cancelLoadin interface- Loadable
 
 - 
loadAsyncpublic void loadAsync() Description copied from interface:LoadableLoads the metadata of the loadable resource asynchronously.The load status changes from LoadStatus.NOT_LOADEDtoLoadStatus.LOADING. A listener can be added viaLoadable.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_LOADand the error can be retrieved by callingLoadable.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.LOADINGstate) whenloadAsyncis 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.LOADEDorLoadStatus.FAILED_TO_LOADstate) whenloadAsyncis called, the done loading listener is immediately invoked when added to the loadable resource.If a loadable resource has failed to load, calling loadAsyncon 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.LOADINGstate) can be cancelled by callingLoadable.cancelLoad().
 - 
retryLoadAsyncpublic void retryLoadAsync() Description copied from interface:LoadableLoads 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:
- retryLoadAsyncin interface- Loadable
 
 - 
addDoneLoadingListenerpublic void addDoneLoadingListener(Runnable listener) Description copied from interface:LoadableAdds 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, use the Loadable.addLoadStatusChangedListener(LoadStatusChangedListener)method instead.- Specified by:
- addDoneLoadingListenerin interface- Loadable
- Parameters:
- listener- a Runnable that is invoked upon completion of the load operation
 
 - 
removeDoneLoadingListenerpublic boolean removeDoneLoadingListener(Runnable listener) Description copied from interface:LoadableRemoves a done loading listener from the loadable resource.- Specified by:
- removeDoneLoadingListenerin interface- Loadable
- Parameters:
- listener- the listener to be removed
- Returns:
- true if the listener was removed, otherwise false
 
 - 
addLoadStatusChangedListenerpublic void addLoadStatusChangedListener(LoadStatusChangedListener listener) Description copied from interface:LoadableAdds aLoadStatusChangedListenerto 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:
- addLoadStatusChangedListenerin interface- Loadable
- Parameters:
- listener- the- LoadStatusChangedListenerto be added
 
 - 
removeLoadStatusChangedListenerpublic boolean removeLoadStatusChangedListener(LoadStatusChangedListener listener) Description copied from interface:LoadableRemoves aLoadStatusChangedListenerfrom the loadable resource.- Specified by:
- removeLoadStatusChangedListenerin interface- Loadable
- Parameters:
- listener- the- LoadStatusChangedListenerto be removed
- Returns:
- true if the listener was removed, otherwise false
 
 - 
isPKCESupportedpublic 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
 
 
- 
 
-