@Exported
public interface DataBinder
Modifier and Type | Method and Description |
---|---|
void |
addFile(String name,
File file)
Add a file for a given file name.
|
void |
addFile(String name,
TransferFile file)
Add a file for a given file name
|
void |
addOptionList(String name,
List<String> values)
Add an option list with a given name
|
void |
addResultSet(String name,
DataResultSet resultSet)
Add a result set with a given name
|
boolean |
containsFiles()
Check if there are files
|
String |
getFieldType(String name)
Retrieve the field type for a given field name.
|
Collection<String> |
getFieldTypeNames()
Retrieve all field names
|
TransferFile |
getFile(String name)
Retrieve a file for a given file name
|
Collection<String> |
getFileNames()
Retrieve all file names
|
String |
getLocal(String name)
Shortcut for
getLocalData().get(name) |
DataObject |
getLocalData()
Retrieve the local data
|
List<String> |
getOptionList(String name)
Retrieve a specific option list by name
|
Collection<String> |
getOptionListNames()
Retrieve all option list names
|
DataResultSet |
getResultSet(String name)
Retrieve the result set by name
|
Collection<String> |
getResultSetNames()
Retrieve all result set names
|
Map<String,DataResultSet> |
getResultSets()
Retrieve a map representation of the result sets, indexed by result set name.
|
void |
merge(DataBinder source)
This will merge copies of all the data from the source binder into this
binder, overwriting existing values and result sets, if they exist.
|
void |
putLocal(String name,
String value)
Shortcut for
getLocalData().put(name,value) |
void |
removeFieldType(String name)
Remove the field type mapping for a given field name
|
void |
removeFile(String name)
Remove a file for a given file name
|
void |
removeOptionList(String name)
Remove an option list for a given name
|
void |
removeResultSet(String name)
Remove the result set for a given name
|
void |
setFieldType(String name,
String type)
Set a field type for a given field name
|
DataObject getLocalData()
String getFieldType(String name)
name
- the field namevoid setFieldType(String name, String type)
name
- the field nametype
- the new typeCollection<String> getFieldTypeNames()
void removeFieldType(String name)
name
- the field name to remove from the mappings tableCollection<String> getFileNames()
TransferFile getFile(String name)
name
- the file namevoid addFile(String name, File file) throws IOException
addFile (name, new TransferStream (file));
name
- the file namefile
- the file objectIOException
- if the file cannot be readaddFile(String, TransferFile)
void addFile(String name, TransferFile file)
name
- the file namefile
- the file streamvoid removeFile(String name)
name
- the file nameboolean containsFiles()
String getLocal(String name)
getLocalData().get(name)
name
- the local property namevoid putLocal(String name, String value)
getLocalData().put(name,value)
name
- the local property namevalue
- the local property valueDataResultSet getResultSet(String name)
name
- the result set nameMap<String,DataResultSet> getResultSets()
addResultSet(String, DataResultSet)
and removeResultSet(String)
methods.addResultSet(String, DataResultSet)
,
removeResultSet(String)
,
getResultSetNames()
Collection<String> getResultSetNames()
void addResultSet(String name, DataResultSet resultSet)
name
- the result set nameresultSet
- the result setvoid removeResultSet(String name)
name
- the result set name to removeList<String> getOptionList(String name)
name
- the list nameCollection<String> getOptionListNames()
void addOptionList(String name, List<String> values)
name
- the option list namevalues
- the valuesvoid removeOptionList(String name)
name
- the option list namevoid merge(DataBinder source)
source
- the source databinder