Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiPutProtectedAttrBN(SdaiAppInstance   appInstance,
                                  SdaiString        attributeName,
                                  SdaiPrimitiveType valueType,
                                  ...); /* value */

Assigns a value to a protected attribute.

...

Some system models are created and maintained by EDM and therefore the users need no write access to them. However, in these system models, some attributes may still be manipulated by selected users even if the model it self is open for read only. The ordinary operations such as e.g sdaiPutAttr and sdaiUnsetAttr, would return an error code if used on these attributes. To manipulate protected attributes one must use the protected-versions of the operations.

...

Arguments

...

TypeNameComment
SdaiAppInstance

appInstance

A numeric instanceID that uniquely identifies the instance of interest in the EDMdatabase.

SdaiString

attributeName

The name of the protected attribute of interest.

SdaiPrimitiveType

valueType

The primitive type of the protected attribute.

 

value

The value to assign to the protected attribute.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiModel modId, edmModId;
 SdaiAggr adminAggrId;
 SdaiInstance johnnyId, lucyId;
  
 /* Get the sdaiModel Id */
 modId = edmiGetModelBN("MyRepository", "MyModel");

...


  
 /* Get Johnnys and lucys user Ids */

...


 rstat = edmiGetUser("johnny", &johnnyId);

...


 rstat = edmiGetUser("lucy", &lucyId);

...


  
 /* Get the edm_model Id in the ExpressDataManager Model */

...


 sdaiGetAttrBN(modId, "edm_model", sdaiINSTANCE, &edmModId);

...


  
 /* Get the model administrator aggregate */

...


 sdaiGetAttrBN(edmModId, "ADMINISTRATORS", sdaiAGGR, &adminAggrId);

...


  
 /* Remove Lucy from list of model administrators */

...


 rstat = edmiDeleteProtectedElement(adminAggrId, sdaiINSTANCE, lucyId);

...


  
 /* Add Johnny to list of model administrators */

...


 rstat = edmiAddProtectedElement(adminAggrId, sdaiINSTANCE, johnnyId);

...


  
 /* Grant create_repository_rights to Johnny */

...


 rstat = edmiPutProtectedAttrBN(johnnyId, "creating_repository_permission",

...


 sdaiBOOLEAN, sdaiTRUE);

...

 
  
 /* Remove the description of MyModel */

...


 rstat = edmiUnsetProtectedAttrBN(edmModId, "description");

...


  
 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"