AGSPortal is an object that represents a view for a user (anonymous or not) into a portal. www.ArcGIS.com is an example of a portal. A portal may support subscriptions which provides organizations a sandboxed area on the portal.
AGSPortal is the main class and the entry point into the API to work with portals and organization subscriptions. It implements all the operations to interface with the backend ArcGIS Portal REST API. It has a delegate AGSPortalDelegate
that is informed when each operation completes successfully or encounters an error.
Note: The API supports connecting to portals running ArcGIS Portal API version 1.6.2 or higher.
Concepts:
AGSPortalUser
), Groups (AGSPortalGroup
) and Content (AGSPortalItem
).Public Member Functions | |
(NSOperation *) | - findGroupsWithQueryParams: |
(NSOperation *) | - findItemsWithQueryParams: |
(id) | - initWithURL:credential: |
(void) | - resubmitWithURL:credential: |
Properties | |
AGSCredential * | credential |
id< AGSPortalDelegate > | delegate |
AGSPortalInfo * | portalInfo |
NSURL * | URL |
AGSPortalUser * | user |
- (NSOperation*) findGroupsWithQueryParams: | (AGSPortalQueryParams *) | queryParams |
Kicks off an operation that finds groups with query. Corresponding methods on the AGSPortalDelegate
are invoked when the operation completes successfully or if an error is encountered.
queryParams | The query parameters to find groups. |
- (NSOperation*) findItemsWithQueryParams: | (AGSPortalQueryParams *) | queryParams |
Kicks off an operation that finds items with query. Corresponding methods on the AGSPortalDelegate
are invoked when the operation completes successfully or if an error is encountered.
queryParams | The query parameters to find items. |
- (id) initWithURL: | (NSURL *) | url | ||
credential: | (AGSCredential *) | cred | ||
Instantiates the AGSPortal and initiates a connection to the portal. It will fetch the portal properties and user properties asynchronously and invoke the loaded/failed methods on AGSPortalDelegate
. It is recommended you assign a delegate to ensure that the portal loaded properly.
url | The url for the portal. Eg, www.arcgis.com | |
cred | The credential of the user. Can be Nil if anonymous access is desired. |
- (void) resubmitWithURL: | (NSURL *) | url | ||
credential: | (AGSCredential *) | cred | ||
If the portal fails to load, you can resubmit it with a different URL and/or credential. This method will do nothing if the portal is already loaded.
url | The url for the portal. | |
cred | The credential of the user. Can be Nil if anonymous access is desired. |
- (AGSCredential*) credential [read, copy] |
The credential of the user for authenticated access. Can be nil, in which case it requests for anonymous access to the portal.
Reimplemented from <AGSSecuredResource>.
- (id<AGSPortalDelegate>) delegate [read, write, assign] |
The delegate for the portal operations.
- (AGSPortalInfo*) portalInfo [read, retain] |
Returned upon successful initialization of the portal. Contains details of the portal/organization as seen by the current user, anonymous or logged in.
- (NSURL*) URL [read, retain] |
The URL of the portal.
- (AGSPortalUser*) user [read, retain] |
Represents the registered user of the portal/organization and is returned upon successful initialization of the portal with a credential.