Value Descriptors
A Value Descriptor (represented by the ValueDescriptor type in Tribefire) is a normalisation of how different values are represented and persisted, regardless if they represent entities or other values within Tribefire.
On this page
Usage
When configuring ChangeValueManipulation scripts for templates, Value Descriptors are normally assigned to variables as their defaultValue, when you don't want to set a fixed value (which is normally the case in templates). The value is then evaluated upon the execution of the template-based action (for example as the name of the current user) and assigned to the prototype (beware of type mismatching!). The following descriptors are available in Tribefire:
Cast Value Descriptors
These descriptors represent cast operations.
| Value Descriptor | Function | 
|---|---|
| Cast | A ValueDescriptorthat represents a cast from aNumbertype to anotherNumbertype. Allowed types areInteger,Double,Float,Long,BigDecimal. | 
| DecimalCast | A Castthat will cast any number toDecimal. | 
| DoubleCast | A Castthat will cast any number toDouble. | 
| FloatCast | A Castthat will cast any number toFloat. | 
| IntegerCast | A Castthat will cast any number toInteger. | 
| LongCast | A Castthat will cast any number toLong. | 
Context Value Descriptors
These descriptors relate the current state of a Tribefire instance.
| Value Descriptor | Function | 
|---|---|
| CurrentLocale | A StringDescriptorthat represents the current Locale. | 
| FocusedEntity | A ValueDescriptorfor an entity, assuming the context of our resolution is given by a single entity. | 
| UserName | A StringDescriptorthat represents the logged-in user name. | 
Conversion Descriptors
These descriptors represent conversion from one data type to another.
| Value Descriptor | Function | 
|---|---|
| Convert | A ValueDescriptorthat represents a conversion from one data type to another. | 
| FormattedConvert | A Convertthat has a format that can be applied for the conversion. | 
| ToBoleean | A FormattedConvertthat converts toBoolean. | 
| ToDate | A FormattedConvertthat converts toDate. | 
| ToDecimal | A FormattedConvertthat converts toDecimal. | 
| ToDouble | A FormattedConvertthat converts toDouble. | 
| ToEnum | A Convertthat converts toEnum. | 
| ToFloat | A FormattedConvertthat converts toFloat. | 
| ToInteger | A FormattedConvertthat converts toInteger. | 
| ToLong | A FormattedConvertthat converts toLong. | 
| ToString | A FormattedConvertthat converts toString. | 
Logic Descriptors
| Value Descriptor | Function | 
|---|---|
| Conjunction | A Junctionthat performs conjunction operation. | 
| Disjunction | A Junctionthat performs disjunction operation. | 
| Junction | A BooleanDescriptorthat performs logical operations on list of boolean operands. | 
| Negation | A BooleanDescriptorthat negates boolean operand. | 
Math Descriptors
These descriptors perform arithmetic operations.
| Value Descriptor | Function | 
|---|---|
| Add | An ArithmeticOperationthat performs addition. | 
| ApproximateOperation | An ImplicitlyTypedDescriptorthat performs approximate operation on a value with respect to a precision. Allowed types arenumeric( int, long, float, double, decimal) anddate. | 
| ArithmeticOperation | An ImplicitlyTypedDescriptorthat performs arithmetic operation on a list of operands. | 
| Avg | An ArithmeticOperationthat finds the average among a list of operands. The operands must be numeric. The returned type will be either a double or a decimal | 
| Ceil | An ApproximateOperationthat computes the ceiling of the value with respect to the precision. | 
| Divide | An ArithmeticOperationthat performs division. | 
| Floor | An ApproximateOperationthat computes the floor of the value with respect to the precision. | 
| Max | An ArithmeticOperationthat finds the largest value among a list of operands. The operands must be numeric. | 
| Min | An ArithmeticOperationthat finds the smallest value among a list of operands. The operands must be numeric. | 
| Multiply | An ArithmeticOperationthat performs multiplication. | 
| Round | An ApproximateOperationthat computes the rounding of the value with respect to the precision. | 
| Subtract | An ArithmeticOperationthat performs subtraction. | 
Navigation Descriptors
These descriptors relate to navigation within Tribefire elements.
| Value Descriptor | Function | 
|---|---|
| PropertyPath | An ImplicitlyTypedDescriptorthat represents a property path with respect to an entity. | 
| ModelPath | An instance of GmModelPathwhich contains elements reflecting the navigation path shown in the GME. | 
Predicate Descriptors
These descriptors resolve predicates.
| Value Descriptor | Function | 
|---|---|
| Assignable | A BinaryPredicatethat represents an assignable operation. | 
| BinaryPredicate | A BooleanDescriptorthat represents a binary operation on two operands. | 
| Equal | A BinaryPredicatethat represents an equal operation. | 
| Greater | A BinaryPredicatethat represents a greater operation. | 
| GreaterOrEqual | A BinaryPredicatethat represents a greater or equal operation. | 
| Ilike | A BinaryPredicatethat represents an Ilike operation. | 
| In | A BinaryPredicatethat represents an In operation. | 
| InstanceOf | A BinaryPredicatethat represents an InstanceOf operation. | 
| Less | A BinaryPredicatethat represents a Less operation. | 
| LessOrEqual | A BinaryPredicatethat represents a LessOrEqual operation. | 
| Like | A BinaryPredicatethat represents a Like operation. | 
| NotEqual | A BinaryPredicatethat represents a NotEqual operation. | 
String Descriptors
These descriptors represent string manipulation operations.
| Value Descriptor | Function | 
|---|---|
| Concatenation | A StringDescriptorthat concatenates a list of string operands. | 
| Localize | A StringDescriptorthat represents the localisation of a string with respect to a certain locale. | 
| Lower | A StringDescriptorthat converts all uppercase character data to lowercase. | 
| StringOperation | A StringDescriptorthat represents a string manipulation operation on a string. | 
| SubString | A StringOperationthat extracts a substring given a mandatorystartIndexand optionalendIndex. | 
| Upper | A StringDescriptorthat converts all lowercase character data to uppercase. | 
Time Descriptors
These descriptors represent time-related data.
| Value Descriptor | Function | 
|---|---|
| Now | A DateDescriptorthat represents an instant of date, i.e. now. | 
What's Next?
For information on how to use Value Descriptors, see Assigning Value Descriptors to Templates