Obsolete Members for PortalItem

  • PortalItem
  • The following members of class PortalItem are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

    Public Functions

    (deprecated) PortalItem(Esri::ArcGISRuntime::Portal *portal, QObject *parent = nullptr)
    (deprecated) void addComment(const QString &comment)
    (deprecated) void addRating(float rating)
    (deprecated) void fetchComments()
    (deprecated) void fetchGroups()
    (deprecated) void shareWith(bool everyone, bool organization)
    (deprecated) void shareWithGroups(const QStringList &groupIds)
    (deprecated) void unshare()
    (deprecated) void unshareGroups(const QStringList &groupIds)
    (deprecated) void updateDataWithJson(const QString &json)
    (deprecated) void updateDataWithUrl(const QUrl &fromUrl, const QString &fileName = QString())

    Signals

    (deprecated) void addCommentCompleted(bool success)
    (deprecated) void addRatingCompleted(bool success)
    (deprecated) void fetchCommentsCompleted(bool success)
    (deprecated) void fetchGroupsCompleted(bool success)
    (deprecated) void shareWithCompleted(bool success)
    (deprecated) void shareWithGroupsCompleted(bool success, const QStringList &failedToShareGroupIds)
    (deprecated) void unshareCompleted(bool success)
    (deprecated) void unshareGroupsCompleted(bool success, const QStringList &failedToUnshareGroupIds)
    (deprecated) void updateDataCompleted(bool success, const QString &itemId)

    Member Function Documentation

    [explicit] PortalItem::PortalItem(Esri::ArcGISRuntime::Portal *portal, QObject *parent = nullptr)

    This function is deprecated. We strongly advise against using it in new code.

    Creates a new portal item for the specified portal.

    • portal - The portal.
    • parent - The optional parent QObject.

    This constructor is used if you wish to create a new item that you will add to a portal.

    since Esri::ArcGISRuntime 100.6

    Use PortalItem(Esri::ArcGISRuntime::Portal*, Esri::ArcGISRuntime::PortalItemType, QObject*) instead.

    See also portal.

    void PortalItem::addComment(const QString &comment)

    This function is deprecated. We strongly advise against using it in new code.

    Adds a comment to a portal item that the user has access to. This method is only available to authenticated users.

    • comment

    The addCommentCompleted signal will emit after the operation is complete.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::addCommentCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous addComment operation is complete.

    • success - Whether adding comment completed successfully.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PortalItem::addRating(float rating)

    This function is deprecated. We strongly advise against using it in new code.

    Adds a rating to a portal item that the user has access to.

    • rating

    Only one rating can be given to a portal item per user. If this call is made on an already rated portal item, the new rating will overwrite the current one. A user cannot rate their own portal item. This method is only available to authenticated users.

    The addRatingCompleted signal will emit after the operation is complete.

    rating must be a floating point number between 1.0 and 5.0.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::addRatingCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous addRating operation is complete.

    • success - Whether adding rating completed successfully.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PortalItem::fetchComments()

    This function is deprecated. We strongly advise against using it in new code.

    Returns the comments for the portal item that you have access to. This method is only available to authenticated users.

    The fetchCommentsCompleted signal will emit after the operation is complete.

    Example: Fetch the comments model for an item:

    int totalCommentsCount = 0;
    connect(portalItem, &PortalItem::fetchCommentsCompleted, [portalItem, &totalCommentsCount](bool success)
    {
      if (!success)
        return;
    
      PortalItemCommentListModel* commentsModel = portalItem->comments();
      if (!commentsModel)
        return;
    
      totalCommentsCount = commentsModel->size();
    });
    
    portalItem->fetchComments();

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::fetchCommentsCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous fetchComments operation is complete.

    • success - Whether fetching comments completed successfully.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PortalItem::fetchGroups()

    This function is deprecated. We strongly advise against using it in new code.

    Returns the groups this portal item belongs to.

    Only those groups that are visible to the current portal user will be returned.

    The fetchGroupsCompleted signal will emit after the operation is complete.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::fetchGroupsCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous fetchGroups operation is complete.

    • success - Whether fetching groups completed successfully.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PortalItem::shareWith(bool everyone, bool organization)

    This function is deprecated. We strongly advise against using it in new code.

    Shares this portal item with everyone or just with the user's organization. This method is only available to authenticated users.

    • everyone
    • organization

    If both 'everyone' and 'organization' are true, the portal item will be shared with everyone (Public). If both 'everyone' and 'organization' are false, the portal item will be made private, unless the item has been shared with one or more groups. In that case, the items access property will be set to PortalAccess::Shared. The groups an item has been shared with are not affected by this method.

    The shareWithCompleted signal will emit after the operation is complete.

    [signal] void PortalItem::shareWithCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous shareWith method completes.

    The parameter success is true when the operation succeeded, otherwise false.

    void PortalItem::shareWithGroups(const QStringList &groupIds)

    This function is deprecated. We strongly advise against using it in new code.

    Shares this portal item with the specified portal groups. This method is only available to authenticated users.

    • groupIds - the groups to be shared with.

    The portal groups are added to the existing set of portal groups the item is shared with. It is not necessary to load the PortalGroup objects that are passed to this method.

    The shareWithGroupsCompleted signal will emit after the operation is complete. The signal contains a QStringList of the group ids that the item could not be shared with.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::shareWithGroupsCompleted(bool success, const QStringList &failedToShareGroupIds)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous shareWithGroups method completes.

    The parameter success is true when the operation succeeded, otherwise false. The parameter failedToShareGroupIds is the list of groups the item could not be shared with.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PortalItem::unshare()

    This function is deprecated. We strongly advise against using it in new code.

    Stops all sharing of this portal item.

    This sets the access property of the item to PortalAccess::Private and makes the item accessible to only the item owner. Removes all groups from the set of groups the item is shared with.

    [signal] void PortalItem::unshareCompleted(bool success)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous unshare method completes.

    The parameter success is true when the operation succeeded, otherwise false.

    void PortalItem::unshareGroups(const QStringList &groupIds)

    This function is deprecated. We strongly advise against using it in new code.

    Stops sharing this portal item with the specified collection of portal groups.

    • groupIds - the groups to stop sharing with.

    The collection of groups are removed from the set of groups the item is shared with. It is not necessary to load the PortalGroup objects that are passed to this method.

    The unshareGroupsCompleted signal will emit after the operation is complete. The signal contains a list of the group ids that the item could not be unshared from.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::unshareGroupsCompleted(bool success, const QStringList &failedToUnshareGroupIds)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous unshareGroups method completes.

    The parameter success is true when the operation succeeded, otherwise false. The parameter failedToUnshareGroupIds is the list of groups the item could not be unshared with.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalItem::updateDataCompleted(bool success, const QString &itemId)

    This function is deprecated. We strongly advise against using it in new code.

    Signal emitted when the asynchronous updateDataWithJson or updateDataWithUrl method completes.

    success Whether the update was successful. itemId The item ID of the PortalItem that was updated.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void PortalItem::updateDataWithJson(const QString &json)

    This function is deprecated. We strongly advise against using it in new code.

    Starts an asynchronous task to update the remote PortalItem with the provided json.

    The portalItem will be updated using the following arguments:

    • json. A string representation of the JSON to use when updating the item.

    The updateDataCompleted signal will emit after the operation is complete.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void PortalItem::updateDataWithUrl(const QUrl &fromUrl, const QString &fileName = QString())

    This function is deprecated. We strongly advise against using it in new code.

    Starts an asynchronous task to update the remote PortalItem from a local or online url.

    The portalItem will be updated using the following arguments:

    • 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 PortalItemType.Image.

    The updateDataCompleted signal will emit after the operation is complete.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also Items and item types.

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