SemanticLayerSetNamePattern

Syntax

bool SemanticLayerSetNamePattern(string mon, SemanticLayerPatternArg tArg)

Parameters

mon. Moniker for working with preconfigured DBMS connection templates.

tArg. Settings of preconfigured DBMS connection template that should be renamed.

Description

The SemanticLayerSetNamePattern operation renames preconfigured DBMS connection template.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SemanticLayerSetNamePattern xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">KPACNCCOCDBDGOAEFDJDAIBAMJFFBCDEDJLPICPCMCFDIKCG!M!S!PLDNOFGCOCDBDGOAEMEKOCGKLAEFDMALEOIGKKCECKAAGLFHC!Patterns</mon>
<tArg xmlns="">
  <index>358700</index>
  <name>DBServer connection</name>
  </tArg>
  </SemanticLayerSetNamePattern>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SemanticLayerSetNamePatternResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SemanticLayerSetNamePatternResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SemanticLayerSetNamePattern" :
{
"mon" : "KPACNCCOCDBDGOAEFDJDAIBAMJFFBCDEDJLPICPCMCFDIKCG!M!S!PLDNOFGCOCDBDGOAEMEKOCGKLAEFDMALEOIGKKCECKAAGLFHC!Patterns",
"tArg" :
{
"index" : "358700",
"name" : "DBServer connection"
}
}
}

JSON response:

{
"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:

Working with Data Models