Class UUIDRegistry


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

      Constructors 
      Constructor Description
      UUIDRegistry()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getUUID​(Element element)
      Get UUID of the given element.
      static boolean hasUUIDInProject​(Project project, IAttachedProject attachedProject)
      Checks if provided project has at least one element read with uuid.
      static void setUUID​(Element element, java.lang.String uuid)
      Assign new UUID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.