Figure 1P-16 - Simple PolicyVariable

Header Image
Project:
Figure 1P-16 - Simple PolicyVariable : Class diagram
Created: 3/28/2022 3:51:09 PM
Modified: 9/16/2023 8:30:08 PM
Project:
Advanced:
A PolicyVariable is an abstract class for modeling different types of variables that can be used to form a PolicyStatement. The variable specifies an attribute or concept that should either be matched or in some way compared to a value when the condition is evaluated.<br/>There are three important factors that must be taken into account in the design of variables. The first is that not every combination of a variable and a value creates a meaningful condition. For example, port numbers cannot be negative. Rather, the type of variable in the condition defines the set of matchable value types.<br/>Second, just because a value has the correct data type does not mean that it can be meaningfully compared to a variable. To continue the above example, a port of 1,000,000 is meaningless. This is handled in this model by specifying constraints (using OCL) that apply to a particular variable that must be obeyed by any value that it is being compared to. The ValueConstraintInVariable association binds a PolicyVariable to a PolicyValue; any constraints that are required in this binding are added to an instance of this association using OCL.<br/>Third, while the model defines a set of useful PolicyVariables, there is a high likelihood that specific applications will need extensions to these variables. This is accommodated through the notion of standard and custom PolicyVariable classes.<br/>There are two subclasses of PolicyVariable, called VariableCustom and VariableStandard. The VariableCustom class defines a set of standardized policy variables for use in an application-specific manner. The term “custom” means that such variables are explicitly designed to work with attributes that are not in any of the VariableStandard subclasses. This means that the particular semantics (including any applicable constraints) are not known to SID model.<br/>The VariableCustom class is an abstract base class that provides two basic attributes to define custom variables that can be used in an application-specific fashion. The variableModelAttribute attribute is a string that defines the name of the attribute within the class specified in the variableModelClass attribute that is to be evaluated or set as a PolicyVariable. Similarly, the variableModelClass attribute is a string that defines the class name whose attribute is to be evaluated or set as a PolicyVariable. This enables the VariableCustom class to point to other attributes of other classes that can be defined as extensions of the standard SID model.<br/>A simplified overview of PolicyVariables is shown in Figure below.<br/>Thus, the combination of variableModelClass and variableModelAttribute enable an application to define a new class that contains an attribute to be used as a PolicyVariable. This provides important extensibility, and enables an application to define its own set of classes and attributes to extend the framework.<br/>The VariableStandard class is an abstract base class for defining a standard set of PolicyVariable objects that are common to most applications. This is the superclass for a standard set of PolicyVariable subclasses that are part of the model.<br/>Currently, the model defines fifteen different subclasses of the VariableStandard class. Two of the more important ones are shown in Figure below – these are the PolicyConditionTimePeriod and the PolicyConditionVendor classes.<br/>PolicyConditionTimePeriod is based on [RFC 2445], and is used to enable or disable a PolicyCondition according to a pre-determined time schedule. The various attributes enable a simple or complex recurring time period to be defined.<br/>PolicyConditionVendor is a concrete base class that provides a general extension mechanism for representing PolicyConditions that have not been modeled with the attributes specified in this model. This class uses two of its properties (constraintData and constraintEncoding) for defining the content and format of a vendor-specific condition. Thus, an application can define a set of encodings which determine how to interpret complex data. Each of these encodings can be given its own OID, enabling them to be registered with some external agency, such as IANA. Its other two attributes are used to describe the type of condition that this represents, and to provide a standard definition of a TRUE or FALSE response. This latter enables this object to interoperate with other PolicyVariableStandard objects as part of a PolicyConditon clause. Standardized extensions are not expected to use this class.<br/>