Difference between revisions of "Attributes"
(Created page with "=== Prerequisite === Attributes are supported since UBIK Version 2.5. === Introduction === UBIK Attributes are used to store additional information per property. Attributes a...") |
|||
Line 12: | Line 12: | ||
{{Attention|The new Meta Attribute Property does replace the NEDDS_VALIDATION property (Version 2.5)!}} | {{Attention|The new Meta Attribute Property does replace the NEDDS_VALIDATION property (Version 2.5)!}} | ||
+ | |||
+ | |||
+ | UBIK supports the following types of attributes | ||
+ | * Content Attributes | ||
+ | * Proxy Attributes | ||
+ | |||
Line 31: | Line 37: | ||
+ | ==== Properties for Proxy Attributes ==== | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Property !! Purpose | ||
+ | |- | ||
+ | | InterfaceTimestamp || Time stamp when the property value was ex- / imported | ||
+ | |- | ||
+ | |} | ||
− | |||
− | |||
− | |||
Revision as of 10:49, 30 March 2015
Contents
Prerequisite
Attributes are supported since UBIK Version 2.5.
Introduction
UBIK Attributes are used to store additional information per property. Attributes are objects managing information fields for properties. As every UBIK Object they are configurable according the set of properties they are carrying.
Configuration
UBIK Attributes must be activated by defining the Meta Attribute property for a MetaProperty.
UBIK supports the following types of attributes
- Content Attributes
- Proxy Attributes
Standard properties of Attributes
Property | Purpose |
---|---|
ValidationTimestamp | Time stamp when the property value was validated |
ValidationUser | Login who validated the property value |
Owner | Ubik Object the attribute belongs to (the owner of the related Property) |
MetaProperty | MetaProperty of the related Property |
Properties for Proxy Attributes
Property | Purpose |
---|---|
InterfaceTimestamp | Time stamp when the property value was ex- / imported |
It is possible to derive from the standard attributes in customizing and add additional attributes.
Accessing the data
Attribute data must be accessed via their properties. Therefor properties provide methods to read and write attribute values:
/// <summary>
/// Tries the get attribute value.
/// </summary>
/// <typeparam name="T">attribute value type</typeparam>
/// <param name="attributeName">Name of the attribute.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TryGetAttributeValue<T>(string attributeName, out T value)
/// <summary>
/// Tries the get attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeID">The attribute identifier.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TryGetAttributeValue<T>(SystemStrings attributeID, out T value)
/// <summary>
/// Tries the set attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeName">Name of the attribute.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TrySetAttributeValue<T>(string attributeName, T value)
/// <summary>
/// Tries the set attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeID">The attribute identifier.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TrySetAttributeValue<T>(SystemStrings attributeID, T value)
/// Tries the get attribute value.
/// </summary>
/// <typeparam name="T">attribute value type</typeparam>
/// <param name="attributeName">Name of the attribute.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TryGetAttributeValue<T>(string attributeName, out T value)
/// <summary>
/// Tries the get attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeID">The attribute identifier.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TryGetAttributeValue<T>(SystemStrings attributeID, out T value)
/// <summary>
/// Tries the set attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeName">Name of the attribute.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TrySetAttributeValue<T>(string attributeName, T value)
/// <summary>
/// Tries the set attribute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="attributeID">The attribute identifier.</param>
/// <param name="value">The value.</param>
/// <returns>true as successfull</returns>
public virtual bool TrySetAttributeValue<T>(SystemStrings attributeID, T value)