|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.rest.output.RestOutputCustomizerImpl
atg.rest.output.XMLOutputCustomizer
public class XMLOutputCustomizer
This class implements an XML REST output customizer.
RestOutputCustomizer| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class atg.rest.output.RestOutputCustomizerImpl |
|---|
RestOutputCustomizerImpl.NucleusComponentReferenceObject, RestOutputCustomizerImpl.RepositoryItemReferenceObject |
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
| Fields inherited from class atg.rest.output.RestOutputCustomizerImpl |
|---|
REQUEST_SCOPE_PATH, SESSION_SCOPE_PATH, SPACE |
| Fields inherited from class atg.nucleus.GenericService |
|---|
SERVICE_INFO_KEY |
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
|---|
DEFAULT_LOG_TRACE_STATUS |
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
| Constructor Summary | |
|---|---|
XMLOutputCustomizer()
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addArrayToElement(ParsedURI pParsedURI,
java.lang.Object pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add an array to the given element. |
protected void |
addListToElement(ParsedURI pParsedURI,
java.util.List<?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given java.util.List to the given element. |
protected void |
addMapToElement(ParsedURI pParsedURI,
java.util.Map<?,?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given java.util.Map to the given element. |
protected void |
addObjectArrayToElement(ParsedURI pParsedURI,
java.lang.Object[] pValue,
int pIndex,
int pCount,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given object array to the given element. |
protected void |
addObjectToElement(ParsedURI pParsedURI,
java.lang.Object pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given object value to the given element |
protected void |
addPrimitiveArrayToElement(java.lang.Object pValue,
int pIndex,
int pCount,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given primitive array to the given element. |
protected void |
addSetToElement(ParsedURI pParsedURI,
java.util.Set<?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given java.util.Set to the given element. |
void |
addValueToOutputObject(java.lang.String pPropertyName,
java.lang.Object pValue,
ParsedURI pParsedURI,
java.lang.Object pContainer,
java.lang.Object pParent,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will add the given value to the given Element object |
java.lang.Object |
createBeanOutput(ParsedURI pParsedURI,
java.lang.Object pResContainer,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method outputs all the properties of an object to the response's output stream |
java.lang.Object |
createBeanValueOutput(ParsedURI pParsedURI,
java.lang.String pResourceName,
java.lang.Object pValue,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Outputs a bean property value to the output stream in XML. |
protected org.dom4j.io.OutputFormat |
createDefaultOutputFormat()
Creates the default org.dom4j.io.OutputFormat object that is used to format the XML output. |
java.lang.Object |
createOutputContainer()
This method creates the output container, a JSONObject. |
protected java.lang.Object |
getNucleusComponentReferenceObject(GenericService pService,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
create a nucleus component reference object |
protected java.lang.Object |
getRepositoryItemReferenceObject(RepositoryItem pItem,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
create a repository item reference object |
boolean |
isOmitEncoding()
Flag indicating if the encoding declaration should be suppressed or not. |
boolean |
isSuppressDeclaration()
Flag indicating if the XML declaration () is suppressed or not. |
boolean |
isXHTML()
Flag indicating whether or not the output should be strict XHTML or not. |
void |
sendToOutputStream(java.lang.Object pDocument,
DynamoHttpServletResponse pResponse)
Writes the XML document to the servlet output stream |
void |
setOmitEncoding(boolean pOmitEncoding)
Sets flag indicating if the encoding declaration should be suppressed or not. |
void |
setSuppressDeclaration(boolean pSuppressDeclaration)
Sets flag indicating if the XML declaration () is suppressed or not. |
void |
setXHTML(boolean pXhtml)
Sets flag indicating whether or not the output should be strict XHTML or not. |
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail |
|---|
public XMLOutputCustomizer()
| Method Detail |
|---|
public boolean isOmitEncoding()
public void setOmitEncoding(boolean pOmitEncoding)
pOmitEncoding - the omitEncoding to setpublic boolean isSuppressDeclaration()
public void setSuppressDeclaration(boolean pSuppressDeclaration)
pSuppressDeclaration - the suppressDeclaration to setpublic boolean isXHTML()
public void setXHTML(boolean pXhtml)
pXhtml - the xHTML to setprotected org.dom4j.io.OutputFormat createDefaultOutputFormat()
public void sendToOutputStream(java.lang.Object pDocument,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pDocument - the document to writepResponse - the servlet response
RestException - not thrown, inherited from interface declaration
java.io.IOException - if an input or output stream exception occurspublic java.lang.Object createOutputContainer()
public java.lang.Object createBeanOutput(ParsedURI pParsedURI,
java.lang.Object pResContainer,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
createBeanOutput in interface RestOutputCustomizercreateBeanOutput in class RestOutputCustomizerImplpParsedURI - an object containing the parsed URIpResContainer - the object container which is the resourcepNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an input or output stream exception occurs
public java.lang.Object createBeanValueOutput(ParsedURI pParsedURI,
java.lang.String pResourceName,
java.lang.Object pValue,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
createBeanValueOutput in interface RestOutputCustomizercreateBeanValueOutput in class RestOutputCustomizerImplpParsedURI - an object containing the parsed URIpResourceName - the name of the resource being outputpValue - the value of the resourcepNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an input or output stream exception occursatg.rest.output.RestOutputCustomizer#outputBeanValue(java.lang.String, java.lang.Object, atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
public void addValueToOutputObject(java.lang.String pPropertyName,
java.lang.Object pValue,
ParsedURI pParsedURI,
java.lang.Object pContainer,
java.lang.Object pParent,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pPropertyName - the name of the property valuepValue - the object representing the valuepParsedURI - an object containing the parsed URIpContainer - the parent container of the given property or null if the parent container is not neededpParent - the element to add the value to as a text elementpNestingDepth - the current nesting depth in the object treepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an input or output stream exception occurs
protected void addArrayToElement(ParsedURI pParsedURI,
java.lang.Object pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the array valuepElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addPrimitiveArrayToElement(java.lang.Object pValue,
int pIndex,
int pCount,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException
pValue - the object representing the primitive array valuepIndex - the index from which to start returning items from the arraypCount - the number of elements to return from the starting point in the arraypElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addObjectArrayToElement(ParsedURI pParsedURI,
java.lang.Object[] pValue,
int pIndex,
int pCount,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the object array valuepIndex - the index from which to start returning items from the arraypCount - the number of elements to return from the starting point in the arraypElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addListToElement(ParsedURI pParsedURI,
java.util.List<?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the ListpElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addSetToElement(ParsedURI pParsedURI,
java.util.Set<?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the SetpElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addMapToElement(ParsedURI pParsedURI,
java.util.Map<?,?> pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the MappElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected void addObjectToElement(ParsedURI pParsedURI,
java.lang.Object pValue,
org.dom4j.Element pElement,
int pNestingDepth,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException,
java.io.IOException
pParsedURI - an object containing the parsed URIpValue - the object representing the object valuepElement - the element to add the value to as a text elementpNestingDepth - the current nesting depth from the resourcepRequest - the servlet requestpResponse - the servlet response
RestException - if an error occurs processing the REST request
java.io.IOException - if an error occurs writing to the output stream
protected java.lang.Object getRepositoryItemReferenceObject(RepositoryItem pItem,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException
pValue - the RepositoryItempRequest - the requestpResponse - the response
RestException - if there's an error getting the repository item
reference values
protected java.lang.Object getNucleusComponentReferenceObject(GenericService pService,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws RestException
pService - the GenericServicepRequest - the requestpResponse - the response
RestException - if there's an error getting the nucleus component
reference values
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||