|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.tasks.MailAddressResolver
public abstract class MailAddressResolver
Infers e-mail addresses for the user when none is specified.
This is an extension point of Hudson. Plugins tha contribute new
implementation of this class should put Extension on your
implementation class, like this:
@Extension
class MyMailAddressResolver extends MailAddressResolver {
...
}
User identity in Hudson is global, and not specific
to a particular job. As a result, mail address resolution only receives
User, which by itself doesn't really have that much information in
it.
So the common technique for a mail address resolution is to define your
own UserProperty types and add it to User objects where more
context is available. For example, an SCM implementation can have a
lot more information about a particular user during a check out, so that
would be a good place to capture information as UserProperty, which
then later used by a MailAddressResolver.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static List<MailAddressResolver> |
LIST
Deprecated. as of 1.286 Use all() for read access and
Extension for registration. |
| Constructor Summary | |
|---|---|
MailAddressResolver()
|
|
| Method Summary | |
|---|---|
static ExtensionList<MailAddressResolver> |
all()
Returns all the registered MailAddressResolver descriptors. |
abstract String |
findMailAddressFor(User u)
Infers e-mail address of the given user. |
static String |
resolve(User u)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final List<MailAddressResolver> LIST
all() for read access and
Extension for registration.MailAddressResolver implementations.
| Constructor Detail |
|---|
public MailAddressResolver()
| Method Detail |
|---|
public abstract String findMailAddressFor(User u)
This method is called when a User without explicitly
configured e-mail address is used, as an attempt to infer e-mail address.
The normal strategy is to look at the projects that the user
is participating, then use the repository information to infer the
e-mail address.
When multiple resolvers are installed, they are consulted in order and the search will be over when an address is inferred by someone.
Since MailAddressResolver is singleton, this method can be
invoked concurrently from multiple threads.
public static String resolve(User u)
public static ExtensionList<MailAddressResolver> all()
MailAddressResolver descriptors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||