Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC)
11g Release 1 (11.1)

E17274-04


oracle.stellent.ridc.model.impl
Class DataBinderImpl

java.lang.Object
  extended by oracle.stellent.ridc.model.impl.DataBinderImpl

All Implemented Interfaces:
DataBinder

public class DataBinderImpl
extends Object
implements DataBinder

Default databinder implementation. This object is NOT serializable.


Constructor Summary
DataBinderImpl()
           

 

Method Summary
 void addFile(String name, File file)
          Add a file to this data binder.
 void addFile(String name, TransferFile file)
          Add a file to this data binder
 void addOptionList(String name, List<String> values)
          Add an option list with the given names
 void addResultSet(String name, DataResultSet resultSet)
          Add a result set with the given name
 boolean containsFiles()
          Check if there are files
 String getFieldType(String name)
          Retrieve the field type for a given property.
 Collection<String> getFieldTypeNames()
          Retrieve all field names
 TransferFile getFile(String name)
          Retrieve a file from this data binder
 Collection<String> getFileNames()
          Retrieve all file names
 Map<String,TransferFile> getFiles()
           
 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
 Map<String,List<String>> getOptionLists()
           
 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.
protected  Map<String,String> loadFieldTypes()
          Load the internal field types by examining the blFieldTypes local data.
 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
 void removeFile(String name)
          Remove a file
 void removeOptionList(String name)
          Remove an option list
 void removeResultSet(String name)
          Remove the result set
protected  void serializeFieldTypes()
          Serialize the field types into the blFieldTypes
 void setFieldType(String name, String type)
          Set a field type for this data binder
 void synchronizeData(DataFactory.Direction in)
          Called after the localdata is set to initialize the binder based on LocalData values (blFieldTypes, etc.)
 String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

DataBinderImpl

public DataBinderImpl()

Method Detail

getOptionLists

public Map<String,List<String>> getOptionLists()

getFiles

public Map<String,TransferFile> getFiles()

synchronizeData

public void synchronizeData(DataFactory.Direction in)
Called after the localdata is set to initialize the binder based on LocalData values (blFieldTypes, etc.)
Parameters:
in - true to sync local into fields

getLocalData

public DataObject getLocalData()
Description copied from interface: DataBinder
Retrieve the local data
Specified by:
getLocalData in interface DataBinder
Returns:
the binder local data

getFieldType

public String getFieldType(String name)
Retrieve the field type for a given property.
Specified by:
getFieldType in interface DataBinder
Parameters:
name - the property name
Returns:
the field type or null if no type is mapped to this property

setFieldType

public void setFieldType(String name,
                         String type)
Set a field type for this data binder
Specified by:
setFieldType in interface DataBinder
Parameters:
name - the field name
type - the type

getFieldTypeNames

public Collection<String> getFieldTypeNames()
Description copied from interface: DataBinder
Retrieve all field names
Specified by:
getFieldTypeNames in interface DataBinder
Returns:
a collection of the property names that have field type mappings

removeFieldType

public void removeFieldType(String name)
Remove the field type mapping
Specified by:
removeFieldType in interface DataBinder
Parameters:
name - the property name to remove from the mappings table

getLocal

public String getLocal(String name)
Shortcut for getLocalData().get(name)
Specified by:
getLocal in interface DataBinder
Parameters:
name - the local property name
Returns:
the value or null if not found

putLocal

public void putLocal(String name,
                     String value)
Shortcut for getLocalData().put(name,value)
Specified by:
putLocal in interface DataBinder
Parameters:
name - the local property name
value - the local property value

getResultSet

public DataResultSet getResultSet(String name)
Retrieve the result set by name
Specified by:
getResultSet in interface DataBinder
Parameters:
name - the result set name
Returns:
the result set or null if not found

getResultSets

public Map<String,DataResultSet> getResultSets()
Description copied from interface: DataBinder
Retrieve a map representation of the result sets, indexed by result set name. Note: this is an unmodifiable map; add or removing of result sets is done through the DataBinder.addResultSet(String, DataResultSet) and DataBinder.removeResultSet(String) methods.
Specified by:
getResultSets in interface DataBinder
Returns:
a map of the available result sets, indexed by result set name
See Also:
DataBinder.addResultSet(String, DataResultSet), DataBinder.removeResultSet(String), DataBinder.getResultSetNames()

removeResultSet

public void removeResultSet(String name)
Remove the result set
Specified by:
removeResultSet in interface DataBinder
Parameters:
name - the result set name to remove

getResultSetNames

public Collection<String> getResultSetNames()
Description copied from interface: DataBinder
Retrieve all result set names
Specified by:
getResultSetNames in interface DataBinder
Returns:
a collection of the available result set names

addResultSet

public void addResultSet(String name,
                         DataResultSet resultSet)
Add a result set with the given name
Specified by:
addResultSet in interface DataBinder
Parameters:
name - the result set name
resultSet - the result set

getOptionList

public List<String> getOptionList(String name)
Retrieve a specific option list by name
Specified by:
getOptionList in interface DataBinder
Parameters:
name - the list name
Returns:
the list values

getOptionListNames

public Collection<String> getOptionListNames()
Description copied from interface: DataBinder
Retrieve all option list names
Specified by:
getOptionListNames in interface DataBinder
Returns:
the names of the available option lists

addOptionList

public void addOptionList(String name,
                          List<String> values)
Add an option list with the given names
Specified by:
addOptionList in interface DataBinder
Parameters:
name - the option list name
values - the values

removeOptionList

public void removeOptionList(String name)
Remove an option list
Specified by:
removeOptionList in interface DataBinder
Parameters:
name - the option list name

getFileNames

public Collection<String> getFileNames()
Description copied from interface: DataBinder
Retrieve all file names
Specified by:
getFileNames in interface DataBinder
Returns:
a list of file names

getFile

public TransferFile getFile(String name)
Retrieve a file from this data binder
Specified by:
getFile in interface DataBinder
Parameters:
name - the file name
Returns:
the file stream or null if not found

addFile

public void addFile(String name,
                    File file)
             throws IOException
Add a file to this data binder. Shortcut for calling:
     addFile (name, new TransferStream (file));
 
Specified by:
addFile in interface DataBinder
Parameters:
name - the file name
file - the file object
Throws:
IOException - if the file cannot be read
See Also:
addFile(String, oracle.stellent.ridc.model.TransferFile)

addFile

public void addFile(String name,
                    TransferFile file)
Add a file to this data binder
Specified by:
addFile in interface DataBinder
Parameters:
name - the file name
file - the file stream

removeFile

public void removeFile(String name)
Remove a file
Specified by:
removeFile in interface DataBinder
Parameters:
name - the file name

containsFiles

public boolean containsFiles()
Description copied from interface: DataBinder
Check if there are files
Specified by:
containsFiles in interface DataBinder
Returns:
true if their are any files attached to this data binder

merge

public 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.
Specified by:
merge in interface DataBinder
Parameters:
source - the source databinder

loadFieldTypes

protected Map<String,String> loadFieldTypes()
Load the internal field types by examining the blFieldTypes local data.
Returns:
a map of field types or empty map if no types are discovered

serializeFieldTypes

protected void serializeFieldTypes()
Serialize the field types into the blFieldTypes

toString

public String toString()
Overrides:
toString in class Object
Returns:
a string representation of the object suitable only for debugging and logging

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC)
11g Release 1 (11.1)

E17274-04


Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.