public final class SpiUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SpiUtil.URLTemplateParameterEncoder
This class implements the URL encoder.
|
Modifier and Type | Field and Description |
---|---|
static String |
EMPTY_STRING
The empty string value
|
static String |
FAX_JOB_ID_TEMPLATE_PARAMETER
The fax job ID template parameter
|
static String |
FAX_JOB_ID_TEMPLATE_PARAMETER_STRING
The fax job ID template parameter
|
static String |
FILE_TEMPLATE_PARAMETER
The file template parameter
|
static String |
FILE_TEMPLATE_PARAMETER_STRING
The file template parameter
|
static String |
SENDER_EMAIL_TEMPLATE_PARAMETER
The sender email template parameter
|
static String |
SENDER_EMAIL_TEMPLATE_PARAMETER_STRING
The sender email template parameter
|
static String |
SENDER_FAX_NUMBER_TEMPLATE_PARAMETER
The sender fax number template parameter
|
static String |
SENDER_FAX_NUMBER_TEMPLATE_PARAMETER_STRING
The sender fax number template parameter
|
static String |
SENDER_NAME_TEMPLATE_PARAMETER
The sender name template parameter
|
static String |
SENDER_NAME_TEMPLATE_PARAMETER_STRING
The sender name template parameter
|
static String |
TARGET_ADDRESS_TEMPLATE_PARAMETER
The target address template parameter
|
static String |
TARGET_ADDRESS_TEMPLATE_PARAMETER_STRING
The target address template parameter
|
static String |
TARGET_NAME_TEMPLATE_PARAMETER
The target name template parameter
|
static String |
TARGET_NAME_TEMPLATE_PARAMETER_STRING
The target name template parameter
|
static String |
TEMPLATE_PARAMETER_PREFIX
The template parameter prefix
|
static String |
TEMPLATE_PARAMETER_SUFFIX
The template parameter suffix
|
static SpiUtil.URLTemplateParameterEncoder |
URL_ENCODER
The URL encoder
|
static String |
UTF_8_ENCODING_NAME
The UTF-8 encoding
|
Modifier and Type | Method and Description |
---|---|
static void |
copyPropertiesToMap(Properties source,
Map<String,String> target)
This function copies all mappings from source properties to target map.
|
static String |
formatTemplate(String template,
FaxJob faxJob,
org.fax4j.util.SpiUtil.TemplateParameterEncoder encoder,
boolean getFileContent,
boolean fullFilePath)
This function formats the provided template.
|
static String |
replaceTemplateParameter(String template,
String parameter,
String value,
org.fax4j.util.SpiUtil.TemplateParameterEncoder encoder)
This function replaces the parameter with the provided value.
|
static String |
urlDecode(String text)
This function URL decodes the given text.
|
static String |
urlEncode(String text)
This function URL encodes the given text.
|
public static final String EMPTY_STRING
public static final SpiUtil.URLTemplateParameterEncoder URL_ENCODER
public static final String UTF_8_ENCODING_NAME
public static final String TEMPLATE_PARAMETER_PREFIX
public static final String TEMPLATE_PARAMETER_SUFFIX
public static final String FILE_TEMPLATE_PARAMETER
public static final String TARGET_ADDRESS_TEMPLATE_PARAMETER
public static final String TARGET_NAME_TEMPLATE_PARAMETER
public static final String SENDER_NAME_TEMPLATE_PARAMETER
public static final String SENDER_FAX_NUMBER_TEMPLATE_PARAMETER
public static final String SENDER_EMAIL_TEMPLATE_PARAMETER
public static final String FAX_JOB_ID_TEMPLATE_PARAMETER
public static final String FILE_TEMPLATE_PARAMETER_STRING
public static final String TARGET_ADDRESS_TEMPLATE_PARAMETER_STRING
public static final String TARGET_NAME_TEMPLATE_PARAMETER_STRING
public static final String SENDER_NAME_TEMPLATE_PARAMETER_STRING
public static final String SENDER_FAX_NUMBER_TEMPLATE_PARAMETER_STRING
public static final String SENDER_EMAIL_TEMPLATE_PARAMETER_STRING
public static final String FAX_JOB_ID_TEMPLATE_PARAMETER_STRING
public static void copyPropertiesToMap(Properties source, Map<String,String> target)
source
- The source propertiestarget
- The target map to populatepublic static String formatTemplate(String template, FaxJob faxJob, org.fax4j.util.SpiUtil.TemplateParameterEncoder encoder, boolean getFileContent, boolean fullFilePath)
template
- The templatefaxJob
- The fax job objectencoder
- The encoder that encodes the template values (may be null)getFileContent
- True to get the file content, false to get the file path for the file template parameterfullFilePath
- If getFileContent=false, the param will be replaced to the file name (full path in case this is true,
or just the name in case of false)public static String replaceTemplateParameter(String template, String parameter, String value, org.fax4j.util.SpiUtil.TemplateParameterEncoder encoder)
template
- The templateparameter
- The parametervalue
- The valueencoder
- The encoder that encodes the template values (may be null)public static String urlEncode(String text)
text
- The text to encodeCopyright © 2009–2020 fax4j. All rights reserved.