2.17.2: 2011-06-17

net.sf.basedb.core
Class FileParameterType

java.lang.Object
  extended by net.sf.basedb.core.ParameterType<File>
      extended by 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
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
(package private)  ItemParameterValueData newParameterValueData()
          Create a new ItemParameterValueData 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, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 allowed
notNull - FALSE if nulls values are allowed, TRUE otherwise
multiplicity - How many values that can be tied to this parameter. 0 is unlimited values and 1 is default.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

validateValue

void validateValue(String name,
                   File value)
             throws InvalidDataException
Always validate.

Specified by:
validateValue in class ParameterType<File>
Parameters:
name - The name of the parameter, use the name if there is need to throw an exception
value - The value
Throws:
InvalidDataException - If the value is not valid

newParameterValueData

ItemParameterValueData newParameterValueData()
Create a new ItemParameterValueData object.

Specified by:
newParameterValueData in class ParameterType<File>

2.17.2: 2011-06-17