Class NSConfigurationAgent
User interface configuration* XML and other elements such as inter-client URLs.
Examples
NSConfigurationAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSConfigurationAgent()
Initializes a new instance of the NSConfigurationAgent class.
Declaration
NSConfigurationAgent Examples
NSConfigurationAgent agent;
agent.callMethod(arg1, arg2);
Methods
ClearConfigurationCache(String,String,Bool)
Configuration XML may be expensive to build and parse, and are therefore cached to the database.
Caching is per application/instance/associate, and can be turned off through the config file. If caching is on, and the configuration is changed, it is necessary to clear the cached configurations from the database, through this call.Declaration
Void ClearConfigurationCache(String application, String instance, Bool forAllAssociates) Examples
NSConfigurationAgent agent;
String application;
String instance;
Bool forAllAssociates;
agent.ClearConfigurationCache(application, instance, forAllAssociates);
Parameters
| Type | Name | Description |
| String | application | |
| String | instance | |
| Bool | forAllAssociates |
Returns
| Type | Description |
| Void |
CreateDefaultDiaryViewEntity()
Sets default values into a new NSDiaryViewEntity.
Declaration
NSDiaryViewEntity CreateDefaultDiaryViewEntity() Examples
NSConfigurationAgent agent;
NSDiaryViewEntity thing = agent.CreateDefaultDiaryViewEntity();
thing = agent.SaveDiaryViewEntity(thing);
Returns
| Type | Description |
| NSDiaryViewEntity | New entity with default values. |
CreateDefaultSystemEventEntity()
Sets default values into a new NSSystemEventEntity.
Declaration
NSSystemEventEntity CreateDefaultSystemEventEntity() Examples
NSConfigurationAgent agent;
NSSystemEventEntity thing = agent.CreateDefaultSystemEventEntity();
thing = agent.SaveSystemEventEntity(thing);
Returns
| Type | Description |
| NSSystemEventEntity | New entity with default values. |
DeleteDiaryViewEntity(Integer)
Deletes the NSDiaryViewEntity
Declaration
Void DeleteDiaryViewEntity(Integer diaryViewEntity) Examples
NSConfigurationAgent agent;
agent.DeleteDiaryViewEntity(123);
Parameters
| Type | Name | Description |
| Integer | diaryViewEntity |
Returns
| Type | Description |
| Void |
DeleteSystemEventEntity(Integer)
Deletes the NSSystemEventEntity
Declaration
Void DeleteSystemEventEntity(Integer systemEventEntity) Examples
NSConfigurationAgent agent;
agent.DeleteSystemEventEntity(123);
Parameters
| Type | Name | Description |
| Integer | systemEventEntity | The identity of the DiaryViewEntity. |
Returns
| Type | Description |
| Void |
DeleteWindowPosSize(Integer)
Deletes a window and dialog position and size setting.
Declaration
Void DeleteWindowPosSize(Integer windowPosSizeId) Parameters
| Type | Name | Description |
| Integer | windowPosSizeId | ID of the window and dialog position and size settings item. |
Returns
| Type | Description |
| Void |
ExistsSystemEvent(String)
Declaration
Bool ExistsSystemEvent(String key) Examples
NSConfigurationAgent agent;
String key;
Bool res = agent.ExistsSystemEvent(key);
Parameters
| Type | Name | Description |
| String | key | The key to match on. |
Returns
| Type | Description |
| Bool | Is there a system event with the given key? |
GetAnyConfiguration(String,String,String,String)
Gets one defined configuration fragment, with full reference resolution and parsing applied.
Declaration
String GetAnyConfiguration(String application, String instance, String item, String type) Examples
NSConfigurationAgent agent;
String application;
String instance;
String item;
String type;
String res = agent.GetAnyConfiguration(application, instance, item, type);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance Six.Web |
| String | instance | The instance name, for instance Main |
| String | item | The configuration item name (first component of file name) |
| String | type | The configuration item type (second component of file name). |
Returns
| Type | Description |
| String | A configuration fragment, with full reference resolution and parsing applied. |
GetApplicationConfiguration(String,String)
Returns the application configuration.
Declaration
String GetApplicationConfiguration(String application, String instance) Examples
NSConfigurationAgent agent;
String application;
String instance;
String res = agent.GetApplicationConfiguration(application, instance);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance 'SixWeb' |
| String | instance | The instance name for the application, like 'MainInstance' |
Returns
| Type | Description |
| String | XML structure containing the application configuration. A list of pages, with information about the name, main panel and preference mappings of each page. |
GetCRMUrl(String,String,Bool)
Returns a valid URL based in the soprotocol provided
Declaration
String GetCRMUrl(String soProtocol, String currents, Bool frameless) Examples
NSConfigurationAgent agent;
String soProtocol;
String currents;
Bool frameless;
String res = agent.GetCRMUrl(soProtocol, currents, frameless);
Parameters
| Type | Name | Description |
| String | soProtocol | |
| String | currents | |
| Bool | frameless |
Returns
| Type | Description |
| String | URl. |
GetCSAuthUrl(String,String,String,String)
Generates a URL to the emarketing module
Declaration
String GetCSAuthUrl(String language, String programName, String action, String extraParameters) Examples
NSConfigurationAgent agent;
String language;
String programName;
String action;
String extraParameters;
String res = agent.GetCSAuthUrl(language, programName, action, extraParameters);
Parameters
| Type | Name | Description |
| String | language | By setting this parameter, you can change the CS language for the current user. |
| String | programName | In this parameter you must specify which CS program you want to create an URL for. Valid examples are ticket, rms, spm etc. |
| String | action | Here you can optionally specify the action for the current program. This will enable you to go to a specific screen. |
| String | extraParameters | If an action is specified, you can specify extra parameters here. This can be used to set specific behaviour for the chosen screen/action. If an empty action is supplied, this parameter will be ignored. |
Returns
| Type | Description |
| String | A valid Service URL composed of the give parameters. |
GetCsCgiUrlInternal()
Gets the host name for Service
Declaration
String GetCsCgiUrlInternal() Examples
NSConfigurationAgent agent;
String res = agent.GetCsCgiUrlInternal();
Returns
| Type | Description |
| String | The host name for where Service is installed. |
GetCsProgramUrl(String,String,String,String)
Converts a module name into a Service URL.
Declaration
String GetCsProgramUrl(String language, String programName, String action, String extraParameters) Examples
NSConfigurationAgent agent;
String language;
String programName;
String action;
String extraParameters;
String res = agent.GetCsProgramUrl(language, programName, action, extraParameters);
Parameters
| Type | Name | Description |
| String | language | By setting this parameter, you can change the CS language for the current user. |
| String | programName | In this parameter you must specify which CS program you want to create an URL for. Valid examples are ticket, rms, spm etc. |
| String | action | Here you can optionally specify the action for the current program. This will enable you to go to a specific screen. |
| String | extraParameters | If an action is specified, you can specify extra parameters here. This can be used to set specific behaviour for the chosen screen/action. If an empty action is supplied, this parameter will be ignored. |
Returns
| Type | Description |
| String | A valid Service URL composed of the give parameters. |
GetCSRegistryValue(Integer)
Gets a value from the Registry table.
Declaration
String GetCSRegistryValue(Integer entry) Examples
NSConfigurationAgent agent;
Integer entry;
String res = agent.GetCSRegistryValue(entry);
Parameters
| Type | Name | Description |
| Integer | entry | The Registry entry to get. |
Returns
| Type | Description |
| String | The value of the specified Registry entry. |
GetCSWwwFolder()
Gets the www folder for Service
Declaration
String GetCSWwwFolder() Examples
NSConfigurationAgent agent;
String res = agent.GetCSWwwFolder();
Returns
| Type | Description |
| String | The www folder for Service. |
GetCustomerUrl()
Gets the URL for the external access to the customer center
Declaration
String GetCustomerUrl() Examples
NSConfigurationAgent agent;
String res = agent.GetCustomerUrl();
Returns
| Type | Description |
| String | The URL to the customer center, without any actions. |
GetDiaryViewEntity(Integer)
Gets an NSDiaryViewEntity object.
Declaration
NSDiaryViewEntity GetDiaryViewEntity(Integer diaryViewEntityId) Examples
NSConfigurationAgent agent;
NSDiaryViewEntity thing = agent.GetDiaryViewEntity(123);
Parameters
| Type | Name | Description |
| Integer | diaryViewEntityId | The identifier of the DiaryViewEntity object. |
Returns
| Type | Description |
| NSDiaryViewEntity |
GetEmailNumberOfDays()
Declaration
Integer GetEmailNumberOfDays() Examples
NSConfigurationAgent agent;
Integer res = agent.GetEmailNumberOfDays();
Returns
| Type | Description |
| Integer | Number of days in the past for which we are fetching email. |
GetEMarketingUrl(String)
Declaration
String GetEMarketingUrl(String language) Parameters
| Type | Name | Description |
| String | language |
Returns
| Type | Description |
| String | URl. |
GetFilterList(String,String)
Gets the list of filters to be used for processing the configuration data for this application.
Declaration
String GetFilterList(String application, String instance) Examples
NSConfigurationAgent agent;
String application;
String instance;
String res = agent.GetFilterList(application, instance);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance 'SixWeb' |
| String | instance | The instance name for the application, like 'MainInstance'. |
Returns
| Type | Description |
| String | XML representing the list of filters and any configuration data they may need. |
GetHelpDispatcherUrl()
Gets the GetHelpDispatcherUrl used by the help system.
Declaration
String GetHelpDispatcherUrl() Examples
NSConfigurationAgent agent;
String res = agent.GetHelpDispatcherUrl();
Returns
| Type | Description |
| String | URL to be used by the help system. |
GetMyWindowPosSizes()
Gets the window and dialog position and size settings belonging to the currently logged-on user.
Declaration
NSWindowPosSize[] GetMyWindowPosSizes() Examples
NSConfigurationAgent agent;
NSWindowPosSize[] res = agent.GetMyWindowPosSizes();
Returns
| Type | Description |
| NSWindowPosSize[] | Array of window and dialog position and size settings. |
GetObjectMapping(String,String)
Gets the object mappings (what code objects should be instantiated to handle the entities of the client configuration?)
Declaration
String GetObjectMapping(String application, String instance) Examples
NSConfigurationAgent agent;
String application;
String instance;
String res = agent.GetObjectMapping(application, instance);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance 'SixWeb' |
| String | instance | The instance name for the application, like 'MainInstance'. |
Returns
| Type | Description |
| String | XML containing the object mappings, including assembly and class names. |
GetPageConfiguration(String,String,String)
Gets the configuration for one whole web page, including all its panels etc.
Declaration
String GetPageConfiguration(String application, String instance, String page) Examples
NSConfigurationAgent agent;
String application;
String instance;
String page;
String res = agent.GetPageConfiguration(application, instance, page);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance SixWeb |
| String | instance | The instance name for the application, like 'MainInstance' |
| String | page | Page name, must correspond to one of the pages in the Application Configuration. |
Returns
| Type | Description |
| String | XML containing the configuration for the given page, from the page down to the control level. |
GetRefreshedPageConfiguration(String,String,String)
Gets the configuration for one whole web page, including all its panels etc.
Declaration
String GetRefreshedPageConfiguration(String application, String instance, String page) Examples
NSConfigurationAgent agent;
String application;
String instance;
String page;
String res = agent.GetRefreshedPageConfiguration(application, instance, page);
Parameters
| Type | Name | Description |
| String | application | The application name, for instance SixWeb |
| String | instance | The instance name for the application, like 'MainInstance' |
| String | page | Page name, must correspond to one of the pages in the Application Configuration. |
Returns
| Type | Description |
| String | XML containing the configuration for the given page, from the page down to the control level. |
GetSystemEventEntity(Integer)
Gets an NSSystemEventEntity object.
Declaration
NSSystemEventEntity GetSystemEventEntity(Integer systemEventEntityId) Examples
NSConfigurationAgent agent;
NSSystemEventEntity thing = agent.GetSystemEventEntity(123);
Parameters
| Type | Name | Description |
| Integer | systemEventEntityId | The identifier of the SystemEventEntity object. |
Returns
| Type | Description |
| NSSystemEventEntity |
GetWindowPosSize(Integer)
Gets an NSWindowPosSize object.
Declaration
NSWindowPosSize GetWindowPosSize(Integer windowPosSizeId) Examples
NSConfigurationAgent agent;
NSWindowPosSize thing = agent.GetWindowPosSize(123);
Parameters
| Type | Name | Description |
| Integer | windowPosSizeId | The identifier of the WindowPosSize object. |
Returns
| Type | Description |
| NSWindowPosSize |
GetWindowPosSizeList(Integer[])
Retrieves a list of NSWindowPosSize objects.
Declaration
NSWindowPosSize[] GetWindowPosSizeList(Integer[]) Examples
Integer[] ids;
NSConfigurationAgent agent;
agent.GetWindowPosSizeList(ids);
Parameters
| Type | Name | Description |
| Integer[] | windowPosSizeIds | The IDs of the NSWindowPosSize objects to get. |
Returns
| Type | Description |
| NSWindowPosSize[] | Array of window and dialog position and size settings. |
GetWindowPosSizesOnAssociateId(Integer)
Gets the window and dialog position and size settings belonging to the specified associate
Declaration
NSWindowPosSize[] GetWindowPosSizesOnAssociateId(Integer associateId) Examples
NSConfigurationAgent agent;
Integer associateId;
NSWindowPosSize[] res = agent.GetWindowPosSizesOnAssociateId(associateId);
Parameters
| Type | Name | Description |
| Integer | associateId | Associate ID of the Associate/Person owning these window settings. |
Returns
| Type | Description |
| NSWindowPosSize[] | Array of window and dialog position and size settings. |
GetWindowPosSizesOnPersonId(Integer)
Gets the window and dialog position and size settings belonging to the specified person
Declaration
NSWindowPosSize[] GetWindowPosSizesOnPersonId(Integer personId) Examples
NSConfigurationAgent agent;
Integer personId;
NSWindowPosSize[] res = agent.GetWindowPosSizesOnPersonId(personId);
Parameters
| Type | Name | Description |
| Integer | personId | Person ID of the associate owning these window settings. |
Returns
| Type | Description |
| NSWindowPosSize[] | Array of window and dialog position and size settings. |
GetWwwUrl(String)
Gets the default URL used for the logo, from the [NetServices] PageUrl preferencec, with tags substituted.
Declaration
String GetWwwUrl(String client) Examples
NSConfigurationAgent agent;
String client;
String res = agent.GetWwwUrl(client);
Parameters
| Type | Name | Description |
| String | client | The name for the client application, like 'CS' or 'SM.web', used for the clie variable. |
Returns
| Type | Description |
| String | URL to be used when clicking the logo. |
GetWwwUrlForSMWeb()
Returns the URL used for the logo by the SM.web client. Uses urldispatch.aspx.
Declaration
String GetWwwUrlForSMWeb() Examples
NSConfigurationAgent agent;
String res = agent.GetWwwUrlForSMWeb();
Returns
| Type | Description |
| String | Link to urldispatch.aspx tagged with [SOSITEURL] |
SaveDiaryViewEntity(NSDiaryViewEntity)
Updates the existing NSDiaryViewEntity or creates a new NSDiaryViewEntity if the ID parameter is 0.
Declaration
NSDiaryViewEntity SaveDiaryViewEntity(NSDiaryViewEntity diaryViewEntity) Examples
NSConfiguration agent;
NSDiaryViewEntity thing = agent.CreateDefaultDiaryViewEntity();
thing = agent.SaveDiaryViewEntity(thing);
Parameters
| Type | Name | Description |
| NSDiaryViewEntity | diaryViewEntity | The DiaryViewEntity to save. |
Returns
| Type | Description |
| NSDiaryViewEntity | New or updated DiaryViewEntity. |
SaveSystemEventEntity(NSSystemEventEntity)
Updates the existing NSSystemEventEntity or creates a new NSSystemEventEntity if the id parameter is 0
Declaration
NSSystemEventEntity SaveSystemEventEntity(NSSystemEventEntity systemEventEntity) Examples
NSConfiguration agent;
NSSystemEventEntity thing = agent.CreateDefaultSystemEventEntity();
thing = agent.SaveSystemEventEntity(thing);
Parameters
| Type | Name | Description |
| NSSystemEventEntity | systemEventEntity | Entity to save. |
Returns
| Type | Description |
| NSSystemEventEntity | New or updated SystemEventEntity. |
SaveWindowPosSize(NSWindowPosSize)
Saves a window and dialog position and size setting.
Declaration
NSWindowPosSize SaveWindowPosSize(NSWindowPosSize windowPosSize) Examples
NSConfigurationAgent agent;
NSWindowPosSize windowPosSize;
NSWindowPosSize res = agent.SaveWindowPosSize(windowPosSize);
Parameters
| Type | Name | Description |
| NSWindowPosSize | windowPosSize | The item that is saved. |
Returns
| Type | Description |
| NSWindowPosSize | The saved item. |
SaveWindowPosSizes(NSWindowPosSize[])
Saves a set of window and dialog position and size settings.
Declaration
NSWindowPosSize[] SaveWindowPosSizes(NSWindowPosSize[] windowPosSizes) Examples
NSConfigurationAgent agent;
NSWindowPosSize[] windowPosSizes;
NSWindowPosSize[] res = agent.SaveWindowPosSizes(windowPosSizes);
Parameters
| Type | Name | Description |
| NSWindowPosSize[] | windowPosSizes | Items to save. |
Returns
| Type | Description |
| NSWindowPosSize[] | The saved items. |