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. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNotifier(Notifier.Builder builder) Constructor for this class, to be called from its subclasses andNotifier.Builder. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Deprecated.Extended configuration specific to this notifier goes here.Deprecated, for removal: This API element is subject to removal in a future version.Useaddress()instead.Deprecated, for removal: This API element is subject to removal in a future version.Useconfiguration()instead.Gets the input location that caused this model to be read.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.Gets the locations map directly for bulk comparison and hashing.getType()Deprecated, for removal: This API element is subject to removal in a future version.Usetype()instead.booleanDeprecated, for removal: This API element is subject to removal in a future version.UsesendOnError()instead.booleanDeprecated, for removal: This API element is subject to removal in a future version.UsesendOnFailure()instead.booleanDeprecated, for removal: This API element is subject to removal in a future version.UsesendOnSuccess()instead.booleanDeprecated, for removal: This API element is subject to removal in a future version.UsesendOnWarning()instead.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.booleanWhether to send notifications on error.booleanWhether to send notifications on failure.booleanWhether to send notifications on success.booleanWhether to send notifications on warning.type()The mechanism used to deliver notifications.with()Creates a new builder with this object as the basis.withAddress(String address) Deprecated.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.
-
Constructor Details
-
Notifier
Constructor for this class, to be called from its subclasses andNotifier.Builder.- See Also:
-
-
Method Details
-
type
The mechanism used to deliver notifications.- Returns:
- a
String - Since:
- 4.0.0
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.Usetype()instead. -
sendOnError
public boolean sendOnError()Whether to send notifications on error.- Returns:
- a
boolean - Since:
- 4.0.0
-
isSendOnError
Deprecated, for removal: This API element is subject to removal in a future version.UsesendOnError()instead. -
sendOnFailure
public boolean sendOnFailure()Whether to send notifications on failure.- Returns:
- a
boolean - Since:
- 4.0.0
-
isSendOnFailure
Deprecated, for removal: This API element is subject to removal in a future version.UsesendOnFailure()instead. -
sendOnSuccess
public boolean sendOnSuccess()Whether to send notifications on success.- Returns:
- a
boolean - Since:
- 4.0.0
-
isSendOnSuccess
Deprecated, for removal: This API element is subject to removal in a future version.UsesendOnSuccess()instead. -
sendOnWarning
public boolean sendOnWarning()Whether to send notifications on warning.- Returns:
- a
boolean - Since:
- 4.0.0
-
isSendOnWarning
Deprecated, for removal: This API element is subject to removal in a future version.UsesendOnWarning()instead. -
address
Deprecated.Use theconfigurationproperties map to specify the notification address instead.- Returns:
- a
String - Since:
- 4.0.0
-
getAddress
Deprecated, for removal: This API element is subject to removal in a future version.Useaddress()instead. -
configuration
Extended configuration specific to this notifier goes here.- Returns:
- a
Map<String, String> - Since:
- 4.0.0
-
getConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.Useconfiguration()instead. -
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker- Parameters:
key- the key of the field, must not benull- Returns:
- the location of the field in the input source or
nullif unknown - Throws:
NullPointerException- ifkeyisnull
-
getLocationKeys
Gets the keys of the locations of the input source. -
getLocationKeyStream
-
getLocations
Gets the locations map directly for bulk comparison and hashing.- Returns:
- an unmodifiable map of locations, never
null
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFromin interfaceInputLocationTracker- Returns:
- InputLocation
-
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
Deprecated.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
-
configurationproperties map to specify the notification address instead.