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.RunListenerImpl
items
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()
Creates a
ChildObserver that subclasses can use when handling events that might create new / update
existing child items. |
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() |
OrphanedItemStrategy |
getOrphanedItemStrategy() |
List<OrphanedItemStrategyDescriptor> |
getOrphanedItemStrategyDescriptors()
Gets the
OrphanedItemStrategyDescriptor s 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 . |
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 |
isHasEvents()
Identifies if this
ComputedFolder has a separate out of band events log. |
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...) . |
void |
setOrphanedItemStrategy(OrphanedItemStrategy strategy) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
addAction, addOrReplaceAction, addProperty, addView, canDelete, delete, deleteView, doChildrenContextMenu, doCreateView, doDoRename, 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, loadJobTotal, makeSearchIndex, newDefaultFolderIcon, newDefaultViewsTabBar, newFolderViewHolder, onDeleted, onLoad, onRenamed, onViewRenamed, removeAction, removeActions, renameTo, replaceAction, replaceActions, resetFolderViews, save, setIcon, setPrimaryView
checkPermission, 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, onCreatedFromScratch, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml
doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, onLoad, save
getSearchIndex, getSearchName, getSearchUrl
protected ComputedFolder(hudson.model.ItemGroup parent, String name)
protected final void init()
init
in class AbstractFolder<I extends hudson.model.TopLevelItem>
protected abstract void computeChildren(ChildObserver<I> observer, hudson.model.TaskListener listener) throws IOException, InterruptedException
observer
- how to indicate which children should be seenlistener
- a way to report progressIOException
InterruptedException
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 hereorphaned
, representing those children which ought to be removed from the folder now; items not listed will be left alone for the time beingIOException
InterruptedException
public void setOrphanedItemStrategy(@Nonnull OrphanedItemStrategy strategy)
protected final ChildObserver<I> createEventsChildObserver()
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.public 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>
IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException
protected 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>
IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException
recalculateAfterSubmitted(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()
public void addTrigger(hudson.triggers.Trigger trigger)
public List<hudson.model.Action> getActions()
getActions
in class hudson.model.Actionable
public boolean isBuildable()
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...)
.public boolean scheduleBuild()
scheduleBuild
in interface hudson.model.BuildableItem
public boolean scheduleBuild(hudson.model.Cause c)
scheduleBuild
in interface hudson.model.BuildableItem
public boolean scheduleBuild(int quietPeriod)
scheduleBuild
in interface hudson.model.BuildableItem
public boolean scheduleBuild(int quietPeriod, hudson.model.Cause c)
scheduleBuild
in interface hudson.model.BuildableItem
public boolean isBuildBlocked()
isBuildBlocked
in interface hudson.model.Queue.Task
@Deprecated public String getWhyBlocked()
getWhyBlocked
in interface hudson.model.Queue.Task
public hudson.model.queue.CauseOfBlockage getCauseOfBlockage()
getCauseOfBlockage
in interface hudson.model.Queue.Task
public void checkAbortPermission()
checkAbortPermission
in interface hudson.model.Queue.Task
public boolean hasAbortPermission()
hasAbortPermission
in interface hudson.model.Queue.Task
public boolean isConcurrentBuild()
isConcurrentBuild
in interface hudson.model.Queue.Task
public Collection<? extends hudson.model.queue.SubTask> getSubTasks()
getSubTasks
in interface hudson.model.Queue.Task
public org.acegisecurity.Authentication getDefaultAuthentication()
getDefaultAuthentication
in interface hudson.model.Queue.Task
public org.acegisecurity.Authentication getDefaultAuthentication(hudson.model.Queue.Item item)
getDefaultAuthentication
in interface hudson.model.Queue.Task
public hudson.model.Label getAssignedLabel()
getAssignedLabel
in interface hudson.model.queue.SubTask
public hudson.model.Node getLastBuiltOn()
getLastBuiltOn
in interface hudson.model.queue.SubTask
public long getEstimatedDuration()
getEstimatedDuration
in interface hudson.model.queue.SubTask
public final FolderComputation<I> createExecutable() throws IOException
createExecutable
in interface hudson.model.queue.SubTask
IOException
@Nonnull protected FolderComputation<I> createComputation(@CheckForNull FolderComputation<I> previous)
public hudson.model.Queue.Task getOwnerTask()
getOwnerTask
in interface hudson.model.queue.SubTask
public Object getSameNodeConstraint()
getSameNodeConstraint
in interface hudson.model.queue.SubTask
public hudson.model.ResourceList getResourceList()
getResourceList
in interface hudson.model.ResourceActivity
protected 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()
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()
OrphanedItemStrategyDescriptor
s applicable to this folder.Copyright © 2016–2017. All rights reserved.