public final class XSLTransformResult extends Object implements BerliozOutput
This class holds information about a process such as its content, processing time (in ms), status and exception.
Modifier and Type | Class and Description |
---|---|
static class |
XSLTransformResult.Status
The status of a process result.
|
Constructor and Description |
---|
XSLTransformResult(CharSequence content,
Exception ex,
Templates templates)
Creates an unsuccessful process result.
|
XSLTransformResult(CharSequence content,
long time,
Templates templates)
Creates a successful transformation result.
|
Modifier and Type | Method and Description |
---|---|
CharSequence |
content() |
String |
getEncoding()
The character encoding for the content.
|
String |
getErrorMessage() |
Exception |
getException() |
String |
getMediaType()
Returns the media type for this output.
|
protected void |
setOutputProperties(Templates templates)
Sets the output properties of this transform result.
|
XSLTransformResult.Status |
status()
Returns the status of the process result.
|
long |
time() |
public XSLTransformResult(CharSequence content, long time, Templates templates)
content
- The content.time
- The processing nano seconds.templates
- The templates used for the transformation.public XSLTransformResult(CharSequence content, Exception ex, Templates templates)
content
- The content.ex
- An exception.templates
- The templates used for the transformation.public CharSequence content()
content
in interface BerliozOutput
public long time()
public XSLTransformResult.Status status()
public String getErrorMessage()
null
if none.public Exception getException()
null
if none.public String getMediaType()
BerliozOutput
getMediaType
in interface BerliozOutput
public String getEncoding()
BerliozOutput
getEncoding
in interface BerliozOutput
protected void setOutputProperties(Templates templates)
templates
- the templates used to generate this.Copyright © 2016 Allette Systems. All rights reserved.