Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.adf.model.adapter
Class MetaDef

java.lang.Object
  extended by oracle.adf.model.adapter.MetaDef


public class MetaDef
extends java.lang.Object

This is a helper class that helps to create and modify data control definitions. It provides an abstract layer on top of different systems that handles data control metadata differently.

Different system registers handler to this calss to handle the data control metadata. The implementation of this class deligates he calls to the underlying handlers.

For a given application context, this class can create the required metadata for the data controls. The application contexts identify the handler that creates the metadata. Applications register their respective handlers to this class.

To create an instance of this class, the caller needs to pass the context to indicate the underlying systems. If a handler for the context is registered, the method calls will be deligated to that handler.

Since:
10.1.3
See Also:
ContextHandler

Field Summary
static java.lang.String CTX_DC_PROJECT
          Set this property if DataControl Should be created in NON Active project
static java.lang.String CTX_JDEVELOPER
          JDeveloper context name.
static java.lang.String CTX_WORKPLACE
          Workplace context name.

 

Constructor Summary
MetaDef(java.lang.String ctxName)
          Creates an instance for a given application context.

 

Method Summary
 void createDataControl(AbstractDefinition def)
          Creates a data control metadata from the data control definition.
 DataControlDefinition getDataControlDefinition(java.lang.String name)
          Gets the definition of the data control specified by the name.
 void refreshDefinition(AbstractDefinition def)
          Refreshes the data control's metadata from a given definition.
 void refreshStructureDefinition(AbstractDefinition def)
          Refreshes the data control's structure definition.
static void registerHandler(java.lang.String ctxName, ContextHandler handler)
          Registers a handler for an application context.
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets the property to pass to the underlying context handlers.

 

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

 

Field Detail

CTX_JDEVELOPER

public static final java.lang.String CTX_JDEVELOPER
JDeveloper context name.
See Also:
Constant Field Values

CTX_WORKPLACE

public static final java.lang.String CTX_WORKPLACE
Workplace context name.
See Also:
Constant Field Values

CTX_DC_PROJECT

public static final java.lang.String CTX_DC_PROJECT
Set this property if DataControl Should be created in NON Active project
See Also:
Constant Field Values

Constructor Detail

MetaDef

public MetaDef(java.lang.String ctxName)
Creates an instance for a given application context.
Parameters:
ctxName - name of the context.
See Also:
CTX_JDEVELOPER, CTX_WORKPLACE

Method Detail

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets the property to pass to the underlying context handlers. Caller may set properties to be passed to the underlying context handlers.

The callers must know the right property name that the underlying context understands.

Parameters:
key - property name.
value - value of the property.

createDataControl

public void createDataControl(AbstractDefinition def)
Creates a data control metadata from the data control definition. The metadata gets serialized by the registered application context handler.
Parameters:
def - the data control definition.
Throws:
AdapterException - is thrown if fails to create the metadata.

getDataControlDefinition

public DataControlDefinition getDataControlDefinition(java.lang.String name)
Gets the definition of the data control specified by the name. This method calls the registered context handler to get the definition.
Parameters:
name - name of the data control.
Returns:
definition of the data control specified by the given name. If the data control doesn't exist, it returns null.

refreshDefinition

public void refreshDefinition(AbstractDefinition def)
Refreshes the data control's metadata from a given definition.

It updates the data control's definition in the data control registry file. It doesn't update the structure defintion of the output as serialized as part of data control metadata.


refreshStructureDefinition

public void refreshStructureDefinition(AbstractDefinition def)
Refreshes the data control's structure definition.

It updates the structure defintion of the output as serialized as part of data control metadata. This method doesn't update the data control metadata in the data control registry.

This method should be called only to refresh the structure definition of the output of the data control.


registerHandler

public static void registerHandler(java.lang.String ctxName,
                                   ContextHandler handler)
Registers a handler for an application context.
Parameters:
ctxName - context name.
handler - the class name for the handler.
Throws:
AdapterException - if fails to load the handler class.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


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