public class PlaceholderReplacer extends Object
WorkflowProcessingContext
-Werten zu parsen und die jeweiligen Werte zu ersetzen.null
ist.Modifier and Type | Field and Description |
---|---|
static String |
PARAMS_SPLITCHAR |
Constructor and Description |
---|
PlaceholderReplacer() |
Modifier and Type | Method and Description |
---|---|
static String |
cleanUp(String text) |
static List<Pattern> |
getPatternList() |
static boolean |
matchPlaceholder(String text) |
static String |
parse(IEntityContext ec,
String text,
IFormDataAdapter fda,
IWorkflowProcessingContext wpc,
Vorgang vorgang,
Mandant mandant,
boolean encodeForHTML)
Diese Methode dient dazu, all verfügbaren Parser auf einen Text anzuwenden.
|
static String |
parse(IEntityContext ec,
String text,
IFormDataAdapter fda,
Mandant client,
FormVersion formVersion,
boolean encodeForHTML)
This method applies all available placeholder replacers on the given text.
|
static String |
parse(IEntityContext ec,
String text,
IFormDataAdapter fda,
Mandant client,
Vorgang formRecord,
boolean encodeForHTML)
This method applies all available placeholder replacers on the given text.
|
static String |
parse(IEntityContext ec,
String text,
IReplacerParams parameters) |
static String |
parse(IEntityContext ec,
String text,
Vorgang formRecord,
boolean encodeForHTML) |
static String |
parse(String text,
IWorkflowProcessingContext wpc)
Diese Methode dient dazu, all verfügbaren Parser auf einen Text anzuwenden.
|
static String |
parse(String text,
IWorkflowProcessingContext wpc,
boolean encodeUserInput) |
static String |
parseForContextValues(IEntityContext ec,
String text,
IContextReplacerParams parameters) |
static String |
parseForFormValues(IEntityContext ec,
String text,
IFormDataAdapter formData,
FormVersion formVersion,
boolean encodeForHTML)
Diese Methode dient dazu, Formularelementplatzhalter durch Formularwerte zu ersetzten.
|
static String |
parseForFormValues(IEntityContext ec,
String text,
IFormReplacerParams parameters) |
static String |
parseForSessionValues(IEntityContext ec,
String text,
ISessionReplacerParams parameters) |
static String |
parseForSessionValues(IEntityContext ec,
String text,
Vorgang process,
String contextPath,
String sessionId)
Diese Methode dient dazu, Systemattribute an die Stelle zu plazieren, an der entsprechende Platzhalter zu finden
sind.
|
static String |
parseForSystemAttributes(IEntityContext ec,
String text,
ISystemReplacerParams parameters) |
static String |
parseForSystemAttributes(IEntityContext ec,
String text,
Vorgang process,
IWorkflowProcessingContext wfpctx)
Diese Methode dient dazu, Systemattribute an die Stelle zu plazieren, an der entsprechende Platzhalter zu finden
sind.
|
static String |
parseForTemplates(IEntityContext ec,
String text,
ITemplateReplacerParams parameters) |
static String |
parseForTemplates(IEntityContext ec,
String text,
Mandant client)
Diese Methode dient dazu, Textbausteinplatzhalter durch Formularwerte zu ersetzten.
|
static String |
replaceFormValue(IEntityContext ec,
String placeholder,
String placeholderContent,
IFormDataAdapter formData,
FormVersion formVersion,
boolean encodeForHTML) |
static String |
replaceSessionValues(IEntityContext ec,
String placeholder,
String placeholderContent,
IContextReplacerParams parameters,
String contextPath) |
static String |
replaceSessionValues(IEntityContext ec,
String placeholder,
String placeholderContent,
Vorgang process,
String sessionId,
String contextPath) |
static String |
replaceSystemValue(IEntityContext ec,
String placeholder,
String placeholderContent,
IWorkflowProcessingContext wfpctx) |
static String |
replaceTemplateValue(IEntityContext ec,
String placeholder,
String placeholderContent,
Mandant client) |
static void |
setDefaultFormValueReplacer(IFormValueReplacer formReplacer) |
static void |
setDefaultSessionValueReplacer(ISessionValueReplacer sessionReplacer) |
static void |
setDefaultSystemValueReplcaer(ISystemValueReplacer systemReplacer) |
static void |
setDefaultTemplateValueReplacer(ITemplateValueReplacer templateReplacer) |
public static final String PARAMS_SPLITCHAR
public static String parse(IEntityContext ec, String text, IReplacerParams parameters)
public static String parse(IEntityContext ec, String text, IFormDataAdapter fda, IWorkflowProcessingContext wpc, Vorgang vorgang, Mandant mandant, boolean encodeForHTML)
null
übergeben, so kann ein Parser ausgelassen werdenec
- Wrapper für EntityManager
(und Zusatzinformationen), um referenzierte Elemente aus dem
WorkflowProcessingContext
zu ladentext
- Text der geparst werden sollfda
- Parsen des Texts mit Formdateninhalten (null
um
replaceFormValue(IEntityContext, String, String, IFormDataAdapter, FormVersion, boolean)
zu überspringen)wpc
- Parsen des Texts mit WorkflowProcessingContext
-Inhalten (null
um
parseForSystemAttributes(IEntityContext, String, Vorgang, IWorkflowProcessingContext)
zu überspringen)vorgang
- Parsen des Texts mit Systemattributen (null
um
parseForSystemAttributes(IEntityContext, String, Vorgang, IWorkflowProcessingContext)
zu überspringen)mandant
- Mandant
auf dessen Textbaustein
-Instanzen zugegriffen werden sollpublic static String parse(IEntityContext ec, String text, IFormDataAdapter fda, Mandant client, Vorgang formRecord, boolean encodeForHTML)
null
for one of the
arguments to skip all placeholder replaces that require this argument.ec
- Entity context for interacting with the database. Wrapper for an EntityManager
with additional
data, that is used to load the corresponding form element values for form value placeholders.text
- The text to be processed.fda
- Required for form element placeholders. Pass null
to skip
replaceFormValue(IEntityContext, String, String, IFormDataAdapter, FormVersion, boolean)
.formRecord
- Required form form value placeholders. Pass null
to skip
replaceFormValue(IEntityContext, String, String, IFormDataAdapter, FormVersion, boolean)
.client
- Client whose template resources are used. Required for template placeholders. Pass null to skip
parseForTemplates(IEntityContext, String, Mandant)
.public static String parse(IEntityContext ec, String text, Vorgang formRecord, boolean encodeForHTML)
public static String parse(IEntityContext ec, String text, IFormDataAdapter fda, Mandant client, FormVersion formVersion, boolean encodeForHTML)
null
for one of the
arguments to skip all placeholder replacements that require this argument.ec
- Entity context for interacting with the database. Wrapper for an EntityManager
with additional
data, that is used to load the corresponding form element values for form value placeholders.text
- The text to be processed.fda
- Required for form element placeholders. Pass null
to skip
replaceFormValue(IEntityContext, String, String, IFormDataAdapter, FormVersion, boolean)
.formVersion
- Required form form value placeholders. Pass null
to skip
replaceFormValue(IEntityContext, String, String, IFormDataAdapter, FormVersion, boolean)
.client
- Client whose template resources are used. Required for template placeholders. Pass null to skip
parseForTemplates(IEntityContext, String, Mandant)
.public static String parse(String text, IWorkflowProcessingContext wpc)
text
- Text der geparst werden sollwpc
- Parsen des Texts mit WorkflowProcessingContext
-Inhaltenpublic static String parse(String text, IWorkflowProcessingContext wpc, boolean encodeUserInput)
public static String parseForFormValues(IEntityContext ec, String text, IFormDataAdapter formData, FormVersion formVersion, boolean encodeForHTML)
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenformData
- - FormulardatenformVersion
- - betreffende FormVersionpublic static String parseForFormValues(IEntityContext ec, String text, IFormReplacerParams parameters)
public static String parseForSessionValues(IEntityContext ec, String text, Vorgang process, String contextPath, String sessionId)
CmnConst.BUILTIN_PLACEHOLDER
process
- - Vorgang
über welchen die Systemattribute ermittelt werdentext
- - Zeichenkette in der zu ersetzende Platzhalter vorkommencontextPath
- the context pathpublic static String parseForSessionValues(IEntityContext ec, String text, ISessionReplacerParams parameters)
public static String parseForContextValues(IEntityContext ec, String text, IContextReplacerParams parameters)
public static String parseForSystemAttributes(IEntityContext ec, String text, Vorgang process, IWorkflowProcessingContext wfpctx)
CmnConst.BUILTIN_PLACEHOLDER
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenprocess
- - Vorgang
über welchen die Systemattribute ermittelt werdenwfpctx
- the workflow processing contextpublic static String parseForSystemAttributes(IEntityContext ec, String text, ISystemReplacerParams parameters)
public static String parseForTemplates(IEntityContext ec, String text, Mandant client)
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenclient
- - Mandant
zum herauslesen der benutzerspezifischen Textbausteinepublic static String parseForTemplates(IEntityContext ec, String text, ITemplateReplacerParams parameters)
public static String cleanUp(String text)
text
- Text to be cleaned from placeholders.public static String replaceTemplateValue(IEntityContext ec, String placeholder, String placeholderContent, Mandant client)
public static String replaceSessionValues(IEntityContext ec, String placeholder, String placeholderContent, Vorgang process, String sessionId, String contextPath)
public static String replaceSessionValues(IEntityContext ec, String placeholder, String placeholderContent, IContextReplacerParams parameters, String contextPath)
public static String replaceSystemValue(IEntityContext ec, String placeholder, String placeholderContent, IWorkflowProcessingContext wfpctx)
public static String replaceFormValue(IEntityContext ec, String placeholder, String placeholderContent, IFormDataAdapter formData, FormVersion formVersion, boolean encodeForHTML)
public static void setDefaultSessionValueReplacer(ISessionValueReplacer sessionReplacer)
sessionReplacer
- the sessionReplacer to setpublic static void setDefaultSystemValueReplcaer(ISystemValueReplacer systemReplacer)
systemReplacer
- the systemReplcaer to setpublic static void setDefaultTemplateValueReplacer(ITemplateValueReplacer templateReplacer)
templateReplacer
- the templateReplacer to setpublic static void setDefaultFormValueReplacer(IFormValueReplacer formReplacer)
formReplacer
- the formReplacer to setpublic static boolean matchPlaceholder(String text)
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.