SetRdsResult SetRds(RdsId tRds, SetRdsArg tArg)
tRds. MDM dictionary instance moniker.
tArg. Parameters for changing metadata.
The SetRds operation changes MDM dictionary metadata.
This operation enables the user to change the following information about MDM dictionary structure:
Information about attributes.
Information about parameters.
Information about relationships with other dictionaries.
Information about levels.
Information about unique and non-unique keys
Information about import and export schemas
Parameters of dictionary translation into other languages.
To execute the operation, in the tRds parameter specify the opened dictionary instance moniker, and in the tArg parameter specify parameters of change. The moniker can be obtained on executing the OpenRds operation. In the tArg.pattern field specify the pattern that will be used to make changes, and in the tArg.meta field specify the updated metadata. To save changed MDM dictionary after the SetRds operation, execute the SaveObject or SaveObjectAs operation.
The SetRds operation results in the moniker of the changed dictionary and the requested metadata, if the tArg.metaGet field was defined on executing the operation.
The example of adding a level to structure of an MDM dictionary. The request contains the dictionary moniker, the pattern indicating whether a level must be created, and metadata of the level to be created. The response contains information about all dictionary levels.
{
"SetRds" :
{
"tRds" :
{
"id" : "S1!M!S!N2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"levels" : "Add"
},
"meta" :
{
"levels" :
{
"its" :
{
"it" :
[
{
"k" : "-1",
"id" : "LEVEL_",
"n" : "Additional",
"vis" : "true"
}
]
}
}
},
"metaGet" :
{
"obInst" : "true",
"levels" : "Get"
}
}
}
}
{
"SetRdsResult" :
{
"id" :
{
"id" : "S1!M!S!N2"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "FACT_ELEMENTS",
"n" : "Dictionary with indicators",
"k" : "219797",
"c" : "3076",
"p" : "5611",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "1",
"levels" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "LEVEL_",
"n" : "Additional",
"vis" : "1"
}
]
}
},
"timeDependency" : "TimeReadOnly",
"eeCallback" : "",
"isHierarchical" : "1",
"isSecured" : "0",
"manageVisibility" : "0",
"isCompound" : "0",
"isBigDictionary" : "0",
"hasMandatoryAccess" : "0",
"hasDimMultipleValues" : "1",
"defaultElementKey" : "4294967295",
"isAbacSecured" : "0"
}
}
}
public static SetRdsResult ChangeRDSStructure(RdsId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetRds()
{
tArg = new SetRdsArg()
{
pattern = new RdsMdPattern()
{
levels = ListOperation.Add
},
meta = new RdsMd()
{
levels = new RdsLevels()
{
its = new RdsLevel[]
{
new RdsLevel()
{
k = uint.MaxValue,
id = "LEVEL_" ,
n = "Additional" ,
vis = true
}
}
}
},
metaGet = new RdsMdPattern()
{
levels = ListOperation.Get
}
},
tRds = moniker
};
//Change dictionary structure
var result = somClient.SetRds(tSet);
return result;
}
See also: