Package org.apache.maven.api.model
Class Notifier
java.lang.Object
org.apache.maven.api.model.Notifier
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Notifier
extends Object
implements Serializable, InputLocationTracker
Configures one method for notifying users/developers when a build breaks.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Notifier instances. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Extended configuration specific to this notifier goes here.getLocation(Object key) Gets the location of the specified field in the input source.getType()The mechanism used to deliver notifications.booleanWhether to send notifications on error.booleanWhether to send notifications on failure.booleanWhether to send notifications on success.booleanWhether to send notifications on warning.static Notifier.BuilderCreates a newNotifierbuilder instance.static Notifier.BuildernewBuilder(boolean withDefaults) Creates a newNotifierbuilder instance using default values or not.static Notifier.BuildernewBuilder(Notifier from) Creates a newNotifierbuilder instance using the specified object as a basis.static Notifier.BuildernewBuilder(Notifier from, boolean forceCopy) Creates a newNotifierbuilder instance using the specified object as a basis.static NotifierCreates a newNotifierinstance.static NotifiernewInstance(boolean withDefaults) Creates a newNotifierinstance using default values or not.with()Creates a new builder with this object as the basis.withAddress(String address) Creates a newNotifierinstance using the specified address.withConfiguration(Map<String, String> configuration) Creates a newNotifierinstance using the specified configuration.withSendOnError(boolean sendOnError) Creates a newNotifierinstance using the specified sendOnError.withSendOnFailure(boolean sendOnFailure) Creates a newNotifierinstance using the specified sendOnFailure.withSendOnSuccess(boolean sendOnSuccess) Creates a newNotifierinstance using the specified sendOnSuccess.withSendOnWarning(boolean sendOnWarning) Creates a newNotifierinstance using the specified sendOnWarning.Creates a newNotifierinstance using the specified type.
-
Method Details
-
getType
The mechanism used to deliver notifications.- Returns:
- a
String
-
isSendOnError
public boolean isSendOnError()Whether to send notifications on error.- Returns:
- a
boolean
-
isSendOnFailure
public boolean isSendOnFailure()Whether to send notifications on failure.- Returns:
- a
boolean
-
isSendOnSuccess
public boolean isSendOnSuccess()Whether to send notifications on success.- Returns:
- a
boolean
-
isSendOnWarning
public boolean isSendOnWarning()Whether to send notifications on warning.- Returns:
- a
boolean
-
getAddress
Deprecated. Where to send the notification to - eg email address.- Returns:
- a
String
-
getConfiguration
Extended configuration specific to this notifier goes here.- Returns:
- a
Map<String, String>
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withType
Creates a newNotifierinstance using the specified type.- Parameters:
type- the newStringto use- Returns:
- a
Notifierwith the specified type
-
withSendOnError
Creates a newNotifierinstance using the specified sendOnError.- Parameters:
sendOnError- the newbooleanto use- Returns:
- a
Notifierwith the specified sendOnError
-
withSendOnFailure
Creates a newNotifierinstance using the specified sendOnFailure.- Parameters:
sendOnFailure- the newbooleanto use- Returns:
- a
Notifierwith the specified sendOnFailure
-
withSendOnSuccess
Creates a newNotifierinstance using the specified sendOnSuccess.- Parameters:
sendOnSuccess- the newbooleanto use- Returns:
- a
Notifierwith the specified sendOnSuccess
-
withSendOnWarning
Creates a newNotifierinstance using the specified sendOnWarning.- Parameters:
sendOnWarning- the newbooleanto use- Returns:
- a
Notifierwith the specified sendOnWarning
-
withAddress
Creates a newNotifierinstance using the specified address.- Parameters:
address- the newStringto use- Returns:
- a
Notifierwith the specified address
-
withConfiguration
Creates a newNotifierinstance using the specified configuration.- Parameters:
configuration- the newMap<String, String>to use- Returns:
- a
Notifierwith the specified configuration
-
newInstance
Creates a newNotifierinstance. Equivalent tonewInstance(true).- Returns:
- a new
Notifier - See Also:
-
newInstance
Creates a newNotifierinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Notifier
-
newBuilder
Creates a newNotifierbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newNotifierbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newNotifierbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theNotifierinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newNotifierbuilder instance using the specified object as a basis.- Parameters:
from- theNotifierinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-