edu.cs.ai.kreator.control.config
Class PathConfigurationOption

java.lang.Object
  extended by edu.cs.ai.kreator.control.config.ConfigurationObject
      extended by edu.cs.ai.kreator.control.config.ConfigurationOption
          extended by edu.cs.ai.kreator.control.config.StringConfigurationOption
              extended by edu.cs.ai.kreator.control.config.PathConfigurationOption

public class PathConfigurationOption
extends StringConfigurationOption

This class represents a path configuration option, i.e. an option with a path as value.

Author:
MaTthias Thimm

Field Summary
static org.apache.log4j.Logger LOG
           
 
Fields inherited from class edu.cs.ai.kreator.control.config.ConfigurationOption
REQUIRES_NO_RESTART, REQUIRES_RESTART
 
Fields inherited from class edu.cs.ai.kreator.control.config.ConfigurationObject
IS_EDITABLE, IS_INVISIBLE, IS_NOT_EDITABLE, IS_VISIBLE, PATHCAPTION_DELIMITER, PATHID_DELIMITER
 
Constructor Summary
PathConfigurationOption(java.lang.String id, java.lang.String caption, java.lang.String description)
           
PathConfigurationOption(java.lang.String id, java.lang.String caption, java.lang.String description, int requiresRestart)
           
PathConfigurationOption(java.lang.String id, java.lang.String caption, java.lang.String description, int visible, int editable)
           
PathConfigurationOption(java.lang.String id, java.lang.String caption, java.lang.String description, int visible, int editable, int requiresRestart)
           
 
Method Summary
 boolean isValid(java.lang.Object value)
          Checks whether the given value object is valid for this option.
 java.lang.Object parseValue(java.lang.String value)
          Parses the given value (read from the XML) into a usable format appropriate for usage.
 
Methods inherited from class edu.cs.ai.kreator.control.config.StringConfigurationOption
writeValue
 
Methods inherited from class edu.cs.ai.kreator.control.config.ConfigurationOption
getDefaultValue, hasDefaultValue, requiresRestart, setDefaultValue
 
Methods inherited from class edu.cs.ai.kreator.control.config.ConfigurationObject
getCaption, getDescription, getId, getParent, getPathCaption, getPathId, hasParent, isEditable, isVisible, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
Constructor Detail

PathConfigurationOption

public PathConfigurationOption(java.lang.String id,
                               java.lang.String caption,
                               java.lang.String description)

PathConfigurationOption

public PathConfigurationOption(java.lang.String id,
                               java.lang.String caption,
                               java.lang.String description,
                               int visible,
                               int editable)

PathConfigurationOption

public PathConfigurationOption(java.lang.String id,
                               java.lang.String caption,
                               java.lang.String description,
                               int requiresRestart)

PathConfigurationOption

public PathConfigurationOption(java.lang.String id,
                               java.lang.String caption,
                               java.lang.String description,
                               int visible,
                               int editable,
                               int requiresRestart)
Method Detail

isValid

public boolean isValid(java.lang.Object value)
Description copied from class: ConfigurationOption
Checks whether the given value object is valid for this option.

Overrides:
isValid in class StringConfigurationOption
Parameters:
value - a value.
Returns:
"TRUE" if the given value is valid for this option.

parseValue

public java.lang.Object parseValue(java.lang.String value)
                            throws java.lang.IllegalArgumentException
Description copied from class: ConfigurationOption
Parses the given value (read from the XML) into a usable format appropriate for usage. NOTE: This is the inverse to ConfigurationOption#writeValue(java.langObject)

Overrides:
parseValue in class StringConfigurationOption
Parameters:
value - a value as string.
Returns:
the option's value in an appropriate format.
Throws:
java.lang.IllegalArgumentException - if the string could not be parsed.