public class CCCompatibilityUtility extends Object
Constructor and Description |
---|
CCCompatibilityUtility() |
Modifier and Type | Method and Description |
---|---|
static int |
confirmationMsg(String msg)
Display a confirmation dialog containing the specified message and
2 choices for the user (YES or NO).
|
static int |
confirmationMsg(String msg,
String title)
Display a confirmation dialog containing the specified message, title
and 2 choices for the user (YES or NO).
|
static void |
errorMsg(Component parent,
String msg,
boolean fromRes)
Display an error dialog with the passed in message
|
static void |
errorMsg(Component parent,
String msg,
Object[] args)
Display an error dialog with the passed in message
|
static PortalContext |
getConnection()
Retrieves the main Portal connection used by Customer Center
|
static CustomerCenterContext |
getCustomerCenterContext()
Retrieves the context for Customer Center
|
static Properties |
getProperties()
Retrieves the global Properties object combining default properties
and any customized properties (specified via the CC SDK).
|
static String |
getResource(String base,
String tag)
Get a specific resource.
|
static ResourceBundle |
getResources()
Retrieves the global resource bundle object combining default strings
and any customized resources (specified via the CC SDK).
|
static JFrame |
getTopFrame()
Retrieves the topmost Frame used by Customer Center.
|
static Properties |
getUserPreferences()
Get the user UI preferences.
|
static void |
invokeInThreadPool(Runnable run)
Run a task in a thread pool managed thread.
|
static ImageIcon |
loadImage(String name)
Load an ImageIcon from a supplied location string
|
static ImageIcon |
loadImage(URL u)
Convenience API to retrieve an ImageIcon from the given URL
|
static PInfranetException |
wrapException(EBufException ex)
Provides a wrapper around an EBufException for your view code, which
is not supposed to be aware of java PCM.
|
public static CustomerCenterContext getCustomerCenterContext()
public static JFrame getTopFrame()
public static PortalContext getConnection()
public static ImageIcon loadImage(URL u)
u
- The URL of the image datapublic static ImageIcon loadImage(String name)
name
- The file name of the image data. An assumption is made
that this file is located with other Java resources
so the name should be package reletive.
I.E> "foo.gif" or "com/portal/myapp/foo.gif"public static Properties getProperties()
public static Properties getUserPreferences()
public static ResourceBundle getResources()
public static String getResource(String base, String tag)
base
- The resource base string. Usually specified as
a property of a PGUIComponenttag
- The resource name tag. This is appended to the base
resource name (seperated by a '.') and used to find a
a resource. If not found, it is looked for alone (not
appended to the base name), and if still not found,
it is returned itself.public static void errorMsg(Component parent, String msg, Object[] args)
parent
- The parent component - typically getTopFrame()msg
- The error message tag. Loads message from resource fileargs
- An argument list to format msg withpublic static void errorMsg(Component parent, String msg, boolean fromRes)
parent
- The parent component - typically getTopFrame()msg
- The error message to displayfromRes
- If true, the error message is assumed to be a tag
that will be read in from the global resource bundle. If false, the
passed in message is displayed.public static int confirmationMsg(String msg)
msg
- The confirmation message to displaypublic static int confirmationMsg(String msg, String title)
msg
- The confirmation message to displayint
- The default button. Use JOptionPane.YES_OPTION or
JOptionPane.NO_OPTIONpublic static void invokeInThreadPool(Runnable run)
run
- The task to runpublic static PInfranetException wrapException(EBufException ex)
Copyright © 2003, 2023, Oracle and/or its affiliates.