Package hudson.plugins.promoted_builds
Class JobPropertyImpl
- All Implemented Interfaces:
ExtensionPoint,Describable<JobProperty<?>>,ItemGroup<PromotionProcess>,ModelObject,PersistenceRoot,ReconfigurableDescribable<JobProperty<?>>,Saveable,BuildStep
public final class JobPropertyImpl
extends JobProperty<AbstractProject<?,?>>
implements ItemGroup<PromotionProcess>
Promotion processes defined for a project.
TODO: a possible performance problem as every time the owner job is reconfigured, all the promotion processes get reloaded from the disk.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.JobProperty
ownerFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionJobPropertyImpl(AbstractProject<?, ?> owner) Programmatic construction.JobPropertyImpl(JobPropertyImpl other, AbstractProject<?, ?> owner) Programmatic construction.JobPropertyImpl(Set<String> activeProcessNames) Programmatic construction. -
Method Summary
Modifier and TypeMethodDescriptionaddProcess(String name) Adds a new promotion process of the given name.createProcessFromXml(String name, InputStream xml) Gets the list of active promotion processes.Finds aPromotionProcessby name.getItems()Gets the list of promotion processes defined for this project, including ones that are no longer actively used and only for archival purpose.getJobAction(AbstractProject<?, ?> job) Deprecated.AbstractProject<?,?> getOwner()GetsAbstractProjectthat contains us.getRootDirFor(PromotionProcess child) getUrl()voidonDeleted(PromotionProcess process) voidonRenamed(PromotionProcess item, String oldName, String newName) booleanprebuild(AbstractBuild<?, ?> build, BuildListener listener) voidsave()protected voidsetOwner(AbstractProject<?, ?> owner) Methods inherited from class hudson.model.JobProperty
getDescriptor, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform, reconfigure, reconfigureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItemName, getItems, getItemsStream, getItemsStream
-
Constructor Details
-
JobPropertyImpl
Programmatic construction.- Parameters:
owner- owner job- Throws:
Descriptor.FormExceptionIOException
-
JobPropertyImpl
public JobPropertyImpl(JobPropertyImpl other, AbstractProject<?, ?> owner) throws Descriptor.FormException, IOExceptionProgrammatic construction.- Parameters:
other- Property to be copiedowner- owner job- Throws:
Descriptor.FormExceptionIOException
-
JobPropertyImpl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public JobPropertyImpl(Set<String> activeProcessNames) Programmatic construction.
-
-
Method Details
-
addProcess
Adds a new promotion process of the given name.- Parameters:
name- Name of the process to be created- Returns:
- Created process
- Throws:
IOException- Execution error
-
setOwner
- Overrides:
setOwnerin classJobProperty<AbstractProject<?,?>>
-
getItems
Gets the list of promotion processes defined for this project, including ones that are no longer actively used and only for archival purpose.- Specified by:
getItemsin interfaceItemGroup<PromotionProcess>- Returns:
- non-null and non-empty. Read-only.
-
getActiveItems
Gets the list of active promotion processes. -
createProcessFromXml
-
getOwner
GetsAbstractProjectthat contains us.- Returns:
- Owner project
-
getItem
Finds aPromotionProcessby name.- Specified by:
getItemin interfaceItemGroup<PromotionProcess>- Parameters:
name- Name of the process- Returns:
PromotionProcessif it can be found.
-
getRootDir
- Specified by:
getRootDirin interfacePersistenceRoot
-
save
- Specified by:
savein interfaceSaveable- Throws:
IOException
-
onDeleted
- Specified by:
onDeletedin interfaceItemGroup<PromotionProcess>
-
onRenamed
- Specified by:
onRenamedin interfaceItemGroup<PromotionProcess>- Throws:
IOException
-
getUrl
- Specified by:
getUrlin interfaceItemGroup<PromotionProcess>
-
getFullName
- Specified by:
getFullNamein interfaceItemGroup<PromotionProcess>
-
getFullDisplayName
- Specified by:
getFullDisplayNamein interfaceItemGroup<PromotionProcess>
-
getUrlChildPrefix
- Specified by:
getUrlChildPrefixin interfaceItemGroup<PromotionProcess>
-
getRootDirFor
- Specified by:
getRootDirForin interfaceItemGroup<PromotionProcess>
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
prebuild
- Specified by:
prebuildin interfaceBuildStep- Overrides:
prebuildin classJobProperty<AbstractProject<?,?>>
-
getJobAction
Deprecated.- Overrides:
getJobActionin classJobProperty<AbstractProject<?,?>>
-