hudson.ivy
Class IvyModuleSet

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.AbstractItem
              extended by hudson.model.Job<P,R>
                  extended by hudson.model.AbstractProject<P,R>
                      extended by hudson.ivy.AbstractIvyProject<IvyModuleSet,IvyModuleSetBuild>
                          extended by hudson.ivy.IvyModuleSet
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.BuildableItem, hudson.model.BuildableItemWithBuildWrappers, hudson.model.Describable<hudson.model.TopLevelItem>, hudson.model.DescriptorByNameOwner, hudson.model.Item, hudson.model.ItemGroup<IvyModule>, hudson.model.ModelObject, hudson.model.PersistenceRoot, hudson.model.Queue.Task, hudson.model.ResourceActivity, hudson.model.Saveable, hudson.model.SCMedItem, hudson.model.TopLevelItem, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, org.kohsuke.stapler.HttpDeletable

public final class IvyModuleSet
extends AbstractIvyProject<IvyModuleSet,IvyModuleSetBuild>
implements hudson.model.TopLevelItem, hudson.model.ItemGroup<IvyModule>, hudson.model.SCMedItem, hudson.model.Saveable, hudson.model.BuildableItemWithBuildWrappers

Group of IvyModules.

This corresponds to the group of Ivy module descriptors that constitute a single branch of projects.

Author:
Timothy Bingaman

Nested Class Summary
static class IvyModuleSet.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.model.AbstractProject
hudson.model.AbstractProject.AbstractProjectDescriptor, hudson.model.AbstractProject.BecauseOfBuildInProgress, hudson.model.AbstractProject.BecauseOfUpstreamBuildInProgress
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static IvyModuleSet.DescriptorImpl DESCRIPTOR
           
 
Fields inherited from class hudson.model.AbstractProject
ABORT, blockBuildWhenUpstreamBuilding, builds, disabled, transientActions, triggers
 
Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties
 
Fields inherited from class hudson.model.AbstractItem
description, name
 
Fields inherited from interface hudson.model.Item
BUILD, CONFIGURE, CREATE, DELETE, EXTENDED_READ, PERMISSIONS, READ, WORKSPACE
 
Constructor Summary
IvyModuleSet(java.lang.String name)
           
 
Method Summary
protected  void addTransientActionsFromBuild(IvyModuleSetBuild build, java.util.Set<java.lang.Class> added)
           
 hudson.model.AbstractProject<?,?> asProject()
           
 int assignBuildNumber()
          To make it easy to grasp relationship among modules and the module set, we'll align the build numbers of all the modules.
protected  void buildDependencyGraph(hudson.model.DependencyGraph graph)
           
 hudson.util.FormValidation doCheckFileInWorkspace(java.lang.String value)
          Check the location of the ivy descriptor file, alternate settings file, etc - any file.
 hudson.util.FormValidation doCheckFileRelative(java.lang.String value)
          Check that the provided file is a relative path.
 void doDoDeleteAllDisabledModules(org.kohsuke.stapler.StaplerResponse rsp)
          Delete all disabled modules.
 java.util.Collection<hudson.model.Job> getAllJobs()
           
 hudson.tasks.Ant.AntInstallation getAnt()
          Gets the Ant to invoke.
 java.lang.String getAntOpts()
          Possibly null, whitespace-separated (including TAB, NL, etc) VM options to be used to launch Ant process.
 java.lang.String getAntProperties()
           
