Package net.sf.basedb.core
Class PathParameterType
This class represent a parameter type that is a path to either a
directory or a file. This parameter type should be used when a plugin
needs to ask for a directory or file to save it's output.
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPathParameterType
(Path.Type pathType) Create a new optional path parameter type.PathParameterType
(Path.Type pathType, String defaultValue, boolean notNull) Create a new path parameter type.PathParameterType
(Path.Type pathType, String defaultValue, boolean notNull, int multiplicity, int width, int height, List<String> items) -
Method Summary
Modifier and TypeMethodDescriptionGet the type of the path to ask for.(package private) ParameterValueData<String>
Create a newTextParameterValueData
object.toString()
(package private) void
validateValue
(String name, String value) Checks if the value is a valifPath
value.Methods inherited from class net.sf.basedb.core.ParameterType
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, isMasked, validate, validate
-
Field Details
-
pathType
-
-
Constructor Details
-
PathParameterType
Create a new optional path parameter type.- Parameters:
pathType
- If the path is to a directory or file
-
PathParameterType
Create a new path parameter type.- Parameters:
pathType
- If the path is to a directory or filedefaultValue
- The default value of this parameternotNull
- FALSE if nulls values are allowed, TRUE otherwise
-
PathParameterType
-
-
Method Details
-
toString
-
validateValue
Checks if the value is a valifPath
value.- Specified by:
validateValue
in classParameterType<String>
- Parameters:
value
- The value to testname
- The name of the parameter, use the name if there is need to throw an exception- Throws:
InvalidDataException
- If the value is not a valid path
-
newParameterValueData
ParameterValueData<String> newParameterValueData()Create a newTextParameterValueData
object.- Specified by:
newParameterValueData
in classParameterType<String>
-
getPathType
Get the type of the path to ask for.- Returns:
- A
Path.Type
object
-