public class XMLInputCustomizer extends RestInputCustomizerImpl
RestInputCustomizer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SPACE
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
XMLInputCustomizer()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
convertToMap(java.lang.Object pObject,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Converts the supplied object to a Map of parameters.
|
java.lang.Class<?> |
getContainerClass()
Returns the Document class object, the container used for XML data.
|
java.lang.Object |
instantiateObjectParameter(java.lang.Object pDocument,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Instantiates an object argument from the given Document.
|
boolean |
isValidTypeString(java.lang.String pData)
Returns true if pData is a valid XML string, false otherwise
|
java.lang.Object |
parseString(java.lang.String pData,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns a Document object representing the data from pData
|
protected java.lang.Object |
processXMLMultiValue(org.dom4j.Element pObj,
org.dom4j.Element pMultiValueDescriptor,
java.lang.Class<?> pPropType,
java.lang.String pPropName,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
process an xml multi value, convert it
into a java object
|
protected java.lang.Object |
produceMultivalueComponentObject(org.dom4j.Element pCurrentValue,
org.dom4j.Element pMultiValueDescriptor,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
produce a result object for a multivalue component item
|
java.lang.String[] |
splitMultipleStringsAtCharacter(java.lang.String pData,
char pChar)
Splits multiple XML strings at the specified character
|
getAcceptableMimeTypes, getEncoding, getFormat, getInputCustomizer, getInputCustomizer, getMapKeyElementString, getMapValueElementString, javaInstanceForClass, setAcceptableMimeTypes, setEncoding, setFormat, setMapKeyElementString, setMapValueElementString
addLogListener, 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, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public java.lang.Class<?> getContainerClass()
public java.lang.Object parseString(java.lang.String pData, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pData
- a String which contains the data streampRequest
- the servlet requestpResponse
- the servlet responseRestException
- if the string in pData cannot be parsedpublic java.util.Map<java.lang.String,java.lang.Object> convertToMap(java.lang.Object pObject, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pObject
- the object to convertpRequest
- the servlet requestpResponse
- the servlet responseRestException
- if pObject is not a Docuemnt object or if an error occurs reading from pObjectpublic java.lang.Object instantiateObjectParameter(java.lang.Object pDocument, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RestException
pDocument
- the Document or Element which contains the data for the object to instantiatepRequest
- the servlet requestpResponse
- the servlet responseorg.dom4j.DocumentException
- if an exception occurs accessing the JSONObjectRestException
- if there is neither an "atg-rest-class-type" property or "class" propertyprotected java.lang.Object processXMLMultiValue(org.dom4j.Element pObj, org.dom4j.Element pMultiValueDescriptor, java.lang.Class<?> pPropType, java.lang.String pPropName, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.lang.Exception
pObj
- the xml elementpMultiValueDescriptor
- the type descriptorpPropType
- the property type for the objectpPropName
- the name of the propertypRequest
- the Dynamo requestpResponse
- the Dynamo responsejava.lang.Exception
- if there was an error creating the java multi value objectprotected java.lang.Object produceMultivalueComponentObject(org.dom4j.Element pCurrentValue, org.dom4j.Element pMultiValueDescriptor, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.lang.Exception
pCurrentValue
- the current xml elementpMultiValueDescriptor
- the current type descriptorpRequest
- the dynamo requestpResponse
- the dynamo responsejava.lang.Exception
- if there was an error producing the java objectpublic java.lang.String[] splitMultipleStringsAtCharacter(java.lang.String pData, char pChar)
pData
- the string to splitpChar
- the character to split atpublic boolean isValidTypeString(java.lang.String pData)
pData
- the string to test