FMWebSyncExtensible Class Reference

Inherits from FMDynamic : FMSerializable : NSObject
Declared in FMWebSync.h

Overview

Base class that defines the properties and methods shared by any class that is considered extensible by the Bayeux specification. The Bayeux specification defines the Ext field, which allows custom data to be stored with a message using a namespaced key to access the information. This class provides methods that store and retrieve JSON data stored in this manner. For example, the property uses the Ext field to store its value using “fm.meta” as a key. In addition, classes which inherit from can store dynamic property values for local read/write access without the need to serialize to JSON. This can aid greatly in the development of third-party extensions to WebSync. Custom information can be stored with method arguments in the “before” event and read out again for further processing in the “after” event.

– copyExtensionsWithExtensible:

Copies extension values from one instance into this instance.

- (void)copyExtensionsWithExtensible:(FMWebSyncExtensible *)extensible

Parameters

name="extensible">The

object with the extensions to copy. This instance.

Discussion

Copies extension values from one instance into this instance.

Declared In

FMWebSync.h

– extensionCount

Gets the number of extensions stored with this instance.

- (int)extensionCount

Discussion

Gets the number of extensions stored with this instance.

Declared In

FMWebSync.h

– extensionNames

Gets the names of the extensions stored with this instance.

- (NSMutableArray *)extensionNames

Discussion

Gets the names of the extensions stored with this instance.

Declared In

FMWebSync.h

– extensions

Gets the internal extensions collection.

- (FMWebSyncExtensions *)extensions

Discussion

Gets the internal extensions collection.

Declared In

FMWebSync.h

– getExtensionValueJsonWithName:

Gets a serialized value stored in the extensions.

- (NSString *)getExtensionValueJsonWithName:(NSString *)name

Parameters

name="name">Fully-qualified

extension name. The extension value in JSON format.

Discussion

Gets a serialized value stored in the extensions.

Declared In

FMWebSync.h

– init

- (id)init

Declared In

FM.h

– metaJson

Gets meta-data associated with the message/publication. Must be valid JSON. Use this property to define meta-data about the request itself, such as authentication details, etc.

- (NSString *)metaJson

Discussion

Gets meta-data associated with the message/publication. Must be valid JSON. Use this property to define meta-data about the request itself, such as authentication details, etc.

Declared In

FMWebSync.h

– setExtensions:

Sets the internal extensions collection.

- (void)setExtensions:(FMWebSyncExtensions *)value

Discussion

Sets the internal extensions collection.

Declared In

FMWebSync.h

– setExtensionValueJsonWithName:valueJson:

Stores a serialized value in the extensions. Must be valid JSON.

- (void)setExtensionValueJsonWithName:(NSString *)name valueJson:(NSString *)valueJson

Parameters

name="name">Fully-qualified

extension name.

name="valueJson">The

extension value in valid JSON format.

Discussion

Stores a serialized value in the extensions. Must be valid JSON.

Declared In

FMWebSync.h

– setExtensionValueJsonWithName:valueJson:validate:

Stores a serialized value in the extensions. Must be valid JSON.

- (void)setExtensionValueJsonWithName:(NSString *)name valueJson:(NSString *)valueJson validate:(bool)validate

Parameters

name="name">Fully-qualified

extension name.

name="valueJson">The

extension value in valid JSON format.

name="validate">Whether

or not to validate the JSON value.

Discussion

Stores a serialized value in the extensions. Must be valid JSON.

Declared In

FMWebSync.h

– setMetaJson:

Sets meta-data associated with the message/publication. Must be valid JSON. Use this property to define meta-data about the request itself, such as authentication details, etc.

- (void)setMetaJson:(NSString *)value

Discussion

Sets meta-data associated with the message/publication. Must be valid JSON. Use this property to define meta-data about the request itself, such as authentication details, etc.

Declared In

FMWebSync.h

+ sharedGetChannelsWithChannels:

