PortalGroup Class

  • PortalGroup
  • class Esri::ArcGISRuntime::PortalGroup

    Represents a group within a portal. More...

    Header: #include <PortalGroup.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::JsonSerializable

    Public Functions

    PortalGroup(Esri::ArcGISRuntime::Portal *portal, const QString &groupId, QObject *parent = nullptr)
    virtual ~PortalGroup() override
    Esri::ArcGISRuntime::PortalAccess access() const
    QStringList admins() const
    QDateTime created() const
    QFuture<void> fetchGroupUsersAsync()
    QString groupDescription() const
    QString groupId() const
    bool isInvitationOnly() const
    bool isViewOnly() const
    QDateTime modified() const
    QString owner() const
    QString phone() const
    Esri::ArcGISRuntime::Portal *portal() const
    QString snippet() const
    Esri::ArcGISRuntime::PortalGroupSortField sortField() const
    Esri::ArcGISRuntime::PortalQuerySortOrder sortOrder() const
    QStringList tags() const
    QUrl thumbnailUrl() const
    QString title() const
    QStringList users() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual void retryLoad() override
    virtual QString toJson() const override
    virtual QJsonObject unknownJson() const override
    virtual QJsonObject unsupportedJson() const override

    Signals

    void fetchGroupUsersCompleted(bool success)

    Static Public Members

    Esri::ArcGISRuntime::PortalGroup *fromJson(const QString &json, Esri::ArcGISRuntime::Portal *portal = nullptr, QObject *parent = nullptr)

    Detailed Description

    Collections of fully populated PortalGroup objects can be obtained by calling the Portal::findGroupsAsync(const Esri::ArcGISRuntime::PortalQueryParameters&, QObject*), Portal::fetchFeaturedGroupsAsync, and PortalItem::fetchGroupsAsync methods, and from the PortalUser::groups property. The load status of such objects is LoadStatus::Loaded.

    Alternatively, a PortalGroup object can be constructed using PortalGroup(Esri::ArcGISRuntime::Portal*, const QString&, QObject*) if the group ID is known. In this case the load status is initially LoadStatus::NotLoaded and the object needs to be loaded to populate its properties.

    The portal group owner is automatically an administrator and is returned in the list of admins. The access property determines the visibility of the group to other users. If the group is private, no one except the administrators and the members of the group can see it. If the group is shared with an organization, then all members of the organization can see the group.

    Administrators can invite, add to, and remove members from a group, and also update and delete the group. The administrator for an organization may also reassign the group to another member of the organization. Group members may leave the group. Authenticated users may apply to join a group.

    See also PortalUser, PortalItem, and Portal Group (ArcGIS REST API).

    Member Function Documentation

    [since Esri::ArcGISRuntime 100.13] PortalGroup::PortalGroup(Esri::ArcGISRuntime::Portal *portal, const QString &groupId, QObject *parent = nullptr)

    Constructor for use when the group ID is known.

    • portal - the portal the group belongs to.
    • groupId - the ID of the group.
    • parent - The optional parent QObject.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    [override virtual] PortalGroup::~PortalGroup()

    Destructor.

    Esri::ArcGISRuntime::PortalAccess PortalGroup::access() const

    Returns the access level for the group.

    QStringList PortalGroup::admins() const

    Returns a list of users that are administrators of this group.

    [override virtual, since Esri::ArcGISRuntime 100.13] void PortalGroup::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    Cancels loading metadata for the object.

    Cancels loading the metadata if the object is loading

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    QDateTime PortalGroup::created() const

    Returns the date the group was created.

    Always a Gregorian calendar using UTC time zone and English locale.

    [since Esri::ArcGISRuntime 200.4] QFuture<void> PortalGroup::fetchGroupUsersAsync()

    Starts an operation to fetch users and administrators of the group.

    The operation is complete when the QFuture is finished. Once the future is finished, the admins and users properties will be populated.

    Canceling the QFuture will not stop this operation from completing, though the QFuture will report that it is canceled and the completion handler will not be called.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    [signal, since Esri::ArcGISRuntime 100.1] void PortalGroup::fetchGroupUsersCompleted(bool success)

    Signal emitted when the fetchGroupUsers operation is complete.

    • success - Whether fetching group users completed successfully.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [static, since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::PortalGroup *PortalGroup::fromJson(const QString &json, Esri::ArcGISRuntime::Portal *portal = nullptr, QObject *parent = nullptr)

    Creates a new PortalGroup from json with an optional portal and parent.

    The PortalGroup will be created using the following arguments:

    • json. The JSON representation of the portal user.
    • portal (optional). A Portal object for use by the PortalUser.
    • parent (optional). A QObject object used as parent.

    To fetch data from an online portal, the JSON must contains the "id" parameter, and portal must be valid.

    const QString json = QStringLiteral(" { \"id\": \"12345678901234567890123456789012\" }");
    PortalGroup* portalGroup = PortalGroup::fromJson(json, portal, parent);

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also JsonSerializable.

    QString PortalGroup::groupDescription() const

    Returns the group's description.

    QString PortalGroup::groupId() const

    Returns the group's ID.

    bool PortalGroup::isInvitationOnly() const

    Returns whether the group membership is invitation-only.

    bool PortalGroup::isViewOnly() const

    Returns whether the group membership is view-only.

    [override virtual, since Esri::ArcGISRuntime 100.13] void PortalGroup::load()

    Reimplements: Loadable::load().

    Loads the metadata for the object asynchronously.

    Loads the metadata if the object is not loaded

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::Error PortalGroup::loadError() const

    Reimplements: Loadable::loadError() const.

    Returns the load error.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also Error.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::LoadStatus PortalGroup::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    Returns the load status.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also LoadStatus.

    QDateTime PortalGroup::modified() const

    Returns the date the group was last modified.

    Always a Gregorian calendar using UTC time zone and English locale.

    QString PortalGroup::owner() const

    Returns the username of the owner of the group.

    QString PortalGroup::phone() const

    Returns the telephone number of the group.

    Esri::ArcGISRuntime::Portal *PortalGroup::portal() const

    Returns the portal this group belongs to.

    [override virtual, since Esri::ArcGISRuntime 100.13] void PortalGroup::retryLoad()

    Reimplements: Loadable::retryLoad().

    Loads or retries loading metadata for the object asynchronously.

    Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    QString PortalGroup::snippet() const

    Returns the summary description snippet for this group.

    Esri::ArcGISRuntime::PortalGroupSortField PortalGroup::sortField() const

    Returns the field that items in this group are sorted by.

    Esri::ArcGISRuntime::PortalQuerySortOrder PortalGroup::sortOrder() const

    Returns the sort order for items in this group.

    QStringList PortalGroup::tags() const

    Returns the user-defined tags that describe the group.

    Queries can use the tags field to find groups with particular tags.

    See also PortalQueryParametersForGroups.

    QUrl PortalGroup::thumbnailUrl() const

    Returns the URL of the thumbnail used for the group.

    All group thumbnails are relative to the URL: http://<community-url>/groups/<groupId>/info.

    QString PortalGroup::title() const

    Returns the title of the group.

    [override virtual] QString PortalGroup::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Returns the PortalGroup as a JSON string representation.

    See also JsonSerializable.

    [override virtual] QJsonObject PortalGroup::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Returns unknown data from the source JSON.

    Unknown JSON is a dictionary of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.

    See also JsonSerializable.

    [override virtual] QJsonObject PortalGroup::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Returns unsupported data from the source JSON.

    Unsupported JSON is a dictionary of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.

    See also JsonSerializable.

    QStringList PortalGroup::users() const

    Returns a list of strings representing users of the group.

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