Class UUIDRegistry

java.lang.Object
com.nomagic.magicdraw.uml.UUIDRegistry

@OpenApiAll public final class UUIDRegistry extends Object
Creates and stores elements UUID.
  • Constructor Details

    • UUIDRegistry

      public UUIDRegistry()
  • Method Details

    • getUUID

      public static String getUUID(@Nonnull Element element)
      Get UUID of the given element. Generates UUID if element has no assigned UUID.
      Parameters:
      element - element to get UUID for.
      Returns:
      assigned or generated UUID.
    • setUUID

      public static void setUUID(@Nonnull Element element, @Nonnull String uuid)
      Assign new UUID.
      Parameters:
      element - element assign UUID to.
      uuid - new uuid for element.
    • hasUUIDInProject

      public static boolean hasUUIDInProject(Project project, @CheckForNull com.nomagic.ci.persistence.IAttachedProject attachedProject)
      Checks if provided project has at least one element read with uuid.
      Parameters:
      project - MD project
      attachedProject - attached project.
      Returns:
      true if at least one UUID is registered in the project.