Represents a view into a portal by a user, either anonymous or with a Credential. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
Properties
- basemaps : BasemapListModel
- credential : Credential
- culture : string
- developerBasemaps : BasemapListModel
- featuredGroups : PortalGroupListModel
- featuredItems : PortalItemListModel
- fetchBasemapsStatus : Enums.TaskStatus
- fetchDeveloperBasemapsStatus : Enums.TaskStatus
- fetchFeaturedGroupsStatus : Enums.TaskStatus
- fetchFeaturedItemsStatus : Enums.TaskStatus
- fetchHomepageFeaturedContentStatus : Enums.TaskStatus
- fetchLicenseInfoResult : LicenseInfo
- fetchLicenseInfoStatus : Enums.TaskStatus
- fetchStylesResult : PortalQueryResultSetForItems
- fetchStylesStatus : Enums.TaskStatus
- fetchSymbolSetsResult : PortalQueryResultSetForItems
- fetchSymbolSetsStatus : Enums.TaskStatus
- findGroupsResult : PortalQueryResultSetForGroups
- findGroupsStatus : Enums.TaskStatus
- findItemsResult : PortalQueryResultSetForItems
- findItemsStatus : Enums.TaskStatus
- homepageFeaturedContent : PortalItemListModel
- loadError : Error
- loadStatus : Enums.LoadStatus
- loginRequired : bool
- portalInfo : PortalInfo
- portalUser : PortalUser
- requestConfiguration : RequestConfiguration
- url : url
Signals
- credentialChanged()
- credentialChanged()
- cultureChanged()
- fetchBasemapsStatusChanged()
- fetchDeveloperBasemapsStatusChanged()
- fetchFeaturedGroupsStatusChanged()
- fetchFeaturedItemsStatusChanged()
- fetchHomepageFeaturedContentStatusChanged()
- fetchLicenseInfoStatusChanged()
- fetchStylesStatusChanged()
- fetchSymbolSetsStatusChanged()
- findGroupsStatusChanged()
- findItemsStatusChanged()
- loadErrorChanged()
- loadStatusChanged()
- loginRequiredChanged()
- portalInfoChanged()
- portalUserChanged()
- requestConfigurationChanged()
- urlChanged()
Methods
- void cancelLoad()
- bool cancelTask(string taskId)
- void fetchBasemaps()
- void fetchDeveloperBasemaps()
- void fetchFeaturedGroups()
- void fetchFeaturedItems()
- void fetchHomepageFeaturedContent()
- string fetchLicenseInfo()
- void fetchStyles()
- void fetchSymbolSets()
- void findGroups(PortalQueryParametersForGroups queryParameters)
- void findItems(PortalQueryParametersForItems queryParameters)
- void load()
- void retryLoad()
Detailed Description
The Portal type is the main entry point into the API used to work with portals and organization subscriptions. It implements all the operations to interface with the backend ArcGIS REST API. Use Portal to search for items and groups and see the contents of the portal, such as services, layers, and so on.
Portals allow users and organizations to publish and share content over the web. A portal can support subscriptions which provide organizations a sandboxed area on the portal. The website www.arcgis.com (ArcGIS Online) is an example of a portal.
Organizations
A Portal may contain multiple organizations. An organization has users in different roles including administrators, publishers, and other users.
- Administrators can add users to their organization subscriptions and have access to all content within the organization.
- Publishers within an organization can in addition create hosted services based on data files that they upload.
- All users can create web maps based on mashing up services that they have access to and can register services running on external servers.
Content
Users create and share content that organized into Items. A Portal can contain different types of content items including:
- Web maps
- Map services (that can be used as layers in web maps)
- Applications (that are built around web maps)
- Data files (that can be uploaded and downloaded)
Users can choose to keep the content they create private, or share it with other members of the same group, or make content public and accessible to everyone.
Users and Groups
A user of the Portal sees the view of the Portal that corresponds to their organization's subscription. This view includes users, groups, and items that belong to the organization or have been shared with them. This view may also include users, groups, and items that are external to the user's organization and have been shared with the user. A Portal can have users who are affiliated with an organization or users who are not.
Users can create and join groups.
Example: Create a portal anonymously:
Portal { id: agolAnon url: "http://www.arcgis.com" }
Example: Create and load a portal with a credential:
Portal { id: agolAsNamedUser credential: Credential { username: myUsername password: myPassword } Component.onCompleted: load(); onErrorChanged: { if (loadStatus === Enums.LoadStatusFailedToLoad) console.log(error.message); } }
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
Type | Default Property |
---|---|
Credential | credential |
RequestConfiguration | requestConfiguration (since Esri.ArcGISRuntime 100.1) |
See also Loadable, RemoteResource, PortalUser, and PortalGroup.
Property Documentation
basemaps : BasemapListModel |
Returns the list of portal basemaps (read-only).
You must first call fetchBasemaps in order to access the list of basemaps.
See also Basemap.
[default] credential : Credential |
The credential for the portal.
Returns the culture 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 empty string if you want to see portal content in the language corresponding to the culture set in the portal/organization settings.
The format for the culture code is based on a language code and a country code, separated by a dash. Example: "en-US".
This property was introduced in Esri.ArcGISRuntime 100.11.
developerBasemaps : BasemapListModel |
Returns the list of portal developer basemaps (read-only).
You must first call fetchDeveloperBasemaps in order to access the list of basemaps.
This property was introduced in Esri.ArcGISRuntime 100.12.
See also Basemap.
featuredGroups : PortalGroupListModel |
Returns the list of groups featured for the portal (read-only).
You must first call fetchFeaturedGroups in order to access the list of featured groups.
See also PortalGroup.
featuredItems : PortalItemListModel |
Returns the list of items featured for the portal (read-only).
You must first call fetchFeaturedItems in order to access the list of featured items.
See also PortalItem.
Returns the status of a the fetchBasemaps task (read-only).
See also Enums.TaskStatus.
Returns the status of a the fetchDeveloperBasemaps task (read-only).
This property was introduced in Esri.ArcGISRuntime 100.12.
See also Enums.TaskStatus.
Returns the status of a the fetchFeaturedGroups task (read-only).
See also Enums.TaskStatus.
Returns the status of a the fetchFeaturedItems task (read-only).
See also Enums.TaskStatus.
Returns the status of a the fetchHomepageFeaturedContent task (read-only).
See also Enums.TaskStatus.
fetchLicenseInfoResult : LicenseInfo |
Returns the result of the fetchLicenseInfo async operation (read-only).
You must first call fetchLicenseInfo in order to populate this result.
This property was introduced in Esri.ArcGISRuntime 100.7.
Returns the status of a the fetchLicenseInfo task (read-only).
This property was introduced in Esri.ArcGISRuntime 100.7.
See also Enums.TaskStatus.
fetchStylesResult : PortalQueryResultSetForItems |
The result returned when the asynchronous fetchStyles operation completes (read-only).
This property was introduced in Esri.ArcGISRuntime 100.12.
Returns the status of a the fetchStyles task (read-only).
This property was introduced in Esri.ArcGISRuntime 100.12.
fetchSymbolSetsResult : PortalQueryResultSetForItems |
The result returned when the asynchronous fetchSymbolSets operation completes (read-only).
This property was introduced in Esri.ArcGISRuntime 100.12.
Returns the status of a the fetchSymbolSets task (read-only).
This property was introduced in Esri.ArcGISRuntime 100.12.
findGroupsResult : PortalQueryResultSetForGroups |
Returns the results of a call to findGroups (read-only).
See also PortalQueryResultSetForGroups and PortalQueryParametersForGroups.
Returns the status of a the findGroups task (read-only).
See also Enums.TaskStatus.
findItemsResult : PortalQueryResultSetForItems |
Returns the results of a call to findItems (read-only).
See also PortalQueryResultSetForItems and PortalQueryParametersForItems.
Returns the status of a the findItems task (read-only).
See also Enums.TaskStatus.
homepageFeaturedContent : PortalItemListModel |
Returns the list of items featured on the homepage of the portal (read-only).
You must first call fetchHomepageFeaturedContent in order to access the list of homepage featured items.
See also PortalItem.
loadError : Error |
Returns the load error for the item (read-only).
Returns the load status of the item (read-only).
See also Enums.LoadStatus.
Whether login is required for the portal.
If loginRequired is set to true
, loading will always require a Credential. If the credential property has not been set, the user will be prompted for login credentials.
If loginRequired is false
, a credential is required only if the remote resource is secured.
This property cannot be changed after the portal is loaded.
portalInfo : PortalInfo |
Returns information about the loaded portal (read-only).
A PortalInfo object represents details of the portal or organization as seen by the current user, anonymous or logged in. If the current user is a member of an organization on this portal, information about the user and organization is included.
This property is null
until the Portal object is loaded.
portalUser : PortalUser |
Returns the registered user of the portal/organization (read-only).
This property is null
until the Portal object is loaded.
[default] requestConfiguration : RequestConfiguration |
The configuration parameters used for network requests sent by this Portal object.
This property was introduced in Esri.ArcGISRuntime 100.1.
The URL of the portal.
If no URL has been set, the default is returned: https://www.arcgis.com (ArcGIS Online).
This property cannot be changed after the portal is loaded.
Signal Documentation
Emitted when the credential property changes.
Note: The corresponding handler is onCredentialChanged
.
Emitted when the credential property changes.
Note: The corresponding handler is onCredentialChanged
.
Emitted when the culture property changes.
Note: The corresponding handler is onCultureChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.11.
Emitted when the fetchBasemapsStatus property changes.
Note: The corresponding handler is onFetchBasemapsStatusChanged
.
Emitted when the fetchDeveloperBasemapsStatus property changes.
Note: The corresponding handler is onFetchDeveloperBasemapsStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.12.
Emitted when the fetchFeaturedGroupsStatus property changes.
Note: The corresponding handler is onFetchFeaturedGroupsStatusChanged
.
Emitted when the fetchFeaturedItemsStatus property changes.
Note: The corresponding handler is onFetchFeaturedItemsStatusChanged
.
Emitted when the fetchHomepageFeaturedContentStatus property changes.
Note: The corresponding handler is onFetchHomepageFeaturedContentStatusChanged
.
Emitted when the fetchLicenseInfoStatus property changes.
Note: The corresponding handler is onFetchLicenseInfoStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.7.
Emitted when the fetchStylesStatus property changes.
Note: The corresponding handler is onFetchStylesStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.12.
Emitted when the fetchSymbolSetsStatus property changes.
Note: The corresponding handler is onFetchSymbolSetsStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.12.
Emitted when the findGroupsStatus property changes.
Note: The corresponding handler is onFindGroupsStatusChanged
.
Emitted when the findItemsStatus property changes.
Note: The corresponding handler is onFindItemsStatusChanged
.
Emitted when the loadError property changes.
Note: The corresponding handler is onLoadErrorChanged
.
Emitted when the loadStatus property changes.
Note: The corresponding handler is onLoadStatusChanged
.
Emitted when the loginRequired property changes.
Note: The corresponding handler is onLoginRequiredChanged
.
Emitted when the portalInfo property changes.
Note: The corresponding handler is onPortalInfoChanged
.
Emitted when the portalUser property changes.
Note: The corresponding handler is onPortalUserChanged
.
Emitted when the requestConfiguration property changes.
Note: The corresponding handler is onRequestConfigurationChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
Emitted when the url property changes.
Note: The corresponding handler is onUrlChanged
.
Method Documentation
See Loadable.
Cancel the task with the ID taskId.
Returns false
if the task cannot be canceled or there is no task with the specified id taskId.
This method was introduced in Esri.ArcGISRuntime 100.7.
See also Cancelable.
Retrieve the set of basemaps available for the portal.
Once the basemaps have been retrieved, the results are available via the basemaps property.
Example:
Fetch the basemaps for a portal:
onLoadStatusChanged: { if (loadStatus === Enums.LoadStatusFailedToLoad) { retryLoad(); return; } if (loadStatus !== Enums.LoadStatusLoaded) return; fetchBasemaps(); } onFetchBasemapsStatusChanged: { if (fetchBasemapsStatus !== Enums.TaskStatusCompleted) return; basemapsGrid.model = basemaps; gridFadeIn.running = true; }
See also Basemap, Portal::basemaps, and PortalInfo::basemapGalleryGroupQuery.
Retrieves a set of developers basemaps available from the portal.
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 Enums.BasemapStyle.
This method was introduced in Esri.ArcGISRuntime 100.12.
See also Basemap, Portal::developerBasemaps, and PortalInfo::developerBasemapGalleryGroupQuery.
Retrieve the set of featuredGroups available for the portal.
Once the groups have been retrieved, the results are available via the featuredGroups property.
See also PortalGroup.
Retrieve the set of featuredItems available for the portal.
Once the items have been retrieved, the results are available via the featuredItems property.
See also PortalItem.
Retrieve the items featured on the homepage of the portal.
Once the content has been retrieved, the results are available via the homepageFeaturedContent property.
See also PortalItem.
Executes a portal query that gets the current user's LicenseInfo including the entitlements and extensions.
Returns a task ID that can be used to cancel the fetchLicenseInfo task.
See also Cancelable.
Executes a portal query with the PortalInfo::stylesGroupQuery query string.
This method was introduced in Esri.ArcGISRuntime 100.12.
Executes a portal query with the PortalInfo::symbolSetsGroupQuery query string.
This method was introduced in Esri.ArcGISRuntime 100.12.
void findGroups(PortalQueryParametersForGroups queryParameters) |
Perform a query to fetch groups matching specified criteria.
queryParameters defines the query to be applied.
Once the query has completed, the results are available in the findGroupsResult property.
Example:
Use findGroups to retrieve all of the groups for a portal:
property int numGroups: 0 PortalQueryParametersForGroups { id: queryParamsGroups searchString: "1==1" } Portal { id: portalWithGroups onFindGroupsStatusChanged: { if (findGroupsStatus !== Enums.TaskStatusCompleted) return; numGroups = findGroupsResult.groupResults.count; } } portalWithGroups.findGroups(queryParamsGroups);
See also PortalQueryParametersForGroups.
void findItems(PortalQueryParametersForItems queryParameters) |
Perform a query to fetch items matching specified criteria.
queryParameters defines the query to be applied. Once the query has completed, the results are available in the findItemsResult property.
Example:
Use findItems to retrieve web maps with specific tags from a portal:
// webmaps authored prior to July 2nd, 2014 are not supported - so search only from that date to the current time property string fromDate: "000000" + new Date('Wed, 02 Jul 2014 00:00:00 GMT').getTime() property string toDate: "000000" + new Date().getTime() PortalQueryParametersForItems { id: webmapQuery types: [ Enums.PortalItemTypeWebMap ] searchString: 'tags:\"' + keyWordField.text + '\" AND + uploaded:[' + fromDate + ' TO ' + toDate +']'; } portal.findItems(webmapQuery);
See also PortalQueryParametersForItems.
See Loadable.
See Loadable.