Inherits from NSObject
Declared in NetmeraContent.h
NetmeraContent.m

Overview

The NetmeraContent object is used to run CRUD operations over the data.

After creating object use add method to fill data and call create method to add data into cloud.

\

Tasks

Properties

createDate

Create date of the NetmeraContent object

@property (readonly) NSString *createDate

Discussion

Create date of the NetmeraContent object

Declared In

NetmeraContent.h

objectName

Name of the content

@property (readonly) NSString *objectName

Discussion

Name of the content

Declared In

NetmeraContent.h

path

Path to the content

@property (nonatomic, retain) NSString *path

Discussion

Path to the content

Declared In

NetmeraContent.h

updateDate

Update date of the NetmeraContent object

@property (readonly) NSString *updateDate

Discussion

Update date of the NetmeraContent object

Declared In

NetmeraContent.h

Instance Methods

add:object:

Adds key,value pairs into the object. If the object contains key, the old value is replaced.

- (void)add:(NSString *)key object:(NSObject *)value

Parameters

key

key to identify specified value.

value

value associates with the specified key. This value can be one of these classes instance;

NSString

NSNumber

NSDate

NSData

NSDictionary – members must be one of the above instance

NSArray – members must be one of the above instance

NetmeraGeoLocation

NetmeraMedia

NetmeraUser

Discussion

Adds key,value pairs into the object. If the object contains key, the old value is replaced.

Warning: Raises an exception if value is not an object that NSDictionary accepts.

Declared In

NetmeraContent.h

addBool:object:

Adds key,value pairs into the object. If the object contains key, the old value is replaced.

- (void)addBool:(NSString *)key object:(BOOL)value

Parameters

key

key to identify specified value

value

BOOL value associates with the specified key

Discussion

Adds key,value pairs into the object. If the object contains key, the old value is replaced.

Warning: Raises an exception if value is not an object that NSDictionary accepts.

Declared In

NetmeraContent.h

create:

Adds data to the cloud.

- (BOOL)create:(NSError **)error

Parameters

error

if it cannot access server

Discussion

Adds data to the cloud.

Declared In

NetmeraContent.h

createInBackground

Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.

- (void)createInBackground

Discussion

Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.

Declared In

NetmeraContent.h

createInBackgroundWithBlock:

Adds data to the cloud in the background thread and executes the given callback block. Since it runs on the background thread it does not block program.It is recommended over create method.

- (void)createInBackgroundWithBlock:(void ( ^ ) ( NetmeraContent *content , NSError *error ))block

Parameters

block

The block to execute. The block should have the following argument signature: (NetmeraContent content, NSError error)

Discussion

Adds data to the cloud in the background thread and executes the given callback block. Since it runs on the background thread it does not block program.It is recommended over create method.

Declared In

NetmeraContent.h

createInBackgroundWithTarget:selector:

Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.

- (void)createInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

target

The object to call selector on.

selector

The selector to call. It should have the following signature: (void) callBackCreateWithContent:(NetmeraContent )content error:(NSError )error. error will be nil on success and set if there was an error. content will be the new creates NetmeraContent object.

Discussion

Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.

Declared In

NetmeraContent.h

delete:

Deletes data from the cloud.

- (BOOL)delete:(NSError **)error

Parameters

error

if it cannot access server

Discussion

Deletes data from the cloud.

Warning: Before calling this method path of the data should be setted

Declared In

NetmeraContent.h

deleteInBackground

Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.

- (void)deleteInBackground

Discussion

Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.

Warning: Before calling this method path of the data should be setted

Declared In

NetmeraContent.h

deleteInBackgroundWithBlock:

Deletes data from the cloud in the background thread and executes.Since it runs on the background thread it does not block program.It is recommended over delete method.

- (void)deleteInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))block

Parameters

block

The block to execute. The block should have the following argument signature: (NSError *error)

Discussion

Deletes data from the cloud in the background thread and executes.Since it runs on the background thread it does not block program.It is recommended over delete method.

Warning: Before calling this method path of the data should be setted

Declared In

NetmeraContent.h

deleteInBackgroundWithTarget:selector:

Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.

- (void)deleteInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

target

The target on which the selector will be called.

selector

The selector to call. It should have the following signature: (void) callBackDeleteWithError:(NSError *)error. error will be nil on success and set if there was an error.

Discussion

Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.

Warning: Before calling this method path of the data should be setted

Declared In

NetmeraContent.h

get:

Gets the NSObject with the specified key.

- (NSObject *)get:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NSObject with the specified key.If the object type is not NSObject or key does not exists then it returns nil.

Discussion

Gets the NSObject with the specified key.

Declared In

NetmeraContent.h

getBool:

