@Bindable(prefix="XmlDocumentSourceHelper") public class XmlDocumentSourceHelper extends Object
IDocumentSource based on XML/XSLT is likely
to need. This helper does note expose any attributes, so that different implementations
can decide which attributes they expose.| Modifier and Type | Field and Description |
|---|---|
int |
timeout
Data transfer timeout.
|
| Constructor and Description |
|---|
XmlDocumentSourceHelper() |
| Modifier and Type | Method and Description |
|---|---|
ProcessingResult |
loadProcessingResult(InputStream xml,
Templates stylesheet,
Map<String,String> xsltParameters)
Loads a
ProcessingResult from the provided InputStream, applying
XSLT transform if specified. |
ProcessingResult |
loadProcessingResult(String url,
Templates stylesheet,
Map<String,String> xsltParameters,
Map<String,Object> metadata,
String user,
String password)
Loads a
ProcessingResult from the provided remote URL, applying XSLT
transform if specified. |
Templates |
loadXslt(IResource xslt)
Loads the XSLT stylesheet from the provided
IResource. |
@Input @Processing @Attribute @IntRange(min=0, max=300) @Label(value="Data transfer timeout") @Level(value=ADVANCED) @Group(value="Service") public int timeout
public ProcessingResult loadProcessingResult(String url, Templates stylesheet, Map<String,String> xsltParameters, Map<String,Object> metadata, String user, String password) throws Exception
ProcessingResult from the provided remote URL, applying XSLT
transform if specified. This method can handle gzip-compressed streams if supported
by the data source.metadata - if a non-null map is provided, request metadata will
be put into the map.user - if not null, the user name to use for HTTP Basic
Authenticationpassword - if not null, the password to use for HTTP Basic
AuthenticationExceptionpublic ProcessingResult loadProcessingResult(InputStream xml, Templates stylesheet, Map<String,String> xsltParameters) throws Exception
ProcessingResult from the provided InputStream, applying
XSLT transform if specified. The provided InputStream will be closed.Exception