ArcGIS Runtime SDK for iOS: AGSPortalUser.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSPortalUser.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 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 #import <ArcGIS/AGSCancelable.h>
33 
34 
35 
40 typedef NS_ENUM(NSInteger, AGSPortalUserRole) {
45 } ;
46 
47 @class AGSPortal;
48 @class AGSPortalFolder;
49 @class AGSPortalGroup;
50 @class AGSPortalItem;
51 @class AGSLoadableImage;
53 @class AGSPortalPrivilege;
54 
70 
71 #pragma mark -
72 #pragma mark initializers
73 
74 
75 
81 -(instancetype)initWithPortal:(AGSPortal*)portal username:(NSString*)username;
82 
88 +(nullable AGSPortalUser *)fromJSON:(id)JSONObject withPortal:(AGSPortal*)portal error:(NSError**)error;
89 
90 #pragma mark -
91 #pragma mark properties
92 
97 @property (nullable, nonatomic, weak, readonly) AGSPortal *portal;
98 
102 @property (nullable, nonatomic, copy, readonly) NSString *username;
103 
107 @property (nullable, nonatomic, copy, readonly) NSString *fullName;
108 
112 @property (nullable, nonatomic, copy, readonly) NSString *userDescription;
113 
117 @property (nullable, nonatomic, copy, readonly) NSString *email;
118 
122 @property (nullable, nonatomic, copy, readonly) NSString *organizationID;
123 
127 @property (nullable, nonatomic, copy, readonly) NSArray<NSString*> *tags;
128 
132 @property (nullable, nonatomic, copy, readonly) NSArray<AGSPortalGroup*> *groups;
133 
140 @property (nonatomic, assign, readonly) AGSPortalAccess access;
141 
145 @property (nullable, nonatomic, strong, readonly) NSDate *created;
146 
150 @property (nullable, nonatomic, strong, readonly) NSDate *modified;
151 
155 @property (nonatomic, assign, readonly) AGSPortalUserRole role;
156 
160 @property (nullable, nonatomic, copy, readonly) NSString *favoritesGroupID;
161 
165 @property (nonatomic, assign, readonly) AGSUnitSystem units;
166 
173 @property (nullable, nonatomic, strong, readonly) AGSLoadableImage *thumbnail;
174 
178 @property (nullable, nonatomic, copy, readonly) NSArray<AGSPortalPrivilege*> *privileges;
179 
180 #pragma mark -
181 #pragma mark methods
182 
188 -(id<AGSCancelable>)fetchContentWithCompletion:(void(^)(NSArray<AGSPortalItem*> * __nullable items, NSArray<AGSPortalFolder*> * __nullable folders, NSError * __nullable error))completion;
189 
196 -(id<AGSCancelable>)fetchContentInFolder:(nullable NSString*)folderID completion:(void(^)(NSArray<AGSPortalItem*> * __nullable items, NSError * __nullable error))completion;
197 
204 -(id<AGSCancelable>)addToFavorites:(AGSPortalItem *)item completion:(nullable void(^)(NSError * __nullable error))completion;
205 
212 -(id<AGSCancelable>)removeFromFavorites:(AGSPortalItem *)item completion:(nullable void(^)(NSError * __nullable error))completion;
213 
220 -(id<AGSCancelable>)fetchFavoriteStatus:(AGSPortalItem *)item completion:(void(^)(BOOL isFavorite, NSError * __nullable error))completion;
221 
231 -(id<AGSCancelable>)createFolder:(NSString *)title
232  completion:(nullable void(^)(AGSPortalFolder * __nullable folder, NSError * __nullable error))completion;
233 
243 -(id<AGSCancelable>)deleteFolder:(AGSPortalFolder *)folder completion:(nullable void(^)(NSError * __nullable error))completion;
244 
253 -(id<AGSCancelable>)deletePortalItem:(AGSPortalItem*)portalItem completion:(nullable void(^)(NSError * __nullable error))completion;
254 
266 -(id<AGSCancelable>)addPortalItem:(AGSPortalItem *)portalItem
267  withContentParameters:(nullable AGSPortalItemContentParameters *)contentParameters
268  toFolder:(nullable AGSPortalFolder *)folder
269  completion:(nullable void(^)(NSError * __nullable error))completion;
270 
280 -(id<AGSCancelable>)movePortalItem:(AGSPortalItem *)portalItem
281  toFolder:(nullable AGSPortalFolder *)folder
282  completion:(nullable void(^)(NSError * __nullable error))completion;
283 
295 -(id<AGSCancelable>)movePortalItems:(NSArray<AGSPortalItem*> *)portalItems
296  toFolder:(nullable AGSPortalFolder *)folder
297  completion:(nullable void(^)(NSDictionary<NSString*,NSError*> * __nullable moveErrors, NSError * __nullable error))completion;
298 
299 @end
300 
301 
AGSPortalAccess
Definition: AGSPortalTypes.h:269
AGSPortalUserRole
Definition: AGSPortalUser.h:40
@ AGSPortalUserRolePublisher
Definition: AGSPortalUser.h:43
@ AGSPortalUserRoleUnknown
Definition: AGSPortalUser.h:41
@ AGSPortalUserRoleUser
Definition: AGSPortalUser.h:42
@ AGSPortalUserRoleAdmin
Definition: AGSPortalUser.h:44
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
Represents a group within the Portal or Organization.
Definition: AGSPortalGroup.h:64
An object representing a portal for ArcGIS.
Definition: AGSPortal.h:98
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:164
An object representing a registered user of the portal or organization.
Definition: AGSPortalUser.h:69
AGSUnitSystem units
Definition: AGSPortalUser.h:165
NSString * email
Definition: AGSPortalUser.h:117
NSDate * created
Definition: AGSPortalUser.h:145
NSDate * modified
Definition: AGSPortalUser.h:150
NSString * organizationID
Definition: AGSPortalUser.h:122
NSArray< NSString * > * tags
Definition: AGSPortalUser.h:127
AGSPortalAccess access
Definition: AGSPortalUser.h:140
NSString * userDescription
Definition: AGSPortalUser.h:112
NSString * fullName
Definition: AGSPortalUser.h:107
NSString * favoritesGroupID
Definition: AGSPortalUser.h:160
NSString * username
Definition: AGSPortalUser.h:102
AGSPortal * portal
Definition: AGSPortalUser.h:97
AGSLoadableImage * thumbnail
Definition: AGSPortalUser.h:173
AGSPortalUserRole role
Definition: AGSPortalUser.h:155
NSArray< AGSPortalGroup * > * groups
Definition: AGSPortalUser.h:132
NSArray< AGSPortalPrivilege * > * privileges
Definition: AGSPortalUser.h:178
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