Package com.structurizr.model
Interface IdGenerator
- All Known Implementing Classes:
MessageDigestIdGenerator
,NormalizedNameIdGenerator
,SequentialIntegerIdGeneratorStrategy
public interface IdGenerator
The interface that ID generators, used when creating IDs for model elements, must implement.
-
Method Summary
Modifier and Type Method Description void
found(java.lang.String id)
Called when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).java.lang.String
generateId(Element element)
Generates an ID for the specified model element.java.lang.String
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
void found(java.lang.String id)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
-