Reference: Util Helper Object
Useful Functions
Name | Arguments | Return Value Type | Notes |
|---|---|---|---|
cleanString
| String value | String | Used to escape any input characters that must be escaped in XML
documents.
Example:
|
getExtForContentType
| String mimetype | String | Enables an integration to obtain a file extension such as .txt or
.xml, based on the specified MIME type. |
getFilenameFromContentDisposition
| String content-disposition | String | Extracts a filename from a content-disposition string. Some assembly components such
as the document iterator strategy populate the content-disposition
message header with filename information. Example: this code returns
the value
testfile.pdf :
|
readFileToVar
| String var_name, String filename | Enables nontext files to be read into a variable. This is the only
delivered means by which nontext documents can be loaded. Note that the
write step's static-file attribute can only
load text documents into a message or variable. The file is specified
relative to the WSAR-INF directory. Example: this code reads the
image file icon-32.png from the WSAR-INF directory into the context
variable v1:
| |
readFileToVar
| String var_name, String filename,String mimetype | Enables nontext files to be read into a variable whose MIME type
you specify. This is the only delivered means by which nontext documents
can be loaded. Note that the write step's
static-file attribute can only load text documents into a message or
variable. The file is specified relative to the WSAR-INF directory.
Example: this code reads the image file icon-32.png from the
WSAR-INF directory into the context variable v1 with the MIME type
image/png:
|