Class CopyNameSupport

java.lang.Object
io.jmix.bpmflowui.util.CopyNameSupport

@Component("bpm_CopyNameSupport") public class CopyNameSupport extends Object
Utility class for handling copy names.
  • Field Details

  • Constructor Details

    • CopyNameSupport

      public CopyNameSupport(Messages messages)
  • Method Details

    • generateCopyNameFor

      public String generateCopyNameFor(String name)
      Generates name with copy suffix for the provided name.
      Parameters:
      name - the name to generate copy name for
      Returns:
      generated name with copy suffix
    • incrementCopyName

      public int incrementCopyName(String name)
      Increment copy number for the provided name.
      Parameters:
      name - the name to increment copy number for
      Returns:
      incremented copy number
    • getNameWithoutSuffix

      public String getNameWithoutSuffix(String name)
      Removes copy suffix from the provided name.
      Parameters:
      name - the name to remove copy suffix from
      Returns:
      name without copy suffix
    • hasCopySuffix

      public boolean hasCopySuffix(String name)
      Checks whether the provided name has copy suffix.
      Parameters:
      name - the name to check
      Returns:
      true if the name has copy suffix, false otherwise
    • getCopySuffix

      @Nullable public String getCopySuffix(String name)
      Returns copy suffix from the provided name.
      Parameters:
      name - the name to get copy suffix from
      Returns:
      copy suffix or null if the name does not have copy suffix
      See Also:
    • appendCopySuffix

      public String appendCopySuffix(String name)
      Returns a name with appended copy suffix
      Parameters:
      name - name to which append
      Returns:
      name with appended copy suffix
    • getLocalizedCopySuffix

      public String getLocalizedCopySuffix()
      Returns:
      localized copy suffix