Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

oracle.apps.fnd.appltest.diagfwk.ui.common
Class DiagUIUtil

java.lang.Object
  extended by oracle.apps.fnd.appltest.diagfwk.ui.common.DiagUIUtil
All Implemented Interfaces:
DiagUIConstants

public class DiagUIUtil
extends java.lang.Object
implements DiagUIConstants

Provides common UI specific APIs that can be used by backing beans for the diagnostic UI.


Field Summary
 
Fields inherited from interface oracle.apps.fnd.appltest.diagfwk.ui.common.DiagUIConstants
IMG_CANCELED, IMG_CHECKMARKSTATUS, IMG_DELETE, IMG_EDIT, IMG_ERROR, IMG_FILE, IMG_FOLDERCLOSED, IMG_FOLDEROPEN, IMG_HELP, IMG_LINK, IMG_NONE, IMG_PARAM, IMG_REPORT, IMG_RUNNING, IMG_SUCCESS, IMG_VIEWLINK, IMG_WARNING, IMG_WARNINGSTATUS, INIT_PARAM_TEMPDIR
 
Constructor Summary
DiagUIUtil()
           
 
Method Summary
static void checkHasDiagfwkPermission(java.lang.String pName, java.lang.String pAction)
          Checks if the currently logged-in user has been granted the DiagfwkUIPermission with the given name and action.
static java.lang.Object evaluateExpr(java.lang.String pExpr, java.lang.Class pClass)
          Evalutates the given expression
static java.lang.String evaluateExprToString(java.lang.String pExpr)
          Evaluates the given expression to a String value (call this if you know your expression results in a String value)
static java.lang.String getAppInitParam(java.lang.String pParamName)
          Returns value of the given initialization parameter as defined in the servlet context
static java.lang.String getTempDir()
          Gets a temp dir based on app configuration.
static java.lang.String getTranslatedLabel(java.lang.String pRbName, java.lang.String pRbKey, java.lang.Object... pTokens)
          Returns the translated String from the given resource bundle with the given key and token values.
static boolean hasDiagfwkPermission(java.lang.String pName, java.lang.String pAction)
          Checks if the currently logged-in user has been granted the DiagfwkUIPermission with the given name and action.
static void refreshIterator(java.lang.String pIteratorName)
          Refreshes an iterator from the bindings with the given name.
static void refreshIterator(java.lang.String pBindingContainerId, java.lang.String pIteratorName)
          Refreshes an iterator with the given name inside the specified binding container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagUIUtil

public DiagUIUtil()
Method Detail

getAppInitParam

public static java.lang.String getAppInitParam(java.lang.String pParamName)
Returns value of the given initialization parameter as defined in the servlet context

Parameters:
pParamName - parameter name
Returns:
value for the given initialization parameter.

getTempDir

public static java.lang.String getTempDir()
Gets a temp dir based on app configuration. Returns null if not configured.


evaluateExprToString

public static java.lang.String evaluateExprToString(java.lang.String pExpr)
Evaluates the given expression to a String value (call this if you know your expression results in a String value)


evaluateExpr

public static java.lang.Object evaluateExpr(java.lang.String pExpr,
                                            java.lang.Class pClass)
Evalutates the given expression


getTranslatedLabel

public static java.lang.String getTranslatedLabel(java.lang.String pRbName,
                                                  java.lang.String pRbKey,
                                                  java.lang.Object... pTokens)
Returns the translated String from the given resource bundle with the given key and token values.

Parameters:
pRbName - fully qualified name of the resource bundle. This could be a XLIFF resource bundle or a Java resource bundle.
pRbKey - key for the resource in the bundle
pTokens - any tokens for the resource that need to be substituted.
Returns:
the translated String value from the resource bundle with the given key and token values.

refreshIterator

public static void refreshIterator(java.lang.String pIteratorName)
Refreshes an iterator from the bindings with the given name.

Parameters:
pIteratorName - name of the iterator to refresh.

refreshIterator

public static void refreshIterator(java.lang.String pBindingContainerId,
                                   java.lang.String pIteratorName)
Refreshes an iterator with the given name inside the specified binding container

Parameters:
pBindingContainerId - - ID for the binding container where the iterator exists
pIteratorName - - name of the iterator to refresh

hasDiagfwkPermission

public static boolean hasDiagfwkPermission(java.lang.String pName,
                                           java.lang.String pAction)
Checks if the currently logged-in user has been granted the DiagfwkUIPermission with the given name and action.

If the permission is not granted, this method will return false. Otherwise it will return true.

Parameters:
pName - - name of the permission
pAction - - action granted by the permission
Returns:
true if the permission is granted. Returns false otherwise.

checkHasDiagfwkPermission

public static void checkHasDiagfwkPermission(java.lang.String pName,
                                             java.lang.String pAction)
Checks if the currently logged-in user has been granted the DiagfwkUIPermission with the given name and action.

If the permission is not granted, this method will throw a RuntimeException.

Parameters:
pName - - name of the permission
pAction - - action granted by the permission

Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.