Skip navigation links

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

E10653-03


oracle.adf.model.binding
Class DCUtil

java.lang.Object
  extended by oracle.jbo.common.JboBeanUtils
      extended by oracle.adf.model.binding.DCUtil

Direct Known Subclasses:
BeanUtils

public class DCUtil
extends JboBeanUtils

Contains some static utility methods used by the framework.


Field Summary
static java.lang.String DATA_PREFIX
           
static java.lang.String DESIGNTIME_PROPERTY
           
static java.lang.String DOT
           
static char SEP_DOT_CHAR
           
static char SEP_SLASH_CHAR
           

 

Fields inherited from class oracle.jbo.common.JboBeanUtils
JSF_EL_start

 

Constructor Summary
DCUtil()
           

 

Method Summary
static java.lang.Object createNewInstance(java.lang.String className)
          *** For internal framework use only ***
static java.lang.String decodePath(java.lang.String encodedString, char sep)
          Replace the 'sep' characters in this name with dots so that the converted name is a spel expression which ADFc would call to execute a method or setInputValue via a control-binding
static java.lang.Object elEvaluate(java.lang.Object context, java.lang.Object onObject, java.lang.String expression)
          If an ADFExpressionEvaluatorFactory is registered in the environment, then use that to fetch a static ADFExpressionEvaluator and run the given expression through it and return the evaluated result.
static java.lang.String encodePath(java.lang.String dotSeperatedName, char sep)
          Replace the dot characters in this dot seperated name with the give seperator.
static DCBindingContainer findBindingContainer(BindingContext ctx, java.lang.String model)
           
static java.lang.Class findClass(java.lang.String className)
          *** For internal framework use only ***
static java.lang.Object findContextObject(BindingContext ctx, java.lang.String objFullName)
           
static java.lang.Object findSpelObject(java.lang.Object rootObj, java.lang.String expression)
          Deprecated. since 10.1.3. use evaluate() or findSpelObject(Object rootObj, String expression, boolean hasElSyntax). Pass true if the expression is an el expression and false if it is simply a . separated string.
