hudson.plugins.promoted_builds
Class JobPropertyImpl

java.lang.Object
  extended by hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>
      extended by hudson.plugins.promoted_builds.JobPropertyImpl
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.JobProperty<?>>, hudson.model.ItemGroup<PromotionProcess>, hudson.model.ModelObject, hudson.model.PersistenceRoot, hudson.model.Saveable, hudson.tasks.BuildStep

public final class JobPropertyImpl
extends hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>
implements hudson.model.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
static class JobPropertyImpl.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.JobProperty
owner
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
JobPropertyImpl(hudson.model.AbstractProject<?,?> owner)
          Programmatic construction.
 
Method Summary
 PromotionProcess addProcess(java.lang.String name)
          Adds a new promotion process of the given name.
 java.util.List<PromotionProcess> getActiveItems()
          Gets the list of active promotion processes.
 java.lang.String getDisplayName()
           
 java.lang.String getFullDisplayName()
           
 java.lang.String getFullName()
           
 PromotionProcess getItem(java.lang.String name)
          Finds a config by name.
 java.util.List<PromotionProcess> getItems()
          Gets the list of promotion processes defined for this project, including ones that are no longer actively used and only for archival purpose.
 hudson.model.Action getJobAction(hudson.model.AbstractProject<?,?> job)
          Deprecated. 
 hudson.model.AbstractProject<?,?> getOwner()
          Gets AbstractProject that contains us.
 java.io.File getRootDir()
           
 java.io.File getRootDirFor(PromotionProcess child)
           
 java.lang.String getUrl()
           
 java.lang.String getUrlChildPrefix()
           
 void onDeleted(PromotionProcess process)
           
 void onRenamed(PromotionProcess item, java.lang.String oldName, java.lang.String newName)
           
 boolean prebuild(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
           
 void save()
           
protected  void setOwner(hudson.model.AbstractProject<?,?> owner)
           
 
Methods inherited from class hudson.model.JobProperty
getDescriptor, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobPropertyImpl

public JobPropertyImpl(hudson.model.AbstractProject<?,?> owner)
                throws hudson.model.Descriptor.FormException,
                       java.io.IOException
Programmatic construction.

Throws:
hudson.model.Descriptor.FormException
java.io.IOException
Method Detail

addProcess

public PromotionProcess addProcess(java.lang.String name)
                            throws java.io.IOException
Adds a new promotion process of the given name.

Throws:
java.io.IOException

setOwner

protected void setOwner(hudson.model.AbstractProject<?,?> owner)
Overrides:
setOwner in class hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>

getItems

public java.util.List<PromotionProcess> 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:
getItems in interface hudson.model.ItemGroup<PromotionProcess>
Returns:
non-null and non-empty. Read-only.

getActiveItems

public java.util.List<PromotionProcess> getActiveItems()
Gets the list of active promotion processes.


getOwner

public hudson.model.AbstractProject<?,?> getOwner()
Gets AbstractProject that contains us.


getItem

public PromotionProcess getItem(java.lang.String name)
Finds a config by name.

Specified by:
getItem in interface hudson.model.ItemGroup<PromotionProcess>

getRootDir

public java.io.File getRootDir()
Specified by:
getRootDir in interface hudson.model.PersistenceRoot

save

public void save()
          throws java.io.IOException
Specified by:
save in interface hudson.model.Saveable
Throws:
java.io.IOException

onDeleted

public void onDeleted(PromotionProcess process)
Specified by:
onDeleted in interface hudson.model.ItemGroup<PromotionProcess>

onRenamed

public void onRenamed(PromotionProcess item,
                      java.lang.String oldName,
                      java.lang.String newName)
               throws java.io.IOException
Specified by:
onRenamed in interface hudson.model.ItemGroup<PromotionProcess>
Throws:
java.io.IOException

getUrl

public java.lang.String getUrl()
Specified by:
getUrl in interface hudson.model.ItemGroup<PromotionProcess>

getFullName

public java.lang.String getFullName()
Specified by:
getFullName in interface hudson.model.ItemGroup<PromotionProcess>

getFullDisplayName

public java.lang.String getFullDisplayName()
Specified by:
getFullDisplayName in interface hudson.model.ItemGroup<PromotionProcess>

getUrlChildPrefix

public java.lang.String getUrlChildPrefix()
Specified by:
getUrlChildPrefix in interface hudson.model.ItemGroup<PromotionProcess>

getRootDirFor

public java.io.File getRootDirFor(PromotionProcess child)
Specified by:
getRootDirFor in interface hudson.model.ItemGroup<PromotionProcess>

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface hudson.model.ModelObject

prebuild

public boolean prebuild(hudson.model.AbstractBuild<?,?> build,
                        hudson.model.BuildListener listener)
Specified by:
prebuild in interface hudson.tasks.BuildStep
Overrides:
prebuild in class hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>

getJobAction

@Deprecated
public hudson.model.Action getJobAction(hudson.model.AbstractProject<?,?> job)
Deprecated. 

Overrides:
getJobAction in class hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>


Copyright © 2004-2011. All Rights Reserved.