Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


oracle.jbo.mom
Class DefinitionManager

java.lang.Object
  extended byoracle.jbo.mom.DefinitionManager

All Implemented Interfaces:
MetaObjectBase
Direct Known Subclasses:
JUMetaObjectManager, MetaObjectManager

public abstract class DefinitionManager
extends java.lang.Object
implements MetaObjectBase

A static class used for accessing meta-objects.

This class contains references to all Business Componenents for Java meta-objects. These classes are loaded from XML through JNDI calls to the appropriate context, and are also loaded at runtime from jboserver.properties.

Since:
Jdeveloper 3.0

Field Summary
protected  boolean mbValidateName
           
protected  javax.naming.Context mContext
          Handle to the Context initialized for the framework
protected  boolean mLazyLoading
          Is lazy loading true, this flag is set to the right value after reading the the jboserver properties, It is suggested to keep the value set to true, In 8i with SharedDataHandle we might want users to turn lazy loading to false
protected  boolean mSubstituteStat
          Flag to keep check if we are in a Substitute case

 

Fields inherited from interface oracle.jbo.common.MetaObjectBase
TYP_APP_MODULE, TYP_ATTRIBUTE, TYP_ATTRIBUTE_LIST_WITH_DEF, TYP_COMPONENT_OBJECT, TYP_DEF_ANY, TYP_DEF_APP_MODULE, TYP_DEF_ATTRIBUTE, TYP_DEF_COMPONENT_OBJECT, TYP_DEF_DOMAIN, TYP_DEF_ENTITY_ASSOC, TYP_DEF_ENTITY_OBJECT, TYP_DEF_PACKAGE, TYP_DEF_VIEW_LINK, TYP_DEF_VIEW_OBJECT, TYP_DOMAIN, TYP_ENTITY_ASSOC, TYP_ENTITY_OBJECT, TYP_ENTITY_ROW, TYP_ENTITY_ROW_SET, TYP_ENTITY_ROW_SET_ITERATOR, TYP_ENTITY_USAGE, TYP_PACKAGE, TYP_TRANSACTION, TYP_VALIDATOR_TYPE, TYP_VARIABLE, TYP_VARIABLE_WHERE_CLAUSE, TYP_VIEW_CRITERIA, TYP_VIEW_LINK, TYP_VIEW_OBJECT, TYP_VIEW_ROW, TYP_VIEW_ROW_SET, TYP_VIEW_ROW_SET_ITERATOR

 

Constructor Summary
protected DefinitionManager()
           

 

Method Summary
protected abstract  ContainerDefImpl createContainerDefObject(boolean topLevel)
           
 void dumpDefObjInfo(int index, java.lang.Object key, DefinitionObjectInfo defObjInfo, boolean forUseChain, java.io.PrintWriter out)
           
 void dumpMOM()
           
 void dumpMOM(java.io.Writer out, boolean dumpUseChain)
          See DefinitionContext#dumpMOM.
protected  ContainerDefImpl findContainer(java.lang.String packageName)
           
 java.lang.Object findDefinitionObject(java.lang.String metaObjectName, int exId, java.lang.Class claz, boolean sub)
          Finds the Meta Object from the statically maintained list of Meta Objects.
 java.lang.Object findDefinitionObject(java.lang.String metaObjectName, int exId, java.lang.Class claz, boolean sub, boolean loadDefIfNotFound)
          Finds the Meta Object from the statically maintained list of Meta Objects.
 java.lang.Object findDefinitionObject(java.lang.String metaObjectName, int exId, java.lang.Class claz, boolean sub, boolean loadDefIfNotFound, boolean bDisableNameChecking)
          Finds the Meta Object from the statically maintained list of Meta Objects.
 java.lang.Object findDefinitionObjectDontCheckName(java.lang.String metaObjectName, int exId, java.lang.Class claz, boolean sub)
          Finds the Meta Object from the statically maintained list of Meta Objects.
 java.lang.Object findLoadedObject(java.lang.String defObjName)
          See DefinitionContext#findDefObj.
protected  java.lang.String findSubstituteName(java.lang.String metaObjectName)
           
protected  boolean getBooleanFlag(PropertyMetadata prop, boolean deflt)
           
 javax.naming.Context getContext()
          Gets the context, an instance of the context factory.