Converts an array of channels to itself.

+ (NSMutableArray *)sharedGetChannelsWithChannels:(NSMutableArray *)channels

Parameters

name="channels">The

array of channels. The array of channels.

Discussion

Converts an array of channels to itself.

Declared In

FMWebSync.h

+ sharedGetChannels:

Converts an array of channels to itself.

+ (NSMutableArray *)sharedGetChannels:(NSMutableArray *)channels

Parameters

name="channels">The

array of channels. The array of channels.

Discussion

Converts an array of channels to itself.

Declared In

FMWebSync.h

+ sharedGetChannelWithChannels:

Gets the first channel from an array of channels.

+ (NSString *)sharedGetChannelWithChannels:(NSMutableArray *)channels

Parameters

name="channels">The

channels to scan. The first channel.

Discussion

Gets the first channel from an array of channels.

Declared In

FMWebSync.h

+ sharedGetKeysWithRecords:

Converts an array of records to an array of keys.

+ (NSMutableArray *)sharedGetKeysWithRecords:(NSMutableArray *)records

Parameters

name="records">The

array of records. The array of keys.

Discussion

Converts an array of records to an array of keys.

Declared In

FMWebSync.h

+ sharedGetKeyWithRecords:

Gets the first key from an array of records.

+ (NSString *)sharedGetKeyWithRecords:(NSMutableArray *)records

Parameters

name="records">The

records to scan. The first key.

Discussion

Gets the first key from an array of records.

Declared In

FMWebSync.h

+ sharedGetRecordsWithRecords:

Converts an array of records to itself.

+ (NSMutableArray *)sharedGetRecordsWithRecords:(NSMutableArray *)records

Parameters

name="records">The

array of records. The array of records.

Discussion

Converts an array of records to itself.

Declared In

FMWebSync.h

+ sharedGetRecords:

Converts an array of records to itself.

+ (NSMutableArray *)sharedGetRecords:(NSMutableArray *)records

Parameters

name="records">The

array of records. The array of records.

Discussion

Converts an array of records to itself.

Declared In

FMWebSync.h

+ sharedGetRecordWithRecords:

Gets the first record from an array of records.

+ (FMWebSyncRecord *)sharedGetRecordWithRecords:(NSMutableArray *)records

Parameters

name="records">The

records to scan. The first record.

Discussion

Gets the first record from an array of records.

Declared In

FMWebSync.h

+ sharedSetChannelsWithChannels:

Converts an array of channels to an array of validated channels.

+ (NSMutableArray *)sharedSetChannelsWithChannels:(NSMutableArray *)channels

Parameters

name="channels">The

array of channels. The array of validated channels.

Discussion

Converts an array of channels to an array of validated channels.

Declared In

FMWebSync.h

+ sharedSetChannels:

Converts an array of channels to an array of validated channels.

+ (NSMutableArray *)sharedSetChannels:(NSMutableArray *)channels

Parameters

name="channels">The

array of channels. The array of validated channels.

Discussion

Converts an array of channels to an array of validated channels.

Declared In

FMWebSync.h

+ sharedSetChannelsWithChannels:validate:

Converts an array of channels to an array of validated channels.

+ (NSMutableArray *)sharedSetChannelsWithChannels:(NSMutableArray *)channels validate:(bool)validate

Parameters

name="channels">The

array of channels.

name="validate">Whether

or not to validate the channels. The array of validated channels.

Discussion

Converts an array of channels to an array of validated channels.

Declared In

FMWebSync.h

+ sharedSetChannels:validate:

Converts an array of channels to an array of validated channels.

+ (NSMutableArray *)sharedSetChannels:(NSMutableArray *)channels validate:(bool)validate

Parameters

name="channels">The

array of channels.

name="validate">Whether

or not to validate the channels. The array of validated channels.

Discussion

Converts an array of channels to an array of validated channels.

Declared In

