Class NSForeignSystemAgent

Collection of all services that works with Foreign key data (Key/Value pairs)

Examples

NSForeignSystemAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSForeignSystemAgent()

Declaration

NSForeignSystemAgent

Examples

NSForeignSystemAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddDeviceByIdentifier(String,String,String)

Adds a new NSForeignDevice with deviceName that belongs to the application with applicationName, with an optional device-specific identifier.

Declaration

NSForeignDevice AddDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice res = agent.AddDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
NSForeignDevice

AddForeignKey(NSForeignKey,String,String,String)

Adds a new key belonging to the ForeignApp and NSForeignDevice specified.

Declaration

NSForeignKey AddForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey res = agent.AddForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
NSForeignKey foreignKey
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
NSForeignKey

CreateDefaultForeignAppEntity()

Sets default values into a new NSForeignAppEntity.

Declaration

NSForeignAppEntity CreateDefaultForeignAppEntity()

Examples

NSForeignSystemAgent agent;
NSForeignAppEntity thing = agent.CreateDefaultForeignAppEntity();
thing = agent.SaveForeignAppEntity(thing);

Returns

Type Description
NSForeignAppEntity

DeleteDeviceByIdentifier(String,String,String)

Deletes an NSForeignDevice with deviceName and deviceIdentifier that belongs to the application with applicationName.

Declaration

Void DeleteDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
agent.DeleteDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
Void

DeleteForeignAppEntity(Integer)

Deletes the NSForeignAppEntity

Declaration

Void DeleteForeignAppEntity(Integer foreignAppEntity)

Examples

NSForeignSystemAgent agent;
agent.DeleteForeignAppEntity(123);

Parameters

Type Name Description
Integer foreignAppEntity

Returns

Type Description
Void

DeleteForeignDevice(NSForeignDevice,String)

Deletes a foreign device from an application

Declaration

Void DeleteForeignDevice(NSForeignDevice foreignDevice, String applicationName)

Parameters

Type Name Description
NSForeignDevice foreignDevice
String applicationName

Returns

Type Description
Void

DeleteForeignKey(NSForeignKey,String,String,String,String,Integer)

Deletes all specified occurrences of a key, belonging to the ForeignApp and NSForeignDevice, table and record specified. Specifying a blank table name will delete ALL keys of the given name; specifying a recordID of 0 will delete ALL keys of the given name for the given table.

Declaration

Void DeleteForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
Integer recordId;
agent.DeleteForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier, tableName, recordId);

Parameters

Type Name Description
NSForeignKey foreignKey
String applicationName
String deviceName
String deviceIdentifier
String tableName
Integer recordId

Returns

Type Description
Void

DeleteForeignKeyOnName(String,String,String,String,String,Integer)

Deletes all specified occurrences of a key, belonging to the ForeignApp and NSForeignDevice, table and record specified. Specifying a blank table name will delete ALL keys of the given name; specifying a recordID of 0 will delete ALL keys of the given name for the given table.

Declaration

