org.qtitools.qti.node.item.template.processing
Enum TemplateRuleType

java.lang.Object
  extended by java.lang.Enum<TemplateRuleType>
      extended by org.qtitools.qti.node.item.template.processing.TemplateRuleType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TemplateRuleType>

public enum TemplateRuleType
extends java.lang.Enum<TemplateRuleType>

This class creates all supported template rules from given CLASS_TAG.

Supported template rules: templateCondition, setTemplateValue, exitTemplate, setCorrectResponse, setDefaultValue.

Author:
Jonathon Hare

Enum Constant Summary
EXIT_TEMPLATE
          Creates exitTemplate template rule.
SET_CORRECT_RESPONSE
          Creates setCorrectResponse template rule.
SET_DEFAULT_VALUE
          Creates setDefaultValue template rule.
SET_TEMPLATE_VALUE
          Creates setTemplateValue template rule.
TEMPLATE_CONDITION
          Creates templateCondition template rule.
 
Method Summary
abstract  TemplateRule create(XmlObject parent)
          Creates template rule.
static TemplateRule getInstance(XmlObject parent, java.lang.String classTag)
          Creates template rule.
 java.lang.String toString()
           
static TemplateRuleType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TemplateRuleType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TEMPLATE_CONDITION

public static final TemplateRuleType TEMPLATE_CONDITION
Creates templateCondition template rule.

See Also:
TemplateCondition

SET_TEMPLATE_VALUE

public static final TemplateRuleType SET_TEMPLATE_VALUE
Creates setTemplateValue template rule.

See Also:
SetTemplateValue

EXIT_TEMPLATE

public static final TemplateRuleType EXIT_TEMPLATE
Creates exitTemplate template rule.

See Also:
ExitTemplate

SET_CORRECT_RESPONSE

public static final TemplateRuleType SET_CORRECT_RESPONSE
Creates setCorrectResponse template rule.

See Also:
SetCorrectResponse

SET_DEFAULT_VALUE

public static final TemplateRuleType SET_DEFAULT_VALUE
Creates setDefaultValue template rule.

See Also:
SetDefaultValue
Method Detail

values

public static final TemplateRuleType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TemplateRuleType c : TemplateRuleType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TemplateRuleType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

create

public abstract TemplateRule create(XmlObject parent)
Creates template rule.

Parameters:
parent - parent of created template rule
Returns:
created template rule

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<TemplateRuleType>

getInstance

public static TemplateRule getInstance(XmlObject parent,
                                       java.lang.String classTag)
Creates template rule.

Parameters:
parent - parent of created template rule
classTag - CLASS_TAG of created template rule
Returns:
created template rule


Copyright © 2009. All Rights Reserved.