Class RefactoringHelper
java.lang.Object
org.contextmapper.dsl.refactoring.RefactoringHelper
Some common logic that is used in multiple ARs to ensure model validity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustAggregateAndModuleNames
(BoundedContext bc, String suffix) If we create a deep-copy of a Bounded Context, we have to rename all Aggregates, Modules, and domain objects.void
adjustDomainObjectNames
(List<SimpleDomainObject> domainObjects, String suffix) If we create a deep-copy of a Bounded Context, we have to rename all domain objects.Collects all Aggregates in the current CML model.Collects all Aggregate names of the current model.Collects all module names of the current CML model.getUniqueName
(String initialName, Set<String> givenNames) Creates a unique name using a counter.
-
Constructor Details
-
RefactoringHelper
-
-
Method Details
-
adjustAggregateAndModuleNames
If we create a deep-copy of a Bounded Context, we have to rename all Aggregates, Modules, and domain objects. (to avoid validation errors regarding uniqueness) -
adjustDomainObjectNames
If we create a deep-copy of a Bounded Context, we have to rename all domain objects. (to avoid validation errors regarding uniqueness) -
collectAllAggregateNames
Collects all Aggregate names of the current model. -
collectAggregates
Collects all Aggregates in the current CML model. -
collectAllModuleNames
Collects all module names of the current CML model. -
getUniqueName
Creates a unique name using a counter. Given a set of already existing domain object names, this method searches for a name that is not already used (simple method with counter as suffix).
-