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)
Methode zum alle Platzhalter zu entfernen und somit einen bereinigten String zurück zu geben
|
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,
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 |
parseForFormValues(IEntityContext ec,
String text,
IFormDataAdapter fda,
FormVersion fv,
boolean encodeForHTML)
Diese Methode dient dazu, Formularelementplatzhalter durch Formularwerte zu ersetzten.
|
static String |
parseForSessionValues(IEntityContext ec,
String text,
Vorgang v,
String context,
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,
Vorgang process,
IWorkflowProcessingContext wpc)
Diese Methode dient dazu, Systemattribute an die Stelle zu plazieren, an der entsprechende Platzhalter zu finden
sind.
|
static String |
parseForTemplates(IEntityContext ec,
String text,
Mandant mandant)
Diese Methode dient dazu, Textbausteinplatzhalter durch Formularwerte zu ersetzten.
|
static String |
replaceFormValue(IEntityContext ec,
String placeholder,
String placeholderContent,
IFormDataAdapter fda,
FormVersion formversion,
boolean encodeForHTML) |
static String |
replaceSessionValues(IEntityContext ec,
String placeholder,
String placeholderContent,
Vorgang vorgang,
String sessionId,
String context) |
static String |
replaceSystemValue(IEntityContext ec,
String placeholder,
String placeholderContent,
IWorkflowProcessingContext wpc) |
static String |
replaceTemplateValue(IEntityContext ec,
String placeholder,
String placeholderContent,
Mandant mandant) |
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, 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(String, IFormDataAdapter, FormVersion)
zu überspringen)wpc
- Parsen des Texts mit WorkflowProcessingContext
-Inhalten (null
um
#parseForWorkflowContext(String, WorkflowProcessingContext, IEntityContext)
zu überspringen)vorgang
- Parsen des Texts mit Systemattributen (null
um
#replaceSystemAttributes(String, Vorgang)
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(String, IFormDataAdapter, FormVersion)
.formRecord
- Required form form value placeholders. Pass null
to skip
#replaceFormValue(String, IFormDataAdapter, FormVersion)
.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(String, IFormDataAdapter, FormVersion)
.formVersion
- Required form form value placeholders. Pass null
to skip
#replaceFormValue(String, IFormDataAdapter, FormVersion)
.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 fda, FormVersion fv, boolean encodeForHTML)
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenfda
- - Formulardatenfv
- - betreffende FormVersionpublic static String parseForSessionValues(IEntityContext ec, String text, Vorgang v, String context, String sessionId)
CmnConst.BUILTIN_PLACEHOLDER
v
- - Vorgang
über welchen die Systemattribute ermittelt werdentext
- - Zeichenkette in der zu ersetzende Platzhalter vorkommencontext
- public static String parseForSystemAttributes(IEntityContext ec, String text, Vorgang process, IWorkflowProcessingContext wpc)
CmnConst.BUILTIN_PLACEHOLDER
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenprocess
- - Vorgang
über welchen die Systemattribute ermittelt werdenwpc
- public static String parseForTemplates(IEntityContext ec, String text, Mandant mandant)
text
- - Zeichenkette in der zu ersetzende Platzhalter vorkommenmandant
- - Mandant
zum herauslesen der benutzerspezifischen Textbausteinepublic static String cleanUp(String text)
text
- public static String replaceTemplateValue(IEntityContext ec, String placeholder, String placeholderContent, Mandant mandant)
public static String replaceSessionValues(IEntityContext ec, String placeholder, String placeholderContent, Vorgang vorgang, String sessionId, String context)
public static String replaceSystemValue(IEntityContext ec, String placeholder, String placeholderContent, IWorkflowProcessingContext wpc)
public static String replaceFormValue(IEntityContext ec, String placeholder, String placeholderContent, IFormDataAdapter fda, 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.