org.deduced.controller.rule
Class PropertyIsRemoveableRule

java.lang.Object
  extended by org.deduced.controller.rule.PropertyIsRemoveableRule
All Implemented Interfaces:
DeductionRuleAnalyzer<java.lang.Boolean>

public class PropertyIsRemoveableRule
extends java.lang.Object
implements DeductionRuleAnalyzer<java.lang.Boolean>

Rule to set the "is changeable" flag on a property controller.

Author:
Steve McDuff

Constructor Summary
PropertyIsRemoveableRule()
           
 
Method Summary
 java.lang.Boolean analyzeRule(java.lang.Object[] inputs, RuleExecutionContext context, PropertyCollection collection, PropertyCollection rule)
          (non-Javadoc)
static boolean isPropertyInputPossibleToEnable(PropertyCollection<?,?> collection, java.lang.Boolean isEnabled, java.lang.Object controlledKey)
          test if a property input is valid to be enabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyIsRemoveableRule

public PropertyIsRemoveableRule()
Method Detail

analyzeRule

public java.lang.Boolean analyzeRule(java.lang.Object[] inputs,
                                     RuleExecutionContext context,
                                     PropertyCollection collection,
                                     PropertyCollection rule)
(non-Javadoc)

Specified by:
analyzeRule in interface DeductionRuleAnalyzer<java.lang.Boolean>
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
See Also:
DeductionRuleAnalyzer.analyzeRule(java.lang.Object[], org.deduced.RuleExecutionContext, org.deduced.PropertyCollection, org.deduced.PropertyCollection)

isPropertyInputPossibleToEnable

public static boolean isPropertyInputPossibleToEnable(PropertyCollection<?,?> collection,
                                                      java.lang.Boolean isEnabled,
                                                      java.lang.Object controlledKey)
test if a property input is valid to be enabled

Parameters:
collection - the collection to control
isEnabled - the controller enabled flag
controlledKey - the controlled property key
Returns:
true if the property controller can be enabled in those conditions