Interface IWorkflowBpmnLocalization
-
public interface IWorkflowBpmnLocalization
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringattachmentNames(WorkflowProcess process, IReferencedAttachmentList attachmentList)Returns a comma-separated list of descriptive names for the given attachments.IBoundMessageLocalizerboundMessageLocalizer(WorkflowNode node)TheIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale().IBoundMessageLocalizerboundMessageLocalizer(WorkflowTrigger trigger)TheIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale().IBoundMessageLocalizerdefaultBoundMessageLocalizer()The defaultIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale().StringdurationOptional(Duration duration)Localizes aDuration, possibly rounding slight to make it more readable.StringdurationRequired(Duration duration)Localizes aDuration, possibly rounding slight to make it more readable.StringentityNameOptional(INameProviding named)Localizes the entity name.StringentityNameOptional(EntityRef entity)Localizes the entity name.StringentityNameOptional(UuidEntityRef entity)Localizes the entity name.StringentityNameRequired(INameProviding named)Localizes the entity name.StringentityNameRequired(EntityRef entity)Localizes the entity name.StringentityNameRequired(UuidEntityRef entity)Localizes the entity name.StringentityNameRequired(String entityName)Localizes the entity name.StringentityNamesOptional(Iterable<?> entities)Localizes the entity names, joining the names with a comma.StringentityNamesRequired(Iterable<?> entities)Localizes the entity names, joining the names with a comma.StringfileNames(WorkflowProcess process, IReferencedFileList fileList)Returns a comma-separated list of descriptive names for the given files.StringfileProvision(IFileProvision fileProvision)Localizes the details of the given file provision.StringformatTemporal(EPresetTemporalFormatStyle style, Temporal temporal)Formats a temporal object (e.g., a date or time) according to the specified style.Localelocale()The locale for which the BPMN diagram is created.StringmultipleCondition(IMultipleConditionProviding conditionProviding)Localizes the multiple conditions of the given properties.StringnodeNameOptional(WorkflowProcess process, NodeKey nodeKey)Localizes the name of a workflow node, identified by its UUID.StringnodeNameRequired(WorkflowProcess process, NodeKey nodeKey)Localizes the name of a workflow node, identified by its UUID.StringoutputFileNameAuto(String fileName)Localizes an output file name, using a pattern similar toOutput file name: [NAME].StringsingleCondition(ISingleConditionProviding conditionProviding)Localizes the single condition of the given properties.StringtriggerNameOptional(WorkflowProcess process, TriggerKey triggerKey)Localizes the name of a workflow trigger, identified by its key.StringtriggerNameRequired(WorkflowProcess process, TriggerKey triggerKey)Localizes the name of a workflow trigger, identified by its key.
-
-
-
Method Detail
-
attachmentNames
String attachmentNames(WorkflowProcess process, IReferencedAttachmentList attachmentList)
Returns a comma-separated list of descriptive names for the given attachments.- Parameters:
process- The workflow process to search for referenced triggers or nodes.attachmentList- The attachments for which to get the names.- Returns:
- A comma-separated list of names for the attachments, never null.
-
boundMessageLocalizer
IBoundMessageLocalizer boundMessageLocalizer(WorkflowNode node)
TheIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale(). Contains handler-specific localizations for the given node.- Parameters:
node- The node for which to get the localizer, never null.- Returns:
- The default
IBoundMessageLocalizer, never null.
-
boundMessageLocalizer
IBoundMessageLocalizer boundMessageLocalizer(WorkflowTrigger trigger)
TheIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale(). Contains handler-specific localizations for the given trigger.- Parameters:
trigger- The trigger for which to get the localizer, never null.- Returns:
- The default
IBoundMessageLocalizer, never null.
-
defaultBoundMessageLocalizer
IBoundMessageLocalizer defaultBoundMessageLocalizer()
The defaultIBoundMessageLocalizerfor localizing messages in the BPMN diagram, using thelocale(). Does not contain any handler-specific localizations.- Returns:
- The default
IBoundMessageLocalizer, never null.
-
durationOptional
String durationOptional(Duration duration)
Localizes aDuration, possibly rounding slight to make it more readable. If the duration is null, returns the empty string.- Parameters:
duration- The duration to localize. If null, returns the empty string.- Returns:
- A localized string representing the duration, never null.
-
durationRequired
String durationRequired(Duration duration)
Localizes aDuration, possibly rounding slight to make it more readable. If the duration is null, returns a localized string indicating that the duration is missing.- Parameters:
duration- The duration to localize. If null, a default message will be returned.- Returns:
- A localized string representing the duration, never null.
-
entityNameOptional
String entityNameOptional(INameProviding named)
Localizes the entity name. Returns empty if the entity is null. If the entity name is non-blank, returns the name as is. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
named- An entity with a name to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameOptional
String entityNameOptional(UuidEntityRef entity)
Localizes the entity name. Returns empty if the entity is null. First resolves the name for the given entity reference. If the resolved name is non-blank, returns that name. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
entity- The entity reference to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameOptional
String entityNameOptional(EntityRef entity)
Localizes the entity name. Returns empty if the entity is null. First resolves the name for the given entity reference. If the resolved name is non-blank, returns that name. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
entity- The entity reference to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameRequired
String entityNameRequired(String entityName)
Localizes the entity name. If the entity name is non-blank, returns the name as is. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
entityName- The name of the entity to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameRequired
String entityNameRequired(INameProviding named)
Localizes the entity name. If the entity name is non-blank, returns the name as is. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
named- An entity with a name to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameRequired
String entityNameRequired(UuidEntityRef entity)
Localizes the entity name. First resolves the name for the given entity reference. If the resolved name is non-blank, returns that name. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
entity- The entity reference to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNameRequired
String entityNameRequired(EntityRef entity)
Localizes the entity name. First resolves the name for the given entity reference. If the resolved name is non-blank, returns that name. Otherwise, returns a localized string indicating that the entity is missing.- Parameters:
entity- The entity reference to localize.- Returns:
- A localized string representing the entity name, never null.
-
entityNamesOptional
String entityNamesOptional(Iterable<?> entities)
Localizes the entity names, joining the names with a comma. If no entities are given, returns the empty string.The items in the iterable must be of type
String,EntityRef,UuidEntityRef, orINameProviding. Other items are silently ignored.- Parameters:
entities- The entity references to localize.- Returns:
- A localized string representing the entity names, never null.
-
entityNamesRequired
String entityNamesRequired(Iterable<?> entities)
Localizes the entity names, joining the names with a comma. If no entities are given, returns a localized string indicating that the entities are missing.The items in the iterable must be of type
String,EntityRef,UuidEntityRef, orINameProviding. Other items are silently ignored.- Parameters:
entities- The entity references to localize.- Returns:
- A localized string representing the entity names, never null.
-
fileNames
String fileNames(WorkflowProcess process, IReferencedFileList fileList)
Returns a comma-separated list of descriptive names for the given files.- Parameters:
process- The workflow process to search for referenced triggers or nodes.fileList- The files for which to get the names.- Returns:
- A comma-separated list of names for the files, never null.
-
fileProvision
String fileProvision(IFileProvision fileProvision)
Localizes the details of the given file provision. If the file provision is null, uses the appropriate defaults. If the file is not made available in any way, returns a localized string indicating this fact.- Parameters:
fileProvision- The file provision to localize. If null, uses the appropriate defaults.- Returns:
- A localized string representing the file provision details, or an empty string if the file provision is null.
-
formatTemporal
String formatTemporal(EPresetTemporalFormatStyle style, Temporal temporal)
Formats a temporal object (e.g., a date or time) according to the specified style.- Returns:
- The formatted temporal object as a string, empty when the temporal is null.
-
locale
Locale locale()
The locale for which the BPMN diagram is created. Can be used e.g. for localizing the name of BPMN elements.- Returns:
- The locale for which the BPMN diagram is created, never null.
-
multipleCondition
String multipleCondition(IMultipleConditionProviding conditionProviding)
Localizes the multiple conditions of the given properties. If the properties are null, returns a localized string indicating that no conditions are set.- Parameters:
conditionProviding- The properties providing the condition to localize.- Returns:
- A localized string representing the conditions, never null.
-
nodeNameOptional
String nodeNameOptional(WorkflowProcess process, NodeKey nodeKey)
Localizes the name of a workflow node, identified by its UUID. if the node is null, returns empty. If the node is not found, returns a localized string indicating that the node is missing.- Parameters:
process- The workflow process containing the node.nodeKey- The UUID of the node to get the name for.- Returns:
- The localized name of the node, or a message indicating that the node is missing.
-
nodeNameRequired
String nodeNameRequired(WorkflowProcess process, NodeKey nodeKey)
Localizes the name of a workflow node, identified by its UUID. If the node is not found, returns a localized string indicating that the node is missing.- Parameters:
process- The workflow process containing the node.nodeKey- The UUID of the node to get the name for.- Returns:
- The localized name of the node, or a message indicating that the node is missing.
-
outputFileNameAuto
String outputFileNameAuto(String fileName)
Localizes an output file name, using a pattern similar toOutput file name: [NAME]. When the name is blank, uses localized string indicating that the file name will be determined automatically at runtime.- Parameters:
fileName- The file name to localize. If blank, a default message will be returned.- Returns:
- A localized string representing the output file name, never null.
-
singleCondition
String singleCondition(ISingleConditionProviding conditionProviding)
Localizes the single condition of the given properties. If the properties are null, returns a localized string indicating that no condition is set.- Parameters:
conditionProviding- The properties providing the condition to localize.- Returns:
- A localized string representing the condition, never null.
-
triggerNameOptional
String triggerNameOptional(WorkflowProcess process, TriggerKey triggerKey)
Localizes the name of a workflow trigger, identified by its key. If the trigger is null, returns an empty string. If the trigger is not found, returns a localized string indicating that the trigger is missing.- Parameters:
process- The workflow process containing the trigger.triggerKey- The key of the trigger to get the name for.- Returns:
- The localized name of the trigger, or a message indicating that the trigger is missing.
-
triggerNameRequired
String triggerNameRequired(WorkflowProcess process, TriggerKey triggerKey)
Localizes the name of a workflow trigger, identified by its key. If the trigger is not found, returns a localized string indicating that the trigger is missing.- Parameters:
process- The workflow process containing the trigger.triggerKey- The key of the trigger to get the name for.- Returns:
- The localized name of the trigger, or a message indicating that the trigger is missing.
-
-