org.olat.core.gui.components.form.flexible.impl.rules
Class FormItemDependencyRuleImpl

java.lang.Object
  extended by org.olat.core.gui.components.form.flexible.impl.rules.FormItemDependencyRuleImpl
All Implemented Interfaces:
FormItemDependencyRule

public abstract class FormItemDependencyRuleImpl
extends java.lang.Object
implements FormItemDependencyRule

Description:
TODO: patrickb Class Description for FormItemDependencyRuleImpl

Initial Date: 09.02.2007

Author:
patrickb

Field Summary
static int CUSTOM
           
static int HIDE_ERROR
           
static int MAKE_INVISIBLE
           
static int MAKE_READONLY
           
static int MAKE_VISIBLE
           
static int MAKE_WRITABLE
           
static int RESET
           
 
Constructor Summary
FormItemDependencyRuleImpl(FormItem triggerElement, java.lang.Object triggerValue, java.util.Set<FormItem> targets, int type)
           
 
Method Summary
 boolean applyRule(FormItemContainer formLayout)
          Checks if rule is triggered and executes the desired actions on the target elements.
 java.lang.String getIdentifier()
          identify this rule without taking the target elements into account.
 java.util.Set<FormItem> getTargetElements()
           
 FormItem getTriggerElement()
          which form element triggers this rule
 java.lang.Object getTriggerValue()
          which trigger value in the form element
 void setDependencyRuleApplayable(DependencyRuleApplayable applayable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAKE_INVISIBLE

public static final int MAKE_INVISIBLE
See Also:
Constant Field Values

MAKE_VISIBLE

public static final int MAKE_VISIBLE
See Also:
Constant Field Values

MAKE_READONLY

public static final int MAKE_READONLY
See Also:
Constant Field Values

MAKE_WRITABLE

public static final int MAKE_WRITABLE
See Also:
Constant Field Values

HIDE_ERROR

public static final int HIDE_ERROR
See Also:
Constant Field Values

RESET

public static final int RESET
See Also:
Constant Field Values

CUSTOM

public static final int CUSTOM
See Also:
Constant Field Values
Constructor Detail

FormItemDependencyRuleImpl

public FormItemDependencyRuleImpl(FormItem triggerElement,
                                  java.lang.Object triggerValue,
                                  java.util.Set<FormItem> targets,
                                  int type)
Parameters:
triggerElement -
triggerValue -
targets -
Method Detail

applyRule

public boolean applyRule(FormItemContainer formLayout)
Description copied from interface: FormItemDependencyRule
Checks if rule is triggered and executes the desired actions on the target elements. returns true if rule was applied

Specified by:
applyRule in interface FormItemDependencyRule
See Also:
org.olat.core.gui.components.form.flexible.api.FormItemDependencyRule#applyRule()

setDependencyRuleApplayable

public void setDependencyRuleApplayable(DependencyRuleApplayable applayable)
Specified by:
setDependencyRuleApplayable in interface FormItemDependencyRule

getIdentifier

public java.lang.String getIdentifier()
Description copied from interface: FormItemDependencyRule
identify this rule without taking the target elements into account.

Specified by:
getIdentifier in interface FormItemDependencyRule
Returns:
See Also:
org.olat.core.gui.components.form.flexible.api.FormItemDependencyRule#getIdentifier()

getTargetElements

public java.util.Set<FormItem> getTargetElements()
Specified by:
getTargetElements in interface FormItemDependencyRule
Returns:
See Also:
org.olat.core.gui.components.form.flexible.api.FormItemDependencyRule#getTargetElements()

getTriggerElement

public FormItem getTriggerElement()
Description copied from interface: FormItemDependencyRule
which form element triggers this rule

Specified by:
getTriggerElement in interface FormItemDependencyRule
Returns:
See Also:
org.olat.core.gui.components.form.flexible.api.FormItemDependencyRule#getTriggerElement()

getTriggerValue

public java.lang.Object getTriggerValue()
Description copied from interface: FormItemDependencyRule
which trigger value in the form element

Specified by:
getTriggerValue in interface FormItemDependencyRule
Returns:
See Also:
org.olat.core.gui.components.form.flexible.api.FormItemDependencyRule#getTriggerValue()