public class XMLOutputCustomizer extends RestOutputCustomizerImpl
RestOutputCustomizerRestOutputCustomizerImpl.NucleusComponentReferenceObject, RestOutputCustomizerImpl.RepositoryItemReferenceObject| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
REQUEST_SCOPE_PATH, SESSION_SCOPE_PATH, SPACESERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
XMLOutputCustomizer()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
checkAgainstNonExpandableList, createComponentConfiguration, createOutputObject, createOutputObjectNoFiltering, createOutputObjectWithDefaultIncludes, createOutputObjectWithoutDefaultIncludes, enableShowRESTPaths, findComponentConfigJSON, getArrayElementString, getBooleanControlParam, getCollectionElementString, getComponentConfiguration, getComponentConfiguration, getComponentResolver, getContentType, getEncoding, getFilteringManager, getFormat, getHostAndPortString, getIndentSize, getMapElementString, getMapKeyElementString, getMapValueElementString, getNucleusComponentPropertyReferenceString, getNucleusComponentPropertyReferenceString, getNucleusComponentReferenceString, getNucleusComponentReferenceString, getReferenceStringRoot, getRepositoryItemPropertyReferenceString, getRepositoryItemReferenceString, getRootElementString, getStringControlParam, getTimeZoneId, isEnableFormatDateOutput, isEnablePerRequestClassFilters, isEnablePerRequestComponentFilters, isEnablePerRequestFilters, isEnablePerRequestRepositoryFilters, isLoggingPropertyDebug, isObjectANonGenericServiceNucleusComponent, isShowRESTPaths, loadNucleusComponentIntoMap, loadNucleusComponentIntoMap, outputBean, outputBeanProperty, outputBeanValue, outputFilteredProperty, outputNonFilteredProperty, searchComponentConfigs, setArrayElementString, setCollectionElementString, setContentType, setEnableFormatDateOutput, setEnablePerRequestClassFilters, setEnablePerRequestComponentFilters, setEnablePerRequestFilters, setEnablePerRequestRepositoryFilters, setEncoding, setFormat, setIndentSize, setLoggingPropertyDebug, setMapElementString, setMapKeyElementString, setMapValueElementString, setRootElementString, setShowRESTPaths, setTimeZoneIdaddLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic XMLOutputCustomizer()
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 responseRestException - not thrown, inherited from interface declarationjava.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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an input or output stream exception occurspublic 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 responseRestException - if an error occurs processing the REST requestjava.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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an input or output stream exception occursprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected 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 responseRestException - if an error occurs processing the REST requestjava.io.IOException - if an error occurs writing to the output streamprotected java.lang.Object getRepositoryItemReferenceObject(RepositoryItem pItem, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pValue - the RepositoryItempRequest - the requestpResponse - the responseRestException - if there's an error getting the repository item
reference valuesprotected java.lang.Object getNucleusComponentReferenceObject(GenericService pService, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pService - the GenericServicepRequest - the requestpResponse - the responseRestException - if there's an error getting the nucleus component
reference values