org.apache.struts2.views.xslt

## Class XSLTResult

- java.lang.Object
- - org.apache.struts2.views.xslt.XSLTResult

- All Implemented Interfaces:
    Result, Serializable

      public class XSLTResult
      extends Object
      implements Result

  XSLTResult uses XSLT to transform an action object to XML.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_PARAM` 'stylesheetLocation' parameter.
    `protected boolean` | `noCache` Determines whether or not the result should allow caching.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSLTResult()`
    `XSLTResult(String stylesheetLocation)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ErrorListener` | `buildErrorListener()`
    `void` | `execute(ActionInvocation invocation)` Represents a generic interface for all action execution results.
    `protected AdapterFactory` | `getAdapterFactory()`
    `protected Source` | `getDOMSourceForStack(Object value)`
    `String` | `getEncoding()`
    `String` | `getExposedValue()`
    `String` | `getStatus()`
    `String` | `getStylesheetLocation()`
    `protected Templates` | `getTemplates(String path)`
    `protected URIResolver` | `getURIResolver()`
    `protected void` | `setAdapterFactory(AdapterFactory adapterFactory)`
    `void` | `setEncoding(String encoding)`
    `void` | `setExposedValue(String exposedValue)`
    `void` | `setNoCache(String xsltNoCache)`
    `void` | `setParse(boolean parse)`
    `void` | `setStatus(String status)`
    `void` | `setStylesheetLocation(String location)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PARAM

          public static final String DEFAULT_PARAM

      'stylesheetLocation' parameter. Points to the xsl.
      See Also:
        Constant Field Values

    - #### noCache

          protected boolean noCache

      Determines whether or not the result should allow caching.

  - ### Constructor Detail

    - #### XSLTResult

          public XSLTResult()

    - #### XSLTResult

          public XSLTResult(String stylesheetLocation)

  - ### Method Detail

    - #### setNoCache

          public void setNoCache(String xsltNoCache)

    - #### setStylesheetLocation

          public void setStylesheetLocation(String location)

    - #### getStylesheetLocation

          public String getStylesheetLocation()

    - #### getExposedValue

          public String getExposedValue()

    - #### setExposedValue

          public void setExposedValue(String exposedValue)

    - #### getStatus

          public String getStatus()

    - #### setStatus

          public void setStatus(String status)

    - #### getEncoding

          public String getEncoding()

    - #### setEncoding

          public void setEncoding(String encoding)

    - #### setParse

          public void setParse(boolean parse)

      Parameters:
        `parse` - if true, parse the stylesheet location for OGNL expressions.

    - #### execute

          public void execute(ActionInvocation invocation)
                       throws Exception

      Description copied from interface: `Result`
      Represents a generic interface for all action execution results. Whether that be displaying a webpage, generating an email, sending a JMS message, etc.
      Specified by:
        `execute` in interface `Result`
      Parameters:
        `invocation` - the invocation context.
      Throws:
        `Exception` - can be thrown.

    - #### buildErrorListener

          protected ErrorListener buildErrorListener()

    - #### getAdapterFactory

          protected AdapterFactory getAdapterFactory()

    - #### setAdapterFactory

          protected void setAdapterFactory(AdapterFactory adapterFactory)

    - #### getURIResolver

          protected URIResolver getURIResolver()

      Returns:
        the URI Resolver to be called by the processor when it encounters an xsl:include, xsl:import, or document() function. The default is an instance of ServletURIResolver, which operates relative to the servlet context.

    - #### getTemplates

          protected Templates getTemplates(String path)
                                    throws TransformerException,
                                           IOException

      Throws:
        `TransformerException`
        `IOException`

    - #### getDOMSourceForStack

          protected Source getDOMSourceForStack(Object value)
                                         throws IllegalAccessException,
                                                InstantiationException

      Throws:
        `IllegalAccessException`
        `InstantiationException`

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.