Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

oracle.apps.fnd.applcore.flex.runtime.util
Class BCModeler

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.util.BCModeler
Direct Known Subclasses:
AbstractBCModeler, EFFGroupBCModeler

public abstract class BCModeler
extends java.lang.Object

A modeler that creates/updates an ADF Business Component model for a flexfield.


Nested Class Summary
static class BCModeler.Arguments
          List of arguments for a modeler.
static class BCModeler.Option
          A modeling option.
static class BCModeler.Options
           
static class BCModeler.Parameter
          A standard parameter for the modeler.
static class BCModeler.ProgressStage
          The stage of a modeler process.
 
Constructor Summary
BCModeler()
           
 
Method Summary
abstract  void build()
          Builds the model.
protected static java.lang.String escapeJavaString(java.lang.String str)
          Escapes special characters in a string so that it can be printed out as a Java string literal.
static BCModelerFactory getFactory(ApplicationResources appRes, java.lang.String flexfieldType, java.lang.String flexfieldCode, ApplicationIdentifier aif)
          Gets a BCModeler factory.
static BCModelerFactory getFactory(ApplicationResources appRes, java.lang.String flexfieldType, java.lang.String flexfieldCode, java.lang.String appShortName)
          Deprecated.  
protected  java.util.List<java.lang.String> getPackages()
          Gets the list of packages that will be created or updated.
abstract  java.util.List<java.lang.String> getReport()
          Gets the report.
 java.lang.String getVersion()
          Gets the version of this modeler.
protected static boolean isDevelopmentMode()
          Whether this modeler is run in development mode.
static void main(java.lang.String[] args)
          Builds a model for a flexfield.
static void notifyAction(ModelerEvent event)
          Notifies about an action the modeler has performed.
static void notifyProgress(ModelerProgressEvent mpe)
          Notifies about the progress if a monitor is associated with the current thread.
static void notifyProgress(java.lang.Object source, java.lang.String message)
          Notifies about the progress if a monitor is associated with the current thread.
static java.util.List<java.lang.String> run(BCModeler.Arguments modelerArgs)
          Creates and runs a modeler based on a set of arguments.
static void run(BCModeler.Arguments modelerArgs, ModelerListener monitor)
          Creates and runs a modeler based on a set of arguments.
static java.lang.Exception run(java.lang.String[] args, java.io.PrintStream ps)
          Creates and runs a modeler based on a list of arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BCModeler

public BCModeler()
Method Detail

getVersion

public java.lang.String getVersion()
Gets the version of this modeler.

Returns:
the version of this modeler.

build

public abstract void build()
Builds the model.

Throws:
BCModelerException - if any error occurs

getReport

public abstract java.util.List<java.lang.String> getReport()
Gets the report.

Returns:
the report as a list of strings

getPackages

protected java.util.List<java.lang.String> getPackages()
Gets the list of packages that will be created or updated. Subclasses should override this method if they want to support auto configuration of the current ADF context.

Returns:
the list of packages that will be created or updated
See Also:
run(Arguments)

notifyProgress

public static final void notifyProgress(java.lang.Object source,
                                        java.lang.String message)
Notifies about the progress if a monitor is associated with the current thread.

Parameters:
source - the source of the message
message - the message

notifyAction

public static final void notifyAction(ModelerEvent event)
Notifies about an action the modeler has performed.

Parameters:
event - the action event

notifyProgress

public static final void notifyProgress(ModelerProgressEvent mpe)
Notifies about the progress if a monitor is associated with the current thread.

Parameters:
mpe - the progress event

run

public static void run(BCModeler.Arguments modelerArgs,
                       ModelerListener monitor)
Creates and runs a modeler based on a set of arguments. Auto configuration of the current ADF context is not supported by this method. The current ADF context must be configured prior to the call. Since this method does not support automatic configuration of the current ADF context, output path cannot be specified in the modeler arguments.

This method returns without waiting for queued events to be dispatched, but it will signal the event dispatching thread to stop once all queued events (added before the stop notification) are dispatched.

Parameters:
modelerArgs - the modeler arguments
monitor - the monitor
Throws:
java.lang.IllegalArgumentException - if the given Arguments object or the monitor is null, or if any of the aguments is invalid

run

public static java.util.List<java.lang.String> run(BCModeler.Arguments modelerArgs)
Creates and runs a modeler based on a set of arguments. This method should not be invoked in multiple concurrent threads if more than one thread have access to the same current ADF context (by calling ADFContext.getCurrent()) because this method will re-assign the current ADF context during its execution.

Parameters:
modelerArgs - the arguments
Returns:
the list of messages
Throws:
BCModelerException - if any error occurs while building the model

getFactory

public static BCModelerFactory getFactory(ApplicationResources appRes,
                                          java.lang.String flexfieldType,
                                          java.lang.String flexfieldCode,
                                          ApplicationIdentifier aif)
Gets a BCModeler factory.

Parameters:
appRes - the application resources
flexfieldType - the flexfield type, which is "DFF" or "KFF"
flexfieldCode - the flexfield code
aif - the application information
Returns:
the factory

getFactory

public static BCModelerFactory getFactory(ApplicationResources appRes,
                                          java.lang.String flexfieldType,
                                          java.lang.String flexfieldCode,
                                          java.lang.String appShortName)
Deprecated. 

Gets the BCModeler factory for a flexfield.

Parameters:
appRes - the connection URL
flexfieldType - the flexfield type
flexfieldCode - the flexfield code
appShortName - the application short name
Returns:
See Also:
getFactory(ApplicationResources, String, String, ApplicationIdentifier)

run

public static java.lang.Exception run(java.lang.String[] args,
                                      java.io.PrintStream ps)
Creates and runs a modeler based on a list of arguments. For thread-safety concerns, see run(Arguments).

Parameters:
args - the arguments
ps - the print stream for output messages; null if the caller is not interested in the output messages
Returns:
the first exception thrown when running the modeler; null if no exception was thrown
See Also:
run(Arguments)

main

public static void main(java.lang.String[] args)
Builds a model for a flexfield.

Parameters:
args - command line arguments

isDevelopmentMode

protected static boolean isDevelopmentMode()
Whether this modeler is run in development mode. When in development mode, the modeler produces models that facilitate the development of other components that depend on the models, such as the UI components.

Returns:
true if this modeler is run in development mode

escapeJavaString

protected static java.lang.String escapeJavaString(java.lang.String str)
Escapes special characters in a string so that it can be printed out as a Java string literal. For example, "5'2\"" is printed as 5'2" without escaping the special characters, which will break an expression such as the following: Attribute1 == "5'2"". By escaping the special characters, "5'2\"" will be transformed into "5'2\\\"", which can be safely printed out between double quotes as a string literal: Attribute1 == "5'2\""

Parameters:
str - the string to be escaped
Returns:
the escaped string

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.