FMWebSync.h

+ sharedSetChannelWithChannel:

Converts a channel to a validated channel array.

+ (NSMutableArray *)sharedSetChannelWithChannel:(NSString *)channel

Parameters

name="channel">The

channel to convert. The validated channel array.

Discussion

Converts a channel to a validated channel array.

Declared In

FMWebSync.h

+ sharedSetChannel:

Converts a channel to a validated channel array.

+ (NSMutableArray *)sharedSetChannel:(NSString *)channel

Parameters

name="channel">The

channel to convert. The validated channel array.

Discussion

Converts a channel to a validated channel array.

Declared In

FMWebSync.h

+ sharedSetChannelWithChannel:validate:

Converts a channel to a validated channel array.

+ (NSMutableArray *)sharedSetChannelWithChannel:(NSString *)channel validate:(bool)validate

Parameters

name="channel">The

channel to convert.

name="validate">Whether

or not to validate the channel. The validated channel array.

Discussion

Converts a channel to a validated channel array.

Declared In

FMWebSync.h

+ sharedSetChannel:validate:

Converts a channel to a validated channel array.

+ (NSMutableArray *)sharedSetChannel:(NSString *)channel validate:(bool)validate

Parameters

name="channel">The

channel to convert.

name="validate">Whether

or not to validate the channel. The validated channel array.

Discussion

Converts a channel to a validated channel array.

Declared In

FMWebSync.h

+ sharedSetKeysWithKeys:

Converts an array of keys to an array of validated records.

+ (NSMutableArray *)sharedSetKeysWithKeys:(NSMutableArray *)keys

Parameters

name="keys">The

array of keys. The array of records.

Discussion

Converts an array of keys to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetKeys:

Converts an array of keys to an array of validated records.

+ (NSMutableArray *)sharedSetKeys:(NSMutableArray *)keys

Parameters

name="keys">The

array of keys. The array of records.

Discussion

Converts an array of keys to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetKeysWithKeys:validate:

Converts an array of keys to an array of validated records.

+ (NSMutableArray *)sharedSetKeysWithKeys:(NSMutableArray *)keys validate:(bool)validate

Parameters

name="validate">Whether

or not to validate the records. The array of records.

name="keys">The

array of keys.

Discussion

Converts an array of keys to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetKeys:validate:

Converts an array of keys to an array of validated records.

+ (NSMutableArray *)sharedSetKeys:(NSMutableArray *)keys validate:(bool)validate

Parameters

name="validate">Whether

or not to validate the records. The array of records.

name="keys">The

array of keys.

Discussion

Converts an array of keys to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetKeyWithKey:

Converts a key to a validated record array.

+ (NSMutableArray *)sharedSetKeyWithKey:(NSString *)key

Parameters

name="key">The

key to convert. The validated record array.

Discussion

Converts a key to a validated record array.

Declared In

FMWebSync.h

+ sharedSetKey:

Converts a key to a validated record array.

+ (NSMutableArray *)sharedSetKey:(NSString *)key

Parameters

name="key">The

key to convert. The validated record array.

Discussion

Converts a key to a validated record array.

Declared In

FMWebSync.h

+ sharedSetKeyWithKey:validate:

Converts a key to a validated record array.

+ (NSMutableArray *)sharedSetKeyWithKey:(NSString *)key validate:(bool)validate

Parameters

name="validate">Whether

or not to validate the record. The validated record array.

name="key">The

key to convert.

Discussion

Converts a key to a validated record array.

Declared In

FMWebSync.h

+ sharedSetKey:validate:

Converts a key to a validated record array.

+ (NSMutableArray *)sharedSetKey:(NSString *)key validate:(bool)validate

Parameters

name="validate">Whether

or not to validate the record. The validated record array.

name="key">The

key to convert.

Discussion

Converts a key to a validated record array.

Declared In

FMWebSync.h

