Annotation Type BoundedContext


  • @Retention(RUNTIME)
    @Target({PACKAGE,ANNOTATION_TYPE})
    @Documented
    public @interface BoundedContext
    Identifies a bounded context. A description of a boundary (typically a subsystem, or the work of a particular team) within which a particular model is defined and applicable. A bounded context has an architectural style and contains domain logic and technical logic.
    See Also:
    Domain-Driven Design Reference (Evans) - Bounded Contexts
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String description
      A human readable description for the bounded context.
      java.lang.String id
      A stable identifier for the bounded context.
      java.lang.String name
      A human readable name for the bounded context.
      java.lang.String value
      An alias for name().
    • Element Detail

      • id

        java.lang.String id
        A stable identifier for the bounded context. If not defined, an identifier will be derived from the annotated element, usually a package. That allows tooling to derive name and description by applying some kind of convention to the identifier.

        Assuming a package com.acme.myapp annotated with BoundedContext, tooling could use a resource bundle to lookup the keys com.acme.myapp._name and com.acme.myapp._description to resolve name and description respectively.

        Returns:
        Default:
        ""
      • name

        java.lang.String name
        A human readable name for the bounded context. Might be overridden by an external resolution mechanism via id(). Tooling should prevent both value() and name() from being configured at the same time. If in doubt, the value defined in name() will be preferred.
        Returns:
        See Also:
        id()
        Default:
        ""
      • value

        java.lang.String value
        An alias for name(). Tooling should prevent both value() and name() from being configured at the same time. If in doubt, the value defined in name() will be preferred.
        Returns:
        See Also:
        name()
        Default:
        ""
      • description

        java.lang.String description
        A human readable description for the bounded context. Might be overridden by an external resolution mechanism via id().
        Returns:
        See Also:
        id()
        Default:
        ""