bool SemanticLayerSetNamePattern(string mon, SemanticLayerPatternArg tArg)
mon. Moniker for working with preconfigured DBMS connection templates.
tArg. Settings of preconfigured DBMS connection template that should be renamed.
The SemanticLayerSetNamePattern operation renames preconfigured DBMS connection template.
To execute the operation, in the mon field specify moniker of opened data model instance with the !Patterns postfix, in the tArg.index field specify template index, and in the tArg.name field specify new name. The moniker can be obtained on executing the OpenSemanticLayer operation. Template index will be available in results of the SemanticLayerGetPatterns operation.
The operation results in the logical true if preconfigured template was renamed successfully.
Below is the example of renaming preconfigured DBMS connection template. The request contains moniker for working with preconfigured templates, template key, and new name. The response contains whether template is renamed successfully.
{
"SemanticLayerSetNamePattern" :
{
"mon" : "KPACNCCOCDBDGOAEFDJDAIBAMJFFBCDEDJLPICPCMCFDIKCG!M!S!PLDNOFGCOCDBDGOAEMEKOCGKLAEFDMALEOIGKKCECKAAGLFHC!Patterns",
"tArg" :
{
"index" : "358700",
"name" : "DBServer connection"
}
}
}
{
"SemanticLayerSetNamePatternResult" : "1"
}
public static bool SemanticLayerSetNamePattern(string moniker, int? patternIndex, string newName)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SemanticLayerSetNamePattern()
{
tArg = new SemanticLayerPatternArg()
{
index = patternIndex,
name = newName
},
// Moniker for working with preconfigured templates
mon = moniker + "!Patterns"
};
// Rename preconfigured template
var result = somClient.SemanticLayerSetNamePattern(tSet);
return result;
}
See also: