Package org.apache.struts2.rest.handler
Class XStreamHandler
java.lang.Object
org.apache.struts2.rest.handler.AbstractContentTypeHandler
org.apache.struts2.rest.handler.XStreamHandler
- All Implemented Interfaces:
ContentTypeHandler
Handles XML content
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDefaultPermissions
(com.opensymphony.xwork2.ActionInvocation invocation, com.thoughtworks.xstream.XStream stream) protected com.thoughtworks.xstream.XStream
createXStream
(com.opensymphony.xwork2.ActionInvocation invocation) fromObject
(com.opensymphony.xwork2.ActionInvocation invocation, Object obj, String resultCode, Writer out) Gets the content type for this handlerGets the extension this handler supportsvoid
Methods inherited from class org.apache.struts2.rest.handler.AbstractContentTypeHandler
fromObject, toObject
-
Constructor Details
-
XStreamHandler
public XStreamHandler()
-
-
Method Details
-
fromObject
public String fromObject(com.opensymphony.xwork2.ActionInvocation invocation, Object obj, String resultCode, Writer out) throws IOException - Throws:
IOException
-
toObject
-
createXStream
protected com.thoughtworks.xstream.XStream createXStream(com.opensymphony.xwork2.ActionInvocation invocation) -
addDefaultPermissions
protected void addDefaultPermissions(com.opensymphony.xwork2.ActionInvocation invocation, com.thoughtworks.xstream.XStream stream) -
getContentType
Description copied from interface:ContentTypeHandler
Gets the content type for this handler- Returns:
- The mime type
-
getExtension
Description copied from interface:ContentTypeHandler
Gets the extension this handler supports- Returns:
- The extension
-