com.adobe.icc.dbforms.util
Class DBUtils

java.lang.Object
  extended by com.adobe.icc.dbforms.util.DBUtils

public final class DBUtils
extends java.lang.Object

Helper/Utility class for utility operations such as String trim or null check, etc.


Constructor Summary
DBUtils()
           
 
Method Summary
static java.lang.String createCanonicalPath(java.lang.String ddePath, DataDictionary dataDictionary)
          Adds collection marker in the path
static java.util.List getAttachmentDocs(java.lang.String dataXml)
           
static Element getChildNode(Element parent, java.lang.String nodeName)
          Returns a child node for the given parent node and nodeName
static Element getControlDataRoot(XMLHelperUtil data)
           
static java.lang.String getDisplayName(int state)
          Get the display name for a State given the state identifier.
static LocalizationResourceInfo getLocalizationResourceInfo(java.util.List infoList, java.lang.String locale)
           
static java.lang.String getParameter(java.lang.String sParameterName, HttpServletRequest request, java.lang.String sDefaultValue)
          Extract a servlet call parameter from the request url and return as string (default value if parameter not given and default provided with the call).
static java.lang.String NVL(java.lang.String string)
          Check if String is NULL and if so return an empty string.
static java.lang.String stringDefault(java.lang.String string, java.lang.String sDefaultString)
          Set a string with a default value if that is not empty.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBUtils

public DBUtils()
Method Detail

NVL

public static java.lang.String NVL(java.lang.String string)
Check if String is NULL and if so return an empty string.

Parameters:
string - The given string.
Returns:
trimmed string or "".

stringDefault

public static java.lang.String stringDefault(java.lang.String string,
                                             java.lang.String sDefaultString)
Set a string with a default value if that is not empty.

Parameters:
string - Destination string.
sDefaultString - Default to set.

getParameter

public static java.lang.String getParameter(java.lang.String sParameterName,
                                            HttpServletRequest request,
                                            java.lang.String sDefaultValue)
Extract a servlet call parameter from the request url and return as string (default value if parameter not given and default provided with the call).

Parameters:
sParameterName - Name of parameter to extract.
request - HttpServletRequest object.
sDefaultValue - String with default value should the parameter not be in the request.
Returns:
String with parameter content.

getDisplayName

public static java.lang.String getDisplayName(int state)
Get the display name for a State given the state identifier.

Parameters:
state - The state identifier.
Returns:
The display name for a State given the state identifier.

createCanonicalPath

public static java.lang.String createCanonicalPath(java.lang.String ddePath,
                                                   DataDictionary dataDictionary)
                                            throws DCTException
Adds collection marker in the path

Parameters:
ddePath -
dataDictionary -
Returns:
path having collection marker [] if contains collection in path
Throws:
DCTException

getLocalizationResourceInfo

public static LocalizationResourceInfo getLocalizationResourceInfo(java.util.List infoList,
                                                                   java.lang.String locale)

getAttachmentDocs

public static java.util.List getAttachmentDocs(java.lang.String dataXml)
                                        throws java.io.IOException
Throws:
java.io.IOException

getControlDataRoot

public static Element getControlDataRoot(XMLHelperUtil data)

getChildNode

public static Element getChildNode(Element parent,
                                   java.lang.String nodeName)
Returns a child node for the given parent node and nodeName

Parameters:
parent - parent node whose child is to be returned
nodeName - name of the child node
Returns:
child node for the given parent node and nodeName. Create if one does not exist.


[an error occurred while processing this directive] [an error occurred while processing this directive]