protected  java.lang.Class<IvyModuleSetBuild> getBuildClass()
           
 java.lang.String getBuildFile()
           
 hudson.util.DescribableList<hudson.tasks.BuildWrapper,hudson.model.Descriptor<hudson.tasks.BuildWrapper>> getBuildWrappers()
          Deprecated. as of 1.335 Use getBuildWrappersList() to be consistent with other subtypes of AbstractProject.
 hudson.util.DescribableList<hudson.tasks.BuildWrapper,hudson.model.Descriptor<hudson.tasks.BuildWrapper>> getBuildWrappersList()
           
 java.lang.String getChangedModulesProperty()
           
 hudson.model.TopLevelItemDescriptor getDescriptor()
           
 java.util.List<IvyModule> getDisabledModules(boolean disabled)
          Possibly empty list of all disabled modules (if disabled==true) or all enabeld modules (if disabled==false)
 java.lang.Object getDynamic(java.lang.String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 IvyModule getItem(java.lang.String name)
           
 java.util.Collection<IvyModule> getItems()
           
 java.lang.String getIvyBranch()
           
 java.lang.String getIvyFileExcludesPattern()
           
 java.lang.String getIvyFilePattern()
           
 IvyModule getModule(java.lang.String name)
           
 java.lang.Class<? extends hudson.model.AbstractProject> getModuleClass()
           
 hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getModulePublishers()
          List of active Publishers that should be applied to all module builds.
 java.util.Collection<IvyModule> getModules()
           
 hudson.model.Hudson getParent()
           
 hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishers()
          List of active Publishers.
 hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishersList()
           
 java.util.List<hudson.model.Queue.Item> getQueueItems()
          Returns the IvyModules that are in the queue.
 java.lang.String getRelativePathToDescriptorFromModuleRoot()
           
protected  java.util.Set<hudson.model.ResourceActivity> getResourceActivities()
           
 java.io.File getRootDirFor(IvyModule child)
           
 java.lang.String getTargets()
          Gets the list of targets to execute.
 java.lang.String getUrlChildPrefix()
           
 java.lang.String getUserConfiguredTargets()
          Gets the list of targets specified by the user, without taking inheritance into account.
 boolean hasDisabledModule()
          Returns true if there's any disabled module.
 boolean ignoreUpstreamChanges()
           
 hudson.tasks.Ant.AntInstallation inferAntInstallation()
           
 boolean isAggregatorStyleBuild()
           
 boolean isArchivingDisabled()
           
 boolean isFingerprintConfigured()
           
 boolean isIncrementalBuild()
           
 void logRotate()
           
protected  hudson.search.SearchIndexBuilder makeSearchIndex()
           
 void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent, java.lang.String name)
           
 void setAggregatorStyleBuild(boolean aggregatorStyleBuild)
           
 void setAnt(java.lang.String antName)
           
 void setAntOpts(java.lang.String antOpts)
          Set ANT_OPTS.
 void setIgnoreUpstremChanges(boolean ignoreUpstremChanges)
           
 void setIncrementalBuild(boolean incrementalBuild)
           
 void setIsArchivingDisabled(boolean archivingDisabled)
           
 void setIvyBranch(java.lang.String ivyBranch)
           
 void setIvyFileExcludesPattern(java.lang.String ivyFileExcludesPattern)
           
 void setIvyFilePattern(java.lang.String ivyFilePattern)
           
 void setRelativePathToDescriptorFromModuleRoot(java.lang.String relativePathToDescriptorFromModuleRoot)
           
 void setTargets(java.lang.String targets)
           
protected  void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
protected  void updateTransientActions()
           
 
Methods inherited from class hudson.model.AbstractProject
_getRuns, addProperty, addToList, addTrigger, blockBuildWhenUpstreamBuilding, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, createHistoryWidget, disable, doBuild, doBuildWithParameters, doCancelQueue, doCheckRetryCount, doConfigSubmit, doDisable, doDoWipeOutWorkspace, doEnable, doPolling, doRssChangelog, doWs, enable, findNearest, getActions, getAssignedLabel, getAuthToken, getBuildingUpstream, getBuildTriggerUpstreamProjects, getCauseOfBlockage, getDownstreamProjects, getEstimatedDuration, getHasCustomQuietPeriod, getIconColor, getJDK, getLastBuiltOn, getModuleRoot, getModuleRoots, getProminentActions, getPronoun, getQueueItem, getQuietPeriod, getRelationship, getResourceList, getRootProject, getScm, getScmCheckoutRetryCount, getSomeBuildWithWorkspace, getSomeWorkspace, getTransitiveDownstreamProjects, getTransitiveUpstreamProjects, getTrigger, getTriggers, getUpstreamProjects, getWhyBlocked, getWorkspace, getWorkspaceResource, hasAbortPermission, hasCustomScmCheckoutRetryCount, hasParticipant, isBuildable, isBuildBlocked, isConcurrentBuild, isConfigurable, isDisabled, isInQueue, isParameterized, loadBuild, makeDisabled, newBuild, performDelete, poll, pollSCMChanges, removeFromList, removeRun, removeTrigger, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild2, scheduleBuild2, scheduleBuild2, schedulePolling, setAssignedLabel, setBlockBuildWhenUpstreamBuilding, setConcurrentBuild, setJDK, setQuietPeriod, setScm
 
