Skip to content
logoBack to home screen

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.

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 DescriptorFunction
CastA ValueDescriptor that represents a cast from a Number type to another Number type. Allowed types are Integer, Double, Float, Long, BigDecimal.
DecimalCastA Cast that will cast any number to Decimal.
DoubleCastA Cast that will cast any number to Double.
FloatCastA Cast that will cast any number to Float.
IntegerCastA Cast that will cast any number to Integer.
LongCastA Cast that will cast any number to Long.

Context Value Descriptors

These descriptors relate the current state of a Tribefire instance.

Value DescriptorFunction
CurrentLocaleA StringDescriptor that represents the current Locale.
FocusedEntityA ValueDescriptor for an entity, assuming the context of our resolution is given by a single entity.
UserNameA StringDescriptor that represents the logged-in user name.

Conversion Descriptors

These descriptors represent conversion from one data type to another.

Value DescriptorFunction
ConvertA ValueDescriptor that represents a conversion from one data type to another.
FormattedConvertA Convert that has a format that can be applied for the conversion.
ToBoleeanA FormattedConvert that converts to Boolean.
ToDateA FormattedConvert that converts to Date.
ToDecimalA FormattedConvert that converts to Decimal.
ToDoubleA FormattedConvert that converts to Double.
ToEnumA Convert that converts to Enum.
ToFloatA FormattedConvert that converts to Float.
ToIntegerA FormattedConvert that converts to Integer.
ToLongA FormattedConvert that converts to Long.
ToStringA FormattedConvert that converts to String.

Logic Descriptors

Value DescriptorFunction
ConjunctionA Junction that performs conjunction operation.
DisjunctionA Junction that performs disjunction operation.
JunctionA BooleanDescriptor that performs logical operations on list of boolean operands.
NegationA BooleanDescriptor that negates boolean operand.

Math Descriptors

These descriptors perform arithmetic operations.

Value DescriptorFunction
AddAn ArithmeticOperation that performs addition.
ApproximateOperationAn ImplicitlyTypedDescriptor that performs approximate operation on a value with respect to a precision. Allowed types are numeric ( int, long, float, double, decimal) and date.
ArithmeticOperationAn ImplicitlyTypedDescriptor that performs arithmetic operation on a list of operands.
AvgAn ArithmeticOperation that finds the average among a list of operands. The operands must be numeric. The returned type will be either a double or a decimal
CeilAn ApproximateOperation that computes the ceiling of the value with respect to the precision.
DivideAn ArithmeticOperation that performs division.
FloorAn ApproximateOperation that computes the floor of the value with respect to the precision.
MaxAn ArithmeticOperation that finds the largest value among a list of operands. The operands must be numeric.
MinAn ArithmeticOperation that finds the smallest value among a list of operands. The operands must be numeric.
MultiplyAn ArithmeticOperation that performs multiplication.
RoundAn ApproximateOperation that computes the rounding of the value with respect to the precision.
SubtractAn ArithmeticOperation that performs subtraction.

These descriptors relate to navigation within Tribefire elements.

Value DescriptorFunction
PropertyPathAn ImplicitlyTypedDescriptor that represents a property path with respect to an entity.
ModelPathAn instance of GmModelPath which contains elements reflecting the navigation path shown in the GME.

Predicate Descriptors

These descriptors resolve predicates.

Value DescriptorFunction
AssignableA BinaryPredicate that represents an assignable operation.
BinaryPredicateA BooleanDescriptor that represents a binary operation on two operands.
EqualA BinaryPredicate that represents an equal operation.
GreaterA BinaryPredicate that represents a greater operation.
GreaterOrEqualA BinaryPredicate that represents a greater or equal operation.
IlikeA BinaryPredicate that represents an Ilike operation.
InA BinaryPredicate that represents an In operation.
InstanceOfA BinaryPredicate that represents an InstanceOf operation.
LessA BinaryPredicate that represents a Less operation.
LessOrEqualA BinaryPredicate that represents a LessOrEqual operation.
LikeA BinaryPredicate that represents a Like operation.
NotEqualA BinaryPredicate that represents a NotEqual operation.

String Descriptors

These descriptors represent string manipulation operations.

Value DescriptorFunction
ConcatenationA StringDescriptor that concatenates a list of string operands.
LocalizeA StringDescriptor that represents the localisation of a string with respect to a certain locale.
LowerA StringDescriptor that converts all uppercase character data to lowercase.
StringOperationA StringDescriptor that represents a string manipulation operation on a string.
SubStringA StringOperation that extracts a substring given a mandatory startIndex and optional endIndex.
UpperA StringDescriptor that converts all lowercase character data to uppercase.

Time Descriptors

These descriptors represent time-related data.

Value DescriptorFunction
NowA DateDescriptor that 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