oracle.cabo.ui.data.provider
Class FixedDataProvider
java.lang.Object
|
+--oracle.cabo.ui.data.provider.FixedDataProvider
- All Implemented Interfaces:
- DataProvider
- public class FixedDataProvider
- extends java.lang.Object
- implements DataProvider
This DataProvider wraps a single DataObject. It can work one of two ways:
- Return the DataObject only for a specific namespace and name. This is the safest option.
- Always return the DataObject. This is more dangerous. When using FixedDataProvider in this way, clients must be very careful to wrap it in another provider that will check the namespace and name - TableDataProvider is especially useful.
- See Also:
TableDataProvider
Method Summary |
void |
cleanup(RenderingContext context)
RenderingContext implementations must call cleanup() once after the last callto getDataObject(). |
DataObject |
getDataObject(RenderingContext cntxt, java.lang.String namespace, java.lang.String name)
Returns the data object if the namespace and name are an exact match. |
void |
init(RenderingContext context)
RenderingContext implementations must call init() once before calling getDataObject(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedDataProvider
public FixedDataProvider(DataObject data)
- Creates a FixedDataProvider.
-
- Parameters:
data
- the data object instance
FixedDataProvider
public FixedDataProvider(java.lang.String namespace,
java.lang.String name,
DataObject data)
- Creates a FixedDataProvider.
-
- Parameters:
namespace
- the namespace for the data object
name
- the name of the data object
data
- the data object instance
FixedDataProvider
public FixedDataProvider(java.lang.String namespace,
java.lang.String name,
java.lang.Object data)
- Creates a FixedDataProvider.
-
- Parameters:
namespace
- the namespace for the data object
name
- the name of the data object
data
- the data object instance
getDataObject
public DataObject getDataObject(RenderingContext cntxt,
java.lang.String namespace,
java.lang.String name)
- Returns the data object if the namespace and name are an exact match.
-
- Specified by:
getDataObject
in interface DataProvider
- Following copied from interface:
oracle.cabo.ui.data.DataProvider
-
- Parameters:
context
- the current rendering context
namespace
- the namespace of the requested DataObject
name
- the name of the requested DataObject
- Returns:
- the DataObject for the specified namespace and name, or null if no such dataObject exists.
init
public void init(RenderingContext context)
- RenderingContext implementations must call init() once before calling getDataObject(). In general, they should try to call it as early as possible.
-
- Specified by:
init
in interface DataProvider
cleanup
public void cleanup(RenderingContext context)
- RenderingContext implementations must call cleanup() once after the last callto getDataObject().
-
- Specified by:
cleanup
in interface DataProvider