AGSPortalItem Class Reference


Description

An AGSPortalItem is a unit of content in the AGSPortal. Each item has a unique identifier and a well- known URL that is independent of the user owning the item. An item may have associated binary or textual data which has to be fetched explicitly using fetchData (AGSPortalItem). For example, an item of type AGSPortalItemTypeMapPackage will fetch the actual bits corresponding to the map package.

The AGSPortalItem's delegate is informed whenever operations performed by the AGSPortalItem complete successfully or encounter an error.

See also:
AGSPortalItemDelegate
Since:
2.2
Inheritance diagram for AGSPortalItem:
<AGSCoding>

List of all members.

Public Member Functions

(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(NSOperation *) - fetchComments
(NSOperation *) - fetchData
(NSOperation *) - fetchThumbnail
(id) - initWithJSON:
(id) - initWithPortal:itemId:

Properties

AGSPortalAccess access
float avgRating
NSArray * comments
NSDate * created
NSString * credits
id< AGSPortalItemDelegatedelegate
AGSEnvelopeextent
NSString * itemDescription
NSString * itemId
NSString * license
NSLocale * locale
NSDate * modified
int numComments
int numRatings
int numViews
NSString * owner
AGSPortalportal
int size
NSString * snippet
AGSSpatialReferencespatialReference
NSArray * tags
UIImage * thumbnail
NSString * thumbnailFileName
NSString * title
AGSPortalItemType type

Member Function Documentation

- (void) decodeWithJSON: (NSDictionary *)  json   [optional, inherited]

Decode object from JSON representation.

Parameters:
json The JSON representation of the object to be decoded.
Since:
1.0
- (NSDictionary *) encodeToJSON   [optional, inherited]

Encode and return JSON representation for object.

Returns:
JSON representation of object.
Since:
1.0
- (NSOperation*) fetchComments  

Kicks off an operation that fetches the comments for the item. The corresponding methods on AGSPortalItemDelegate are invoked when the operation completes successfully or encounters an error.

Since:
2.2
- (NSOperation*) fetchData  

Kicks off an operation that fetches raw bytes for the item. The corresponding methods on AGSPortalItemDelegate are invoked when the operation completes successfully or encounters an error.

Since:
2.2
- (NSOperation*) fetchThumbnail  

Kicks off an operation that fetches the thumbnail for the item. The corresponding methods on AGSPortalItemDelegate are invoked when the operation completes successfully or encounters an error.

Since:
2.2
- (id) initWithJSON: (NSDictionary *)  json   [optional, inherited]

Initialize and return object from JSON representation.

Parameters:
json The JSON representation of the object to be created.
Returns:
Object decoded from JSON representation.
Since:
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (id) initWithPortal: (AGSPortal *)  portal
itemId: (NSString *)  itemId 

Initializes a portal item with a portal and item id.

Parameters:
portal The portal to which the item may belong to.
itemId The Id of the item.
Since:
2.2

Property Documentation

- (AGSPortalAccess) access [read, assign]

Indicates who can access this item. Can be AGSPortalAccessPrivate, AGSPortalAccessShared, AGSPortalAccessOrganization, or AGSPortalAccessPublic.

If AGSPortalAccessPrivate, only the item owner can access. AGSPortalAccessShared allows access to members of a group that the item is shared with . AGSPortalAccessOrganization restricts item access to members of an organization. If AGSPortalAccessPublic, all users can access the item.

Since:
2.2
- (float) avgRating [read, assign]

Average rating of the item.

Since:
2.2
- (NSArray*) comments [read, retain]

Array of comments (AGSPortalItemComment) of the item. These need to be fetched explicitly using fetchComments.

Since:
2.2
- (NSDate*) created [read, retain]

Date on which the item was first uploaded.

Since:
2.2
- (NSString*) credits [read, retain]

The access information about the item.

Since:
2.2
- (id<AGSPortalItemDelegate>) delegate [read, write, assign]

The delegate for the portal item operations.

Since:
2.2
- (AGSEnvelope*) extent [read, retain]

The default extent of the item. Only applicable to certain item types.

Since:
2.2
- (NSString*) itemDescription [read, retain]

The description of the item, if any.

Since:
2.2
- (NSString*) itemId [read, retain]

The Id of the item.

Since:
2.2
- (NSString*) license [read, retain]

Information about licenses or restrictions to view or edit the item.

Since:
2.2
- (NSLocale*) locale [read, retain]

The item's language and country information.

Since:
2.2
- (NSDate*) modified [read, retain]

Date on which the item was modified.

Since:
2.2
- (int) numComments [read, assign]

The number of comments on the item.

Since:
2.2
- (int) numRatings [read, assign]

The number of ratings made by the users on the item.

Since:
2.2
- (int) numViews [read, assign]

Number of times a file item type is downloaded for the first time or a text item type is opened. For a URL item type, the numViews property increases the first time a service is opened.

Since:
2.2
- (NSString*) owner [read, retain]

The user who created the item.

Since:
2.2
- (AGSPortal*) portal [read, retain]

The portal that the item belogs to.

Since:
2.2
- (int) size [read, assign]

The size of the item in kilobytes.

Since:
2.2
- (NSString*) snippet [read, retain]

Snippet or summary of the item with a character limit of 250 characters.

Since:
2.2
- (AGSSpatialReference*) spatialReference [read, retain]

The spatial reference of the item. Only applicable to certain item types.

Since:
2.2
- (NSArray*) tags [read, retain]

Words or short phrases that describe the item.

Since:
2.2
- (UIImage*) thumbnail [read, retain]

The thumbnail image of the item. This needs to be fetched explicitly using fetchThumbnail.

Since:
2.2
- (NSString*) thumbnailFileName [read, retain]

The name of the thumbnail image of the item.

Since:
2.2
- (NSString*) title [read, retain]

Title of the item.

Since:
2.2
- (AGSPortalItemType) type [read, assign]

The type of the item.

Since:
2.2