PortalUser QML Type

  • Esri.ArcGISRuntime
  • PortalUser
  • PortalUser represents a registered user of a portal or organization. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherits:

    Object

    Properties

    Signals

    Methods

    Detailed Description

    A Portal may have users who are unaffiliated with an organization or users who are part of an organization. Users sign in to the portal and create and share content which is organized into items (PortalItem). Users can create and join groups (PortalGroup) and share items with groups. This makes the items visible and accessible to other members of the group. Users could be in different roles including administrators, publishers and information workers. Administrators can add users to their organizations and have access to all content within the organization. All users can create web maps based on mashing up services that they have access to and can register services running on external servers. Publishers within an organization can in addition create hosted services based on data files that they upload.

    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.

    TypeDefault Property
    Portalportal

    See also JsonSerializable, Loadable, and User (ArcGIS REST API).

    Property Documentation

    [read-only] access : Enums.PortalAccess

    Returns the visibility of a user's information (read-only).

    If set to Enums.PortalAccessPrivate, the user's descriptive information will not be available to others nor will the username be searchable. The organization's administrator can always see all users.

    See also Enums.PortalAccess.


    [read-only, since Esri.ArcGISRuntime 100.1] addPortalItemStatus : Enums.TaskStatus

    Returns the status of the addPortalItemWithJson or addPortalItemWithUrl operation (read-only).

    This property was introduced in Esri.ArcGISRuntime 100.1.

    See also Enums.TaskStatus.


    [read-only] addToFavoritesStatus : Enums.TaskStatus

    Returns the status of the addToFavorites operation (read-only).

    See also Enums.TaskStatus.


    [read-only] createFolderResult : PortalFolder

    The PortalFolder created using the createFolder method.


    [read-only] createFolderStatus : Enums.TaskStatus

    Returns the status of the createFolder operation (read-only).

    See also Enums.TaskStatus.


    [read-only] created : date

    Returns the date and time the user was created (read-only).


    [read-only] deleteFolderStatus : Enums.TaskStatus

    Returns the status of the deleteFolder operation (read-only).

    See also Enums.TaskStatus.


    [read-only] deletePortalItemStatus : Enums.TaskStatus

    Returns the status of the deletePortalItem operation (read-only).

    See also Enums.TaskStatus.


    [read-only] email : string

    Returns the user's email address (read-only).


    [read-only] favoritesGroupId : string

    The ID of the group that contains the user's favorites (read-only).


    [read-only] fetchContentStatus : Enums.TaskStatus

    Returns the status of the fetchContent operation (read-only).

    See also Enums.TaskStatus.


    [read-only] fetchFavoritesStatusStatus : Enums.TaskStatus

    Returns the status of the fetchFavoritesStatus operation (read-only).

    See also Enums.TaskStatus.


    [read-only] folders : PortalFolderListModel

    Returns a list of PortalFolder objects for the user's content (read-only).

    The folders are retrieved by calling fetchContent and the signal fetchContentStatus property shows the status of the operation.

    See also PortalFolder.


    [read-only] fullName : string

    Returns the user's full name (read-only).


    [read-only] groups : PortalGroupListModel

    Returns the list of groups for the portal user.

    See also PortalGroup.


    [read-only] items : PortalItemListModel

    Returns a list of PortalItem objects for which the user has access (raed-only).

    The items are retrieved by calling fetchContent or fetchContentInFolder and the signal fetchContentStatus property shows the status of the operation.

    See also PortalItem.


    json : jsobject

    The JSON representation of the PortalUser.

    portal is conserved


    [read-only] loadError : Error

    Returns the Error for the user.


    [read-only] loadStatus : Enums.LoadStatus

    Returns the load status of the user.

    See also Enums.LoadStatus.


    [read-only] modified : date

    Returns the date and time the user was modified (read-only).


    [read-only] movePortalItemStatus : Enums.TaskStatus

    Returns the status of the movePortalItem operation (read-only).

    See also Enums.TaskStatus.


    [read-only] movePortalItemsResults : list<PortalResult>

    Returns the list of PortalResult that will be returned by movePortalItems (read-only).


    [read-only, since Esri.ArcGISRuntime 100.1] movePortalItemsStatus : Enums.TaskStatus

    Returns the status of the movePortalItems operation (read-only).

    This property was introduced in Esri.ArcGISRuntime 100.1.

    See also Enums.TaskStatus.


    [read-only] organizationId : string

    Returns the ID of the organization the user belongs to (read-only).


    [read-only] phone : string

    Returns the user's phone number (read-only).


    [default] portal : Portal

    Returns the user's Portal.


    [read-only] privileges : PortalPrivilegeListModel

    A list of the privileges possessed by this user.

    See also PortalPrivilege.


    [read-only] removeFromFavoritesStatus : Enums.TaskStatus

    Returns the status of the removeFromFavorites operation (read-only).

    See also Enums.TaskStatus.


    [read-only] role : Enums.PortalUserRole

    Returns the user's role in the organization (read-only).

    See also Enums.PortalUserRole.


    [read-only] tags : list<string>

    Returns a list of user-defined tags that describe the user (read-only).


    [read-only] thumbnailUrl : url

    Returns a URL to the user's thumbnail (read-only).


    [read-only] units : Enums.UnitSystem

    Returns the user's preferred units.

    See also Enums.UnitSystem.


    [read-only] unknownJson : jsobject

    Returns the unknown JSON from the source JSON.

    See also JsonSerializable.


    [read-only] unsupportedJson : jsobject

    Returns the unsupported data from the source JSON.

    See also JsonSerializable.


    [read-only] userDescription : string

    Returns the user's description (read-only).


    username : string

    Returns the user's username.


    Signal Documentation

    accessChanged()

    Emitted when access property is changed.

    Note: The corresponding handler is onAccessChanged.


    [since Esri.ArcGISRuntime 100.1] addPortalItemStatusChanged()

    Emitted when addPortalItemStatus property is changed.

    Note: The corresponding handler is onAddPortalItemStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    addToFavoritesStatusChanged()

    Emitted when addToFavoritesStatus property is changed.

    Note: The corresponding handler is onAddToFavoritesStatusChanged.


    createFolderStatusChanged()

    Emitted when createFolderStatus property is changed.

    Note: The corresponding handler is onCreateFolderStatusChanged.


    createdChanged()

    Emitted when created property is changed.

    Note: The corresponding handler is onCreatedChanged.


    deleteFolderStatusChanged()

    Emitted when deleteFolderStatus property is changed.

    Note: The corresponding handler is onDeleteFolderStatusChanged.


    deletePortalItemStatusChanged()

    Emitted when deletePortalItemStatus property is changed.

    Note: The corresponding handler is onDeletePortalItemStatusChanged.


    emailChanged()

    Emitted when email property is changed.

    Note: The corresponding handler is onEmailChanged.


    favoritesGroupIdChanged()

    Emitted when favoritesGroupId property is changed.

    Note: The corresponding handler is onFavoritesGroupIdChanged.


    fetchContentStatusChanged()

    Emitted when fetchContentStatus property is changed.

    Note: The corresponding handler is onFetchContentStatusChanged.


    fetchFavoritesStatusStatusChanged()

    Emitted when fetchFavoritesStatusStatus property is changed.

    Note: The corresponding handler is onFetchFavoritesStatusStatusChanged.


    fullNameChanged()

    Emitted when fullName property is changed.

    Note: The corresponding handler is onFullNameChanged.


    loadErrorChanged()

    Emitted when loadError property is changed.

    Note: The corresponding handler is onLoadErrorChanged.


    loadStatusChanged()

    Emitted when loadStatus property is changed.

    Note: The corresponding handler is onLoadStatusChanged.


    modifiedChanged()

    Emitted when modified property is changed.

    Note: The corresponding handler is onModifiedChanged.


    movePortalItemStatusChanged()

    Emitted when movePortalItemStatus property is changed.

    Note: The corresponding handler is onMovePortalItemStatusChanged.


    [since Esri.ArcGISRuntime 100.1] movePortalItemsStatusChanged()

    Emitted when movePortalItemsStatus property is changed.

    Note: The corresponding handler is onMovePortalItemsStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    organizationIdChanged()

    Emitted when organizationId property is changed.

    Note: The corresponding handler is onOrganizationIdChanged.


    phoneChanged()

    Emitted when phone property is changed.

    Note: The corresponding handler is onPhoneChanged.


    portalChanged()

    Emitted when portal property is changed.

    Note: The corresponding handler is onPortalChanged.


    removeFromFavoritesStatusChanged()

    Emitted when removeFromFavoritesStatus property is changed.

    Note: The corresponding handler is onRemoveFromFavoritesStatusChanged.


    roleChanged()

    Emitted when role property is changed.

    Note: The corresponding handler is onRoleChanged.


    tagsChanged()

    Emitted when tags property is changed.

    Note: The corresponding handler is onTagsChanged.


    thumbnailUrlChanged()

    Emitted when thumbnailUrl property is changed.

    Note: The corresponding handler is onThumbnailUrlChanged.


    unitsChanged()

    Emitted when units property is changed.

    Note: The corresponding handler is onUnitsChanged.


    userDescriptionChanged()

    Emitted when userDescription property is changed.

    Note: The corresponding handler is onUserDescriptionChanged.


    usernameChanged()

    Emitted when username property is changed.

    Note: The corresponding handler is onUsernameChanged.


    Method Documentation

    [since Esri.ArcGISRuntime 100.1] void addPortalItemWithJson(PortalItem portalItem, jsobject json, PortalFolder toFolder)

    Adds a PortalItem from a JSON object.

    The portalItem will be created using the following arguments:

    • portalItem - The local PortalItem which will be added to the portal.
    • json - The JSON representation of the portal item. This format is particularly suitable for adding items such as web maps and is the format used by the Map::saveAs method.
    • toFolder - (optional). The folder in which the item will be located. If empty, the item will be placed in the user's root folder.

    This method was introduced in Esri.ArcGISRuntime 100.1.

    See also Items and item types.


    [since Esri.ArcGISRuntime 100.1] void addPortalItemWithUrl(PortalItem portalItem, url fromUrl, string fileName, PortalFolder toFolder)

    Adds a PortalItem from a local or online URL.

    The portalItem will be created using the following arguments:

    • portalItem - The local PortalItem which will be added to the portal.
    • fromUrl - The local or online URL from which the portalItem will be populated. For local files, this should be of the form "qrc:/example.csv" or "file://"; for online resources, this should be of the form "https://...".
    • fileName - (optional). The name of the file which will be associated with the PortalItem (including extension). If a file name is not supplied, the portal item will have no file associated with it for future downloads.

      Note: A file name is only relevant for certain item types such as Enums.PortalItemType or Enums.PortalItemTypeImage.

    • toFolder - (optional). The folder in which the item will be located. If empty, the item will be placed in the user's root folder.

    Example:

    Add an item with a local URL:

    const localCSVFile = "qrc:/Samples/CloudAndPortal/AddItemsToPortal/add_item_sample.csv";
    myUser.addPortalItemWithUrl(itemToAdd, localCSVFile, "add_item_sample.csv");

    Load the item once it has been successfully loaded

    onAddPortalItemStatusChanged: {
        if (addPortalItemStatus !== Enums.TaskStatusCompleted)
            return;
    
        itemToAdd.load();

    This method was introduced in Esri.ArcGISRuntime 100.1.

    See also Items and item types.


    void addToFavorites(PortalItem portalItem)

    Adds the PortalItem portalItem to the user's favorites group.


    void cancelLoad()

    See Loadable.


    void createFolder(string title)

    Creates a new PortalFolder with the given title in the user's root folder.

    Multilevel folders are not supported in a portal.


    void deleteFolder(PortalFolder folder)

    Removes the specified folder from the portal.


    void deletePortalItem(PortalItem portalItem)

    Removes the PortalItem portalItem from the portal.


    void fetchContent()

    Starts an operation that fetches the user's content at the root level (not in a folder).

    Example:

    Retrieve the model representing a user's folders:

    Connections {
        target: portalUser
        function onFetchContentStatusChanged() {
            if (portalUser.fetchContentStatus !== Enums.TaskStatusCompleted)
                return;
    
            console.log("folders count = ", portalUser.folders.count);
        }
    }
    portalUser.fetchContent();

    The content is made up of lists of PortalItem and PortalFolder objects.


    void fetchContentInFolder(const QString&folderId)

    Starts an operation that fetches the user's content within a specific folder (folderId).

    The content is made up of lists of PortalItem objects.


    void fetchFavoritesStatus(PortalItem portalItem)

    Starts an operation to determine whether PortalItem portalItem is in the user's favorites group.

    The fetchFavoritesStatusStatus property shows the status of the operation.


    void load()

    See Loadable.


    void movePortalItem(PortalItem portalItem, PortalFolder toFolder)

    Move item portalItem to the folder specified by toFolder (optional).

    Passing null for toFolder will move the item to the user's root folder.


    [since Esri.ArcGISRuntime 100.1] void movePortalItems(list<PortalItem> portalItems, PortalFolder toFolder)

    Moves multiple PortalItems.

    Move the items listed in portalItems to the folder specified by toFolder (optional).

    Passing null for toFolder will move the items to the user's root folder.

    This method was introduced in Esri.ArcGISRuntime 100.1.


    void removeFromFavorites(PortalItem portalItem)

    Removes the PortalItem portalItem from the user's favorites group.


    void retryLoad()

    See Loadable.


    void setPortal(Portal*portal)

    Sets the portal this user is registered for.

    portal: The portal

    Warning: It is not possible to change the portal for a user which has already been loaded.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.