Gets the boolean value with the specified key.

- (BOOL)getBool:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the boolean value with the specified key.If value is a boolean or key does not exists then it returns false.

Discussion

Gets the boolean value with the specified key.

Declared In

NetmeraContent.h

getDictionary:

Gets the NSDictionary object with the specified key.

- (NSDictionary *)getDictionary:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NSDictionary object with the specified key.If the object type is not an NSDictionary or key does not exists then it returns nil.

Discussion

Gets the NSDictionary object with the specified key.

Declared In

NetmeraContent.h

getDictionaryArray:

Gets the NSArray object with the specified key.

- (NSArray *)getDictionaryArray:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NSArray object with the specified key.If the object type is not an NSArray or key does not exists then it returns nil.

Discussion

Gets the NSArray object with the specified key.

Declared In

NetmeraContent.h

getDouble:

Gets the double value with the specified key.

- (double)getDouble:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the double value with the specified key.If value is not a double or key does not exists then it returns 0.0.

Discussion

Gets the double value with the specified key.

Declared In

NetmeraContent.h

getInt:

Gets the int value with the specified key.

- (int)getInt:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the int value with the specified key.If value is not an integer or key does not exists then it returns 0.

Discussion

Gets the int value with the specified key.

Declared In

NetmeraContent.h

getLong:

Gets the long value with the specified key.

- (long)getLong:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the long value with the specified key.If value is not a long or key does not exists then it returns 0.

Discussion

Gets the long value with the specified key.

Declared In

NetmeraContent.h

getNetmeraGeoLocation:

Gets the NetmeraGeoLocation object with the specified key.

- (NetmeraGeoLocation *)getNetmeraGeoLocation:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NetmeraGeoLocation object with the specified key.If the object type is not an NetmeraGeoLocation or key does not exists then it returns nil.

Discussion

Gets the NetmeraGeoLocation object with the specified key.

Declared In

NetmeraContent.h

getNetmeraMedia:

Gets the NetmeraMedia object with the specified key.

- (NetmeraMedia *)getNetmeraMedia:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NetmeraMedia object with the specified key.If the object type is not an NetmeraMedia or key does not exists then it returns null.

Discussion

Gets the NetmeraMedia object with the specified key.

Declared In

NetmeraContent.h

getNetmeraUser:

Gets the NetmeraUser object with the specified key.

- (NetmeraUser *)getNetmeraUser:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NetmeraUser object with the specified key.If the object type is not an NetmeraUser or key does not exists then it returns null.

Discussion

Gets the NetmeraUser object with the specified key.

Declared In

NetmeraContent.h

getString:

Gets the NSString object with the specified key.

- (NSString *)getString:(NSString *)key

Parameters

key

key to get value

Return Value

Returns the NSString with the specified key.If the object type is not NSString or key does not exists then it returns nil.

Discussion

Gets the NSString object with the specified key.

Declared In

NetmeraContent.h

initWithObjectName:

Constructor that takes content name as parameter.

- (NetmeraContent *)initWithObjectName:(NSString *)objectName

Parameters

objectName

Name of the content

Discussion

Constructor that takes content name as parameter.

Declared In

NetmeraContent.h

setOwner:

Set the owner of this content. If it is generic content then do not call setOwner: method.

- (void)setOwner:(NetmeraUser *)user

Parameters

user

Owner of the content

Discussion

Set the owner of this content. If it is generic content then do not call setOwner: method.

Declared In

NetmeraContent.h

update:

Updates data

- (BOOL)update:(NSError **)error

Parameters

error

if it cannot access server

Discussion

Updates data

Declared In

NetmeraContent.h

updateInBackgroundWithBlock:

Updates data in the background thread and executes. Since it runs on the background thread it does not block program.It is recommended over update method.

- (void)updateInBackgroundWithBlock:(void ( ^ ) ( NetmeraContent *content , NSError *error ))block

Parameters

block

The block to execute. The block should have the following argument signature: (NetmeraContent content, NSError error)

Discussion

Updates data in the background thread and executes. Since it runs on the background thread it does not block program.It is recommended over update method.

Declared In

NetmeraContent.h

updateInBackgroundWithTarget:selector:

Updates data in the background thread. Since it runs on the background thread it does not block program.It is recommended over update method.

- (void)updateInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

target

The target on which the selector will be called.

selector

The selector to call. It should have the following signature: (void)callBackUpdateWithContent:(NetmeraContent )content error:(NSError )error. error will be nil on success and set if there was an error. content will be the NetmeraContent with the updated data.

Discussion

Updates data in the background thread. Since it runs on the background thread it does not block program.It is recommended over update method.

Declared In

NetmeraContent.h