Class UUIDRegistry


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

      • UUIDRegistry

        public UUIDRegistry()
    • Method Detail

      • getUUID

        public static java.lang.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
                                   java.lang.String uuid)
        Assign new UUID.
        Parameters:
        element - element assign UUID to.
        uuid - new uuid for element.
      • hasUUIDInProject

        public static boolean hasUUIDInProject​(Project project,
                                               @CheckForNull
                                               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.