Package org.contextmapper.archunit
Class ContextMapperArchConditions
- java.lang.Object
-
- org.contextmapper.archunit.ContextMapperArchConditions
-
public class ContextMapperArchConditions extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdhereToCmlAggregateStructure
adhereToCmlAggregateStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext, TacticDDDAnnotationSet tacticDDDAnnotationSet)
Checks whether an Java package representing an Aggregate, contains the same objects (Entities, Value Objects, Domain Events) as the corresponding Aggregate in CML.static AdhereToCmlDomainEventStructure
adhereToCmlDomainEventStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML domain event.static AdhereToCmlEntityStructure
adhereToCmlEntityStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML entity.static AdhereToCmlValueObjectStructure
adhereToCmlValueObjectStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML value object.static ModeledAsAggregateInContext
beModeledAsAggregatesInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as an Aggregate in CML.static ModeledAsDomainEventInContext
beModeledAsDomainEventInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a Domain Event in CML.static ModeledAsEntityInContext
beModeledAsEntityInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as an Entity in CML.static ModeledAsModuleInContext
beModeledAsModulesInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a module (a package-info.java class with an @Module jMolecules annotation that sets the module name) is represented as a corresponding module in CML.static ModeledAsRepositoryInContext
beModeledAsRepositoryInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a class, given by its simple name, is represented as a repository in CML.static ModeledAsServiceInContext
beModeledAsServiceInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a service in CML.static ModeledAsValueObjectInContext
beModeledAsValueObjectInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a Value Object in CML.
-
-
-
Method Detail
-
beModeledAsAggregatesInCML
public static ModeledAsAggregateInContext beModeledAsAggregatesInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as an Aggregate in CML.- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the Aggregates- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsEntityInCML
public static ModeledAsEntityInContext beModeledAsEntityInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as an Entity in CML.- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the Entities- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsValueObjectInCML
public static ModeledAsValueObjectInContext beModeledAsValueObjectInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a Value Object in CML.- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the Value Objects- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsModulesInCML
public static ModeledAsModuleInContext beModeledAsModulesInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a module (a package-info.java class with an @Module jMolecules annotation that sets the module name) is represented as a corresponding module in CML.Limitation: this rule works with the jMolecules annotation only!
- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the Module- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsDomainEventInCML
public static ModeledAsDomainEventInContext beModeledAsDomainEventInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a Domain Event in CML.- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the Domain Events- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsServiceInCML
public static ModeledAsServiceInContext beModeledAsServiceInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext cmlContext)
Checks whether a class, given by its simple name, is represented as a service in CML.- Parameters:
cmlContext
- the CML Bounded Context within which the check searches for the services- Returns:
- returns an
ArchCondition
for aJavaClass
-
beModeledAsRepositoryInCML
public static ModeledAsRepositoryInContext beModeledAsRepositoryInCML(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a class, given by its simple name, is represented as a repository in CML.- Parameters:
boundedContext
- the CML Bounded Context within which the check searches for the repositories- Returns:
- returns an
ArchCondition
for aJavaClass
-
adhereToCmlAggregateStructure
public static AdhereToCmlAggregateStructure adhereToCmlAggregateStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext, TacticDDDAnnotationSet tacticDDDAnnotationSet)
Checks whether an Java package representing an Aggregate, contains the same objects (Entities, Value Objects, Domain Events) as the corresponding Aggregate in CML.- Parameters:
boundedContext
- the CML Bounded Context within which the check searches for the AggregatestacticDDDAnnotationSet
- the set of Java annotations that is used to identify entities, value objects, and domain events within the package. Provide an implementation of theTacticDDDAnnotationSet
interface ( custom or, for example,JMoleculesTacticAnnotationSet
).- Returns:
- returns an
ArchCondition
for aJavaPackage
-
adhereToCmlEntityStructure
public static AdhereToCmlEntityStructure adhereToCmlEntityStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML entity.- Parameters:
boundedContext
- the CML Bounded Context within which the check searches for the corresponding entities (by the classes simple names)- Returns:
- returns an
ArchCondition
for aJavaClass
-
adhereToCmlValueObjectStructure
public static AdhereToCmlValueObjectStructure adhereToCmlValueObjectStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML value object.- Parameters:
boundedContext
- the CML Bounded Context within which the check searches for the corresponding value objects (by the classes simple names)- Returns:
- returns an
ArchCondition
for aJavaClass
-
adhereToCmlDomainEventStructure
public static AdhereToCmlDomainEventStructure adhereToCmlDomainEventStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Checks whether a classes fields are modeled in a CML domain event.- Parameters:
boundedContext
- the CML Bounded Context within which the check searches for the corresponding domain events (by the classes simple names)- Returns:
- returns an
ArchCondition
for aJavaClass
-
-