GetObjectByOdId

Syntax

GetObjectResult GetObjectByOdId(OdId tObject, GetObjectArg tArg)

Parameters

tObject. Moniker of the object, which information should be obtained.

tArg. Operation execution parameters.

Description

The GetObjectByOdId operation gets basic properties of repository object.

Comments

The operation gets various basic properties of object (name, identifier, parameter values, shortcut settings, and so on). To execute the operation, in the tObject field specify object moniker, and in the tArg.metaGet field specify the pattern that will be used to get information.

The operation results in the obtained information about object.

Example

Below is the example of getting shortcut properties. The request contains shortcut moniker. The response contains basic properties and information about the object, to which the shortcut refers.

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">
<GetObjectByOdId xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!SHORTCUT_TO_REPORT</id>
  </tObject>
<tArg xmlns="">
<metaGet>
  <obInst>true</obInst>
  <shortcutSource>true</shortcutSource>
  </metaGet>
  </tArg>
  </GetObjectByOdId>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetObjectByOdIdResult 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">
<id xmlns="">
  <id>S1!M!SHORTCUT_TO_REPORT</id>
  </id>
<metaGet xmlns="">
<obInst>
<obDesc ds="" isShortcut="1" isLink="0" ver="11" hf="0">
  <i>SHORTCUT_TO_REPORT</i>
  <n>Regular report (2)</n>
  <k>176020</k>
  <c>2562</c>
  <p>61</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
<shortcutSource>
<obDesc ds="" isShortcut="0" isLink="0" ver="11" hf="0">
  <i>REPORT</i>
  <n>Regular report</n>
  <k>176019</k>
  <c>2562</c>
  <p>61</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </shortcutSource>
  </metaGet>
  </GetObjectByOdIdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetObjectByOdId" :
{
"tObject" :
{
"id" : "S1!M!SHORTCUT_TO_REPORT"
},
"tArg" :
{
"metaGet" :
{
"obInst" : "true",
"shortcutSource" : "true"
}
}
}
}

JSON response:

{
"GetObjectByOdIdResult" :
{
"id" :
{
"id" : "S1!M!SHORTCUT_TO_REPORT"
},
"metaGet" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "1",
"@isLink" : "0",
"@ver" : "11",
"@hf" : "0",
"i" : "SHORTCUT_TO_REPORT",
"n" : "Regular report (2)",
"k" : "176020",
"c" : "2562",
"p" : "61",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"shortcutSource" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "11",
"@hf" : "0",
"i" : "REPORT",
"n" : "Regular report",
"k" : "176019",
"c" : "2562",
"p" : "61",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
}
}
}
}
public static GetObjectResult GetShortcutMeta(MbId mb, string shortcutId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tObject = new GetObjectByOdId()
{
//Operation execution parameters
tArg = new GetObjectArg()
{
metaGet = new MbObjectPattern()
{
shortcutSource = true
}
},
tObject = new OdId()
{
id = mb.id + '!' + shortcutId
}
};
//Get shortcut metadata
var result = somClient.GetObjectByOdId(tObject);
return result;
}

See also:

Working with a Repository