Class RoleBasedProjectNamingStrategy
- java.lang.Object
-
- jenkins.model.ProjectNamingStrategy
-
- org.jenkinsci.plugins.rolestrategy.RoleBasedProjectNamingStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ProjectNamingStrategy>
,Serializable
public class RoleBasedProjectNamingStrategy extends ProjectNamingStrategy implements Serializable
A Naming Strategy so that users with only item specific create permissions can create only items matching the role pattern.- Since:
- 2.2.0
- Author:
- Kanstantsin Shautsou
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RoleBasedProjectNamingStrategy.DescriptorImpl
Descriptor.-
Nested classes/interfaces inherited from class jenkins.model.ProjectNamingStrategy
ProjectNamingStrategy.DefaultProjectNamingStrategy, ProjectNamingStrategy.PatternProjectNamingStrategy, ProjectNamingStrategy.ProjectNamingStrategyDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class jenkins.model.ProjectNamingStrategy
DEFAULT_NAMING_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description RoleBasedProjectNamingStrategy(boolean forceExistingJobs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkName(String name)
void
checkName(String parentName, String name)
Checks if the given name and parentName match a role pattern.boolean
isForceExistingJobs()
-
Methods inherited from class jenkins.model.ProjectNamingStrategy
all, getDescriptor
-
-
-
-
Method Detail
-
checkName
public void checkName(String name) throws Failure
- Overrides:
checkName
in classProjectNamingStrategy
- Throws:
Failure
-
checkName
public void checkName(String parentName, String name) throws Failure
Checks if the given name and parentName match a role pattern.- Overrides:
checkName
in classProjectNamingStrategy
- Parameters:
parentName
- Name of the parent item in which the new item should be created.name
- The name of the item that should be created.- Throws:
Failure
- When the name is not allowed orItem.CREATE
permission is missing
-
isForceExistingJobs
public boolean isForceExistingJobs()
- Overrides:
isForceExistingJobs
in classProjectNamingStrategy
-
-