+ sharedSetRecordsWithRecords:

Converts an array of records to an array of validated records.

+ (NSMutableArray *)sharedSetRecordsWithRecords:(NSMutableArray *)records

Parameters

name="records">The

array of records. The array of validated records.

Discussion

Converts an array of records to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetRecords:

Converts an array of records to an array of validated records.

+ (NSMutableArray *)sharedSetRecords:(NSMutableArray *)records

Parameters

name="records">The

array of records. The array of validated records.

Discussion

Converts an array of records to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetRecordsWithRecords:validate:

Converts an array of records to an array of validated records.

+ (NSMutableArray *)sharedSetRecordsWithRecords:(NSMutableArray *)records validate:(bool)validate

Parameters

name="records">The

array of records.

name="validate">Whether

or not to validate the records. The array of validated records.

Discussion

Converts an array of records to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetRecords:validate:

Converts an array of records to an array of validated records.

+ (NSMutableArray *)sharedSetRecords:(NSMutableArray *)records validate:(bool)validate

Parameters

name="records">The

array of records.

name="validate">Whether

or not to validate the records. The array of validated records.

Discussion

Converts an array of records to an array of validated records.

Declared In

FMWebSync.h

+ sharedSetRecordWithRecord:

Converts a record to a validated record array.

+ (NSMutableArray *)sharedSetRecordWithRecord:(FMWebSyncRecord *)record

Parameters

name="record">The

record to convert. The validated record array.

Discussion

Converts a record to a validated record array.

Declared In

FMWebSync.h

+ sharedSetRecord:

Converts a record to a validated record array.

+ (NSMutableArray *)sharedSetRecord:(FMWebSyncRecord *)record

Parameters

name="record">The

record to convert. The validated record array.

Discussion

Converts a record to a validated record array.

Declared In

FMWebSync.h

+ sharedSetRecordWithRecord:validate:

Converts a record to a validated record array.

+ (NSMutableArray *)sharedSetRecordWithRecord:(FMWebSyncRecord *)record validate:(bool)validate

Parameters

name="record">The

record to convert.

name="validate">Whether

or not to validate the record. The validated record array.

Discussion

Converts a record to a validated record array.

Declared In

FMWebSync.h

+ sharedSetRecord:validate:

Converts a record to a validated record array.

+ (NSMutableArray *)sharedSetRecord:(FMWebSyncRecord *)record validate:(bool)validate

Parameters

name="record">The

record to convert.

name="validate">Whether

or not to validate the record. The validated record array.

Discussion

Converts a record to a validated record array.

Declared In

FMWebSync.h

+ validateChannelWithChannel:error:

Validates a channel.

+ (bool)validateChannelWithChannel:(NSString *)channel error:(NSString **)error

Parameters

name="channel">The

channel to validate.

name="error">The

error, if validation failed. true if validation succeeded; otherwise false.

Discussion

Validates a channel.

Declared In

FMWebSync.h

+ validateChannel:error:

Validates a channel.

+ (bool)validateChannel:(NSString *)channel error:(NSString **)error

Parameters

name="channel">The

channel to validate.

name="error">The

error, if validation failed. true if validation succeeded; otherwise false.

Discussion

Validates a channel.

Declared In

FMWebSync.h

+ validateRecordWithRecord:error:

Validates a record.

+ (bool)validateRecordWithRecord:(FMWebSyncRecord *)record error:(NSString **)error

Parameters

name="error">The

error, if validation failed. true if validation succeeded; otherwise false.

name="record">The

record to validate.

Discussion

Validates a record.

Declared In

FMWebSync.h

+ validateRecord:error:

Validates a record.

+ (bool)validateRecord:(FMWebSyncRecord *)record error:(NSString **)error

Parameters

name="error">The

error, if validation failed. true if validation succeeded; otherwise false.

name="record">The

record to validate.

Discussion

Validates a record.

Declared In

FMWebSync.h