Package net.sf.basedb.core
Class FileParameterType
- java.lang.Object
-
- net.sf.basedb.core.ParameterType<File>
-
- net.sf.basedb.core.FileParameterType
-
public class FileParameterType extends ParameterType<File>
This class represent a parameter type that is a file.- Version:
- 2.0
- Author:
- Samuel, Nicklas
- Last modified
- $Date$
-
-
Constructor Summary
Constructors Constructor Description FileParameterType()
Create a new file parameter type, allowing null values.FileParameterType(File defaultValue, boolean notNull, int multiplicity)
Create a new file parameter type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ItemParameterValueData
newParameterValueData()
Create a newItemParameterValueData
object.String
toString()
(package private) void
validateValue(String name, File value)
Always validate.-
Methods inherited from class net.sf.basedb.core.ParameterType
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, isMasked, validate, validate
-
-
-
-
Constructor Detail
-
FileParameterType
public FileParameterType()
Create a new file parameter type, allowing null values.
-
FileParameterType
public FileParameterType(File defaultValue, boolean notNull, int multiplicity)
Create a new file parameter type.- Parameters:
defaultValue
- Default value of the parameter. Null is allowednotNull
- FALSE if nulls values are allowed, TRUE otherwisemultiplicity
- How many values that can be tied to this parameter. 0 is unlimited values and 1 is default.
-
-
Method Detail
-
validateValue
void validateValue(String name, File value) throws InvalidDataException
Always validate.- Specified by:
validateValue
in classParameterType<File>
- Parameters:
name
- The name of the parameter, use the name if there is need to throw an exceptionvalue
- The value- Throws:
InvalidDataException
- If the value is not valid
-
newParameterValueData
ItemParameterValueData newParameterValueData()
Create a newItemParameterValueData
object.- Specified by:
newParameterValueData
in classParameterType<File>
-
-