Package com.nomagic.magicdraw.uml
Class UUIDRegistry
- java.lang.Object
-
- com.nomagic.magicdraw.uml.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 private static IProject
getIProject(Project project, IAttachedProject attachedProject)
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.
-
-
-
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 projectattachedProject
- attached project.- Returns:
- true if at least one UUID is registered in the project.
-
getIProject
private static IProject getIProject(Project project, @CheckForNull IAttachedProject attachedProject)
-
-