Interface IFormatModifierFunction
- All Known Implementing Classes:
SSSOMTDefaultModifierFunction
,SSSOMTFlattenFunction
,SSSOMTFormatFunction
,SSSOMTListItemFunction
,SSSOMTShortFunction
,SSSOMTUriExpressionExpandFunction
,SSSOMTUriExpressionSlotValueFunction
public interface IFormatModifierFunction
Represents a SSSOM/T format modifier function.
Such a function may be called in a placeholder inside a format string, after the placeholder name, as follows:
%{placeholder|modifier_function(extra_arg1)}
-
Method Summary
-
Method Details
-
getName
String getName()Gets the name by which the function should be called in a placeholder.- Returns:
- The function name.
-
getSignature
String getSignature()Gets the expected signature of the function. This works similarly toISSSOMTFunction.getSignature()
, but it only concerns the additional arguments beyond the value of the substituted placeholder to modify (e.g.extra_arg1
in the example above).- Returns:
- The function signature.
-
call
Executes the function.- Parameters:
value
- The original value this function is supposed to modify. It is guaranteed never to benull
, but the exact type will depend on what the substituted placeholder was, and also on what any previous modifier function may have done with it.extra
- Additional arguments to the function, if any. If the function declared that it expects some mandatory arguments (through thegetSignature()
method), it is guaranteed the list will contains as many arguments as expected.- Returns:
- The modified value. It may not need be of the same type as the original value (e.g., a function could transform a list value into a string value).
-