ArcGIS Runtime SDK for iOS
100.15
|
Represents a group within the Portal or Organization.
An Instance of this class resource represents a group within the Portal or Organization. The owner is automatically an administrator and is returned in the list of admins. Adminstrators can invite, add to or remove members from a group as well as update or 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.
Instance Methods | |
(void) | - cancelLoad |
(void) | - doCancelLoading |
(void) | - doStartLoading: |
(id< AGSCancelable >) | - fetchUsersWithCompletion: |
(id< AGSCancelable >) | - findItemsWithSearchParameters:completion: |
(instancetype) | - initWithPortal:groupID: |
(void) | - loadDidFinishWithError: |
(void) | - loadWithCompletion: |
(void) | - onLoadStatusChanged |
(void) | - retryLoadWithCompletion: |
(nullable id) | - toJSON: |
Class Methods | |
(nullable id< AGSJSONSerializable >) | + fromJSON:error: |
(nullable AGSPortalGroup *) | + fromJSON:withPortal:error: |
(instancetype) | + portalGroupWithPortal:groupID: |
Properties | |
AGSPortalAccess | access |
NSArray< NSString * > * | admins |
NSDate * | created |
NSString * | groupDescription |
NSString * | groupID |
BOOL | invitationOnly |
NSError * | loadError |
AGSLoadStatus | loadStatus |
NSDate * | modified |
NSString * | owner |
NSString * | phone |
AGSPortal * | portal |
NSString * | snippet |
AGSPortalGroupSortField | sortField |
AGSPortalQuerySortOrder | sortOrder |
NSArray< NSString * > * | tags |
AGSLoadableImage * | thumbnail |
NSString * | title |
NSDictionary< NSString *, id > * | unknownJSON |
NSDictionary< NSString *, id > * | unsupportedJSON |
NSArray< NSString * > * | users |
BOOL | viewOnly |
|
requiredinherited |
Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion:
or retryLoadWithCompletion:
to complete and this will call them all back with the error of NSUserCancelledError
- (void) doCancelLoading |
Never call this method directly. The framework calls this method on a background thread when cancelLoad (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to cancel loading their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
at the end passing in an error representing NSUserCancelledError
.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) doStartLoading: | (BOOL) | retrying |
Never call this method directly. The framework calls this method on a background thread when loadWithCompletion: (AGSLoadable-p)
or retryLoadWithCompletion: (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to load their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
upon completion, passing in the error if any.
retrying | flag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p) . |
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (id<AGSCancelable>) fetchUsersWithCompletion: | (nullable void(^)(NSArray< NSString * > *__nullable users, NSArray< NSString * > *__nullable admins, NSError *__nullable error)) | completion |
Kicks off an operation to fetch users and admins of the group. The completion block is invoked when the operation completes successfully or if an error is encountered. When completed, the admins
and users
properties will be populated.
completion | block that is invoked when operation finishes |
- (id<AGSCancelable>) findItemsWithSearchParameters: | (AGSPortalGroupContentSearchParameters *) | parameters | |
completion: | (void(^)(AGSPortalGroupContentSearchResultSet *__nullable result, NSError *__nullable error)) | completion | |
Finds portal items that belong to this group and match the given search parameters This method uses a Group Content Search operation that's designed specifically for finding items that belong to a group. It differs from the findItemsWithQueryParameters:completion: (AGSPortal)
method which uses a general-purpose Search operation that's suitable for searching all items stored on a portal.
The behavior of this method differs from the findItemsWithQueryParameters:completion: (AGSPortal)
method in the following ways:
AGSPortalGroupContentSearchParameters::categories
property is used, the categories specified there will be matched with group categories that have been specified by the group owner/administrator, as opposed to the organization-level categories that the general-purpose Search operation matches against.AGSPortalGroupContentSearchParameters::sortField
option is available, "added", to sort the results based on the time the items were added to the group.It's not necessary to load the AGSPortalGroup
before calling this method.
parameters | the search parameters |
completion | Block that is invoked when the operation finishes. The #result parameter is populated if the operation completed successfully, otherwise the #error parameter is populated. |
|
staticrequiredinherited |
Initializes and returns an object from its JSON representation.
JSONObject | NSDictionary or NSArray containing the JSON. |
error | encountered during the operation, if any. |
+ (nullable AGSPortalGroup *) fromJSON: | (id) | JSONObject | |
withPortal: | (AGSPortal *) | portal | |
error: | (NSError **) | error | |
Initialize a portal group with JSON content to represent an existing group in the portal.
JSONObject | representing the JSON content of the group |
portal | The portal to which the group belongs to. |
- (instancetype) initWithPortal: | (AGSPortal *) | portal | |
groupID: | (NSString *) | groupID | |
Creates a portal group object for a specified portal and a specified group ID.
portal | The portal to which the group belongs to. |
groupID | The ID of the existing group in the portal. |
- (void) loadDidFinishWithError: | (nullable NSError *) | error |
Only subclasses should call this method in doStartLoading: (AGSLoadableBase(ForSubclassEyesOnly))
and doCancelLoading (AGSLoadableBase(ForSubclassEyesOnly))
when done loading or failed to load.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
requiredinherited |
Loads data for the object asynchronously. The completion block is invoked upon completion.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad
to cancel loading - retryLoadWithCompletion:
to force reload - (void) onLoadStatusChanged |
Never call this method directly. The framework calls this method on a background thread when AGSLoadable::loadStatus
changes is called. Subclasses can optionally implement this to know when their loading status has changed.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
+ (instancetype) portalGroupWithPortal: | (AGSPortal *) | portal | |
groupID: | (NSString *) | groupID | |
Creates a portal group object for a specified portal and a specified group ID.
portal | The portal to which the group belongs to. |
groupID | The ID of the existing group in the portal. |
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad
and then this methodIf the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
|
requiredinherited |
Returns JSON representation for this object.
error | encountered during the operation, if any. |
NSDictionary
or NSArray
containing the JSON. Reimplemented in AGSPortalItem.
|
readnonatomicassign |
Determines who can access the group's conent. Can be either AGSPortalAccessPrivate
, AGSPortalAccessOrganization
, or AGSPortalAccessPublic
.
AGSPortalAccessPrivate
implies only members of the group have access. AGSPortalAccessOrganization
implies all members of the organization have access regardless of whether they are members of the group. AGSPortalAccessPublic
implies everyone has access.
|
readnonatomiccopy |
Array of strings representing admin users of the group. These need to be fetched explicitly using fetchUsersWithCompletion:
|
readnonatomicstrong |
The date on which the group was created.
|
readnonatomiccopy |
The description of the group, if exists.
|
readnonatomiccopy |
Id of the group.
|
readnonatomicassign |
If YES, this group will not accept join requests. Else, this group does not require an invitation to join. Only group owners and admins can invite users to the group.
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readnonatomicstrong |
The date on which the group was modified.
|
readnonatomiccopy |
The user who created the group.
|
readnonatomiccopy |
The contact information for the group.
|
readnonatomicweak |
The portal that the group belongs to. Needs to be optional because it's a weak reference.
|
readnonatomiccopy |
Snippet or summary of the group with a character limit of 250 characters.
|
readnonatomicassign |
Determines the sort field for the group's content. Can be either AGSPortalGroupSortFieldTitle
, AGSPortalGroupSortFieldOwner
, AGSPortalGroupSortFieldAvgRating
, AGSPortalGroupSortFieldNumViews
, AGSPortalGroupSortFieldCreated
, or AGSPortalGroupSortFieldModified
.
|
readnonatomicassign |
Determines the sort order for the group's content. Can be either AGSPortalQuerySortOrderAscending
or AGSPortalQuerySortOrderDescending
.
|
readnonatomiccopy |
Words or short phrases that describe the group.
|
readnonatomicstrong |
The thumbnail image of the group.
If it is nil, there is no group thumbnail. Otherwise, the image needs to be loaded asynchronously by calling loadWithCompletion: (AGSLoadable-p)
|
readnonatomiccopy |
The group title.
|
readrequirednonatomiccopyinherited |
A dictionary of values that was in the source JSON but was unparsed by API.
NSDictionary
containing the unknown JSON.
|
readnonatomiccopyinherited |
A dictionary of values that are supported by the REST API, but not exposed through the SDK API.
NSDictionary
containing the unsupported JSON.
|
readnonatomiccopy |
Array of strings representing users of the group. These need to be fetched explicitly using fetchUsersWithCompletion:
|
readnonatomicassign |
Determines whether the group is 'view only' or not. Users cannot share items with 'view only' groups.