Package jenkins.model
Class DefaultUserCanonicalIdResolver
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<User.CanonicalIdResolver>
-
- hudson.model.User.CanonicalIdResolver
-
- jenkins.model.DefaultUserCanonicalIdResolver
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<User.CanonicalIdResolver>
,Comparable<User.CanonicalIdResolver>
@Extension public class DefaultUserCanonicalIdResolver extends User.CanonicalIdResolver
Default User.CanonicalIdResolver to escape unsupported characters and generate user ID. Compared to other implementations, this resolver will always return an ID- Author:
- Nicolas De Loof
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static Descriptor<User.CanonicalIdResolver>
DESCRIPTOR
-
Fields inherited from class hudson.model.User.CanonicalIdResolver
REALM
-
-
Constructor Summary
Constructors Constructor Description DefaultUserCanonicalIdResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptor<User.CanonicalIdResolver>
getDescriptor()
By default looks for a nested class (conventionally namedDescriptorImpl
) implementingDescriptor
and marked withExtension
.int
getPriority()
Gets priority of the resolver.String
resolveCanonicalId(String idOrFullName, Map<String,?> context)
extract user ID from idOrFullName with help from contextual infos.-
Methods inherited from class hudson.model.User.CanonicalIdResolver
all, compareTo, resolve
-
-
-
-
Field Detail
-
DESCRIPTOR
public static final Descriptor<User.CanonicalIdResolver> DESCRIPTOR
-
-
Method Detail
-
resolveCanonicalId
public String resolveCanonicalId(String idOrFullName, Map<String,?> context)
Description copied from class:User.CanonicalIdResolver
extract user ID from idOrFullName with help from contextual infos. can returnnull
if no user ID matched the input- Specified by:
resolveCanonicalId
in classUser.CanonicalIdResolver
-
getPriority
public int getPriority()
Description copied from class:User.CanonicalIdResolver
Gets priority of the resolver. Higher priority means that it will be checked earlier.Overriding methods must not use
Integer.MIN_VALUE
, because it will cause collisions withDefaultUserCanonicalIdResolver
.- Overrides:
getPriority
in classUser.CanonicalIdResolver
- Returns:
- Priority of the resolver.
-
getDescriptor
public Descriptor<User.CanonicalIdResolver> getDescriptor()
Description copied from class:AbstractDescribableImpl
By default looks for a nested class (conventionally namedDescriptorImpl
) implementingDescriptor
and marked withExtension
.Gets the descriptor for this instance.
Descriptor
is a singleton for every concreteDescribable
implementation, so ifa.getClass() == b.getClass()
then by defaulta.getDescriptor() == b.getDescriptor()
as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptor
in interfaceDescribable<User.CanonicalIdResolver>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<User.CanonicalIdResolver>
-
-