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()
Introduced or updated in version: 7
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.
Introduced or updated in version: 8.2
Declaration
NSForeignDevice AddDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
NSForeignDevice |
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.
Introduced or updated in version: 8.2
Declaration
NSForeignKey AddForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
NSForeignKey | foreignKey | |
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
NSForeignKey |
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.
Introduced or updated in version: 7
Declaration
NSForeignAppEntity CreateDefaultForeignAppEntity()
Returns
Type | Description |
---|---|
NSForeignAppEntity |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
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.
Introduced or updated in version: 8.2
Declaration
Void DeleteDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
Void |
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
String deviceIdentifier;
agent.DeleteDeviceByIdentifier(applicationName, deviceName, deviceIdentifier);
DeleteForeignAppEntity(Integer)
Deletes the NSForeignAppEntity
Introduced or updated in version: 7
Declaration
Void DeleteForeignAppEntity(Integer foreignAppEntity)
Parameters
Type | Name | Description |
---|---|---|
Integer | foreignAppEntity |
Returns
Type | Description |
---|---|
Void |
Examples
NSForeignSystemAgent agent;
agent.DeleteForeignAppEntity(123);
DeleteForeignDevice(NSForeignDevice,String)
Deletes a foreign device from an application
Introduced or updated in version: 7
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.
Introduced or updated in version: 7
Declaration
Void DeleteForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
NSForeignKey | foreignKey | |
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
Void |
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.
Introduced or updated in version: 8.2
Declaration
Void DeleteForeignKeyOnName(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | keyName | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
Void |
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.
Introduced or updated in version: 7
Declaration
Map GetAllForeignKeysOnEntity(String entityType, Integer entityId)
Parameters
Type | Name | Description |
---|---|---|
String | entityType | |
Integer | entityId |
Returns
Type | Description |
---|---|
Map |
Examples
NSForeignSystemAgent agent;
String entityType;
Integer entityId;
Map res = agent.GetAllForeignKeysOnEntity(entityType, entityId);
GetAppByName(String)
Gets the ForeignApp with the given name.
Introduced or updated in version: 7
Declaration
NSForeignAppEntity GetAppByName(String applicationName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName |
Returns
Type | Description |
---|---|
NSForeignAppEntity |
Examples
NSForeignSystemAgent agent;
String applicationName;
NSForeignAppEntity res = agent.GetAppByName(applicationName);
GetApplicationDevices(String)
Gets all devices that belong to a foreign application.
Introduced or updated in version: 7
Declaration
NSForeignDevice[] GetApplicationDevices(String applicationName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName |
Returns
Type | Description |
---|---|
NSForeignDevice[] |
Examples
NSForeignSystemAgent agent;
String applicationName;
NSForeignDevice[] res = agent.GetApplicationDevices(applicationName);
GetApplicationKeys(String)
Returns all ForeignKeys that belong to an application.
Introduced or updated in version: 7
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.
Introduced or updated in version: 7
Declaration
NSForeignDevice GetDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
NSForeignDevice |
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.
Introduced or updated in version: 7
Declaration
NSForeignDevice GetDeviceByName(String applicationName, String deviceName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName |
Returns
Type | Description |
---|---|
NSForeignDevice |
Examples
NSForeignSystemAgent agent;
String applicationName;
String deviceName;
NSForeignDevice res = agent.GetDeviceByName(applicationName, deviceName);
GetDeviceKeys(String,String)
Returns all ForeignKeys that belong to a device.
Introduced or updated in version: 7
Declaration
NSForeignKey[] GetDeviceKeys(String applicationName, String deviceName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName |
Returns
Type | Description |
---|---|
NSForeignKey[] |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey[] GetDeviceKeysOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
NSForeignKey[] |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey[] GetDeviceKeysOnDeviceIdentifierTable(String applicationName, String deviceName, String deviceIdentifier, String tableName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | tableName |
Returns
Type | Description |
---|---|
NSForeignKey[] |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey[] GetDeviceKeysOnDeviceIdentifierTableRecordId(String applicationName, String deviceName, String deviceIdentifier, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
NSForeignKey[] |
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.
Introduced or updated in version: 7
Declaration
NSForeignAppEntity GetForeignAppEntity(Integer foreignAppEntityId)
Parameters
Type | Name | Description |
---|---|---|
Integer | foreignAppEntityId |
Returns
Type | Description |
---|---|
NSForeignAppEntity |
Examples
NSForeignSystemAgent agent;
NSForeignAppEntity thing = agent.GetForeignAppEntity(123);
GetForeignDevice(Integer)
Gets an NSForeignDevice object.
Introduced or updated in version: 7
Declaration
NSForeignDevice GetForeignDevice(Integer foreignDeviceId)
Parameters
Type | Name | Description |
---|---|---|
Integer | foreignDeviceId |
Returns
Type | Description |
---|---|
NSForeignDevice |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey GetKey(String applicationName, String deviceName, String keyName, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | keyName | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
NSForeignKey |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey GetKeyByValue(String applicationName, String deviceName, String keyName, String keyValue, String tableName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | keyName | |
String | keyValue | |
String | tableName |
Returns
Type | Description |
---|---|
NSForeignKey |
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.
Introduced or updated in version: 8.2
Declaration
NSForeignKey GetKeyByValueAndIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String keyValue, String tableName)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | keyName | |
String | keyValue | |
String | tableName |
Returns
Type | Description |
---|---|
NSForeignKey |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey GetKeyOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | keyName | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
NSForeignKey |
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.
Introduced or updated in version: 7
Declaration
String GetKeyValue(String applicationName, String deviceName, String keyName, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | keyName | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
String |
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.
Introduced or updated in version: 7
Declaration
String GetKeyValueOnDeviceIdentifier(String applicationName, String deviceName, String deviceIdentifier, String keyName, String tableName, Integer recordId)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
String | keyName | |
String | tableName | |
Integer | recordId |
Returns
Type | Description |
---|---|
String |
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.
Introduced or updated in version: 8.2
Declaration
NSForeignDevice SaveDeviceByIdentifier(String applicationName, String deviceName, String deviceIdentifier, NSForeignDevice foreignDevice)
Parameters
Type | Name | Description |
---|---|---|
String | applicationName | |
String | deviceName | |
String | deviceIdentifier | |
NSForeignDevice | foreignDevice |
Returns
Type | Description |
---|---|
NSForeignDevice |
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.
Introduced or updated in version: 7
Declaration
NSForeignAppEntity SaveForeignAppEntity(NSForeignAppEntity foreignAppEntity)
Parameters
Type | Name | Description |
---|---|---|
NSForeignAppEntity | foreignAppEntity |
Returns
Type | Description |
---|---|
NSForeignAppEntity | The new or updated NSForeignAppEntity. |
Examples
NSForeignSystem agent;
NSForeignAppEntity thing = agent.CreateDefaultForeignAppEntity();
thing = agent.SaveForeignAppEntity(thing);
SaveForeignDevice(NSForeignDevice,String)
Saves a foreign device for an foreign application
Introduced or updated in version: 7
Declaration
NSForeignDevice SaveForeignDevice(NSForeignDevice foreignDevice, String applicationName)
Parameters
Type | Name | Description |
---|---|---|
NSForeignDevice | foreignDevice | |
String | applicationName |
Returns
Type | Description |
---|---|
NSForeignDevice |
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.
Introduced or updated in version: 7
Declaration
NSForeignKey SaveForeignKey(NSForeignKey foreignKey, String applicationName, String deviceName, String deviceIdentifier)
Parameters
Type | Name | Description |
---|---|---|
NSForeignKey | foreignKey | |
String | applicationName | |
String | deviceName | |
String | deviceIdentifier |
Returns
Type | Description |
---|---|
NSForeignKey |
Examples
NSForeignSystemAgent agent;
NSForeignKey foreignKey;
String applicationName;
String deviceName;
String deviceIdentifier;
NSForeignKey res = agent.SaveForeignKey(foreignKey, applicationName, deviceName, deviceIdentifier);