arm4::ArmIdentityProperties Class Reference
[ARM 4.0 Properties, Identity properties]
Contains metadata attributes that are part of the identity of an application or a transaction. More...
Public Member Functions | |
ArmIdentityProperties (const std::vector< std::string > &identityNames, const std::vector< std::string > &identityValues, const std::vector< std::string > &contextNames=NullVector) | |
Constructs an object that contains an immutable set of identity property names and values, and an immutable set of context property names. | |
const std::string & | getIdentityName (int32_t index) const |
const std::string & | getIdentityValue (int32_t index) const |
const std::string & | getContextName (int32_t index) const |
Static Public Attributes | |
static const ArmIdentityProperties | Null |
A null ArmIdentityProperties instance. |
Detailed Description
Contains metadata attributes that are part of the identity of an application or a transaction.
ArmIdentityProperties
addresses a requirement to accept a set of string (name,value) pairs that extend the concept of application and transaction identity and context.
ARM defines two types of properties - identity and context. The difference between them is as follows:
- An identity property's name and value are the same for all instances of an application or transaction.
- A context property's name is the same for all instances of an application or transaction, but a context property's value may vary for each instance.
ArmIdentityProperties
contains some attributes that are common to the identity of both an application and a transaction. The full identity is captured in ArmApplicationDefinition
and ArmTransactionDefinition
, which each adds other attributes to those listed here. All these attributes are immutable. The common attributes include:
- A set of identity names (maximum of ArmConstants::PROPERTY_MAX_COUNT; maximum length of ArmConstants::PROPERTY_NAME_MAX_LENGTH characters).
- A set of identity values (maximum of ArmConstants::PROPERTY_MAX_COUNT; maximum length of ArmConstants::PROPERTY_VALUE_MAX_LENGTH characters).
- A set of context names (maximum of ArmConstants::PROPERTY_MAX_COUNT; maximum length of ArmConstants::PROPERTY_NAME_MAX_LENGTH characters). The context values may change with each instance so they are not part of the identity. The context values are in ArmApplication or ArmTransaction.
Property names and values are in arrays. A property name and value form a (name,value) pair. The array index of a property value in the value array is bound to the property name at the same index in the name array. Moving the (name,value) pair to a different index does not affect the identity of the application. For example, if an application is registered once with a name A and a value X in array indices 0 and once with the same name and value in array indices 1, the registered identity has not changed.
If a name is repeated in the array, the name and its corresponding value are ignored, and the first instance of the name in the array (and its corresponding value) is used. If it is a NullString or a zero-length string, the (name,value) pair is ignored. Names should not contain trailing blank characters or consist of only blank characters.
The names of identity and context properties can be any string, with one exception. Strings beginning with the four characters "<code>ARM:</code>" are reserved for the ARM specification. The specification will define names with known semantics using this prefix. One name format is currently defined. Any name beginning with the eight-character prefix "<code>ARM:CIM:</code>" represents a name defined using the DMTF CIM (Distributed Management Task Force Common Information Model) naming rules. For example, "<code>ARM:CIM:CIM_SoftwareElement.Name</code>" indicates that the property value has the semantics of the Name property of the CIM_SoftwareElement
class. It is anticipated that additional naming semantics are likely to be added in the future.
Constructor & Destructor Documentation
arm4::ArmIdentityProperties::ArmIdentityProperties | ( | const std::vector< std::string > & | identityNames, | |
const std::vector< std::string > & | identityValues, | |||
const std::vector< std::string > & | contextNames = NullVector | |||
) |
Constructs an object that contains an immutable set of identity property names and values, and an immutable set of context property names.
These properties describe identity properties that are common to all instances of an application or transaction.
The names and values are provided in arrays of strings. There can be up to twenty elements in each of the arrays. A NullString
reference and a zero-length string are both treated as a null element. It is permissible to have NullString elements in the middle of the array. For example, it is permissible for the elements at indices 0 and 19 to be non-NullString
and all the elements from indices 1 to 18 to be NullString
. The arrays are position sensitive.
The identity property name and value arrays should contain the same number of elements at the same array indices; for each non-NullString
name or value, there should be a corresponding non-NullString
value or name, respectively, at the same array index. For any array index, if either the name or the value is NullString
, both the name and the value are ignored.
The context property names are provided in this object. The context values are provided in an ArmApplication
, ArmTransaction
or ArmTranReport
object. If the name at an array index is NullString
, the corresponding value in those objects is ignored.
- Parameters:
-
identityNames an vector of identity property names. identityValues an vector of identity property values. contextNames an vector of identity property names.
Member Function Documentation
const std::string& arm4::ArmIdentityProperties::getContextName | ( | int32_t | index | ) | const |
- Parameters:
-
index the index of the context name to be returned.
- Returns:
- the string (the
name
part of the (name,value) context property) at the specified array index. The returned value may be aNullString
.
const std::string& arm4::ArmIdentityProperties::getIdentityName | ( | int32_t | index | ) | const |
- Parameters:
-
index the index of the identity name to be returned.
- Returns:
- the string (the
name
part of the (name,value) identity property) at the specified array index. The returned value will be aNullString
if either the name or value at the index is set to NullString.
const std::string& arm4::ArmIdentityProperties::getIdentityValue | ( | int32_t | index | ) | const |
- Parameters:
-
index the index of the identity value to be returned.
- Returns:
- the string (the
value
part of the (name,value) identity property) at the specified array index. The returned value will be aNullString
if either the name or value at the index is set to a NullString.
The documentation for this class was generated from the following file: