hudson.tasks
Class UserNameResolver

java.lang.Object
  extended by 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 Extension to 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
static List<UserNameResolver> LIST
          Deprecated. since 2009-02-24. Use all() for read access, and use Extension for registration.
 
Constructor Summary
UserNameResolver()
           
 
Method Summary
static ExtensionList<UserNameResolver> all()
          Returns all the registered UserNameResolver descriptors.
abstract  String findNameFor(User u)
          Finds full name 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

LIST

public static final List<UserNameResolver> LIST
Deprecated. since 2009-02-24. Use all() for read access, and use Extension for registration.
All registered UserNameResolver implementations.

Constructor Detail

UserNameResolver

public UserNameResolver()
Method Detail

findNameFor

public abstract String findNameFor(User u)
Finds full name of the given user.

This method is called when a User without 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 someoene.

Since UserNameResolver is singleton, this method can be invoked concurrently from multiple threads.

Returns:
null if the inference failed.

resolve

public static String resolve(User u)

all

public static ExtensionList<UserNameResolver> all()
Returns all the registered UserNameResolver descriptors.



Copyright © 2004-2013 Hudson. All Rights Reserved.