Class NSForeignSystemAgent
Collection of all services that works with Foreign key data (Key/Value pairs)
Syntax
Examples
NSForeignSystemAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSForeignSystemAgent()
Collection of all services that works with Foreign key data (Key/Value pairs)
Declaration
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice res = agent.AddDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey res = agent.AddForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier);
CreateDefaultForeignAppEntity()
Sets default values into a new NSForeignAppEntity.
Declaration
NSForeignAppEntity CreateDefaultForeignAppEntity()
Returns
Examples
NSForeignSystemAgent agent;
NSForeignAppEntity thing = agent.CreateDefaultForeignAppEntity();
thing = agent.SaveForeignAppEntity(thing);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
agent.DeleteDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);
DeleteForeignAppEntity(Integer)
Deletes the NSForeignAppEntity
Declaration
Void DeleteForeignAppEntity(Integer foreignAppEntity)
Parameters
Type |
Name |
Description |
Integer |
foreignAppEntity |
|
Returns
Examples
NSForeignSystemAgent agent;
agent.DeleteForeignAppEntity(123);
DeleteForeignDevice(NSForeignDevice,String)
Deletes a foreign device from an application
Declaration
Void DeleteForeignDevice(NSForeignDevice foreignDevice, String applicationName)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
agent.callMethod(arg1, arg2);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
Integer recordId;
agent.DeleteForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier, tableName, recordId);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String keyName;
String tableName;
Integer recordId;
agent.DeleteForeignKeyOnName(applicationName, deviceName, deviceIdentifier, keyName, tableName, recordId);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String entityType;
Integer entityId;
Map res = agent.GetAllForeignKeysOnEntity(entityType, entityId);
GetAppByName(String)
Gets the ForeignApp with the given name.
Declaration
NSForeignAppEntity GetAppByName(String applicationName)
Parameters
Type |
Name |
Description |
String |
applicationName |
|
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
NSForeignAppEntity res = agent.GetAppByName(applicationName);
GetApplicationDevices(String)
Gets all devices that belong to a foreign application.
Declaration
NSForeignDevice[] GetApplicationDevices(String applicationName)
Parameters
Type |
Name |
Description |
String |
applicationName |
|
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
NSForeignDevice[] res = agent.GetApplicationDevices(applicationName);
GetApplicationKeys(String)
Returns all ForeignKeys that belong to an application.
Declaration
NSForeignKey[] GetApplicationKeys(String applicationName)
Parameters
Type |
Name |
Description |
String |
applicationName |
|
Returns
Type |
Description |
NSForeignKey[] |
All ForeignKeys that belong to this application.
|
Examples
NSForeignSystemAgent agent;
String applicationName;
NSForeignKey[] res = agent.GetApplicationKeys(applicationName);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice res = agent.GetDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);
GetDeviceByName(String,String)
Gets an NSForeignDevice with deviceName that belongs to the application with applicationName.
Declaration
NSForeignDevice GetDeviceByName(String applicationName, String deviceName)
Parameters
Type |
Name |
Description |
String |
applicationName |
|
String |
deviceName |
|
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
NSForeignDevice res = agent.GetDeviceByName(applicationName, deviceName);
GetDeviceKeys(String,String)
Returns all ForeignKeys that belong to a device.
Declaration
NSForeignKey[] GetDeviceKeys(String applicationName, String deviceName)
Parameters
Type |
Name |
Description |
String |
applicationName |
|
String |
deviceName |
|
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
NSForeignKey[] res = agent.GetDeviceKeys(applicationName, deviceName);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifier(applicationName, deviceName, deviceIdentifier);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifierTable(applicationName, deviceName, deviceIdentifier, tableName);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
String tableName;
Integer recordId;
NSForeignKey[] res = agent.GetDeviceKeysOnDeviceIdentifierTableRecordId(applicationName, deviceName, deviceIdentifier, tableName, recordId);
GetForeignAppEntity(Integer)
Gets an NSForeignAppEntity object.
Declaration
NSForeignAppEntity GetForeignAppEntity(Integer foreignAppEntityId)
Parameters
Type |
Name |
Description |
Integer |
foreignAppEntityId |
|
Returns
Examples
NSForeignSystemAgent agent;
NSForeignAppEntity thing = agent.GetForeignAppEntity(123);
GetForeignDevice(Integer)
Gets an NSForeignDevice object.
Declaration
NSForeignDevice GetForeignDevice(Integer foreignDeviceId)
Parameters
Type |
Name |
Description |
Integer |
foreignDeviceId |
|
Returns
Examples
NSForeignSystemAgent agent;
NSForeignDevice thing = agent.GetForeignDevice(123);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String tableName;
Integer recordId;
NSForeignKey res = agent.GetKey(applicationName, deviceName, keyName, tableName, recordId);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String keyValue;
String tableName;
NSForeignKey res = agent.GetKeyByValue(applicationName, deviceName, keyName, keyValue, tableName);
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)
Parameters
Returns
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);
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)
Parameters
Returns
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);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String keyName;
String tableName;
Integer recordId;
String res = agent.GetKeyValue(applicationName, deviceName, keyName, tableName, recordId);
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)
Parameters
Returns
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);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignDevice foreignDevice;
NSForeignDevice res = agent.SaveDeviceByIdentifier(applicationName, deviceName, deviceIdentifier, foreignDevice);
SaveForeignAppEntity(NSForeignAppEntity)
yUpdates the existing NSForeignAppEntity or creates a new NSForeignAppEntity if the ID parameter is 0.
Declaration
NSForeignAppEntity SaveForeignAppEntity(NSForeignAppEntity foreignAppEntity)
Parameters
Returns
Examples
NSForeignSystem agent;
NSForeignAppEntity thing = agent.CreateDefaultForeignAppEntity();
thing = agent.SaveForeignAppEntity(thing);
SaveForeignDevice(NSForeignDevice,String)
Saves a foreign device for an foreign application
Declaration
NSForeignDevice SaveForeignDevice(NSForeignDevice foreignDevice, String applicationName)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
NSForeignDevice foreignDevice;
String applicationName;
NSForeignDevice res = agent.SaveForeignDevice(foreignDevice, applicationName);
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)
Parameters
Returns
Examples
NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey res = agent.SaveForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier);