Interface IWorkflowBpmnLocalization


  • public interface IWorkflowBpmnLocalization
    • 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.
      • durationOptional

        String durationOptional​(Duration duration)
        Localizes a Duration, 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 a Duration, 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, or INameProviding. 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, or INameProviding. 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 to Output 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.