org.olat.course.condition
Class ExtendedCondition
java.lang.Object
org.olat.course.condition.ExtendedCondition
- All Implemented Interfaces:
- java.io.Serializable
public class ExtendedCondition
- extends java.lang.Object
- implements java.io.Serializable
Description:
This class represents conditions for the extended easy mode in course editor.
Each condition consists of an attribute, an operator and a value to be tested.
Initial Date: 23.10.2006
- Author:
- Lars Eberle (BPS Bildungsportal Sachsen GmbH)
- See Also:
- Serialized Form
|
Constructor Summary |
ExtendedCondition(java.lang.String attribute,
Operator operator,
java.lang.String value)
Defines a new extended condition. |
ExtendedCondition(java.lang.String attribute,
java.lang.String operator,
java.lang.String value)
Defines a new extended condition and tries to determine the operator class
from this given String. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONDITION_CONNECTOR_AND
public static final transient java.lang.String CONDITION_CONNECTOR_AND
- See Also:
- Constant Field Values
CONDITION_CONNECTOR_OR
public static final transient java.lang.String CONDITION_CONNECTOR_OR
- See Also:
- Constant Field Values
ExtendedCondition
public ExtendedCondition(java.lang.String attribute,
Operator operator,
java.lang.String value)
- Defines a new extended condition.
ExtendedCondition
public ExtendedCondition(java.lang.String attribute,
java.lang.String operator,
java.lang.String value)
- Defines a new extended condition and tries to determine the operator class
from this given String.
If the operator isn't recognized, an Exception will be thrown, so be careful
using this method!
- Throws:
java.lang.IllegalArgumentException - if the given operator string doesn't match an registered operator.
getAttribute
public java.lang.String getAttribute()
- Returns:
- Returns the attribute.
setAttribute
public void setAttribute(java.lang.String attribute)
- Parameters:
attribute - The attribute to set.
getOperator
public Operator getOperator()
- Returns:
- Returns the operator.
setOperator
public void setOperator(Operator operator)
- Parameters:
operator - The operator to set.
getValue
public java.lang.String getValue()
- Returns:
- Returns the value.
setValue
public void setValue(java.lang.String value)
- Parameters:
value - The value to set.
buildExpression
public java.lang.String buildExpression()
- Returns:
- The expression of this condition, e.g. hasAttribute("attributName", "valueToBeTested")