pousse-cafe:add-aggregate

Full name:

org.pousse-cafe-framework:pousse-cafe-maven-plugin:0.19.0:add-aggregate

Description:

Generates all required classes to represent a new Aggregate. Given Aggregate name MyAggregate, the following classes will be created:

  • MyAggregate: the Aggregate Root,
  • MyAggregateId: the Aggregate's identifier type,
  • MyAggregateFactory: the Aggregate Factory,
  • MyAggregateRepository: the Aggregate Repository,
  • MyAggregateDataAccess: the interface describing Repository's requirements for commands and queries on stored data,
  • MyAggregateAttributes: the implementation for Aggregate's attributes (i.e. the data actually stored).

Depending on chosen storage adapters, additional specific classes may be created in addition to the list mentioned above.

Attributes:

  • Requires a Maven project to be executed.
  • Executes by direct invocation only.
  • Requires dependency resolution of artifacts in scope: compile+runtime.

Required Parameters

Name Type Since Description
<aggregateName> String 0.3 Name of the new Aggregate. Aggregate's name is used to name all linked classes (Factory, Repository, ...).
User property is: aggregateName.
<aggregatePackage> String 0.3 Enclosing package for the new classes and sub-packages. The package must not already exist.
User property is: aggregatePackage.
<demoAttribute> boolean 0.5 Deprecated. This option has no replacement
Default value is: false.
User property is: demoAttribute.
<missingAdaptersOnly> boolean 0.3 Deprecated. This is handled automatically now.
Default value is: false.
User property is: missingAdaptersOnly.
<sourceDirectory> File 0.3 Path of the folder containing the Model's source code. Classes and packages will be created in this folder.
Default value is: ${project.build.sourceDirectory}.
User property is: sourceDirectory.
<storageAdapters> String[] 0.3 List of storage adapters to create. Storage name is used to select them. By default, only internal storage classes are generated. Currently, supported storage names are: "internal", "spring-mongo", "spring-jpa".
Default value is: internal.
User property is: storageAdapters.

Optional Parameters

Name Type Since Description
<codeFormatterProfile> File 0.17 Path to a JDT code formatter profile file. This kind of file may be exported directly using Eclipse.
User property is: codeFormatterProfile.

Parameter Details

<aggregateName>

Name of the new Aggregate. Aggregate's name is used to name all linked classes (Factory, Repository, ...).
  • Type: java.lang.String
  • Since: 0.3
  • Required: Yes
  • User Property: aggregateName

<aggregatePackage>

Enclosing package for the new classes and sub-packages. The package must not already exist.
  • Type: java.lang.String
  • Since: 0.3
  • Required: Yes
  • User Property: aggregatePackage

<codeFormatterProfile>

Path to a JDT code formatter profile file. This kind of file may be exported directly using Eclipse.
  • Type: java.io.File
  • Since: 0.17
  • Required: No
  • User Property: codeFormatterProfile

<demoAttribute>

Deprecated. This option has no replacement
This option is not taken into account anymore.
  • Type: boolean
  • Since: 0.5
  • Required: Yes
  • User Property: demoAttribute
  • Default: false

<missingAdaptersOnly>

Deprecated. This is handled automatically now.
Flag telling to add missing storage adapters. This is useful when you already have your aggregate ready but only want to add support for a new storage.
  • Type: boolean
  • Since: 0.3
  • Required: Yes
  • User Property: missingAdaptersOnly
  • Default: false

<sourceDirectory>

Path of the folder containing the Model's source code. Classes and packages will be created in this folder.
  • Type: java.io.File
  • Since: 0.3
  • Required: Yes
  • User Property: sourceDirectory
  • Default: ${project.build.sourceDirectory}

<storageAdapters>

List of storage adapters to create. Storage name is used to select them. By default, only internal storage classes are generated. Currently, supported storage names are: "internal", "spring-mongo", "spring-jpa".
  • Type: java.lang.String[]
  • Since: 0.3
  • Required: Yes
  • User Property: storageAdapters
  • Default: internal