Class ContextMapperArchRules


  • public class ContextMapperArchRules
    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 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 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContextMapperArchRules

        public ContextMapperArchRules()
    • 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
      • 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 Aggregate 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 Aggregate should be modelled
        Returns:
        returns an ArchRule object