Class WorkflowLocalizationHelper
- java.lang.Object
-
- de.xima.fc.workflow.processor.logic.WorkflowLocalizationHelper
-
public final class WorkflowLocalizationHelper extends Object
Helper for resolving localized messages for workflow elements. Uses the resource bundle requested by the workflow element handler, or falls back to the common or FC resource bundle.- Since:
- 8.2.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getLocalizedWorkflowElementMessage(Locale locale, Mandant client, EWorkflowElementType elementType, String type, String key, String defaultValue)
Get a localized message for a workflow element.static String
getLocalizedWorkflowElementMessage(Locale locale, IElementHandler<?,?> handler, String key, String defaultValue)
Get a localized message for a workflow element.static String
getLocalizedWorkflowNodeMessage(Locale locale, Mandant client, String type, String key, String defaultValue)
Get a localized message for a workflow node.static String
getLocalizedWorkflowTriggerMessage(Locale locale, Mandant client, String type, String key, String defaultValue)
Get a localized message for a workflow trigger.
-
-
-
Method Detail
-
getLocalizedWorkflowElementMessage
public static String getLocalizedWorkflowElementMessage(Locale locale, IElementHandler<?,?> handler, String key, String defaultValue)
Get a localized message for a workflow element. Falls back to the common or FC resource bundle if the handler does not provide a message.- Parameters:
locale
- The locale to use. If null, the default locale is used.handler
- The handler of the workflow element.key
- The key of the message.defaultValue
- The default value to return if the message is not found.- Returns:
- The localized message.
-
getLocalizedWorkflowElementMessage
public static String getLocalizedWorkflowElementMessage(Locale locale, Mandant client, EWorkflowElementType elementType, String type, String key, String defaultValue)
Get a localized message for a workflow element. Falls back to the common or FC resource bundle if the handler does not provide a message.- Parameters:
locale
- The locale to use. If null, the default locale is used.client
- The client containing the project with the workflow.elementType
- Whether the element is a trigger or node.type
- The type of the workflow element.key
- The key of the message.defaultValue
- The default value to return if the message is not found.- Returns:
- The localized message.
-
getLocalizedWorkflowNodeMessage
public static String getLocalizedWorkflowNodeMessage(Locale locale, Mandant client, String type, String key, String defaultValue)
Get a localized message for a workflow node. Falls back to the common or FC resource bundle if the handler does not provide a message.- Parameters:
locale
- The locale to use. If null, the default locale is used.client
- The client containing the project with the workflow.type
- The type of the workflow node.key
- The key of the message.defaultValue
- The default value to return if the message is not found.- Returns:
- The localized message.
-
getLocalizedWorkflowTriggerMessage
public static String getLocalizedWorkflowTriggerMessage(Locale locale, Mandant client, String type, String key, String defaultValue)
Get a localized message for a workflow trigger. Falls back to the common or FC resource bundle if the handler does not provide a message.- Parameters:
locale
- The locale to use. If null, the default locale is used.client
- The client containing the project with the workflow.type
- The type of the workflow trigger.key
- The key of the message.defaultValue
- The default value to return if the message is not found.- Returns:
- The localized message.
-
-