Skip to content

Commit

Permalink
#18 updated annotation target and retention
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPirnbaum committed Dec 16, 2020
1 parent 1d6b8d8 commit e9f616f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
*/
package org.jmolecules.architecture.cqrs.annotation;

import java.lang.annotation.*;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Identifies a command publisher in the context of CQRS, i.e. logic to publish a {@link Command}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.jmolecules.event.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Identifies a domain event handler, i.e. logic to process a {@link DomainEvent}.
*
Expand All @@ -24,6 +30,9 @@
* @author Martin Schimak
* @author Oliver Drotbohm
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface DomainEventHandler {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.jmolecules.event.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Identifies a domain event publisher, i.e. logic to publish a {@link DomainEvent}.
*
Expand All @@ -24,6 +30,9 @@
* @author Martin Schimak
* @author Oliver Drotbohm
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface DomainEventPublisher {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.jmolecules.event.annotation.sourcing;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* A sourcing event marks the change of the domain model within one transaction.
* Thus, it only contains a unique identifier of the changed entity as well as the diff to
Expand All @@ -26,5 +32,8 @@
* @author Martin Schimak
* @author Oliver Drotbohm
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface SourcingEvent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.jmolecules.event.annotation.sourcing;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Identifies a sourcing event handler, i.e. logic to process a {@link SourcingEvent}.
*
Expand All @@ -24,5 +30,8 @@
* @author Martin Schimak
* @author Oliver Drotbohm
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface SourcingEventHandler {
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/
package org.jmolecules.event.annotation.sourcing;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Identifies a sourcing event publisher, i.e. logic to publish aic to process a {@link SourcingEvent}.
*
Expand All @@ -24,5 +30,8 @@
* @author Martin Schimak
* @author Oliver Drotbohm
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
public @interface SourcingEventPublisher {
}

0 comments on commit e9f616f

Please sign in to comment.