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

E22562-07

oracle.apps.fnd.applcore.dt.osn.utils
Class OsnUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.dt.osn.utils.OsnUtils

public final class OsnUtils
extends java.lang.Object

Utilities class for OSN.


Method Summary
static javax.swing.tree.DefaultMutableTreeNode fromXMLFile(oracle.ide.Context context)
          Load the default xml file and return a tree of DefaultMutableTreeNode representing the file in a swing tree.
static boolean isOSNDTEnabled()
          Is OSN DT enabled.
static oracle.jbo.dt.objects.JboAppModule loadAM(oracle.ide.Context context, java.lang.String amName)
          Load AM by name.
static java.util.List<java.lang.String> loadAMNames(oracle.ide.Context context)
          Load a list of AM names for the current project, sorted Alphabetically.
static oracle.jbo.dt.objects.JboView loadVO(oracle.ide.Context context, java.lang.String voName)
          Load VO by name.
static java.util.ArrayList loadVOAttrs(oracle.ide.Context context, java.lang.String voName)
          Load VO attributes.
static java.lang.String readXMLFromFile(oracle.ide.Context context)
          Read from the fnd OSN integration file and return the entire contents as a String.
static void saveXMLToFile(oracle.ide.Context context, java.lang.String xml)
          Save the xml String to the fnd OSN integration file.
static java.lang.String toPackageName(java.lang.String amName)
          Return the package name for this AM name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOSNDTEnabled

public static boolean isOSNDTEnabled()
Is OSN DT enabled. This is set with a java system property -J-DATG_OSN_ENABLED=[true\false]. The default is true. This method returns true by default, decision to have ability turn OSN DT off has been reversed for now.

Returns:
true if enabled via property, false otherwise.

readXMLFromFile

public static java.lang.String readXMLFromFile(oracle.ide.Context context)
Read from the fnd OSN integration file and return the entire contents as a String.

Parameters:
context - context relating to current operation, probably Model project file.
Returns:
xml as String, null if cannot load for any reason.

saveXMLToFile

public static void saveXMLToFile(oracle.ide.Context context,
                                 java.lang.String xml)
Save the xml String to the fnd OSN integration file. If the file does not exist it will be created. If it does exist is under source control, it will be checked out. No exceptions will be thrown, this method will log exceptions to the log if an error occurs.

Parameters:
context - context relating to current operation, probably Model project file.
xml - xml to save.

fromXMLFile

public static javax.swing.tree.DefaultMutableTreeNode fromXMLFile(oracle.ide.Context context)
Load the default xml file and return a tree of DefaultMutableTreeNode representing the file in a swing tree. If the file does not exist, a single node representing the tree root is returned which can be used by the UI to add nodes.

Parameters:
context - context for current node.
Returns:
DefaultMutableTreeNode node(s), never null.

loadAMNames

public static java.util.List<java.lang.String> loadAMNames(oracle.ide.Context context)
Load a list of AM names for the current project, sorted Alphabetically.

Parameters:
context - context for current node.
Returns:
A possibly empty but never null list of AM names for the current project.

loadAM

public static oracle.jbo.dt.objects.JboAppModule loadAM(oracle.ide.Context context,
                                                        java.lang.String amName)
Load AM by name. If it cannot be loaded, null is returned.

Parameters:
context - context of clicked object, Project or AM.
amName - name of AM.
Returns:
AM, null if cannot be found.

loadVO

public static oracle.jbo.dt.objects.JboView loadVO(oracle.ide.Context context,
                                                   java.lang.String voName)
Load VO by name. If it cannot be loaded, null is returned.

Parameters:
context - context of clicked object, Project or AM.
voName - name of VO.
Returns:
VO, null if cannot be found.

loadVOAttrs

public static java.util.ArrayList loadVOAttrs(oracle.ide.Context context,
                                              java.lang.String voName)
Load VO attributes. If they cannot be loaded, null is returned.

Parameters:
context - context of clicked object, Project or AM.
voName - name of VO.
Returns:
List of JboViewAttr, null if cannot be found.

toPackageName

public static java.lang.String toPackageName(java.lang.String amName)
Return the package name for this AM name

Parameters:
amName - non-null AM name some.package.myAM
Returns:
some.package, or a meaningfule replacement if there is no package.

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

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.