I - the child item typepublic abstract class ComputedFolder<I extends hudson.model.TopLevelItem> extends AbstractFolder<I> implements hudson.model.BuildableItem, hudson.model.Queue.FlyweightTask
Item.CONFIGURE to anyone.AbstractFolder.ItemListenerImpl, AbstractFolder.RunListenerImplitems| Modifier | Constructor and Description |
|---|---|
protected |
ComputedFolder(hudson.model.ItemGroup parent,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTrigger(hudson.triggers.Trigger trigger) |
void |
checkAbortPermission() |
protected abstract void |
computeChildren(ChildObserver<I> observer,
hudson.model.TaskListener listener)
Called to (re-)compute the set of children of this folder.
|
protected FolderComputation<I> |
createComputation(FolderComputation<I> previous) |
protected ChildObserver<I> |
createEventsChildObserver()
Deprecated.
|
FolderComputation<I> |
createExecutable() |
org.kohsuke.stapler.HttpResponse |
doBuild(jenkins.util.TimeDuration delay) |
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
List<hudson.model.Action> |
getActions() |
hudson.model.Label |
getAssignedLabel() |
hudson.model.queue.CauseOfBlockage |
getCauseOfBlockage() |
FolderComputation<I> |
getComputation()
URL binding and other purposes.
|
protected File |
getComputationDir() |
org.acegisecurity.Authentication |
getDefaultAuthentication() |
org.acegisecurity.Authentication |
getDefaultAuthentication(hudson.model.Queue.Item item) |
long |
getEstimatedDuration() |
hudson.model.Node |
getLastBuiltOn() |
PseudoRun<I> |
getLastFailedBuild() |
PseudoRun<I> |
getLastStableBuild() |
PseudoRun<I> |
getLastSuccessfulBuild() |
OrphanedItemStrategy |
getOrphanedItemStrategy() |
List<OrphanedItemStrategyDescriptor> |
getOrphanedItemStrategyDescriptors()
Gets the
OrphanedItemStrategyDescriptors applicable to this folder. |
hudson.model.Queue.Task |
getOwnerTask() |
hudson.model.ResourceList |
getResourceList() |
Object |
getSameNodeConstraint() |
Collection<? extends hudson.model.queue.SubTask> |
getSubTasks() |
protected String |
getSuccessfulDestination()
Where user will be redirected after creating or reconfiguring a
AbstractFolder. |
List<hudson.triggers.TriggerDescriptor> |
getTriggerDescriptors() |
Map<hudson.triggers.TriggerDescriptor,hudson.triggers.Trigger<?>> |
getTriggers() |
String |
getWhyBlocked()
Deprecated.
|
boolean |
hasAbortPermission() |
protected void |
init() |
boolean |
isBuildable()
Whether it is permissible to recompute this folder at this time.
|
boolean |
isBuildBlocked() |
boolean |
isConcurrentBuild() |
boolean |
isDisabled()
Is this folder disabled.
|
boolean |
isHasEvents()
Identifies if this
ComputedFolder has a separate out of band events log. |
void |
onCreatedFromScratch() |
void |
onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name) |
protected ChildObserver<I> |
openEventsChildObserver()
Opens a new
ChildObserver that subclasses can use when handling events that might create new / update
existing child items. |
protected Collection<I> |
orphanedItems(Collection<I> orphaned,
hudson.model.TaskListener listener)
Hook called when some items are no longer in the list.
|
protected void |
recalculateAfterSubmitted(boolean recalculate)
Method for child classes to use if they want to suppress/confirm the automatic recalculation provided in
doConfigSubmit(StaplerRequest, StaplerResponse). |
protected String |
renameBlocker()
Allows a subclass to block renames under dynamic conditions.
|
boolean |
scheduleBuild() |
boolean |
scheduleBuild(hudson.model.Cause c) |
boolean |
scheduleBuild(int quietPeriod) |
boolean |
scheduleBuild(int quietPeriod,
hudson.model.Cause c) |
hudson.model.Queue.Item |
scheduleBuild2(int quietPeriod,
hudson.model.Action... actions)
Duck-types
ParameterizedJobMixIn.scheduleBuild2(int, Action...). |
protected void |
setDisabled(boolean disabled)
Sets the folder as disabled.
|
void |
setOrphanedItemStrategy(OrphanedItemStrategy strategy) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
protected boolean |
supportsMakeDisabled()
Determines whether the folder supports being made disabled.
|
addAction, addOrReplaceAction, addProperty, addView, canDelete, delete, deleteView, doChildrenContextMenu, doCreateView, doDisable, doDoRename, doEnable, doLastBuild, doSubmitDescription, doViewExistsCheck, getAllJobs, getBuildHealth, getBuildHealthReports, getDescriptor, getFolderViews, getHealthMetrics, getIcon, getIconColor, getItem, getItemGroup, getItems, getJob, getJobsDir, getOverrides, getPrimaryView, getPronoun, getProperties, getRootDirFor, getRootDirFor, getStaplerFallback, getUrlChildPrefix, getView, getViewActions, getViews, getViewsTabBar, initViews, invalidateBuildHealthReports, itemsPut, loadChildren, loadJobTotal, makeDisabled, makeSearchIndex, newDefaultFolderIcon, newDefaultViewsTabBar, newFolderViewHolder, onDeleted, onRenamed, onViewRenamed, removeAction, removeActions, renameTo, replaceAction, replaceActions, resetFolderViews, save, setIcon, setPrimaryViewcheckPermission, delete, doConfigDotXml, doDoDelete, doReload, doSetName, getAbsoluteUrl, getACL, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, movedTo, onCopiedFrom, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXmldoContextMenu, getAction, getAction, getActions, getAllActions, getDynamicgetSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdelete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, savegetSearchIndex, getSearchName, getSearchUrlprotected ComputedFolder(hudson.model.ItemGroup parent,
String name)
protected final void init()
init in class AbstractFolder<I extends hudson.model.TopLevelItem>public void onCreatedFromScratch()
onCreatedFromScratch in interface hudson.model.ItemonCreatedFromScratch in class hudson.model.AbstractItempublic void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name)
throws IOException
AbstractFolderonLoad in interface hudson.model.ItemonLoad in class AbstractFolder<I extends hudson.model.TopLevelItem>IOExceptionprotected abstract void computeChildren(ChildObserver<I> observer, hudson.model.TaskListener listener) throws IOException, InterruptedException
Thread.interrupted() status and throws a InterruptedException if set at least once every 5
seconds to allow the user to interrupt a computation..observer - how to indicate which children should be seenlistener - a way to report progressIOException - if there was an IOException during the computation.InterruptedException - if the computation was interrupted.protected Collection<I> orphanedItems(Collection<I> orphaned, hudson.model.TaskListener listener) throws IOException, InterruptedException
Item.delete() or ItemGroup.onDeleted(T) or ItemListener.fireOnDeleted(hudson.model.Item) yourself.
By default, uses getOrphanedItemStrategy().orphaned - a nonempty set of items which no longer are supposed to be herelistener - the listener to report decisions to.orphaned, representing those children which ought to be removed from the folder
now; items not listed will be left alone for the timeIOException - if there was an I/O issue processing the items.InterruptedException - if interrupted while processing the items.public void setOrphanedItemStrategy(@Nonnull OrphanedItemStrategy strategy)
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) protected final ChildObserver<I> createEventsChildObserver()
openEventsChildObserver()ChildObserver that subclasses can use when handling events that might create new / update
existing child items. The handling of orphaned items is a responsibility of the OrphanedItemStrategy
which is only applied as part of a full computation.ChildObserver for event handling.protected final ChildObserver<I> openEventsChildObserver()
ChildObserver that subclasses can use when handling events that might create new / update
existing child items. The handling of orphaned items is a responsibility of the OrphanedItemStrategy
which is only applied as part of a full computation.ChildObserver for event handling. The caller must ChildObserver.close() when done.public boolean isDisabled()
isDisabled in class AbstractFolder<I extends hudson.model.TopLevelItem>true if and only if the folder is disabled.FolderJobQueueDecisionHandlerprotected void setDisabled(boolean disabled)
setDisabled in class AbstractFolder<I extends hudson.model.TopLevelItem>disabled - true if and only if the folder is to be disabled.protected boolean supportsMakeDisabled()
supportsMakeDisabled in class AbstractFolder<I extends hudson.model.TopLevelItem>true if and only if AbstractFolder.setDisabled(boolean) is implementedpublic void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
doConfigSubmit in class AbstractFolder<I extends hudson.model.TopLevelItem>IOExceptionjavax.servlet.ServletExceptionhudson.model.Descriptor.FormExceptionprotected final void recalculateAfterSubmitted(boolean recalculate)
doConfigSubmit(StaplerRequest, StaplerResponse). This method should only be called from
submit(StaplerRequest, StaplerResponse). If called multiple times from
submit(StaplerRequest, StaplerResponse) then all calls must be with the false parameter
to suppress recalculation.recalculate - true to require recalculation, false to suppress recalculation.submit(StaplerRequest, StaplerResponse)protected void submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
submit in class AbstractFolder<I extends hudson.model.TopLevelItem>IOExceptionjavax.servlet.ServletExceptionhudson.model.Descriptor.FormExceptionrecalculateAfterSubmitted(boolean)@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull protected final String getSuccessfulDestination()
AbstractFolder.getSuccessfulDestination in class AbstractFolder<I extends hudson.model.TopLevelItem>HttpServletResponse.sendRedirect(String)public Map<hudson.triggers.TriggerDescriptor,hudson.triggers.Trigger<?>> getTriggers()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<hudson.triggers.TriggerDescriptor> getTriggerDescriptors()
public void addTrigger(hudson.triggers.Trigger trigger)
public List<hudson.model.Action> getActions()
getActions in class hudson.model.Actionablepublic boolean isBuildable()
true if this folder can currenty be recomputed.public org.kohsuke.stapler.HttpResponse doBuild(@QueryParameter
jenkins.util.TimeDuration delay)
@CheckForNull public hudson.model.Queue.Item scheduleBuild2(int quietPeriod, hudson.model.Action... actions)
ParameterizedJobMixIn.scheduleBuild2(int, Action...).quietPeriod - seconds to wait before starting (normally 0)actions - various actions to associate with the scheduling, such as ParametersAction or
CauseActionpublic boolean scheduleBuild()
scheduleBuild in interface hudson.model.BuildableItempublic boolean scheduleBuild(hudson.model.Cause c)
scheduleBuild in interface hudson.model.BuildableItempublic boolean scheduleBuild(int quietPeriod)
scheduleBuild in interface hudson.model.BuildableItempublic boolean scheduleBuild(int quietPeriod,
hudson.model.Cause c)
scheduleBuild in interface hudson.model.BuildableItempublic boolean isBuildBlocked()
isBuildBlocked in interface hudson.model.Queue.Task@Deprecated public String getWhyBlocked()
getWhyBlocked in interface hudson.model.Queue.Taskpublic hudson.model.queue.CauseOfBlockage getCauseOfBlockage()
getCauseOfBlockage in interface hudson.model.Queue.Taskpublic void checkAbortPermission()
checkAbortPermission in interface hudson.model.Queue.Taskpublic boolean hasAbortPermission()
hasAbortPermission in interface hudson.model.Queue.Taskpublic boolean isConcurrentBuild()
isConcurrentBuild in interface hudson.model.Queue.Taskpublic Collection<? extends hudson.model.queue.SubTask> getSubTasks()
getSubTasks in interface hudson.model.Queue.Taskpublic org.acegisecurity.Authentication getDefaultAuthentication()
getDefaultAuthentication in interface hudson.model.Queue.Taskpublic org.acegisecurity.Authentication getDefaultAuthentication(hudson.model.Queue.Item item)
getDefaultAuthentication in interface hudson.model.Queue.Taskpublic hudson.model.Label getAssignedLabel()
getAssignedLabel in interface hudson.model.queue.SubTaskpublic hudson.model.Node getLastBuiltOn()
getLastBuiltOn in interface hudson.model.queue.SubTaskpublic long getEstimatedDuration()
getEstimatedDuration in interface hudson.model.queue.SubTaskpublic final FolderComputation<I> createExecutable() throws IOException
createExecutable in interface hudson.model.queue.SubTaskIOException@Nonnull protected FolderComputation<I> createComputation(@CheckForNull FolderComputation<I> previous)
public hudson.model.Queue.Task getOwnerTask()
getOwnerTask in interface hudson.model.queue.SubTaskpublic Object getSameNodeConstraint()
getSameNodeConstraint in interface hudson.model.queue.SubTaskpublic hudson.model.ResourceList getResourceList()
getResourceList in interface hudson.model.ResourceActivityprotected File getComputationDir()
public boolean isHasEvents()
ComputedFolder has a separate out of band events log. Default implementation
just checks if the events log has content. Subclasses can override this method to force the events log
always present in the UI.true if this ComputedFolder has a separate out of band events log.@Nonnull public FolderComputation<I> getComputation()
null temporarily inside the constructor, so beware if you extend this class.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public PseudoRun<I> getLastSuccessfulBuild()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public PseudoRun<I> getLastStableBuild()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public PseudoRun<I> getLastFailedBuild()
protected String renameBlocker()
renameBlocker in class AbstractFolder<I extends hudson.model.TopLevelItem>@NonNull public OrphanedItemStrategy getOrphanedItemStrategy()
@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @NonNull public List<OrphanedItemStrategyDescriptor> getOrphanedItemStrategyDescriptors()
OrphanedItemStrategyDescriptors applicable to this folder.OrphanedItemStrategyDescriptors applicable to this folder.Copyright © 2016–2017. All rights reserved.