Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.trees.uiModel.util
Class UIModelUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.trees.uiModel.util.UIModelUtils

public final class UIModelUtils
extends java.lang.Object

Utility class to be used across UIModel.

Author:
Abhay K Kumar <abhay.k.kumar&064;oracle.com>

Method Summary
static TreeNodeProperties.TreeNodeType checkTreeNodeType(oracle.jbo.Row treeNodeRow)
          Checks the type of tree node whether it is value based, range based or referenced node.
static java.lang.String extractDestViewDef(oracle.jbo.server.ApplicationModuleImpl am, java.lang.String vlAccessorName, java.lang.String viewDefName)
          Extracts the View Definition name assoicated with destionation of given View Link and its container data source view object.
static oracle.jbo.server.ViewRowSetImpl getChildAccessorTreeNodes(DataSource ds, oracle.jbo.Row treeNodeRow, oracle.jbo.ApplicationModule am, boolean isDynamicRow)
          Gets the List of actual Tree nodes from child accessor data source as row iterator of value nodes.
static java.util.List<org.apache.commons.beanutils.DynaProperty> getDataSourceProperties(TreeStructure treeStructure)
          Gets the list of DynaPropertys of all DataSources associated with this tree structure.
static java.lang.Object getFormattedValue(java.lang.Class attrClassName, java.lang.Object value)
          Get formatted value for any String representation of value based on class name.
static java.lang.String getMessage(java.lang.String code, java.lang.Object[] params)
          Returns the translated message for given code.
static java.lang.String[] getPrimaryKeysVal(java.util.List<Attribute> pkAttrs, oracle.jbo.Row nodeRow)
           
static oracle.jbo.RowIterator getRangeTreeNodes(DataSource ds, oracle.jbo.Row rangeNodeRow, oracle.jbo.ApplicationModule am)
          Gets the actual Tree nodes Iterator as set of actual data source nodes for a given range tree node.
static oracle.jbo.Row getValueTreeNode(DataSource ds, oracle.jbo.Row valueNodeRow, oracle.jbo.ApplicationModule am)
          Gets the actual Tree nodes from data source as value node.
static boolean isLeafNode(TreeNodeProperties.TreeNodeType nodeType, oracle.jbo.Row nodeRow, boolean hasVlAccessorChild)
          Checks whether the node is a referenced tree node.
static boolean isNullOrEmpty(java.lang.String passedVal)
          Checks whether passed value is null or empty.
static boolean isRangeNode(oracle.jbo.Row rangeNodeRow)
          Checks whether the node is a range node.
static boolean isRefTreeNode(oracle.jbo.Row refTreeNodeRow)
          Checks whether the node is a referenced tree node.
static java.util.Map loadAttributeHints(TreeStructure treeStructure)
          load hints for all the available attributes for given tree structure.
static java.lang.String trim(java.lang.String toTrim)
          Trims spaces from a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isRangeNode

public static boolean isRangeNode(oracle.jbo.Row rangeNodeRow)
Checks whether the node is a range node.

Parameters:
rangeNodeRow - as Row
Returns:
boolean whether node is range node

checkTreeNodeType

public static TreeNodeProperties.TreeNodeType checkTreeNodeType(oracle.jbo.Row treeNodeRow)
Checks the type of tree node whether it is value based, range based or referenced node.

Parameters:
treeNodeRow - as oracle.jbo.Row
Returns:
TreeNodeProperties.TreeNodeType indicating the type of node

isRefTreeNode

public static boolean isRefTreeNode(oracle.jbo.Row refTreeNodeRow)
Checks whether the node is a referenced tree node.

Parameters:
refTreeNodeRow - as Row
Returns:
boolean whether node is referenced tree node

isLeafNode

public static boolean isLeafNode(TreeNodeProperties.TreeNodeType nodeType,
                                 oracle.jbo.Row nodeRow,
                                 boolean hasVlAccessorChild)
Checks whether the node is a referenced tree node.

Parameters:
nodeType - as TreeNodeProperties.TreeNodeType
nodeRow - as Row
hasVlAccessorChild - true if foreign key based child is allowed for associated data source
Returns:
boolean whether it is a leaf node

getMessage

public static java.lang.String getMessage(java.lang.String code,
                                          java.lang.Object[] params)
Returns the translated message for given code.