Methods inherited from class hudson.model.Job
doBuildStatus, doConfigDotXml, doDescription, doDoRename, doRssAll, doRssFailed, doTimelineData, getACL, getAllProperties, getBuild, getBuildByNumber, getBuildDir, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusUrl, getBuildTimeGraph, getFirstBuild, getLastBuild, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLogRotator, getNearestBuild, getNearestOldBuild, getNextBuildNumber, getPermalinks, getProperties, getProperty, getWidgets, isBuilding, isKeepDependencies, isNameEditable, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setLogRotator, supportsLogRotator, updateNextBuildNumber
 
Methods inherited from class hudson.model.AbstractItem
checkPermission, delete, delete, doDoDelete, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getFullDisplayName, getFullName, getName, getRootDir, getSearchUrl, getShortUrl, getUrl, hasPermission, resolveForCLI, save, setDescription, toString
 
Methods inherited from class hudson.model.Actionable
addAction, getAction, getAction, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hudson.model.ItemGroup
getFullDisplayName, getFullName, getUrl
 
Methods inherited from interface hudson.model.SCMedItem
getScm, poll, pollSCMChanges
 
Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild
 
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getShortUrl, getUrl, onCopiedFrom
 
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
 
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
 
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
 
Methods inherited from interface hudson.security.AccessControlled
checkPermission, getACL, hasPermission
 
Methods inherited from interface hudson.model.Queue.Task
checkAbortPermission, createExecutable, getAssignedLabel, getCauseOfBlockage, getEstimatedDuration, getFullDisplayName, getLastBuiltOn, getName, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked, isConcurrentBuild
 
Methods inherited from interface hudson.model.ResourceActivity
getDisplayName, getResourceList
 

Field Detail

DESCRIPTOR

@Extension(ordinal=900.0)
public static final IvyModuleSet.DescriptorImpl DESCRIPTOR
Constructor Detail

IvyModuleSet

public IvyModuleSet(java.lang.String name)
Method Detail

getUrlChildPrefix

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

getParent

public hudson.model.Hudson getParent()
Specified by:
getParent in interface hudson.model.Item
Specified by:
getParent in interface hudson.model.TopLevelItem
Overrides:
getParent in class hudson.model.AbstractItem

getItems

public java.util.Collection<IvyModule> getItems()
Specified by:
getItems in interface hudson.model.ItemGroup<IvyModule>

getModules

@Exported
public java.util.Collection<IvyModule> getModules()

getItem

public IvyModule getItem(java.lang.String name)
Specified by:
getItem in interface hudson.model.ItemGroup<IvyModule>

getModule

public IvyModule getModule(java.lang.String name)

updateTransientActions

protected void updateTransientActions()
Overrides:
updateTransientActions in class AbstractIvyProject<IvyModuleSet,IvyModuleSetBuild>

addTransientActionsFromBuild

protected void addTransientActionsFromBuild(IvyModuleSetBuild build,
                                            java.util.Set<java.lang.Class> added)
Specified by:
addTransientActionsFromBuild in class AbstractIvyProject<IvyModuleSet,IvyModuleSetBuild>

hasDisabledModule

