Package com.structurizr.model
Interface IdGenerator
- All Known Implementing Classes:
SequentialIntegerIdGeneratorStrategy
public interface IdGenerator
The interface that ID generators, used when creating IDs for model elements/relationships, must implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).generateId
(Element element) Generates an ID for the specified model element.generateId
(Relationship relationship) Generates an ID for the specified model relationship.
-
Method Details
-
generateId
Generates an ID for the specified model element.- Parameters:
element
- an Element instance- Returns:
- the ID, as a String
-
generateId
Generates an ID for the specified model relationship.- Parameters:
relationship
- a Relationship instance- Returns:
- the ID, as a String
-
found
Called when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).- Parameters:
id
- the ID that has been found
-