Package org.contextmapper.archunit
Class ContextMapperJMoleculesArchRules
- java.lang.Object
-
- org.contextmapper.archunit.ContextMapperJMoleculesArchRules
-
public class ContextMapperJMoleculesArchRules extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.tngtech.archunit.lang.ArchRule
aggregateClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that Aggregates in the code (classes annotated with @AggregateRoot) are modeled as Aggregates in CML.static com.tngtech.archunit.lang.ArchRule
aggregatesShouldAdhereToCmlStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that the classes (entities, value objects, and domain events) inside an Aggregates package are also contained in the corresponding Aggregate of the CML model.static com.tngtech.archunit.lang.ArchRule
domainEventClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that domain events in the code (classes annotated with @DomainEvent) are modeled as domain events in CML.static com.tngtech.archunit.lang.ArchRule
domainEventsShouldAdhereToCmlDomainEventStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that domain events in the code (classes annotated with @DomainEvent) only contain fields that are modeled in the corresponding CML domain events as well.static com.tngtech.archunit.lang.ArchRule
entitiesShouldAdhereToCmlEntityStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that entities in the code (classes annotated with @Entity) only contain fields that are modeled in the corresponding CML entities as well.static com.tngtech.archunit.lang.ArchRule
entityClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that entities in the code (classes annotated with @Entity) are modeled as entities in CML.static com.tngtech.archunit.lang.ArchRule
modulePackagesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that modules in the code (package-info.java classes annotated with @Module) are modeled as modules in CML.static com.tngtech.archunit.lang.ArchRule
repositoryClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that repositories in the code (classes annotated with @Repository) are modeled as repositories in CML.static com.tngtech.archunit.lang.ArchRule
serviceClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that services in the code (classes annotated with @Service) are modeled as services in CML.static com.tngtech.archunit.lang.ArchRule
valueObjectClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that value objects in the code (classes annotated with @ValueObject) are modeled as value objects in CML.static com.tngtech.archunit.lang.ArchRule
valueObjectsShouldAdhereToCmlValueObjectStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that value objects in the code (classes annotated with @ValueObject) only contain fields that are modeled in the corresponding CML value objects as well.
-
-
-
Method Detail
-
aggregateClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule aggregateClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that Aggregates in the code (classes annotated with @AggregateRoot) are modeled as Aggregates in CML.- Parameters:
boundedContext
- the Bounded Context within which the Aggregate should be modelled- Returns:
- returns an ArchRule object
-
modulePackagesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule modulePackagesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that modules in the code (package-info.java classes annotated with @Module) are modeled as modules in CML.- Parameters:
boundedContext
- the Bounded Context within which the Module should be modelled- Returns:
- returns an ArchRule object
-
entityClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule entityClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that entities in the code (classes annotated with @Entity) are modeled as entities in CML.- Parameters:
boundedContext
- the Bounded Context within which the Entity should be modelled- Returns:
- returns an ArchRule object
-
valueObjectClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule valueObjectClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that value objects in the code (classes annotated with @ValueObject) are modeled as value objects in CML.- Parameters:
boundedContext
- the Bounded Context within which the Value Object should be modelled- Returns:
- returns an ArchRule object
-
domainEventClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule domainEventClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that domain events in the code (classes annotated with @DomainEvent) are modeled as domain events in CML.- Parameters:
boundedContext
- the Bounded Context within which the domain event should be modelled- Returns:
- returns an ArchRule object
-
serviceClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule serviceClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that services in the code (classes annotated with @Service) are modeled as services in CML.- Parameters:
boundedContext
- the Bounded Context within which the service should be modelled- Returns:
- returns an ArchRule object
-
repositoryClassesShouldBeModeledInCml
public static com.tngtech.archunit.lang.ArchRule repositoryClassesShouldBeModeledInCml(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that repositories in the code (classes annotated with @Repository) are modeled as repositories in CML.- Parameters:
boundedContext
- the Bounded Context within which the repository should be modelled- Returns:
- returns an ArchRule object
-
aggregatesShouldAdhereToCmlStructure
public static com.tngtech.archunit.lang.ArchRule aggregatesShouldAdhereToCmlStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that the classes (entities, value objects, and domain events) inside an Aggregates package are also contained in the corresponding Aggregate of the CML model.- Parameters:
boundedContext
- the Bounded Context within which the Aggregate should be modelled- Returns:
- returns an ArchRule object
-
entitiesShouldAdhereToCmlEntityStructure
public static com.tngtech.archunit.lang.ArchRule entitiesShouldAdhereToCmlEntityStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that entities in the code (classes annotated with @Entity) only contain fields that are modeled in the corresponding CML entities as well.- Parameters:
boundedContext
- the Bounded Context within which entities shall be checked- Returns:
- returns an ArchRule object
-
valueObjectsShouldAdhereToCmlValueObjectStructure
public static com.tngtech.archunit.lang.ArchRule valueObjectsShouldAdhereToCmlValueObjectStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that value objects in the code (classes annotated with @ValueObject) only contain fields that are modeled in the corresponding CML value objects as well.- Parameters:
boundedContext
- the Bounded Context within which value objects shall be checked- Returns:
- returns an ArchRule object
-
domainEventsShouldAdhereToCmlDomainEventStructure
public static com.tngtech.archunit.lang.ArchRule domainEventsShouldAdhereToCmlDomainEventStructure(org.contextmapper.dsl.contextMappingDSL.BoundedContext boundedContext)
Ensures that domain events in the code (classes annotated with @DomainEvent) only contain fields that are modeled in the corresponding CML domain events as well.- Parameters:
boundedContext
- the Bounded Context within which domain events shall be checked- Returns:
- return an ArchRule object
-
-