FUNCTION xpxDefineProtectedData(modelId : GENERIC; instanceTypeNameOrInstanceTypeIdOrInstanceId : GENERRIC; permittetOperations : INTEGER; createCondition, deleteCondition : STRING; writeCondition, readCondition : STRING; aggrOperationsCondition : STRING; selectCondition, selectConditionFilter : STRING; options : INTEGER; attributeNameOrAttributeId1 : GENERIC; attribute1Operations : INTEGER; attribute1Condition : STRING; attributeNameOrAttributeId2 : GENERIC; atribute2Operations : INTEGER; attribute2Condition : STRING; . . . attributeNameOrAttributeIdN : GENERIC; attributeNOperations : INTEGER; attributeNCondition : STRING) rstat : INTEGER;
This function will define one EDMprotectedData item in an EDMdataModel. An EDMprotectedData item can be one entityInstance, one instance type (one entity) or one instance type and all its sybtypes. The EDMprotectedData description is stored as "meta-data" in the actual model. This meta-data is implemented using USER_DEFINED_ENTITY.
NOTE: Be aware of the options EXCLUDE_USER_DEFINED_ENTITIES and ONLY_USER_DEFINED_ENTITIES in the EDMwriteStepFile operations
The xpxDefineProtectedData() operation can only be successfully performed for callers that have ADMINISTRATOR rights to the actual model. The xpxDefineProtectedData() must be performed in an open EDMwriteTransaction.
Any "condition" argument in the following functions are any legal EDMexpressX logical functions. Such expressions may contain invocations of any functions in the actual EDMmethodSchema (EDMquerySchema, EDMruleSchema, EDMmapSchema), in the actual underlying Express schema, any EDMsystemQuery, any built-in EDMexpressX functions, any Express built-in schema.
The following constants are implemented for being used in such "conditions":
xpxCREATE_ACCESS, xpxWRITE_ACCESS, xpxREAD_ACCESS, xpxDELETE_ACCESS, xpxSELECT_ACCESS
XPXCURRENTUSERID, XPXSUPERUSERID, XPXCURRENTGROUPID ,XPXCURRENTATTRIBUTEVALUE
XPXNEWATTRIBUTEVALUE,XPXCURRENTATTRIBUTEID,XPXCURRENTOPERATION,XPXCURRENTAGGRINDEX
XPXCURRENTAGGRID, XPXNEWAGGRELEMENTVALUE
XPXCREATE_AGGR, XPXGET_AGGR_MEMBER_COUNT, XPXPUT_AGGR_ELEMENT_BY_INDEX, XPXAPPEND_AGGR_ELEMENT, XPXADD_AGGR_ELEMENT
XPXGET_AGGR_ELEMENT_BY_INDEX, XPXGET_AGGR_ELEMENTS, XPXPUT_AGGR_ELEMENTS, XPXDELETE_AGGR_ELEMENTS_BY_VALUE
XPXDELETE_AGGR_ELEMENT_BY_INDEX, XPX_INSERT_AGGR_ELEMENT_BEFORE_INDEX
Arguments
1 | Type | Name | Comment |
2 | GENERIC | modelId | The EDMdataModel to define the actual ProtectedData for Only ADMINISTRATOR's of the model are permitted to perform this operation successfully The actual EDMdataModel must be in an open EDMwriteTransaction |
3 | GENERIC | instanceTypeNameOrInstanceTypeIdOrInstanceId | An EntityInstanceId, an InstanceTypeId (entityId) or an InstanceTypeName (EntityName) that defines the EDMprotectedData item. |
4 | INTEGER | permittetOperations | Any combinations of xpxCREATE_ACCESS, xpxWRITE_ACCESS, xpxREAD_ACCESS, xpxDELETE_ACCESS, xpxSELECT_ACCESS .The default value is all set, i.e., all operations are legal |
5 | STRING | createCondition | Any legal textual logical EDMexpressX expression that be evaluated before an xpxCREATE_ACCESS operation. This operation must be evaluated to TRUE before the actual operation can be performed. The default value is NULL = no condition = TRUE |
6 | STRING | deleteCondition | Same as "createCondition" but for xpxDELETE_ACCESS operations |
7 | STRING | writeCondition | Same as "createCondition" but for xpxWRITE_ACCESS operations |
8 | STRING | readCondition | Same as "createCondition" but for xpxREAD_ACCESS operations |
9 | STRING | aggrOperationsCondition | Same as "createCondition" but for any operations on aggregates |
10 | STRING | selectCondition | Same as "createCondition" but for xpxSELECT_ACCESS operations |
11 | STRING | selectConditionFilter | Condition that will be "AND(ed)" to the conditions specified by the caller in an xpxSELECT_ACCESS operation the default value is NULL, i.e., no condition will be "AND(ed)" to the user specified select operation condition. |
12 | INTEGER | options | Default value is xpxEXCLUDE_ATTRIBUTES |
13 | GENERIC | attributeNameOrAttributeIdN | AttributeId or attributeName |
14 | INTEGER | attributeNOperations | Permitted operation on attribute, i.e., xpxREAD_ACCESS or xpxWRITE_ACCESS. Default is xpxREAD and xpxWRITE |
15 | STRING | attributeNCondition | Condition that will be evaluated before any access to this specified attribute. The default value is NULL = no condition = TRUE |
Return Value
Options
Option | Comment |
xpxSUBTYPES | Only effective when the actual "instanceTypeNameOrInstanceTypeIdOrInstanceId" is an instance type, then this options specifies that the actual EDMprotectedData item includes all subtypes of the specified EDMprotectedData item |
xpxINCLUDE_ATTRIBUTES | Only attributes listed in the following arguments can be accessed |
xpxEXCLUDE_ATTRIBUTES | All attributes except those listed in the following arguments can be accessed |
Example
<Missing Example>
See also
Filter by label
There are no items with the selected labels at this time.