Package jenkins.branch
Class ProjectNameProperty
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
-
- com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<MultiBranchProject<?,?>>
-
- jenkins.branch.ProjectNameProperty
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
,ReconfigurableDescribable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
public class ProjectNameProperty extends com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<MultiBranchProject<?,?>>
Holds the unmangled project name provided toSCMSourceObserver.observe(String)
and used to create aMultiBranchProject
within aOrganizationFolder
. Normally one would hope that the name provided bySCMSourceObserver.observe(String)
can be directly mapped toAbstractItem.getName()
however as we have no control over either the length or the characters coming from theSCMNavigator
we need to mangle the name withNameMangler.apply(String)
. As unmangled names are not reconstructable from the mangled name, we need to store the original unmangled name, hence this property.Note that this is not an issue for the children of
MultiBranchProject
asBranch.getName()
is the unmangled name of the branch.- Since:
- 2.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProjectNameProperty.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ProjectNameProperty(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>
reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
-
-
-
Constructor Detail
-
ProjectNameProperty
public ProjectNameProperty(String name)
-
-
Method Detail
-
getName
public String getName()
-
reconfigure
public com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?> reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException
- Specified by:
reconfigure
in interfaceReconfigurableDescribable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
- Overrides:
reconfigure
in classcom.cloudbees.hudson.plugins.folder.AbstractFolderProperty<MultiBranchProject<?,?>>
- Throws:
Descriptor.FormException
-
-