org.deduced.text.rule
Class GetFormattedMultiLanguageTextRule

java.lang.Object
  extended by org.deduced.rule.DeductionRuleLibrary
      extended by org.deduced.text.rule.GetFormattedMultiLanguageTextRule
All Implemented Interfaces:
DeductionRuleAnalyzer<java.lang.Object>

public class GetFormattedMultiLanguageTextRule
extends DeductionRuleLibrary

GetParameterizedMultiLanguageTextRule

Author:
Steve

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deduced.rule.DeductionRuleLibrary
DeductionRuleLibrary.CompareResult
 
Field Summary
private static int GENERIC_PARAMETER_START_INDEX
          starting index of generic parameters
 
Constructor Summary
GetFormattedMultiLanguageTextRule()
           
 
Method Summary
 java.lang.Object analyzeRule(java.lang.Object[] inputs, RuleExecutionContext context, PropertyCollection collection, PropertyCollection rule)
          (non-JSDoc)
static java.lang.Object getParameterizedTextForLanguage(PropertyCollection<?,?> translationList, java.lang.String defaultText, PropertyCollection<?,?> language, java.lang.Object[] parameters)
          get parameterized Text For Language
 
Methods inherited from class org.deduced.rule.DeductionRuleLibrary
addReferenceToList, and, bigger, biggerOrEqual, clearPropertyCollection, createDateIncrementList, createObject, createObjectsMatchingAllValues, createObjectsMatchingAllValues, createObjectsMatchingAllValuesInOrderedList, createObjectsMatchingAllValuesInOrderedList, createOrReuseListToMatchType, debug, equals, equalTo, fillList, fillListWithSpecifiedTypes, fillOrderedList, fillOrderedListExtractMatchesValues, fillOrderedListWithSpecifiedTypes, filter, filterList, filterList, filterList, findParentOfType, formatDate, formatDate, formatTime, getModelFromCollection, getPropertyCollectionController, instanceOf, maximumCollection, maximumValue, merge, minimumCollection, minimumValue, not, or, property, removeAlreadyMatchedOrderedListValues, same, smaller, smallerOrEqual, sum, sum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERIC_PARAMETER_START_INDEX

private static final int GENERIC_PARAMETER_START_INDEX
starting index of generic parameters

See Also:
Constant Field Values
Constructor Detail

GetFormattedMultiLanguageTextRule

public GetFormattedMultiLanguageTextRule()
Method Detail

analyzeRule

public java.lang.Object analyzeRule(java.lang.Object[] inputs,
                                    RuleExecutionContext context,
                                    PropertyCollection collection,
                                    PropertyCollection rule)
                             throws java.lang.Exception
(non-JSDoc)

Parameters:
inputs - the array of inputs
context - the rule execution context
collection - the collection on which the rule is executed
rule - the rule being executed
Returns:
the rule result
Throws:
java.lang.Exception - any exception detected during rule execution
See Also:
DeductionRuleAnalyzer.analyzeRule(java.lang.Object[], org.deduced.RuleExecutionContext, org.deduced.PropertyCollection, org.deduced.PropertyCollection)

getParameterizedTextForLanguage

public static java.lang.Object getParameterizedTextForLanguage(PropertyCollection<?,?> translationList,
                                                               java.lang.String defaultText,
                                                               PropertyCollection<?,?> language,
                                                               java.lang.Object[] parameters)
get parameterized Text For Language

Parameters:
translationList - the list of text associated with each language
defaultText - the default text value to use
language - the language to use
parameters - generic parameter array
Returns:
the formatted text associated with the specified language, if none is found, the default text is returned.