Class AbstractAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractAggregateException>

java.lang.Object
org.fuin.ddd4j.jackson.AbstractAggregateExceptionData<EX>
Type Parameters:
EX - Concrete type of wrapped exception.
All Implemented Interfaces:
Serializable, org.fuin.ddd4j.core.ExceptionData<EX>, org.fuin.objects4j.common.ToExceptionCapable<EX>, org.fuin.objects4j.common.ValueObject
Direct Known Subclasses:
AbstractVersionedAggregateExceptionData, AggregateDeletedExceptionData, AggregateNotFoundExceptionData, AggregateVersionConflictExceptionData

public abstract class AbstractAggregateExceptionData<EX extends org.fuin.ddd4j.core.AbstractAggregateException> extends Object implements org.fuin.ddd4j.core.ExceptionData<EX>
Base class for storing the data from a AbstractAggregateException for marshalling and allows recreating it after unmarshalling. The idea is to transport an exception from the server to the client (without stack trace) and recreate it to be thrown on the client.
See Also:
  • Constructor Details

    • AbstractAggregateExceptionData

      protected AbstractAggregateExceptionData()
      Constructor only for marshalling/unmarshalling.
    • AbstractAggregateExceptionData

      public AbstractAggregateExceptionData(org.fuin.ddd4j.core.AbstractAggregateException ex)
      Constructor with exception.
      Parameters:
      ex - Exception to copy data from.
  • Method Details

    • getMessage

      public final String getMessage()
      Returns the exception message.
      Returns:
      Message.
    • getAggregateType

      public final String getAggregateType()
      Returns the type of the aggregate.
      Returns:
      Aggregate type.
    • getAggregateId

      public final String getAggregateId()
      Returns the unique aggregate identifier.
      Returns:
      Aggregate ID.