org.enhydra.barracuda.config
Class ScreenUtil

java.lang.Object
  |
  +--org.enhydra.barracuda.config.ScreenUtil

public class ScreenUtil
extends java.lang.Object

This class represents the master Barracuda config screen. It is stored in the users session on a per-locale basis, and is used kind of as a master repository for objects that make up the system.


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
ScreenUtil()
           
 
Method Summary
static org.apache.log4j.Level cvtIntToLevel(int i)
           
static int cvtLevelToInt(java.lang.Class cl)
           
static int cvtLevelToInt(org.apache.log4j.Level l)
           
static BAction getActionLink(ViewContext vc, ListenerFactory lf)
          This method creates a BAction component and adds the specified listener to it.
static BSelect getDebugLevelComp(ViewContext vc, java.lang.String compName, int selectedIndex)
          This method greats a typical debug level BSelect component
static BSelect getDebugLevelComp2(ViewContext vc, java.lang.String compName, java.lang.Class cl)
          This method greats a typical debug level BSelect component, using the new Log4J options (Debug, Info, Warn, Error, Fatal)
static java.lang.String getErrMsg(ViewContext vc, java.lang.String formName, java.lang.String keyName)
          This method extracts a ValidationException error message (if it exists) from a ViewContext object.
static BSelect getSelectComp(ViewContext vc, java.lang.String compName, ListModel lm, int selectedIndex)
          This method greats a typical debug level BSelect component
static java.lang.String getSuccessMsg(ViewContext vc, java.lang.String formName, java.lang.String keyName)
          This method creates a success message
static BToggleButton getToggleButton(ViewContext vc, java.lang.String name, java.lang.String value, boolean selected)
          This method greats a typical debug level BSelect component
static BAction getUpdateButtonComp(ViewContext vc, ListenerFactory lf)
          This method greats a typical debug level BSelect component
static void setLevel(java.lang.Class cl, int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

ScreenUtil

public ScreenUtil()
Method Detail

getDebugLevelComp

public static BSelect getDebugLevelComp(ViewContext vc,
                                        java.lang.String compName,
                                        int selectedIndex)
This method greats a typical debug level BSelect component

Parameters:
vc - the view context
compName - the component name
selectedIndex - the index to be selected
Returns:
the resulting BSelect component

getDebugLevelComp2

public static BSelect getDebugLevelComp2(ViewContext vc,
                                         java.lang.String compName,
                                         java.lang.Class cl)
This method greats a typical debug level BSelect component, using the new Log4J options (Debug, Info, Warn, Error, Fatal)

Parameters:
vc - the view context
compName - the component name
Returns:
the resulting BSelect component

cvtLevelToInt

public static int cvtLevelToInt(java.lang.Class cl)

cvtLevelToInt

public static int cvtLevelToInt(org.apache.log4j.Level l)

cvtIntToLevel

public static org.apache.log4j.Level cvtIntToLevel(int i)

setLevel

public static void setLevel(java.lang.Class cl,
                            int i)

getSelectComp

public static BSelect getSelectComp(ViewContext vc,
                                    java.lang.String compName,
                                    ListModel lm,
                                    int selectedIndex)
This method greats a typical debug level BSelect component

Parameters:
vc - the view context
compName - the component name
selectedIndex - the index to be selected
Returns:
the resulting BSelect component

getToggleButton

public static BToggleButton getToggleButton(ViewContext vc,
                                            java.lang.String name,
                                            java.lang.String value,
                                            boolean selected)
This method greats a typical debug level BSelect component

Parameters:
vc - the view context
Returns:
the resulting BAction component

getActionLink

public static BAction getActionLink(ViewContext vc,
                                    ListenerFactory lf)
This method creates a BAction component and adds the specified listener to it.

Parameters:
vc - the view context
lf - the listener factory to be notified when the action occurs
Returns:
the resulting BAction component

getUpdateButtonComp

public static BAction getUpdateButtonComp(ViewContext vc,
                                          ListenerFactory lf)
This method greats a typical debug level BSelect component

Parameters:
vc - the view context
lf - the listener factory to be notified when the action occurs
Returns:
the resulting BAction component

getErrMsg

public static java.lang.String getErrMsg(ViewContext vc,
                                         java.lang.String formName,
                                         java.lang.String keyName)
This method extracts a ValidationException error message (if it exists) from a ViewContext object. This method expects the ViewContext to contain an EventContext, which in turn must contain a FormMap (specified by formName), which in turn must contain a ValidationException (specified by keyName).

Parameters:
vc - the view context
keyName - the key name which was used to store the ValidationException
Returns:
the resulting error message (blank is it doesn't exist)

getSuccessMsg

public static java.lang.String getSuccessMsg(ViewContext vc,
                                             java.lang.String formName,
                                             java.lang.String keyName)
This method creates a success message

Parameters:
vc - the view context
keyName - the key name which was used to store the ValidationException
Returns:
the resulting error message (blank is it doesn't exist)


Copyright © 2001 Enhydra.org