Class InMemoryDataModelDiagramStorage

java.lang.Object
io.jmix.datatoolsflowui.datamodel.impl.InMemoryDataModelDiagramStorage
All Implemented Interfaces:
DataModelDiagramStorage

public class InMemoryDataModelDiagramStorage extends Object implements DataModelDiagramStorage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<UUID,byte[]>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all stored diagram data from the storage.
    @org.jspecify.annotations.Nullable byte[]
    get(UUID id)
    Retrieves the diagram data associated with the specified unique identifier.
    void
    put(UUID id, byte[] diagramData)
    Stores the specified diagram data associated with the provided unique identifier.
    boolean
    Removes the diagram data associated with the specified unique identifier.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • diagrams

      protected final Map<UUID,byte[]> diagrams
  • Constructor Details

    • InMemoryDataModelDiagramStorage

      public InMemoryDataModelDiagramStorage(DatatoolsUiProperties properties)
  • Method Details

    • get

      public @org.jspecify.annotations.Nullable byte[] get(UUID id)
      Description copied from interface: DataModelDiagramStorage
      Retrieves the diagram data associated with the specified unique identifier.
      Specified by:
      get in interface DataModelDiagramStorage
      Parameters:
      id - the unique UUID identifying the diagram data to retrieve
      Returns:
      a byte array representing the diagram data if found, or null if no data is associated with the given ID
    • put

      public void put(UUID id, byte[] diagramData)
      Description copied from interface: DataModelDiagramStorage
      Stores the specified diagram data associated with the provided unique identifier.
      Specified by:
      put in interface DataModelDiagramStorage
      Parameters:
      id - the unique UUID used to identify the diagram data
      diagramData - a byte array representing the diagram data to be stored
    • remove

      public boolean remove(UUID id)
      Description copied from interface: DataModelDiagramStorage
      Removes the diagram data associated with the specified unique identifier.
      Specified by:
      remove in interface DataModelDiagramStorage
      Parameters:
      id - the unique UUID identifying the diagram data to be removed
      Returns:
      true if the diagram data was found and removed, false otherwise
    • clear

      public void clear()
      Description copied from interface: DataModelDiagramStorage
      Removes all stored diagram data from the storage.
      Specified by:
      clear in interface DataModelDiagramStorage