protected  com.sun.java.util.collections.Map getCurrentApplicationMap(boolean create)
          Deprecated. since 10.1.3. No direct replacement (but see comments above).
protected abstract  java.lang.String getDefaultMOMCacheScope()
          Return an indication as to the default scope of the MOM cache (to be used if the application's adf-config.xml does not explicitly indicate a value).
protected  com.sun.java.util.collections.HashMap getDefinitionObjectsMap()
          Deprecated. since 9.0.5. No direct replacement (but see comments for getCurrentApplicationMap(boolean)).
protected  ContainerDefImpl getDynamicObjectsContainer()
          Returns DynamicObjectsPackage.
protected abstract  java.lang.String getDynamicPackageName()
           
 DTD getJboDTD()
          Gets the cached DTD.
 DefXMLParser getJboXMLDoc()
          Deprecated. since 10.1.3. See comments above.
protected  java.lang.String getLatestDTDVersion()
           
 boolean getLazyLoadProp()
          Function to set the lazy load property
 java.lang.Object getMapLock()
          See DefinitionContext#getCacheLock.
 java.lang.String getMOMCacheScope()
          Return an indication as to the scope of the MOM cache.
 java.util.Properties getMOMProperties()
          Gets the server properties loaded from oracle.jbo.server.jboserver.properties.
protected abstract  java.lang.String getProjectFileExtension()
           
 LongRunningStatementMonitor getStatementMonitor()
          Return the LongRunningStatementMonitor that can monitor and terminate long running SQL statements.
abstract  java.lang.String[] getXMLVersionArray()
           
protected  void initListener()
           
protected  void initManager()
           
protected  void initSubExtendsPropForProject()
          Set the substitute extends prop for Project For 8i, we treat it differently than other deployments
protected  void insertDefinition(java.lang.String defObjName, java.lang.Object defObj)
           
protected  void insertDefinition(java.lang.String defObjName, java.lang.Object defObj, boolean isAgeable)
          See DefinitionContext#insertDefObj.
 boolean is323Compatible()
           
 boolean is903Compatible()
           
 boolean isLazyLoadingMode()
          Gets the value of the JSP lazy loading flag.
 DefElement loadBaseXMLElement(java.lang.String metaObjectName)
          Function gets called for extends case where the superclass needs to be loaded.
 void loadContext(java.lang.String cusContextFactory, java.lang.String initContext)
          Allows the application to change the context factory and default context at runtime.
 DefElement loadDefElement(java.lang.String metaObjectName)
           
protected abstract  DefinitionObject loadFromXML(java.lang.String metaObjectName, DefElement elem, java.lang.String objType)
          Loads the XML metadata stream and returns a Def Object
protected  java.lang.Object loadLazyDefinitionObject(java.lang.String metaObjectName, ContainerDefImpl parent, boolean loadParent, boolean sub)
          Main function in MOM to load a object from XMLStream through XMLContext
protected abstract  java.lang.Object loadLazyFromSharedObject(java.lang.String metaObjectName, ContainerDefImpl parent, boolean loadParent, boolean sub)
           
 ContainerDefImpl loadProjectDefinition()
           
protected  ContainerDefImpl loadProjectDefinition(java.io.InputStream is, java.lang.String metaObjectName)
          Deprecated. since 10.1.3. Use loadProjectDefinition(String) instead.
protected  ContainerDefImpl loadProjectDefinition(java.io.Reader reader, java.lang.String metaObjectName)
          Deprecated. since 10.1.3. Use loadProjectDefinition(String) instead.
 ContainerDefImpl loadProjectDefinition(java.lang.String projectName)
          Finds the named package definition from the MOM cache.
protected abstract  java.lang.Object loadSpecialObjects(DefElement impl, java.lang.String metaObjectName, java.lang.String objType)
           
 void removeAllDefinitions()
          Purges the MOM cache for the current thread (which may or may not be shared with other threads, depending upon the scope of the MOM cache).
protected  java.lang.Object removeDefinition(java.lang.String defObjName)
          See DefinitionContext#removeDefObj.
 void reportVMProperties()
          Diagnostic method which reports some useful VM properties throught the diagnostic stream
 void setContextImpl(javax.naming.Context jndiContext)
          Set the JNDI context through API Call
protected  void setLazyLoadingMode(boolean lazyLoading)
          Sets the value of the JSP lazy loading flag.
protected  void setNameCheck(boolean flag)
           
protected  boolean usesMDS()
          Return an indication as to whether the current application should use MDS for this DefinitionManager instance.
protected abstract  boolean usesMDSByDefault()
          Return an indication as to whether this DefinitionManager instance should use MDS if the application's adf-config.xml does not explicitly indicate true or false.

 

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

 

Field Detail

mLazyLoading

protected boolean mLazyLoading
Is lazy loading true, this flag is set to the right value after reading the the jboserver properties, It is suggested to keep the value set to true, In 8i with SharedDataHandle we might want users to turn lazy loading to false

mContext

protected javax.naming.Context mContext
Handle to the Context initialized for the framework

mSubstituteStat

protected boolean mSubstituteStat
Flag to keep check if we are in a Substitute case

mbValidateName

protected boolean mbValidateName

Constructor Detail

DefinitionManager

protected DefinitionManager()

Method Detail

initListener

protected void initListener()

initManager

protected void initManager()

setNameCheck

protected void setNameCheck(boolean flag)

getJboXMLDoc

public DefXMLParser getJboXMLDoc()
Deprecated. since 10.1.3. See comments above.
Gets the XML parser. The getJboDTD method may be invoked on this parser, but not, in general, the parse or reset methods (they are not thread-safe). However, rather than invoking getJboXMLDoc().getJboDTD() to get the cached DTD, one should simply invoke getJboDTD().
Returns:
the XMLParser.

getJboDTD

public DTD getJboDTD()
Gets the cached DTD.
Returns:
the cached DTD.

setContextImpl

public void setContextImpl(javax.naming.Context jndiContext)
Set the JNDI context through API Call
Parameters:
jndiContext - Initial Context Impl

isLazyLoadingMode

public boolean isLazyLoadingMode()
Gets the value of the JSP lazy loading flag.
Returns:
the value of the lazy loading flag.

setLazyLoadingMode

protected void setLazyLoadingMode(boolean lazyLoading)
Sets the value of the JSP lazy loading flag.
Parameters:
lazyLoading - the new value of the lazy loading flag.

findContainer

protected ContainerDefImpl findContainer(java.lang.String packageName)

findDefinitionObject

public java.lang.Object findDefinitionObject(java.lang.String metaObjectName,
                                             int exId,
                                             java.lang.Class claz,
                                             boolean sub)
Finds the Meta Object from the statically maintained list of Meta Objects.
Parameters:
metaObjectName - the fully qualified Name of the Meta Object.
exId - id identifying the meta-object kind.
claz - meta-object implementation class.
sub - flag controlling whether to perform meta-object substitution.
Returns:
The Meta Object. Returns null if no meta object exists.

findDefinitionObject

public java.lang.Object findDefinitionObject(java.lang.String metaObjectName,
                                             int exId,
                                             java.lang.Class claz,
                                             boolean sub,
                                             boolean loadDefIfNotFound)
Finds the Meta Object from the statically maintained list of Meta Objects.
Parameters:
metaObjectName - the fully qualified Name of the Meta Object.
exId - id identifying the meta-object kind.
claz - meta-object implementation class.
sub - flag controlling whether to perform meta-object substitution.
Returns:
The Meta Object. Returns null if no meta object exists.

findDefinitionObjectDontCheckName

public java.lang.Object findDefinitionObjectDontCheckName(java.lang.String metaObjectName,
                                                          int exId,
                                                          java.lang.Class claz,
                                                          boolean sub)
Finds the Meta Object from the statically maintained list of Meta Objects. This variation will not check the identifier name
Parameters:
metaObjectName - the fully qualified Name of the Meta Object.
exId - id identifying the meta-object kind.
claz - meta-object implementation class.
sub - flag controlling whether to perform meta-object substitution.
Returns:
The Meta Object. Returns null if no meta object exists.

findDefinitionObject

public java.lang.Object findDefinitionObject(java.lang.String metaObjectName,
                                             int exId,
                                             java.lang.Class claz,
                                             boolean sub,
                                             boolean loadDefIfNotFound,
                                             boolean bDisableNameChecking)
Finds the Meta Object from the statically maintained list of Meta Objects.
Parameters:
metaObjectName - the fully qualified Name of the Meta Object.
exId - id identifying the meta-object kind.
claz - meta-object implementation class.
sub - flag controlling whether to perform meta-object substitution.
bDisableNameChecking - disables name checking regardless of the internal settings
Returns:
The Meta Object. Returns null if no meta object exists.

findSubstituteName

protected java.lang.String findSubstituteName(java.lang.String metaObjectName)

loadSpecialObjects

protected abstract java.lang.Object loadSpecialObjects(DefElement impl,
                                                       java.lang.String metaObjectName,
                                                       java.lang.String objType)

loadLazyFromSharedObject

protected abstract java.lang.Object loadLazyFromSharedObject(java.lang.String metaObjectName,
                                                             ContainerDefImpl parent,
                                                             boolean loadParent,
                                                             boolean sub)

loadLazyDefinitionObject

protected java.lang.Object loadLazyDefinitionObject(java.lang.String metaObjectName,
                                                    ContainerDefImpl parent,
                                                    boolean loadParent,
                                                    boolean sub)
Main function in MOM to load a object from XMLStream through XMLContext

loadDefElement

public DefElement loadDefElement(java.lang.String metaObjectName)

loadFromXML

protected abstract DefinitionObject loadFromXML(java.lang.String metaObjectName,
                                                DefElement elem,
                                                java.lang.String objType)
Loads the XML metadata stream and returns a Def Object
Parameters:
metaObjectName - name of the metaobject, for diagnostic purposes.
elem - an XML Stream as a DefElement object.
objType - object type Tag.
Returns:
a defObject, which is a JBO Object extending DefinitionObject

getDynamicObjectsContainer

protected ContainerDefImpl getDynamicObjectsContainer()
Returns DynamicObjectsPackage. If there is none, then creates one
Returns:
DynamicObjectsPackage

getDynamicPackageName

protected abstract java.lang.String getDynamicPackageName()

getProjectFileExtension

protected abstract java.lang.String getProjectFileExtension()

createContainerDefObject

protected abstract ContainerDefImpl createContainerDefObject(boolean topLevel)

loadProjectDefinition

protected ContainerDefImpl loadProjectDefinition(java.io.InputStream is,
                                                 java.lang.String metaObjectName)
Deprecated. since 10.1.3. Use loadProjectDefinition(String) instead.

loadProjectDefinition

protected ContainerDefImpl loadProjectDefinition(java.io.Reader reader,
                                                 java.lang.String metaObjectName)
Deprecated. since 10.1.3. Use loadProjectDefinition(String) instead.

loadProjectDefinition

public ContainerDefImpl loadProjectDefinition(java.lang.String projectName)
Finds the named package definition from the MOM cache. Loads it from the metadata store if necessary.
Parameters:
projectName - the fully-qualified name of the package.
Returns:
the named package, or null if no package exists.

loadProjectDefinition

public ContainerDefImpl loadProjectDefinition()

initSubExtendsPropForProject

protected void initSubExtendsPropForProject()
Set the substitute extends prop for Project For 8i, we treat it differently than other deployments

Finds if there is a subtitute extends tag and sets the right flag, finally makes a top level call to loadProject() Function first checks in Command line argument then in the file jboserver.properties only if this is missing in command line argument


is323Compatible

public boolean is323Compatible()

is903Compatible

public boolean is903Compatible()

getBooleanFlag

protected boolean getBooleanFlag(PropertyMetadata prop,
                                 boolean deflt)

getLazyLoadProp

public boolean getLazyLoadProp()
Function to set the lazy load property

loadContext

public void loadContext(java.lang.String cusContextFactory,
                        java.lang.String initContext)
Allows the application to change the context factory and default context at runtime.
Parameters:
cusContextFactory - the name of the new custom context factory. if null the default is restored.
initContext - the name of the new default context. if null the default is restored.

getContext

public javax.naming.Context getContext()
Gets the context, an instance of the context factory. Applications can use the context to specify their own bindings for business meta-objects, and can fetch these objects from the context.
Returns:
the context.

getMOMProperties

public java.util.Properties getMOMProperties()
Gets the server properties loaded from oracle.jbo.server.jboserver.properties.
Returns:
the server properties.

loadBaseXMLElement

public DefElement loadBaseXMLElement(java.lang.String metaObjectName)
Function gets called for extends case where the superclass needs to be loaded.
Parameters:
metaObjectName -
Returns:
JBOElementImpl

reportVMProperties

public void reportVMProperties()
Diagnostic method which reports some useful VM properties throught the diagnostic stream

getXMLVersionArray

public abstract java.lang.String[] getXMLVersionArray()

getLatestDTDVersion

protected java.lang.String getLatestDTDVersion()

dumpDefObjInfo

public void dumpDefObjInfo(int index,
                           java.lang.Object key,
                           DefinitionObjectInfo defObjInfo,
                           boolean forUseChain,
                           java.io.PrintWriter out)

dumpMOM

public void dumpMOM(java.io.Writer out,
                    boolean dumpUseChain)
See DefinitionContext#dumpMOM.

dumpMOM

public void dumpMOM()

insertDefinition

protected void insertDefinition(java.lang.String defObjName,
                                java.lang.Object defObj,
                                boolean isAgeable)
See DefinitionContext#insertDefObj.

insertDefinition

protected void insertDefinition(java.lang.String defObjName,
                                java.lang.Object defObj)

removeDefinition

protected java.lang.Object removeDefinition(java.lang.String defObjName)
See DefinitionContext#removeDefObj.

findLoadedObject

public java.lang.Object findLoadedObject(java.lang.String defObjName)
See DefinitionContext#findDefObj.

removeAllDefinitions

public void removeAllDefinitions()
Purges the MOM cache for the current thread (which may or may not be shared with other threads, depending upon the scope of the MOM cache).

getMapLock

public java.lang.Object getMapLock()
See DefinitionContext#getCacheLock.

getCurrentApplicationMap

protected com.sun.java.util.collections.Map getCurrentApplicationMap(boolean create)
Deprecated. since 10.1.3. No direct replacement (but see comments above).
In releases prior to 10.1.3, the map returned by this method was sometimes used as a proxy for the MOM cache. That usage is no longer supported. External clients that were issueing get, put, and remove on the returned Map should instead invoke the findLoadedObject, insertDefinition, and removeDefinition methods directly.
Parameters:
create - Create map if not found?
Returns:
the synchronized name-to-metaobject map for the current application. This won't have the same semantics as in prior releases (because the map values may be DefinitionObjectInfo objects rather than DefinitionObject objects). In future releases, this method may raise an exception.

getDefinitionObjectsMap

protected com.sun.java.util.collections.HashMap getDefinitionObjectsMap()
Deprecated. since 9.0.5. No direct replacement (but see comments for getCurrentApplicationMap(boolean)).

getDefaultMOMCacheScope

protected abstract java.lang.String getDefaultMOMCacheScope()
Return an indication as to the default scope of the MOM cache (to be used if the application's adf-config.xml does not explicitly indicate a value). The expected values are "request", "session", or "application" (case-sensitive). Any other value is treated as "application". This default value is currently obtained from a system property. It should perhaps be obtained from a JVM-wide BC4J property. (But see comments in JUMetaObjectManager.usesMDSByDefault()).
Returns:
Default scope (as explained above).

getMOMCacheScope

public java.lang.String getMOMCacheScope()
Return an indication as to the scope of the MOM cache.
Returns:
ADFContext.REQUEST_SCOPE, ADFContext.SESSION_SCOPE, or ADFContext.APPLICATION_SCOPE. The returned value is guaranteed to be identical (not just equal) to one of these three values.

usesMDSByDefault

protected abstract boolean usesMDSByDefault()
Return an indication as to whether this DefinitionManager instance should use MDS if the application's adf-config.xml does not explicitly indicate true or false. This default value is obtained from a JVM-wide BC4J property. (Actually, that's not currently true for JUMetaObjectManager - see comments in JUMetaObjectManager.usesMDSByDefault()).
Returns:
Should we use MDS for applications that don't specify that info in the app's adf-config.xml?

usesMDS

protected boolean usesMDS()
Return an indication as to whether the current application should use MDS for this DefinitionManager instance.
Returns:
Should we use MDS for the current application?

getStatementMonitor

public LongRunningStatementMonitor getStatementMonitor()
Return the LongRunningStatementMonitor that can monitor and terminate long running SQL statements. The monitor runs in its own thread.
Returns:
The LongRunningStatementMonitor instance.

Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


Copyright © 1997, 2005, Oracle. All rights reserved.