Class NSPreferenceAgent
Preferences, user interface tab configuration.
Syntax
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSPreferenceAgent()
Preferences, user interface tab configuration.
Declaration
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
Methods
CreateDefaultPreference()
Sets default values into a new NSPreference.
Declaration
NSPreference CreateDefaultPreference()
Returns
Examples
NSPreferenceAgent agent;
NSPreference thing = agent.CreateDefaultPreference();
thing = agent.SavePreference(thing);
CreateDefaultPreferenceDescription()
Sets default values into a new NSPreferenceDescription.
Declaration
NSPreferenceDescription CreateDefaultPreferenceDescription()
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescription thing = agent.CreateDefaultPreferenceDescription();
thing = agent.SavePreferenceDescription(thing);
CreateDefaultPreferenceDescriptionLine()
Sets default values into a new NSPreferenceDescriptionLine.
Declaration
NSPreferenceDescriptionLine CreateDefaultPreferenceDescriptionLine()
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescriptionLine thing = agent.CreateDefaultPreferenceDescriptionLine();
thing = agent.SavePreferenceDescriptionLine(thing);
DeleteFromSectionAndKey(String,String)
Gets an NSPreferenceDescription based on the section and key
Declaration
Void DeleteFromSectionAndKey(String section, String key)
Parameters
Returns
Examples
NSPreferenceAgent agent;
String section;
String key;
agent.DeleteFromSectionAndKey(section, key);
DeletePrefDescLinesByPrefDescId(Integer)
Deletes the PrefDescLines associated with Preference Description ID in the SuperOffice database
Declaration
Void DeletePrefDescLinesByPrefDescId(Integer prefDescId)
Parameters
Type |
Name |
Description |
Integer |
prefDescId |
|
Returns
Examples
NSPreferenceAgent agent;
Integer prefDescId;
agent.DeletePrefDescLinesByPrefDescId(prefDescId);
DeletePrefDescLinesByPrefDescIds(Integer[])
Deletes the PrefDescLines associated with Preference Description IDs in the SuperOffice database
Declaration
Void DeletePrefDescLinesByPrefDescIds(Integer[] prefDescIds)
Parameters
Type |
Name |
Description |
Integer[] |
prefDescIds |
|
Returns
Examples
NSPreferenceAgent agent;
Integer[] prefDescIds;
agent.DeletePrefDescLinesByPrefDescIds(prefDescIds);
DeletePreference(Integer)
Deletes a preference by ID
Declaration
Void DeletePreference(Integer id)
Parameters
Returns
Examples
NSPreferenceAgent agent;
Integer id;
agent.DeletePreference(id);
DeletePreferenceDescription(Integer)
Deletes the NSPreferenceDescription
Declaration
DeletePreferenceDescription(Integer preferenceDescription)
Parameters
Type |
Name |
Description |
Integer |
preferenceDescription |
|
Returns
Examples
NSPreferenceAgent agent;
agent.DeletePreferenceDescription(123);
DeletePreferenceDescriptionLine(Integer)
Deletes the NSPreferenceDescriptionLine
Declaration
DeletePreferenceDescriptionLine(Integer preferenceDescriptionLine)
Parameters
Type |
Name |
Description |
Integer |
preferenceDescriptionLine |
|
Returns
Examples
NSPreferenceAgent agent;
agent.DeletePreferenceDescriptionLine(123);
DeletePreferenceDescriptionLines(Integer[])
Deletes the PrefDescLines in the SuperOffice database
Declaration
Void DeletePreferenceDescriptionLines(Integer[] prefDescLineIds)
Parameters
Type |
Name |
Description |
Integer[] |
prefDescLineIds |
|
Returns
Examples
NSPreferenceAgent agent;
Integer[] prefDescLineIds;
agent.DeletePreferenceDescriptionLines(prefDescLineIds);
DeletePreferences(Integer[])
Deletes some preferences by ID
Declaration
Void DeletePreferences(Integer[] ids)
Parameters
Type |
Name |
Description |
Integer[] |
ids |
|
Returns
Examples
NSPreferenceAgent agent;
Integer[] ids;
agent.DeletePreferences(ids);
GetAll()
Gets a list of all PreferenceDescriptions in the system.
Declaration
NSPreferenceDescription[] GetAll()
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescription[] res = agent.GetAll();
GetAllFromSection(String)
Gets all NSPreferenceDescription-items in the specified section
Declaration
NSPreferenceDescription[] GetAllFromSection(String section)
Parameters
Type |
Name |
Description |
String |
section |
|
Returns
Examples
NSPreferenceAgent agent;
String section;
NSPreferenceDescription[] res = agent.GetAllFromSection(section);
GetFromSectionAndKey(String,String)
Gets an NSPreferenceDescription based on the section and key
Declaration
NSPreferenceDescription GetFromSectionAndKey(String section, String key)
Parameters
Returns
Examples
NSPreferenceAgent agent;
String section;
String key;
NSPreferenceDescription res = agent.GetFromSectionAndKey(section, key);
GetNetServicesStatusUrl()
Returns URL to status service. e.g. 'https://help.superoffice.com/sodispatcher/v1/status'
Declaration
String GetNetServicesStatusUrl()
Returns
Type |
Description |
String |
URL; NULL if status does not need to be checked yet.
|
Examples
NSPreferenceAgent agent;
String res = agent.GetNetServicesStatusUrl();
GetPreference(Integer)
Declaration
NSPreference GetPreference(Integer id)
Parameters
Returns
Examples
NSPreferenceAgent agent;
Integer id;
NSPreference res = agent.GetPreference(id);
GetPreferenceByName(String,String,Integer)
Gets a preference by name
Declaration
NSPreference GetPreferenceByName(String prefSection, String prefKey, Integer prefLevel)
Parameters
Returns
Examples
NSPreferenceAgent agent;
String prefSection;
String prefKey;
Integer prefLevel;
NSPreference res = agent.GetPreferenceByName(prefSection, prefKey, prefLevel);
GetPreferenceByNameAndId(String,String,Integer,Integer)
Gets a preference by name and owner ID.
Declaration
NSPreference GetPreferenceByNameAndId(String prefSection, String prefKey, Integer prefLevel, Integer ownerId)
Parameters
Returns
Examples
NSPreferenceAgent agent;
String prefSection;
String prefKey;
Integer prefLevel;
Integer ownerId;
NSPreference res = agent.GetPreferenceByNameAndId(prefSection, prefKey, prefLevel, ownerId);
GetPreferenceDescription(Integer)
Gets an NSPreferenceDescription object.
Declaration
NSPreferenceDescription GetPreferenceDescription(Integer preferenceDescriptionId)
Parameters
Type |
Name |
Description |
Integer |
preferenceDescriptionId |
|
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescription thing = agent.GetPreferenceDescription(123);
GetPreferenceDescriptionLine(Integer)
Gets an NSPreferenceDescriptionLine object.
Declaration
NSPreferenceDescriptionLine GetPreferenceDescriptionLine(Integer preferenceDescriptionLineId)
Parameters
Type |
Name |
Description |
Integer |
preferenceDescriptionLineId |
|
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescriptionLine thing = agent.GetPreferenceDescriptionLine(123);
GetPreferenceDescriptionLineFromIdAndValue(Integer,String)
Gets a preference description line from a prefDesc_id and a prefValue
Declaration
NSPreferenceDescriptionLine GetPreferenceDescriptionLineFromIdAndValue(Integer prefDescId, String prefValue)
Parameters
Returns
Examples
NSPreferenceAgent agent;
Integer prefDescId;
String prefValue;
NSPreferenceDescriptionLine res = agent.GetPreferenceDescriptionLineFromIdAndValue(prefDescId, prefValue);
GetPreferenceDescriptionLinesByPrefDescId(Integer)
Gets all preference description lines from a prefDesc_id
Declaration
NSPreferenceDescriptionLine[] GetPreferenceDescriptionLinesByPrefDescId(Integer prefDescId)
Parameters
Type |
Name |
Description |
Integer |
prefDescId |
|
Returns
Examples
NSPreferenceAgent agent;
Integer prefDescId;
NSPreferenceDescriptionLine[] res = agent.GetPreferenceDescriptionLinesByPrefDescId(prefDescId);
GetPreferences(NSPreferenceSpec[])
Gets one or more preferences based on a set of specifications.
Declaration
NSPreference[] GetPreferences(NSPreferenceSpec[] specifications)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceSpec[] specifications;
NSPreference[] res = agent.GetPreferences(specifications);
GetPreferencesWithDisplayValues(NSPreferenceSpec[])
Gets one or more preferences based on a set of specifications.
Declaration
NSPreference[] GetPreferencesWithDisplayValues(NSPreferenceSpec[] specifications)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceSpec[] specifications;
NSPreference[] res = agent.GetPreferencesWithDisplayValues(specifications);
GetTabOrder(String)
Declaration
NSTabOrder GetTabOrder(String tabName)
Parameters
Type |
Name |
Description |
String |
tabName |
|
Returns
Examples
NSPreferenceAgent agent;
String tabName;
NSTabOrder res = agent.GetTabOrder(tabName);
GetTabOrders()
Preferences, user interface tab configuration.
Declaration
NSTabOrder[] GetTabOrders()
Returns
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
SaveFromSectionAndKey(String,String,NSPreferenceDescription)
Updates an NSPreferenceDescription based on the section and key
Declaration
NSPreferenceDescription SaveFromSectionAndKey(String section, String key, NSPreferenceDescription preferenceDescription)
Parameters
Returns
Examples
NSPreferenceAgent agent;
String section;
String key;
NSPreferenceDescription preferenceDescription;
NSPreferenceDescription res = agent.SaveFromSectionAndKey(section, key, preferenceDescription);
SavePreference(NSPreference)
Declaration
Void SavePreference(NSPreference preference)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSPreference preference;
agent.SavePreference(preference);
SavePreferenceDescription(NSPreferenceDescription)
Updates the existing NSPreferenceDescription or creates a new NSPreferenceDescription if the id parameter is 0
Declaration
NSPreferenceDescription SavePreferenceDescription(NSPreferenceDescription preferenceDescription)
Parameters
Returns
Examples
NSPreference agent;
NSPreferenceDescription thing = agent.CreateDefaultPreferenceDescription();
thing = agent.SavePreferenceDescription(thing);
SavePreferenceDescriptionLine(NSPreferenceDescriptionLine)
Updates the existing NSPreferenceDescriptionLine or creates a new NSPreferenceDescriptionLine if the id parameter is 0
Declaration
NSPreferenceDescriptionLine SavePreferenceDescriptionLine(NSPreferenceDescriptionLine preferenceDescriptionLine)
Parameters
Returns
Examples
NSPreference agent;
NSPreferenceDescriptionLine thing = agent.CreateDefaultPreferenceDescriptionLine();
thing = agent.SavePreferenceDescriptionLine(thing);
SavePreferenceDescriptionLines(NSPreferenceDescriptionLine[])
Saves the PreferenceDescriptionLine array in the SuperOffice database
Declaration
NSPreferenceDescriptionLine[] SavePreferenceDescriptionLines(NSPreferenceDescriptionLine[] preferenceDescriptionLines)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSPreferenceDescriptionLine[] preferenceDescriptionLines;
NSPreferenceDescriptionLine[] res = agent.SavePreferenceDescriptionLines(preferenceDescriptionLines);
SavePreferenceEntities(NSPreference[],Bool)
Saves this set of preferences.
Declaration
Void SavePreferenceEntities(NSPreference[] preferences, Bool removeLowerLevels)
Parameters
Returns
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
SavePreferenceEntity(NSPreference,Bool)
Saves a complete preference object, on any level and any target.
Declaration
NSPreference SavePreferenceEntity(NSPreference preference, Bool removeLowerLevels)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSPreference preference;
Bool removeLowerLevels;
NSPreference res = agent.SavePreferenceEntity(preference, removeLowerLevels);
SavePreferences(NSPreference[])
Saves this set of preferences.
Declaration
Void SavePreferences(NSPreference[] preferences)
Parameters
Returns
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
SaveTabOrder(NSTabOrder)
Saves the tab order. The order is saved pr. user.
Declaration
Void SaveTabOrder(NSTabOrder tabOrder)
Parameters
Returns
Examples
NSPreferenceAgent agent;
NSTabOrder tabOrder;
agent.SaveTabOrder(tabOrder);
SaveTabOrders(NSTabOrder[])
Preferences, user interface tab configuration.
Declaration
Void SaveTabOrders(NSTabOrder[] tabOrders)
Parameters
Returns
Examples
NSPreferenceAgent agent;
agent.callMethod(arg1, arg2);
UpdateNetServicesStatus(String)
Updates the NetServices preferences with values contained in the content from the Status URL
Declaration
Void UpdateNetServicesStatus(String xmlOrJson)
Parameters
Type |
Name |
Description |
String |
xmlOrJson |
|
Returns
Examples
NSPreferenceAgent agent;
String xmlOrJson;
agent.UpdateNetServicesStatus(xmlOrJson);