static java.lang.Object findSpelObject(java.lang.Object rootObj, java.lang.String expression, boolean hasElSyntax)
          If the given expression is to be evaluated as el (has {''} or is a static value, pass true for hasElSyntax.
static java.lang.Object findSpelObject(java.lang.Object rootObj, java.lang.StringBuffer tokenizer)
           
static java.lang.String generateContainerName(DCBindingContainer formBnd)
          *** For internal framework use only ***
static java.lang.String generateControlName(DCControlBinding controlBnd)
          *** For internal framework use only ***
static java.lang.String generateIteratorName(DCIExecutable iterBnd)
          *** For internal framework use only ***
static JUCtrlActionBinding getActionBinding(BindingContext bctx, java.lang.String path, char sep)
           
static DCBindingContainer getBindingContainer(javax.servlet.http.HttpServletRequest request)
          *** For internal framework use only ***
static BindingContext getBindingContext(javax.servlet.http.HttpServletRequest request)
          *** For internal framework use only ***
static java.lang.String getCategoryValue(AttributeDef aDef, LocaleContext localCtx)
           
static java.lang.String getControlType(StructureDef vo, AttributeDef attrDef, LocaleContext locale)
          This method determines what control type to use for a given attribute.
static java.util.ArrayList<AttributeDef> getFilteredAttributeDefs(AttributeDef[] attrDefs, LocaleContext locale, java.lang.String category, boolean summaryForm)
           
static java.util.Iterator getIteratorForArray(java.lang.Object data, java.lang.Class clz)
          If clz object represents a primitive type array, then the name returned is the name determined by the following table.
static java.util.List getLocalizedExceptionsList(java.util.List excs, LocaleContext lCtx)
          Get an interMedia object for an InputStream
static JUCtrlValueBinding getValueBinding(BindingContext bctx, java.lang.String path, char sep)
           
static JUCtrlValueBinding getValueBinding(DCBindingContainer bindingContainer, java.lang.String path)
           
static java.lang.String getValueBindingNameFromPath(java.lang.String path)
           
static boolean inDesignTime()
           
static DCBindingContainer initializeBindingContainer(javax.servlet.http.HttpServletRequest request, BindingContext ctx, java.lang.String model)
          *** For internal framework use only ***
static java.lang.Object invokeActionBinding(BindingContext bctx, java.lang.String modelRef, java.util.ArrayList methodParams)
          Invoke an actionBinding with a list of parameter values
static java.lang.Object invokeActionBindingFromPath(BindingContext bctx, java.lang.String path, java.util.ArrayList methodParams, char sep)
          Invoke an actionBinding with a list of parameter values
static boolean isActionBindingPath(java.lang.String path)
           
static boolean isAppInPollingDCEMode()
          Deprecated. since 11.1.1 Polling mode information is moved into ADS.
static boolean isCollectionOrStructureType(java.lang.Class propClass)
           
static boolean isCollectionType(java.lang.Class propClass)
           
static boolean isEmptyString(java.lang.String s)
          *** For internal framework use only ***
static boolean isScalarType(java.lang.Class type)
           
static boolean isValueBindingPath(java.lang.String path)
           
static void putValueInPath(BindingContext bctx, java.lang.String path, java.lang.Object value)
           
static java.lang.Object removeValueFromPath(BindingContext bctx, java.lang.String path)
           
static void setBindingContainer(javax.servlet.http.HttpServletRequest request, DCBindingContainer container)
          *** For internal framework use only ***
static boolean setBindingValueFromPath(BindingContext bctx, java.lang.String path, java.lang.String value, char sep)
          Set the value of a AttrsBinding
static boolean skipMetaDataLookup(java.lang.String sType)
          If string is null/empty or one of the known java types then skip metadata lookup.

 

Methods inherited from class oracle.jbo.common.JboBeanUtils
getProperty, getPropertyDescriptor, getPropertyInMapOrBean, isElExpr, setProperty, setPropertyInMapOrBean

 

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

 

Field Detail

DATA_PREFIX

public static final java.lang.String DATA_PREFIX
See Also:
Constant Field Values

SEP_DOT_CHAR

public static final char SEP_DOT_CHAR
See Also:
Constant Field Values

SEP_SLASH_CHAR

public static final char SEP_SLASH_CHAR
See Also:
Constant Field Values

DOT

public static final java.lang.String DOT
See Also:
Constant Field Values

DESIGNTIME_PROPERTY

public static final java.lang.String DESIGNTIME_PROPERTY
See Also:
Constant Field Values

Constructor Detail

DCUtil

public DCUtil()

Method Detail

findClass

public static java.lang.Class findClass(java.lang.String className)
*** For internal framework use only ***

createNewInstance

public static java.lang.Object createNewInstance(java.lang.String className)
*** For internal framework use only ***

generateContainerName

public static java.lang.String generateContainerName(DCBindingContainer formBnd)
*** For internal framework use only ***

generateIteratorName

public static java.lang.String generateIteratorName(DCIExecutable iterBnd)
*** For internal framework use only ***

generateControlName

public static java.lang.String generateControlName(DCControlBinding controlBnd)
*** For internal framework use only ***

isEmptyString

public static boolean isEmptyString(java.lang.String s)
*** For internal framework use only ***

inDesignTime

public static boolean inDesignTime()

encodePath

public static java.lang.String encodePath(java.lang.String dotSeperatedName,
                                          char sep)
Replace the dot characters in this dot seperated name with the give seperator. This is a utility method for ADFc to call so that it can convert the dot-seperated spel expression to a single-name string to place on a jsp page and then use this string to execute a model-binding -action like calling invoke method or setInputValue on the binding.

decodePath

public static java.lang.String decodePath(java.lang.String encodedString,
                                          char sep)
Replace the 'sep' characters in this name with dots so that the converted name is a spel expression which ADFc would call to execute a method or setInputValue via a control-binding

findSpelObject

public static java.lang.Object findSpelObject(java.lang.Object rootObj,
                                              java.lang.String expression,
                                              boolean hasElSyntax)
If the given expression is to be evaluated as el (has {''} or is a static value, pass true for hasElSyntax.

findSpelObject

public static java.lang.Object findSpelObject(java.lang.Object rootObj,
                                              java.lang.String expression)
Deprecated. since 10.1.3. use evaluate() or findSpelObject(Object rootObj, String expression, boolean hasElSyntax). Pass true if the expression is an el expression and false if it is simply a . separated string.

findSpelObject

public static java.lang.Object findSpelObject(java.lang.Object rootObj,
                                              java.lang.StringBuffer tokenizer)

findContextObject

public static java.lang.Object findContextObject(BindingContext ctx,
                                                 java.lang.String objFullName)

isValueBindingPath

public static boolean isValueBindingPath(java.lang.String path)

getValueBindingNameFromPath

public static java.lang.String getValueBindingNameFromPath(java.lang.String path)

getValueBinding

public static JUCtrlValueBinding getValueBinding(BindingContext bctx,
                                                 java.lang.String path,
                                                 char sep)

getValueBinding

public static JUCtrlValueBinding getValueBinding(DCBindingContainer bindingContainer,
                                                 java.lang.String path)

setBindingValueFromPath

public static boolean setBindingValueFromPath(BindingContext bctx,
                                              java.lang.String path,
                                              java.lang.String value,
                                              char sep)
Set the value of a AttrsBinding

isActionBindingPath

public static boolean isActionBindingPath(java.lang.String path)

getActionBinding

public static JUCtrlActionBinding getActionBinding(BindingContext bctx,
                                                   java.lang.String path,
                                                   char sep)

putValueInPath

public static void putValueInPath(BindingContext bctx,
                                  java.lang.String path,
                                  java.lang.Object value)

removeValueFromPath

public static java.lang.Object removeValueFromPath(BindingContext bctx,
                                                   java.lang.String path)

invokeActionBindingFromPath

public static java.lang.Object invokeActionBindingFromPath(BindingContext bctx,
                                                           java.lang.String path,
                                                           java.util.ArrayList methodParams,
                                                           char sep)
Invoke an actionBinding with a list of parameter values

invokeActionBinding

public static java.lang.Object invokeActionBinding(BindingContext bctx,
                                                   java.lang.String modelRef,
                                                   java.util.ArrayList methodParams)
Invoke an actionBinding with a list of parameter values

getBindingContext

public static BindingContext getBindingContext(javax.servlet.http.HttpServletRequest request)
*** For internal framework use only ***

initializeBindingContainer

public static DCBindingContainer initializeBindingContainer(javax.servlet.http.HttpServletRequest request,
                                                            BindingContext ctx,
                                                            java.lang.String model)
*** For internal framework use only ***

setBindingContainer

public static void setBindingContainer(javax.servlet.http.HttpServletRequest request,
                                       DCBindingContainer container)
*** For internal framework use only ***

getBindingContainer

public static DCBindingContainer getBindingContainer(javax.servlet.http.HttpServletRequest request)
*** For internal framework use only ***

findBindingContainer

public static DCBindingContainer findBindingContainer(BindingContext ctx,
                                                      java.lang.String model)

getLocalizedExceptionsList

public static java.util.List getLocalizedExceptionsList(java.util.List excs,
                                                        LocaleContext lCtx)
Get an interMedia object for an InputStream
Parameters:
inStream - the inputStream to read from
contentType - the mime-type of the stream
binding - the binding for which the interMedia object must be created

elEvaluate

public static java.lang.Object elEvaluate(java.lang.Object context,
                                          java.lang.Object onObject,
                                          java.lang.String expression)
If an ADFExpressionEvaluatorFactory is registered in the environment, then use that to fetch a static ADFExpressionEvaluator and run the given expression through it and return the evaluated result.

10.1.2 and earlier applications which are not migrated by designtime should continue to work without starting with '${' and ending with '}' syntax. For 10.1.3 onwards, all expressions should follow the el-expression syntax starting with '${' and ending with '}'.

Parameters:
context - may refer to ADFContext. This may be used to setup a evaluator factory.
onObject - Object on which to run the expression on.
expression - String to Evaluate on the given object.

getIteratorForArray

public static java.util.Iterator getIteratorForArray(java.lang.Object data,
                                                     java.lang.Class clz)
If clz object represents a primitive type array, then the name returned is the name determined by the following table. The encoding of element type names is as follows:
 B            byte
 C            char
 D            double
 F            float
 I            int
 J            long
 Lclassname;  class or interface
 S            short
 Z            boolean
 V     void
 

getControlType

public static final java.lang.String getControlType(StructureDef vo,
                                                    AttributeDef attrDef,
                                                    LocaleContext locale)
This method determines what control type to use for a given attribute. It first checks the hints for specific directions from the developer. If no control type was specified, the attribute's type is used. If all else fails, the default type (textfield) is returned.
Parameters:
attrDef - the attribute to determine a control type for
Returns:
the suggested control type to display the attribute

skipMetaDataLookup

public static boolean skipMetaDataLookup(java.lang.String sType)
If string is null/empty or one of the known java types then skip metadata lookup.

isCollectionOrStructureType

public static boolean isCollectionOrStructureType(java.lang.Class propClass)

isCollectionType

public static boolean isCollectionType(java.lang.Class propClass)

isScalarType

public static boolean isScalarType(java.lang.Class type)

isAppInPollingDCEMode

public static boolean isAppInPollingDCEMode()
Deprecated. since 11.1.1 Polling mode information is moved into ADS.
Return true if ADFConfig setting Active Data exists and if 'use-polling' entry is true. Else, look in "activeDataConfigUsePolling" key in request/session/application scope and if it exists and is a boolean true, then return true. Else return false. This value is evaluated everytime this method is called.

getFilteredAttributeDefs

public static java.util.ArrayList<AttributeDef> getFilteredAttributeDefs(AttributeDef[] attrDefs,
                                                                         LocaleContext locale,
                                                                         java.lang.String category,
                                                                         boolean summaryForm)

getCategoryValue

public static java.lang.String getCategoryValue(AttributeDef aDef,
                                                LocaleContext localCtx)

Skip navigation links

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

E10653-03


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