public boolean hasDisabledModule()
Returns true if there's any disabled module.


getDisabledModules

public java.util.List<IvyModule> getDisabledModules(boolean disabled)
Possibly empty list of all disabled modules (if disabled==true) or all enabeld modules (if disabled==false)


isIncrementalBuild

public boolean isIncrementalBuild()

getChangedModulesProperty

public java.lang.String getChangedModulesProperty()

isAggregatorStyleBuild

public boolean isAggregatorStyleBuild()

ignoreUpstreamChanges

public boolean ignoreUpstreamChanges()

isArchivingDisabled

public boolean isArchivingDisabled()

setIncrementalBuild

public void setIncrementalBuild(boolean incrementalBuild)

getIvyFilePattern

public java.lang.String getIvyFilePattern()

setIvyFilePattern

public void setIvyFilePattern(java.lang.String ivyFilePattern)

getIvyFileExcludesPattern

public java.lang.String getIvyFileExcludesPattern()

setIvyFileExcludesPattern

public void setIvyFileExcludesPattern(java.lang.String ivyFileExcludesPattern)

getIvyBranch

public java.lang.String getIvyBranch()

setIvyBranch

public void setIvyBranch(java.lang.String ivyBranch)

setAggregatorStyleBuild

public void setAggregatorStyleBuild(boolean aggregatorStyleBuild)

setIgnoreUpstremChanges

public void setIgnoreUpstremChanges(boolean ignoreUpstremChanges)

setIsArchivingDisabled

public void setIsArchivingDisabled(boolean archivingDisabled)

getModulePublishers

public hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getModulePublishers()
List of active Publishers that should be applied to all module builds.


getPublishers

public hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishers()
List of active Publishers. Can be empty but never null.


getPublishersList

public hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishersList()
Specified by:
getPublishersList in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

getBuildWrappersList

public hudson.util.DescribableList<hudson.tasks.BuildWrapper,hudson.model.Descriptor<hudson.tasks.BuildWrapper>> getBuildWrappersList()
Specified by:
getBuildWrappersList in interface hudson.model.BuildableItemWithBuildWrappers

getBuildWrappers

@Deprecated
public hudson.util.DescribableList<hudson.tasks.BuildWrapper,hudson.model.Descriptor<hudson.tasks.BuildWrapper>> getBuildWrappers()
Deprecated. as of 1.335 Use getBuildWrappersList() to be consistent with other subtypes of AbstractProject.

List of active BuildWrappers. Can be empty but never null.


getDynamic

public java.lang.Object getDynamic(java.lang.String token,
                                   org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
getDynamic in class hudson.model.Job<IvyModuleSet,IvyModuleSetBuild>

getRootDirFor

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

getAllJobs

public java.util.Collection<hudson.model.Job> getAllJobs()
Specified by:
getAllJobs in interface hudson.model.Item
Overrides:
getAllJobs in class hudson.model.Job<IvyModuleSet,IvyModuleSetBuild>

getBuildClass

protected java.lang.Class<IvyModuleSetBuild> getBuildClass()
Specified by:
getBuildClass in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

makeSearchIndex

protected hudson.search.SearchIndexBuilder makeSearchIndex()
Overrides:
makeSearchIndex in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

isFingerprintConfigured

public boolean isFingerprintConfigured()
Specified by:
isFingerprintConfigured in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

onLoad

public void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
                   java.lang.String name)
            throws java.io.IOException
Specified by:
onLoad in interface hudson.model.Item
Overrides:
onLoad in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>
Throws:
java.io.IOException

assignBuildNumber

public int assignBuildNumber()
                      throws java.io.IOException
To make it easy to grasp relationship among modules and the module set, we'll align the build numbers of all the modules.

This method is invoked from Executor.run(), and because of the mutual exclusion among IvyModuleSetBuild and IvyBuild, we can safely touch all the modules.

Overrides:
assignBuildNumber in class hudson.model.Job<IvyModuleSet,IvyModuleSetBuild>
Throws:
java.io.IOException

