ArcGIS Runtime SDK for iOS: AGSPortalUser.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSPortalUser.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSLoadableBase.h>
29 #import <ArcGIS/AGSJSONSerializable.h>
30 #import <ArcGIS/AGSPortalTypes.h>
31 #import <ArcGIS/AGSUnitSystem.h>
32 
33 
34 
39 typedef NS_ENUM(NSInteger, AGSPortalUserRole) {
44 } ;
45 
46 @class AGSPortal;
47 @class AGSLoadableImage;
49 @class AGSPortalPrivilege;
50 
51 @protocol AGSCancelable;
52 
68 
69 #pragma mark -
70 #pragma mark initializers
71 
72 
73 
79 -(instancetype)initWithPortal:(AGSPortal*)portal username:(NSString*)username;
80 
86 +(nullable AGSPortalUser *)fromJSON:(id)JSONObject withPortal:(AGSPortal*)portal error:(NSError**)error;
87 
88 #pragma mark -
89 #pragma mark properties
90 
95 @property (nullable, nonatomic, weak, readonly) AGSPortal *portal;
96 
100 @property (nullable, nonatomic, copy, readonly) NSString *username;
101 
105 @property (nullable, nonatomic, copy, readonly) NSString *fullName;
106 
110 @property (nullable, nonatomic, copy, readonly) NSString *userDescription;
111 
115 @property (nullable, nonatomic, copy, readonly) NSString *email;
116 
120 @property (nullable, nonatomic, copy, readonly) NSString *organizationID;
121 
125 @property (nullable, nonatomic, copy, readonly) NSArray<NSString*> *tags;
126 
130 @property (nullable, nonatomic, copy, readonly) NSArray<AGSPortalGroup*> *groups;
131 
138 @property (nonatomic, assign, readonly) AGSPortalAccess access;
139 
143 @property (nullable, nonatomic, strong, readonly) NSDate *created;
144 
148 @property (nullable, nonatomic, strong, readonly) NSDate *modified;
149 
153 @property (nonatomic, assign, readonly) AGSPortalUserRole role;
154 
158 @property (nullable, nonatomic, copy, readonly) NSString *favoritesGroupID;
159 
163 @property (nonatomic, assign, readonly) AGSUnitSystem units;
164 
171 @property (nullable, nonatomic, strong, readonly) AGSLoadableImage *thumbnail;
172 
176 @property (nullable, nonatomic, copy, readonly) NSArray<AGSPortalPrivilege*> *privileges;
177 
178 #pragma mark -
179 #pragma mark methods
180 
186 -(id<AGSCancelable>)fetchContentWithCompletion:(void(^)(NSArray<AGSPortalItem*> * __nullable items, NSArray<AGSPortalFolder*> * __nullable folders, NSError * __nullable error))completion;
187 
194 -(id<AGSCancelable>)fetchContentInFolder:(nullable NSString*)folderID completion:(void(^)(NSArray<AGSPortalItem*> * __nullable items, NSError * __nullable error))completion;
195 
202 -(id<AGSCancelable>)addToFavorites:(AGSPortalItem *)item completion:(nullable void(^)(NSError * __nullable error))completion;
203 
210 -(id<AGSCancelable>)removeFromFavorites:(AGSPortalItem *)item completion:(nullable void(^)(NSError * __nullable error))completion;
211 
218 -(id<AGSCancelable>)fetchFavoriteStatus:(AGSPortalItem *)item completion:(void(^)(BOOL isFavorite, NSError * __nullable error))completion;
219 
229 -(id<AGSCancelable>)createFolder:(NSString *)title
230  completion:(nullable void(^)(AGSPortalFolder * __nullable folder, NSError * __nullable error))completion;
231 
241 -(id<AGSCancelable>)deleteFolder:(AGSPortalFolder *)folder completion:(nullable void(^)(NSError * __nullable error))completion;
242 
251 -(id<AGSCancelable>)deletePortalItem:(AGSPortalItem*)portalItem completion:(nullable void(^)(NSError * __nullable error))completion;
252 
264 -(id<AGSCancelable>)addPortalItem:(AGSPortalItem *)portalItem
265  withContentParameters:(nullable AGSPortalItemContentParameters *)contentParameters
266  toFolder:(nullable AGSPortalFolder *)folder
267  completion:(nullable void(^)(NSError * __nullable error))completion;
268 
278 -(id<AGSCancelable>)movePortalItem:(AGSPortalItem *)portalItem
279  toFolder:(nullable AGSPortalFolder *)folder
280  completion:(nullable void(^)(NSError * __nullable error))completion;
281 
293 -(id<AGSCancelable>)movePortalItems:(NSArray<AGSPortalItem*> *)portalItems
294  toFolder:(nullable AGSPortalFolder *)folder
295  completion:(nullable void(^)(NSDictionary<NSString*,NSError*> * __nullable moveErrors, NSError * __nullable error))completion;
296 
297 @end
298 
299 
AGSPortalAccess
Definition: AGSPortalTypes.h:269
AGSPortalUserRole
Definition: AGSPortalUser.h:39
@ AGSPortalUserRolePublisher
Definition: AGSPortalUser.h:42
@ AGSPortalUserRoleUnknown
Definition: AGSPortalUser.h:40
@ AGSPortalUserRoleUser
Definition: AGSPortalUser.h:41
@ AGSPortalUserRoleAdmin
Definition: AGSPortalUser.h:43
AGSUnitSystem
Definition: AGSUnitSystem.h:35
A base class for loadables.
Definition: AGSLoadableBase.h:45
An image that is loaded asynchronously.
Definition: AGSLoadableImage.h:35
Represents a folder of content within the Portal or Organization.
Definition: AGSPortalFolder.h:38
An Object representing a Portal for ArcGIS.
Definition: AGSPortal.h:105
Content for a new AGSPortalItem.
Definition: AGSPortalItemContentParameters.h:37
Object representing a unit of content in an ArcGIS portal.
Definition: AGSPortalItem.h:93
Privileges of a portal user.
Definition: AGSPortalPrivilege.h:141
An object representing a registered user of the portal or organization.
Definition: AGSPortalUser.h:67
AGSUnitSystem units
Definition: AGSPortalUser.h:163
NSString * email
Definition: AGSPortalUser.h:115
NSDate * created
Definition: AGSPortalUser.h:143
NSDate * modified
Definition: AGSPortalUser.h:148
NSString * organizationID
Definition: AGSPortalUser.h:120
NSArray< NSString * > * tags
Definition: AGSPortalUser.h:125
AGSPortalAccess access
Definition: AGSPortalUser.h:138
NSString * userDescription
Definition: AGSPortalUser.h:110
NSString * fullName
Definition: AGSPortalUser.h:105
NSString * favoritesGroupID
Definition: AGSPortalUser.h:158
NSString * username
Definition: AGSPortalUser.h:100
AGSPortal * portal
Definition: AGSPortalUser.h:95
AGSLoadableImage * thumbnail
Definition: AGSPortalUser.h:171
AGSPortalUserRole role
Definition: AGSPortalUser.h:153
NSArray< AGSPortalGroup * > * groups
Definition: AGSPortalUser.h:130
NSArray< AGSPortalPrivilege * > * privileges
Definition: AGSPortalUser.h:176
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
A protocol to convert objects to and from JSON.
Definition: AGSJSONSerializable.h:38