Interface ServiceExceptionBuilder<T extends ServiceException>

Type Parameters:
T - the type parameter
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractServiceExceptionBuilder

public interface ServiceExceptionBuilder<T extends ServiceException> extends Serializable
The service exception builder.
Author:
Christian Bremer
  • Method Details

    • httpStatus

      ServiceExceptionBuilder<T> httpStatus(int httpStatus)
      Sets http status on service exception builder.
      Parameters:
      httpStatus - the http status
      Returns:
      the service exception builder
    • errorCode

      ServiceExceptionBuilder<T> errorCode(String errorCode)
      Sets error code on service exception builder.
      Parameters:
      errorCode - the error code
      Returns:
      the service exception builder
    • reason

      ServiceExceptionBuilder<T> reason(String reason)
      Sets reason on service exception builder.
      Parameters:
      reason - the reason
      Returns:
      the service exception builder
    • cause

      Sets cause on service exception builder.
      Parameters:
      cause - the cause
      Returns:
      the service exception builder
    • from

      ServiceExceptionBuilder<T> from(ServiceException serviceException)
      From another service exception.
      Parameters:
      serviceException - the other service exception
      Returns:
      the service exception builder
    • build

      T build()
      Build the service exception.
      Returns:
      the service exception