public class URLtoBusinessObjectDocumentUtility
extends java.lang.Object
This utility class provides a system service to perform the transformation between URL and Business Object Document. This utility is created to be used by Web applications to load the configuration that defines how a URL request can be transformed to a business object document and perform that transformation. This utility class can be used in any Web application that would like to define the transformation of a URL to business object document through configuration instead of programatically.
It is strongly recommend that the web application that is leveraging this utility to provide a mechanism that the base code that is using this utility can be overriden to use the map based methods of the client API.
Modifier and Type | Method and Description |
---|---|
BusinessObjectDocumentType | createBusinessObjectDocument(commonj.sdo.DataObject documentRoot, java.lang.String urlObject, java.lang.String verb, java.util.Map requestParameters)
This method contstructs the Business Object Document for the specified URL client object.
|
java.util.Map | createResponseMap(commonj.sdo.DataObject businessObjectDocument, java.lang.String urlObject)
This method creates the response map that represents the responding business object document.
|
static URLtoBusinessObjectDocumentUtility | getInstance(javax.servlet.http.HttpServletRequest servletRequest)
This method returns a unique instance of the URL to Business Object Document utility that has been defined and configured in the application.
|
static URLtoBusinessObjectDocumentUtility | getInstance(javax.servlet.ServletContext servletContext)
This method returns a unique instance of the URL to Business Object Document utility that has been defined and configured in the application.
|
java.lang.String | getLocalizedCommonException(java.lang.String errorCode, java.util.Locale locale)
This method gets a localized common message for client errors that are treated as exceptions.
|
java.lang.String | getLocalizedCommonException(java.lang.String errorCode, java.lang.Object[] parameters, java.util.Locale locale)
This method gets a localized common message for client errors that are treated as exceptions.
|
java.lang.String[] | getMediatedReasonCode(java.lang.String clientObject, java.lang.String property, java.lang.String reasonCode, java.util.Locale locale)
This method returns the mediated message and client object property associated with the specified reason code.
|
java.lang.String[] | getMediatedReasonCode(java.lang.String clientObject, java.lang.String property, java.lang.String reasonCode, java.lang.Object[] parameters, java.util.Locale locale)
This method returns the mediated message and client object property associated with the specified reason code.
|
void | load(java.io.InputStream inputStream)
This method loads the configuration that defines the URL to Business Object Document mediation.
|
static URLtoBusinessObjectDocumentUtility | newInstance()
This method returns a new instance of the URL to Business Object Document utility.
|
void | reset()
This method resets the configuration of the URL to Business Object Document utility.
|
void | setApplicationErrorResourceBundle(java.lang.String bundle)
This method sets the base resource bundle for common exceptions.
|
void | setExtensionApplicationErrorResourceBundle(java.lang.String bundle)
This method sets the extension resource bundle for common exceptions.
|
java.lang.String | toString()
This method returns the string representation of the object for debugging purposes.
|
public static URLtoBusinessObjectDocumentUtility getInstance(javax.servlet.ServletContext servletContext)
public static URLtoBusinessObjectDocumentUtility getInstance(javax.servlet.http.HttpServletRequest servletRequest)
public static URLtoBusinessObjectDocumentUtility newInstance()
public java.lang.String toString()
public void reset()
public void load(java.io.InputStream inputStream) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
public java.lang.String[] getMediatedReasonCode(java.lang.String clientObject, java.lang.String property, java.lang.String reasonCode, java.util.Locale locale)
public java.lang.String[] getMediatedReasonCode(java.lang.String clientObject, java.lang.String property, java.lang.String reasonCode, java.lang.Object[] parameters, java.util.Locale locale)
public BusinessObjectDocumentType createBusinessObjectDocument(commonj.sdo.DataObject documentRoot, java.lang.String urlObject, java.lang.String verb, java.util.Map requestParameters) throws java.lang.Exception
public java.util.Map createResponseMap(commonj.sdo.DataObject businessObjectDocument, java.lang.String urlObject) throws java.lang.Exception
public void setApplicationErrorResourceBundle(java.lang.String bundle)
public void setExtensionApplicationErrorResourceBundle(java.lang.String bundle)
public java.lang.String getLocalizedCommonException(java.lang.String errorCode, java.util.Locale locale)
public java.lang.String getLocalizedCommonException(java.lang.String errorCode, java.lang.Object[] parameters, java.util.Locale locale)