Void DeleteForeignKeyOnName(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String keyName;
String tableName;
Integer recordId;
agent.DeleteForeignKeyOnName(applicationName, deviceName, deviceIdentifier, keyName, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String keyName
String tableName
Integer recordId

Returns

Type Description
Void

GetAllForeignKeysOnEntity(String,Integer)

Gets a list of foreignkeys ('app.device.key') and their values ('123') that belong to the specified entity.

Declaration

Map GetAllForeignKeysOnEntity(String entityType, Integer entityId)

Examples

NSForeignSystemAgent agent;
String entityType;
Integer entityId;
Map res = agent.GetAllForeignKeysOnEntity(entityType, entityId);

Parameters

Type Name Description
String entityType
Integer entityId

Returns

Type Description
Map

GetAppByName(String)

Gets the ForeignApp with the given name.

Declaration

NSForeignAppEntity GetAppByName(String applicationName)

Examples

NSForeignSystemAgent agent;
String applicationName;
NSForeignAppEntity res = agent.GetAppByName(applicationName);

Parameters

Type Name Description
String applicationName

Returns

Type Description
NSForeignAppEntity

GetApplicationDevices(String)

Gets all devices that belong to a foreign application.

Declaration

NSForeignDevice[] GetApplicationDevices(String applicationName)

Examples

NSForeignSystemAgent agent;
String applicationName;
NSForeignDevice[] res = agent.GetApplicationDevices(applicationName);

Parameters

Type Name Description
String applicationName

Returns

Type Description
NSForeignDevice[]

GetApplicationKeys(String)

Returns all ForeignKeys that belong to an application.

Declaration

NSForeignKey[] GetApplicationKeys(String applicationName)

Examples

NSForeignSystemAgent agent;
String applicationName;
NSForeignKey[] res = agent.GetApplicationKeys(applicationName);

Parameters

Type Name Description
String applicationName

Returns

Type Description
NSForeignKey[] All ForeignKeys that belong to this application.

GetDeviceByIdentifier(String,String,String)

Gets an NSForeignDevice with deviceName and deviceIdentifier that belongs to the application with applicationName.

Declaration

NSForeignDevice GetDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice res = agent.GetDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
NSForeignDevice

GetDeviceByName(String,String)

Gets an NSForeignDevice with deviceName that belongs to the application with applicationName.

Declaration

NSForeignDevice GetDeviceByName(String applicationName, String deviceName)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
NSForeignDevice res = agent.GetDeviceByName(applicationName, deviceName);

Parameters

Type Name Description
String applicationName
String deviceName

Returns

Type Description
NSForeignDevice

GetDeviceKeys(String,String)

Returns all ForeignKeys that belong to a device.

Declaration

NSForeignKey[] GetDeviceKeys(String applicationName, String deviceName)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
NSForeignKey[] res = agent.GetDeviceKeys(applicationName, deviceName);

Parameters

Type Name Description
String applicationName
String deviceName

Returns

Type Description
NSForeignKey[]

GetDeviceKeysOnDeviceIdentifier(String,String,String)

Returns all ForeignKeys that belong to a device with a given deviceIdentifier.

Declaration

NSForeignKey[] GetDeviceKeysOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifier(applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
NSForeignKey[]

GetDeviceKeysOnDeviceIdentifierTable(String,String,String,String)

Returns all ForeignKeys that belong to a device with a given deviceIdentifier and table name.

Declaration

NSForeignKey[] GetDeviceKeysOnDeviceIdentifierTable(String applicationName, String deviceName, String deviceIdentifier, String tableName)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifierTable(applicationName, deviceName, deviceIdentifier, tableName);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String tableName

Returns

Type Description
NSForeignKey[]

GetDeviceKeysOnDeviceIdentifierTableRecordId(String,String,String,String,Integer)

Returns all ForeignKeys that belong to a device with a given deviceIdentifier and table name, as well as record id.

Declaration

NSForeignKey[] GetDeviceKeysOnDeviceIdentifierTableRecordId(String applicationName, String deviceName, String deviceIdentifier, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
Integer recordId;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifierTableRecordId(applicationName, deviceName, deviceIdentifier, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String tableName
Integer recordId

Returns

Type Description
NSForeignKey[]

GetForeignAppEntity(Integer)

Gets an NSForeignAppEntity object.

Declaration

NSForeignAppEntity GetForeignAppEntity(Integer foreignAppEntityId)

Examples

NSForeignSystemAgent agent;
NSForeignAppEntity thing = agent.GetForeignAppEntity(123);

Parameters

Type Name Description
Integer foreignAppEntityId

Returns

Type Description
NSForeignAppEntity

GetForeignDevice(Integer)

Gets an NSForeignDevice object.

Declaration

NSForeignDevice GetForeignDevice(Integer foreignDeviceId)

Examples

NSForeignSystemAgent agent;
NSForeignDevice thing = agent.GetForeignDevice(123);

Parameters

Type Name Description
Integer foreignDeviceId

Returns

Type Description
NSForeignDevice

GetKey(String,String,String,String,Integer)

Returns a foreign key by its key name that belongs to the specified device and application. A table name and record ID can also be specified.

Declaration

NSForeignKey GetKey(String applicationName, String deviceName, String keyName, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String tableName;
Integer recordId;
NSForeignKey res = agent.GetKey(applicationName, deviceName, keyName, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String keyName
String tableName
Integer recordId

Returns

Type Description
NSForeignKey

GetKeyByValue(String,String,String,String,String)

Gets a foreignkey based on its name and value, that belongs to the specified device and application.

Declaration

NSForeignKey GetKeyByValue(String applicationName, String deviceName, String keyName, String keyValue, String tableName)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String keyValue;
String tableName;
NSForeignKey res = agent.GetKeyByValue(applicationName, deviceName, keyName, keyValue, tableName);

Parameters

Type Name Description
String applicationName
String deviceName
String keyName
String keyValue
String tableName

Returns

Type Description
NSForeignKey

GetKeyByValueAndIdentifier(String,String,String,String,String,String)

Gets a foreignkey based on its name and value, that belongs to the specified deviceId, device, and application.

Declaration

NSForeignKey GetKeyByValueAndIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String keyValue, String tableName)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String keyName;
String keyValue;
String tableName;
NSForeignKey res = agent.GetKeyByValueAndIdentifier(applicationName, deviceName, deviceIdentifier, keyName, keyValue, tableName);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String keyName
String keyValue
String tableName

Returns

Type Description
NSForeignKey

GetKeyOnDeviceIdentifier(String,String,String,String,String,Integer)

Returns a foreign key by its key name and device identifier, that belongs to the specified device and application. A table name and record ID can also be specified.

Declaration

NSForeignKey GetKeyOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String keyName;
String tableName;
Integer recordId;
NSForeignKey res = agent.GetKeyOnDeviceIdentifier(applicationName, deviceName, deviceIdentifier, keyName, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String keyName
String tableName
Integer recordId

Returns

Type Description
NSForeignKey

GetKeyValue(String,String,String,String,Integer)

Gets the string value of an NSForeignKey, that belongs to the specified device and application. The table name and record ID must also be specified.

Declaration

String GetKeyValue(String applicationName, String deviceName, String keyName, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String tableName;
Integer recordId;
String res = agent.GetKeyValue(applicationName, deviceName, keyName, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String keyName
String tableName
Integer recordId

Returns

Type Description
String

GetKeyValueOnDeviceIdentifier(String,String,String,String,String,Integer)

Returns a foreign key string value by its key name and device identifier, that belongs to the specified device and application. A table name and record ID can also be specified.

Declaration

String GetKeyValueOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String keyName;
String tableName;
Integer recordId;
String res = agent.GetKeyValueOnDeviceIdentifier(applicationName, deviceName, deviceIdentifier, keyName, tableName, recordId);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
String keyName
String tableName
Integer recordId

Returns

Type Description
String

SaveDeviceByIdentifier(String,String,String,NSForeignDevice)

Updates an NSForeignDevice with deviceName that belongs to the application with applicationName.

Declaration

NSForeignDevice SaveDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier, NSForeignDevice foreignDevice)

Examples

NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice foreignDevice;
NSForeignDevice res = agent.SaveDeviceByIdentifier(applicationName, deviceName, deviceIdentifier, foreignDevice);

Parameters

Type Name Description
String applicationName
String deviceName
String deviceIdentifier
NSForeignDevice foreignDevice

Returns

Type Description
NSForeignDevice

SaveForeignAppEntity(NSForeignAppEntity)

yUpdates the existing NSForeignAppEntity or creates a new NSForeignAppEntity if the ID parameter is 0.

Declaration

NSForeignAppEntity SaveForeignAppEntity(NSForeignAppEntity foreignAppEntity)

Examples

NSForeignSystem  agent;
NSForeignAppEntity thing = agent.CreateDefaultForeignAppEntity();
thing = agent.SaveForeignAppEntity(thing);

Parameters

Type Name Description
NSForeignAppEntity foreignAppEntity

Returns

Type Description
NSForeignAppEntity The new or updated NSForeignAppEntity.

SaveForeignDevice(NSForeignDevice,String)

Saves a foreign device for an foreign application

Declaration

NSForeignDevice SaveForeignDevice(NSForeignDevice foreignDevice, String applicationName)

Examples

NSForeignSystemAgent agent;
NSForeignDevice foreignDevice;
String applicationName;
NSForeignDevice res = agent.SaveForeignDevice(foreignDevice, applicationName);

Parameters

Type Name Description
NSForeignDevice foreignDevice
String applicationName

Returns

Type Description
NSForeignDevice

SaveForeignKey(NSForeignKey,String,String,String)

Saves a key belonging to the ForeignApp and NSForeignDevice specified.

Declaration

NSForeignKey SaveForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier)

Examples

NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey res = agent.SaveForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier);

Parameters

Type Name Description
NSForeignKey foreignKey
String applicationName
String deviceName
String deviceIdentifier

Returns

Type Description
NSForeignKey