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>
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 inherited from class hudson.model.User.CanonicalIdResolver
REALM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBy default looks for a nested class (conventionally namedDescriptorImpl
) implementingDescriptor
and marked withExtension
.int
Gets priority of the resolver.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 Details
-
DESCRIPTOR
-
-
Constructor Details
-
DefaultUserCanonicalIdResolver
public DefaultUserCanonicalIdResolver()
-
-
Method Details
-
resolveCanonicalId
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
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>
-