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
Modifier and TypeClassDescriptionstatic class
Builder 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.boolean
Whether to send notifications on error.boolean
Whether to send notifications on failure.boolean
Whether to send notifications on success.boolean
Whether to send notifications on warning.static Notifier.Builder
Creates a newNotifier
builder instance.static Notifier.Builder
newBuilder
(boolean withDefaults) Creates a newNotifier
builder instance using default values or not.static Notifier.Builder
newBuilder
(Notifier from) Creates a newNotifier
builder instance using the specified object as a basis.static Notifier.Builder
newBuilder
(Notifier from, boolean forceCopy) Creates a newNotifier
builder instance using the specified object as a basis.static Notifier
Creates a newNotifier
instance.static Notifier
newInstance
(boolean withDefaults) Creates a newNotifier
instance using default values or not.with()
Creates a new builder with this object as the basis.withAddress
(String address) Creates a newNotifier
instance using the specified address.withConfiguration
(Map<String, String> configuration) Creates a newNotifier
instance using the specified configuration.withSendOnError
(boolean sendOnError) Creates a newNotifier
instance using the specified sendOnError.withSendOnFailure
(boolean sendOnFailure) Creates a newNotifier
instance using the specified sendOnFailure.withSendOnSuccess
(boolean sendOnSuccess) Creates a newNotifier
instance using the specified sendOnSuccess.withSendOnWarning
(boolean sendOnWarning) Creates a newNotifier
instance using the specified sendOnWarning.Creates a newNotifier
instance 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:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withType
Creates a newNotifier
instance using the specified type.- Parameters:
type
- the newString
to use- Returns:
- a
Notifier
with the specified type
-
withSendOnError
Creates a newNotifier
instance using the specified sendOnError.- Parameters:
sendOnError
- the newboolean
to use- Returns:
- a
Notifier
with the specified sendOnError
-
withSendOnFailure
Creates a newNotifier
instance using the specified sendOnFailure.- Parameters:
sendOnFailure
- the newboolean
to use- Returns:
- a
Notifier
with the specified sendOnFailure
-
withSendOnSuccess
Creates a newNotifier
instance using the specified sendOnSuccess.- Parameters:
sendOnSuccess
- the newboolean
to use- Returns:
- a
Notifier
with the specified sendOnSuccess
-
withSendOnWarning
Creates a newNotifier
instance using the specified sendOnWarning.- Parameters:
sendOnWarning
- the newboolean
to use- Returns:
- a
Notifier
with the specified sendOnWarning
-
withAddress
Creates a newNotifier
instance using the specified address.- Parameters:
address
- the newString
to use- Returns:
- a
Notifier
with the specified address
-
withConfiguration
Creates a newNotifier
instance using the specified configuration.- Parameters:
configuration
- the newMap<String, String>
to use- Returns:
- a
Notifier
with the specified configuration
-
newInstance
Creates a newNotifier
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
Notifier
- See Also:
-
newInstance
Creates a newNotifier
instance 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 newNotifier
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newNotifier
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newNotifier
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theNotifier
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newNotifier
builder instance using the specified object as a basis.- Parameters:
from
- theNotifier
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-