SetSegResult SetSeg(SegId tSeg, SetSegArg tArg)
tSeg. Cube segment instance moniker.
tArg. Operation execution parameters.
The SetSeg operation changes cube segment metadata.
To execute the operation, in the tAlg field specify segment instance moniker, and in the tArg.pattern field specify the pattern that will be used to change metadata, and in the tArg.meta field specify metadata to be set. One can also determine the tArg.metaGet pattern to get metadata after it was changed. The moniker can be obtained after executing the OpenSeg operation.
To save changes, use the SaveObject operation.
The operation results in the updated metadata if the tArg.metaGet field was defined.
Below is the example of changing cube segment activity. The request contains moniker of opened segment instance and activity value to be set. The response contains updated information about segment activity value to be set.
{
"SetSeg" :
{
"tSeg" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"active" : "true"
},
"meta" :
{
"data" :
{
"active" : "false"
}
},
"metaGet" :
{
"obInst" : "true",
"active" : "true"
}
}
}
}
{
"SetSegResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "OBJ317192",
"n" : "Cube segment",
"k" : "317192",
"c" : "1295",
"p" : "317162",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"data" :
{
"active" : "0"
}
}
}
}
public static SetSegResult SetSeg(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSeg()
{
tArg = new SetSegArg()
{
pattern = new SegMdPattern()
{
active = true
},
meta = new SegMd()
{
data = new SegData()
{
active = false
}
},
metaGet = new SegMdPattern()
{
active = true
}
},
tSeg = new SegId() { id = moniker }
};
// Change cube segment settings
var result = somClient.SetSeg(tSet);
return result;
}
See also: