Class ContextMapperArchConditions


  • public class ContextMapperArchConditions
    extends java.lang.Object
    • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 Aggregates
        tacticDDDAnnotationSet - the set of Java annotations that is used to identify entities, value objects, and domain events within the package. Provide an implementation of the TacticDDDAnnotationSet interface ( custom or, for example, JMoleculesTacticAnnotationSet).
        Returns:
        returns an ArchCondition for a JavaPackage
      • 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 a JavaClass
      • 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 a JavaClass
      • 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 a JavaClass