oracle.stellent.ridc.model
Interface DataBinder

All Known Implementing Classes:
DataBinderImpl

public interface DataBinder

A DataBinder is the Data Model Object used for Content Server communication. It encapsulates a set of local properties, a collection of result sets and option list values.


Method Summary
 void addFile(java.lang.String name, java.io.File file)
          Add a file to this data binder.
 void addFile(java.lang.String name, TransferFile file)
          Add a file to this data binder
 void addOptionList(java.lang.String name, java.util.List<java.lang.String> values)
          Add an option list with the given names
 void addResultSet(java.lang.String name, DataResultSet resultSet)
          Add a result set with the given name
 boolean containsFiles()
           
 java.lang.String getFieldType(java.lang.String name)
          Retrieve the field type for a given property.
 java.util.Collection<java.lang.String> getFieldTypeNames()
           
 TransferFile getFile(java.lang.String name)
          Retrieve a file from this data binder
 java.util.Collection<java.lang.String> getFileNames()
           
 java.lang.String getLocal(java.lang.String name)
          Shortcut for getLocalData().get(name)
 DataObject getLocalData()
           
 java.util.List<java.lang.String> getOptionList(java.lang.String name)
          Retrieve a specific option list by name
 java.util.Collection<java.lang.String> getOptionListNames()
           
 DataResultSet getResultSet(java.lang.String name)
          Retrieve the result set by name
 java.util.Collection<java.lang.String> getResultSetNames()
           
 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(java.lang.String name, java.lang.String value)
          Shortcut for getLocalData().put(name,value)
 void removeFieldType(java.lang.String name)
          Remove the field type mapping
 void removeFile(java.lang.String name)
          Remove a file
 void removeOptionList(java.lang.String name)
          Remove an option list
 void removeResultSet(java.lang.String name)
          Remove the result set
 void setFieldType(java.lang.String name, java.lang.String type)
          Set a field type for this data binder
 

Method Detail

getLocalData

DataObject getLocalData()
Returns:
the binder local data

getFieldType

java.lang.String getFieldType(java.lang.String name)
Retrieve the field type for a given property.

Parameters:
name - the property name
Returns:
the field type or null if no type is mapped to this property

setFieldType

void setFieldType(java.lang.String name,
                  java.lang.String type)
Set a field type for this data binder

Parameters:
name - the field name
type - the type

getFieldTypeNames

java.util.Collection<java.lang.String> getFieldTypeNames()
Returns:
a collection of the property names that have field type mappings

removeFieldType

void removeFieldType(java.lang.String name)
Remove the field type mapping

Parameters:
name - the property name to remove from the mappings table

getFileNames

java.util.Collection<java.lang.String> getFileNames()
Returns:
a list of file names

getFile

TransferFile getFile(java.lang.String name)
Retrieve a file from this data binder

Parameters:
name - the file name
Returns:
the file stream or null if not found

addFile

void addFile(java.lang.String name,
             java.io.File file)
             throws java.io.IOException
Add a file to this data binder. Shortcut for calling:
     addFile (name, new TransferStream (file));
 

Parameters:
name - the file name
file - the file object
Throws:
java.io.IOException - if the file cannot be read
See Also:
addFile(String, TransferFile)

addFile

void addFile(java.lang.String name,
             TransferFile file)
Add a file to this data binder

Parameters:
name - the file name
file - the file stream

removeFile

void removeFile(java.lang.String name)
Remove a file

Parameters:
name - the file name

containsFiles

boolean containsFiles()
Returns:
true if their are any files attached to this data binder

getLocal

java.lang.String getLocal(java.lang.String name)
Shortcut for getLocalData().get(name)

Parameters:
name - the local property name
Returns:
the value or null if not found

putLocal

void putLocal(java.lang.String name,
              java.lang.String value)
Shortcut for getLocalData().put(name,value)

Parameters:
name - the local property name
value - the local property value

getResultSet

DataResultSet getResultSet(java.lang.String name)
Retrieve the result set by name

Parameters:
name - the result set name
Returns:
the result set or null if not found

getResultSetNames

java.util.Collection<java.lang.String> getResultSetNames()
Returns:
a collection of the available result set names

addResultSet

void addResultSet(java.lang.String name,
                  DataResultSet resultSet)
Add a result set with the given name

Parameters:
name - the result set name
resultSet - the result set

removeResultSet

void removeResultSet(java.lang.String name)
Remove the result set

Parameters:
name - the result set name to remove

getOptionList

java.util.List<java.lang.String> getOptionList(java.lang.String name)
Retrieve a specific option list by name

Parameters:
name - the list name
Returns:
the list values

getOptionListNames

java.util.Collection<java.lang.String> getOptionListNames()
Returns:
the names of the available option lists

addOptionList

void addOptionList(java.lang.String name,
                   java.util.List<java.lang.String> values)
Add an option list with the given names

Parameters:
name - the option list name
values - the values

removeOptionList

void removeOptionList(java.lang.String name)
Remove an option list

Parameters:
name - the option list name

merge

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.

Parameters:
source - the source databinder


Copyright © 2008-2009 Oracle Corporation. All Rights Reserved.