public abstract class ProjectNamingStrategy extends Object implements Describable<ProjectNamingStrategy>, ExtensionPoint
Modifier and Type | Class and Description |
---|---|
static class |
ProjectNamingStrategy.DefaultProjectNamingStrategy
Default implementation which does not restrict the name to any form.
|
static class |
ProjectNamingStrategy.PatternProjectNamingStrategy
Naming strategy which allows the admin to define a pattern a job's name has to follow.
|
static class |
ProjectNamingStrategy.ProjectNamingStrategyDescriptor |
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static ProjectNamingStrategy |
DEFAULT_NAMING_STRATEGY
The default naming strategy which does not restrict the name of a job.
|
Constructor and Description |
---|
ProjectNamingStrategy() |
Modifier and Type | Method and Description |
---|---|
static DescriptorExtensionList<ProjectNamingStrategy,ProjectNamingStrategy.ProjectNamingStrategyDescriptor> |
all() |
void |
checkName(String name)
Called when creating a new job.
|
ProjectNamingStrategy.ProjectNamingStrategyDescriptor |
getDescriptor()
Gets the descriptor for this instance.
|
boolean |
isForceExistingJobs()
This flag can be used to force existing jobs to be migrated to a new naming strategy - if this method returns true, the naming will be enforced at every config change.
|
public static final ProjectNamingStrategy DEFAULT_NAMING_STRATEGY
public ProjectNamingStrategy.ProjectNamingStrategyDescriptor getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass()
then by default
a.getDescriptor() == b.getDescriptor()
as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor
in interface Describable<ProjectNamingStrategy>
public static DescriptorExtensionList<ProjectNamingStrategy,ProjectNamingStrategy.ProjectNamingStrategyDescriptor> all()
public void checkName(String name) throws Failure
name
- the name given from the UIFailure
- if the user has to be informed about an illegal name, forces the user to change the name before submitting. The message of the failure will be presented to the user.public boolean isForceExistingJobs()
false
is
returned, only new jobs have to follow the strategy.true
if existing jobs should be enforced to confirm to the naming standard.Copyright © 2004–2021. All rights reserved.