Package org.jboss.windup.config
Class AbstractPathConfigurationOption
- java.lang.Object
-
- org.jboss.windup.config.AbstractConfigurationOption
-
- org.jboss.windup.config.AbstractPathConfigurationOption
-
- All Implemented Interfaces:
ConfigurationOption
public abstract class AbstractPathConfigurationOption extends AbstractConfigurationOption
Provides a base for validatingConfigurationOptions of typeFile. This uses the results ofConfigurationOption.getUIType()to determine whether to validate as a file or as a directory.- Author:
- Jesse Sightler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPathConfigurationOption(boolean mustExist)If mustExist is set to true, then the path will fail to validate if it does not already exist.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PathcastToPath(Object file)Class<?>getType()Returns the datatype for this Option (typically File, String, or List). ValidationResultvalidate(Object fileObject)Validate the user indicated value and return the result.-
Methods inherited from class org.jboss.windup.config.AbstractConfigurationOption
getAvailableValues, getDefaultValue, getPriority, setAvailableValues
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.windup.config.ConfigurationOption
getDescription, getLabel, getName, getUIType, isRequired
-
-
-
-
Method Detail
-
getType
public Class<?> getType()
Description copied from interface:ConfigurationOptionReturns the datatype for this Option (typically File, String, or List).
-
validate
public ValidationResult validate(Object fileObject)
Description copied from interface:ConfigurationOptionValidate the user indicated value and return the result.
-
-