MetabaseLinkResult OpenMetabaseLink(OdId tOb, OpenMetabaseLinkArg tArg)
tOb. Moniker of repository object that is repository connection.
tArg. Operation execution parameters.
The OpenMetabaseLink operation opens repository connection and returns context of working with it.
The operation gets access to repository connection settings. To execute the operation, in the tOb field specify moniker of the repository object that is repository connection, and in the tArg field specify opening parameters. In the tArg.metaGet field specify parameters for getting metadata. The operation results in the moniker of opened repository connection instance and also requested metadata if the appropriate pattern was specified on executing the operation. The further work with opened repository connection instance is executed using the GetMetabaseLink and SetMetabaseLink operations. To close the opened repository connection instance, use the CloseMetabaseLink operation.
The example of opening repository connection for edit. The request contains repository connection moniker. The response contains moniker of opened repository connection instance.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier section.
{
"OpenMetabaseLink" :
{
"tOb" :
{
"id" : "S1!M!174241"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}
{
"OpenMetabaseLinkResult" :
{
"id" :
{
"id" : "S1!M!S!ML7"
}
}
}
public static MetabaseLinkResult OpenMetabaseLink(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenMetabaseLink()
{
tArg = new OpenMetabaseLinkArg()
{
args = new MetabaseLinkOpenArgs()
{
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open repository connection
var tResult = somClient.OpenMetabaseLink(tOpen);
return tResult;
}
See also: