Package church.i18n.processing.exception
Class ProcessingExceptionOptionalBuilder
java.lang.Object
church.i18n.processing.message.ProcessingMessageAbstractBuilder<ProcessingExceptionBuilder>
church.i18n.processing.exception.ProcessingExceptionOptionalBuilder
- All Implemented Interfaces:
GenericBuilder<Optional<ProcessingException>>,ProcessingExceptionBuilder,ProcessingExceptionIntermediate<ProcessingExceptionBuilder>,ProcessingMessageBuilderMethods<ProcessingExceptionBuilder>
public class ProcessingExceptionOptionalBuilder
extends ProcessingMessageAbstractBuilder<ProcessingExceptionBuilder>
implements ProcessingExceptionBuilder
Exception builder that builds actual exception. When exception is build, it returns non-empty
optional object with exception.
-
Field Summary
Fields inherited from class church.i18n.processing.message.ProcessingMessageAbstractBuilder
contextInfo, helpUri, message, messageType, securityLevel -
Constructor Summary
ConstructorsConstructorDescriptionProcessingExceptionOptionalBuilder(@NotNull I18nMessage message) ProcessingExceptionOptionalBuilder(@NotNull ProcessingMessage message) ProcessingExceptionOptionalBuilder(@NotNull ProcessingMessage message, @NotNull Throwable cause) ProcessingExceptionOptionalBuilder(@NotNull String code, @Nullable Object... params) -
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<ProcessingException> build()Build an object.booleaninthashCode()voidBuilds and directly throws built exception.@NotNull StringtoString()@NotNull ProcessingExceptionOptionalBuilderwithLogLevel(@NotNull LogLevel logLevel) Specify log level of exception.@NotNull ProcessingExceptionOptionalBuilderwithStatus(@NotNull Status status) Specify the response status of an exception that can be used for system inter-communication.Methods inherited from class church.i18n.processing.message.ProcessingMessageAbstractBuilder
addContextInfo, addContextInfo, withHelpUri, withHelpUri, withMessageType, withSecurityLevelMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface church.i18n.processing.message.ProcessingMessageBuilderMethods
addContextInfo, addContextInfo, withHelpUri, withHelpUri, withMessageType, withSecurityLevel
-
Constructor Details
-
ProcessingExceptionOptionalBuilder
-
ProcessingExceptionOptionalBuilder
-
ProcessingExceptionOptionalBuilder
-
ProcessingExceptionOptionalBuilder
public ProcessingExceptionOptionalBuilder(@NotNull @NotNull ProcessingMessage message, @NotNull @NotNull Throwable cause)
-
-
Method Details
-
build
Description copied from interface:GenericBuilderBuild an object.- Specified by:
buildin interfaceGenericBuilder<Optional<ProcessingException>>- Returns:
- Build non-null object.
-
throwException
public void throwException()Description copied from interface:ProcessingExceptionBuilderBuilds and directly throws built exception.- Specified by:
throwExceptionin interfaceProcessingExceptionBuilder
-
withLogLevel
@NotNull public @NotNull ProcessingExceptionOptionalBuilder withLogLevel(@NotNull @NotNull LogLevel logLevel) Description copied from interface:ProcessingExceptionIntermediateSpecify log level of exception.- Specified by:
withLogLevelin interfaceProcessingExceptionIntermediate<ProcessingExceptionBuilder>- Parameters:
logLevel- The log level you want to use.- Returns:
- An instance of object
ProcessingExceptionIntermediate.
-
withStatus
@NotNull public @NotNull ProcessingExceptionOptionalBuilder withStatus(@NotNull @NotNull Status status) Description copied from interface:ProcessingExceptionIntermediateSpecify the response status of an exception that can be used for system inter-communication.- Specified by:
withStatusin interfaceProcessingExceptionIntermediate<ProcessingExceptionBuilder>- Parameters:
status- Status associated with this exception.- Returns:
- An instance of object
ProcessingExceptionIntermediate.
-
hashCode
public int hashCode()- Overrides:
hashCodein classProcessingMessageAbstractBuilder<ProcessingExceptionBuilder>
-
equals
- Overrides:
equalsin classProcessingMessageAbstractBuilder<ProcessingExceptionBuilder>
-
toString
- Overrides:
toStringin classProcessingMessageAbstractBuilder<ProcessingExceptionBuilder>
-