|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.3.0) E17060-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.odi.interfaces.interactive.support.xrefs.ContextManager
public class ContextManager
This class is a helper to provide expression contexts for each <@link DataSet> in an interface,
as well as a context for target expressions.
An ODI interface expression context (<@link IExpressionContext>) is an object that
is able to produce all the recognizable parsing tags that will be used when parsing the
expression, for a specified language and technology.
Each of the context returned by this class ensures that they refer to:
DataSet
giveContext
to learn how to retrieve a context for a given dataset.
IExpressionContext
Constructor Summary | |
---|---|
ContextManager(OdiProject pProject,
IOdiEntityManager pOdiEntityManager)
Create a context manager that will include tags for the specified project. |
|
ContextManager(OdiProject pProject,
IOdiEntityManager pOdiEntityManager,
boolean pUseFindersForProjectObjects)
Create a context manager that will include tags for the specified project. |
Method Summary | |
---|---|
void |
dataSetRemoved(DataSet pDataSet)
This method must be called by the user when a <@link DataSet> is removed from the current interface, so that the cache can be cleaned up. Note that there is no need for a dataSetAdded method,
as the cache will be automatically populated when the context for
the new <@link DataSet> is requested using the giveContext method. |
void |
dataStoreAdded(SourceDataStore pSourceDataStore)
This method will be called by <@link oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions InteractiveInterfaceHelperWithActions> after a <@link SourceDataStore> has been added to a DataSet . |
void |
dataStoreRemoved(SourceDataStore pSourceDataStore)
This method will be called by <@link oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions InteractiveInterfaceHelperWithActions> after a <@link SourceDataStore> is removed from a DataSet . |
IExpressionContext |
giveContext(DataSet pDataSet)
Return an IExpressionContext for a given DataSet . |
boolean |
isUseFindersForProject()
A method to return the current setting for how to get external objects, such as variables, sequences, and procedures. |
void |
refreshDatastores()
Clear all caches concerning DataStore objects: they might have changed. |
void |
refreshGlobalAndProjectObjects()
Refreshes all global and project objects (variables, sequences, user functions). |
void |
setUseFindersForProject(boolean pUseFindersForProject)
Change the behaviour of this ContextManager to force it to use finders or not for external project objects. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextManager(OdiProject pProject, IOdiEntityManager pOdiEntityManager)
UseFindersForProjectObjects
to false
pProject
- the projectpOdiEntityManager
- the current entity managerContextManager(OdiProject, IOdiEntityManager, boolean)
public ContextManager(OdiProject pProject, IOdiEntityManager pOdiEntityManager, boolean pUseFindersForProjectObjects)
pProject
- The project in which this context manager will pick project objects (variables, etc)pOdiEntityManager
- The current entity manager.pUseFindersForProjectObjects
- if true
, finders will be used to fetch project objects,
if false
the getters on the project will be used. Use finders if other
editors or SDK calls might change the context between the time the manager is created
and when the context is actually used, since finders will pick up the new information.Method Detail |
---|
public void dataSetRemoved(DataSet pDataSet)
dataSetAdded
method,
as the cache will be automatically populated when the context for
the new <@link DataSet> is requested using the giveContext
method.
pDataSet
- The DataSet
that is being removed.public void dataStoreAdded(SourceDataStore pSourceDataStore)
DataSet
.
For internal use only.
pSourceDataStore
- The SourceDataStore
that has been added.public void dataStoreRemoved(SourceDataStore pSourceDataStore)
DataSet
.
For internal use only.
pSourceDataStore
- The SourceDataStore
that is being removed.public IExpressionContext giveContext(DataSet pDataSet)
IExpressionContext
for a given DataSet
.
Note that this method is optimized and caches the contexts to return the
context as fast as possible. Thus if a context for a specified DataSet
object is requested multiple times, the context will be created and cached
during the first call. For subsequent calls the cached context object will be returned.
This means that if the context information changes, for example if a new DataStore
object is added to the DataSet, or if a new column has been added to
the DataStore
, then the cache must be updated.
To reset the cache that stores context information for DataStore
objects,
use refreshDatastores
.
To reset the cache that stores context information for global and project (external) objects,
DataStore
objects,
use refreshGlobalAndProjectObjects
.
- Parameters:
pDataSet
- A DataSet
for which we want an expression context.
If pDataSet is null
, a context will be returned for target expressions.
- Returns:
- The context for the given
DataSet
.
public boolean isUseFindersForProject()
true
if this instance of ContextManager uses
finders to find external objects, false
if it uses the project's getters.public void refreshDatastores()
DataStore
objects: they might have changed.
This should be called if the data store objects have been changed since this
context manager was created, before calling giveContext
to retrieve
the context object.
public void refreshGlobalAndProjectObjects()
giveContext
to retrieve
the context object.
public void setUseFindersForProject(boolean pUseFindersForProject)
pUseFindersForProject
- The new value for UseFindersForProject
.
|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.3.0) E17060-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |