Package hudson.tasks
Class UserNameResolver
- java.lang.Object
-
- hudson.tasks.UserNameResolver
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class UserNameResolver extends Object implements ExtensionPoint
Finds full name off the user when none is specified.This is an extension point of Hudson. Plugins tha contribute new implementation of this class should use
Extensionto register the instance into Hudson, like this:@Extension class MyserNameResolver extends UserNameResolver { ... }- Since:
- 1.192
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static List<UserNameResolver>LISTDeprecated.since 2009-02-24.
-
Constructor Summary
Constructors Constructor Description UserNameResolver()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<UserNameResolver>all()Returns all the registeredUserNameResolverdescriptors.abstract StringfindNameFor(User u)Finds full name of the given user.static Stringresolve(User u)
-
-
-
Field Detail
-
LIST
@Deprecated public static final List<UserNameResolver> LIST
All registeredUserNameResolverimplementations.
-
-
Method Detail
-
findNameFor
public abstract String findNameFor(User u)
Finds full name of the given user.This method is called when a
Userwithout explicitly name is used.When multiple resolvers are installed, they are consulted in order and the search will be over when a name is found by someone.
Since
UserNameResolveris singleton, this method can be invoked concurrently from multiple threads.- Returns:
- null if the inference failed.
-
all
public static ExtensionList<UserNameResolver> all()
Returns all the registeredUserNameResolverdescriptors.
-
-