logRotate

public void logRotate()
               throws java.io.IOException,
                      java.lang.InterruptedException
Overrides:
logRotate in class hudson.model.Job<IvyModuleSet,IvyModuleSetBuild>
Throws:
java.io.IOException
java.lang.InterruptedException

buildDependencyGraph

protected void buildDependencyGraph(hudson.model.DependencyGraph graph)
Specified by:
buildDependencyGraph in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

inferAntInstallation

public hudson.tasks.Ant.AntInstallation inferAntInstallation()

getResourceActivities

protected java.util.Set<hudson.model.ResourceActivity> getResourceActivities()
Overrides:
getResourceActivities in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>

asProject

public hudson.model.AbstractProject<?,?> asProject()
Specified by:
asProject in interface hudson.model.BuildableItemWithBuildWrappers
Specified by:
asProject in interface hudson.model.SCMedItem

getTargets

public java.lang.String getTargets()
Gets the list of targets to execute.


setTargets

public void setTargets(java.lang.String targets)

getRelativePathToDescriptorFromModuleRoot

public java.lang.String getRelativePathToDescriptorFromModuleRoot()

setRelativePathToDescriptorFromModuleRoot

public void setRelativePathToDescriptorFromModuleRoot(java.lang.String relativePathToDescriptorFromModuleRoot)

getAntOpts

public java.lang.String getAntOpts()
Possibly null, whitespace-separated (including TAB, NL, etc) VM options to be used to launch Ant process. If antOpts is null or empty, we'll return the globally-defined ANT_OPTS.


setAntOpts

public void setAntOpts(java.lang.String antOpts)
Set ANT_OPTS.


getBuildFile

public java.lang.String getBuildFile()

getAntProperties

public java.lang.String getAntProperties()

getAnt

public hudson.tasks.Ant.AntInstallation getAnt()
Gets the Ant to invoke. If null, we pick any random Ant installation.


setAnt

public void setAnt(java.lang.String antName)

getQueueItems

public java.util.List<hudson.model.Queue.Item> getQueueItems()
Returns the IvyModules that are in the queue.


getUserConfiguredTargets

public java.lang.String getUserConfiguredTargets()
Gets the list of targets specified by the user, without taking inheritance into account.

This is only used to present the UI screen, and in all the other cases getTargets() should be used.


submit

protected void submit(org.kohsuke.stapler.StaplerRequest req,
                      org.kohsuke.stapler.StaplerResponse rsp)
               throws java.io.IOException,
                      javax.servlet.ServletException,
                      hudson.model.Descriptor.FormException
Overrides:
submit in class hudson.model.AbstractProject<IvyModuleSet,IvyModuleSetBuild>
Throws:
java.io.IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException

getModuleClass

public java.lang.Class<? extends hudson.model.AbstractProject> getModuleClass()

doDoDeleteAllDisabledModules

public void doDoDeleteAllDisabledModules(org.kohsuke.stapler.StaplerResponse rsp)
                                  throws java.io.IOException,
                                         java.lang.InterruptedException
Delete all disabled modules.

Throws:
java.io.IOException
java.lang.InterruptedException

doCheckFileInWorkspace

public hudson.util.FormValidation doCheckFileInWorkspace(@QueryParameter
                                                         java.lang.String value)
                                                  throws java.io.IOException,
                                                         javax.servlet.ServletException
Check the location of the ivy descriptor file, alternate settings file, etc - any file.

Throws:
java.io.IOException
javax.servlet.ServletException

doCheckFileRelative

public hudson.util.FormValidation doCheckFileRelative(@QueryParameter
                                                      java.lang.String value)
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException
Check that the provided file is a relative path. And check that it exists, just in case.

Throws:
java.io.IOException
javax.servlet.ServletException

getDescriptor

public hudson.model.TopLevelItemDescriptor getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.model.TopLevelItem>
Specified by:
getDescriptor in interface hudson.model.TopLevelItem


Copyright © 2010. All Rights Reserved.