Parameters:
code - as string
params - as array of parameter objects
Returns:
Message as String

loadAttributeHints

public static java.util.Map loadAttributeHints(TreeStructure treeStructure)
load hints for all the available attributes for given tree structure.

Parameters:
treeStructure - Tree Structure metadata
Returns:
Map of attribute name and its display value as key value pair
See Also:
TreeStructure

getDataSourceProperties

public static java.util.List<org.apache.commons.beanutils.DynaProperty> getDataSourceProperties(TreeStructure treeStructure)
Gets the list of DynaPropertys of all DataSources associated with this tree structure.

Parameters:
treeStructure - as Tree structure metadata
Returns:
List the list of DynaPropertys
See Also:
DynaProperty, TreeStructure

getFormattedValue

public static java.lang.Object getFormattedValue(java.lang.Class attrClassName,
                                                 java.lang.Object value)
Get formatted value for any String representation of value based on class name.

Parameters:
attrClassName - Class Name
value - Value in String format
Returns:
formatted value of provided class type

getRangeTreeNodes

public static oracle.jbo.RowIterator getRangeTreeNodes(DataSource ds,
                                                       oracle.jbo.Row rangeNodeRow,
                                                       oracle.jbo.ApplicationModule am)
                                                throws oracle.jbo.SQLStmtException,
                                                       oracle.jbo.JboException
Gets the actual Tree nodes Iterator as set of actual data source nodes for a given range tree node.

Parameters:
ds - as data source to which these nodes are associated
rangeNodeRow - as Row
am - Application module for containing dynamic VO
Returns:
Row for value node from data sourceGets the actual Tree nodes from data source for provide Range Node.
Throws:
oracle.jbo.SQLStmtException - Sql Statment Exception
oracle.jbo.JboException - No Definition/Invalid Definition found Exception

getPrimaryKeysVal

public static java.lang.String[] getPrimaryKeysVal(java.util.List<Attribute> pkAttrs,
                                                   oracle.jbo.Row nodeRow)

extractDestViewDef

public static java.lang.String extractDestViewDef(oracle.jbo.server.ApplicationModuleImpl am,
                                                  java.lang.String vlAccessorName,
                                                  java.lang.String viewDefName)
Extracts the View Definition name assoicated with destionation of given View Link and its container data source view object.

Parameters:
am - ApplicationModule
vlAccessorName - View Link Accessor Name
viewDefName - Contaier source View Definition name
Returns:
view definition ame for the destionation of view link

getValueTreeNode

public static oracle.jbo.Row getValueTreeNode(DataSource ds,
                                              oracle.jbo.Row valueNodeRow,
                                              oracle.jbo.ApplicationModule am)
                                       throws oracle.jbo.SQLStmtException,
                                              oracle.jbo.JboException
Gets the actual Tree nodes from data source as value node.

Parameters:
ds - as DataSource to which these nodes are associated
valueNodeRow - as Row
am - Application module for containing dynamic VO
Returns:
Row for value node from data source
Throws:
oracle.jbo.SQLStmtException - Sql Statment Exception
oracle.jbo.JboException - No Definition/Invalid Definition found Exception

getChildAccessorTreeNodes

public static oracle.jbo.server.ViewRowSetImpl getChildAccessorTreeNodes(DataSource ds,
                                                                         oracle.jbo.Row treeNodeRow,
                                                                         oracle.jbo.ApplicationModule am,
                                                                         boolean isDynamicRow)
                                                                  throws oracle.jbo.SQLStmtException,
                                                                         oracle.jbo.JboException
Gets the List of actual Tree nodes from child accessor data source as row iterator of value nodes.

Parameters:
ds - as DataSource to which these nodes are associated
treeNodeRow - as Row for master node for which VLAccessor will be tracked
am - Application module for containing dynamic VO
Returns:
RowSet for Child nodes for given VL Accessor data source
Throws:
oracle.jbo.SQLStmtException - Sql Statment Exception
oracle.jbo.JboException - No Definition/Invalid Definition found Exception

trim

public static java.lang.String trim(java.lang.String toTrim)
Trims spaces from a string.

Parameters:
toTrim - the string to trim
Returns:
String the string without spaces

isNullOrEmpty

public static boolean isNullOrEmpty(java.lang.String passedVal)
Checks whether passed value is null or empty.

Parameters:
passedVal - Passed value

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.