Class FolderComputation<I extends TopLevelItem>
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
com.cloudbees.hudson.plugins.folder.computed.FolderComputation<I>
- All Implemented Interfaces:
ModelObject,Queue.Executable,Saveable,SearchableModelObject,SearchItem,Runnable,WithConsoleUrl,FullyNamedModelObject,Loadable,ModelObjectWithContextMenu
public class FolderComputation<I extends TopLevelItem>
extends Actionable
implements FullyNamedModelObject, Queue.Executable, Saveable, Loadable
A particular “run” of
ComputedFolder.- Since:
- 4.11-beta-1
-
Nested Class Summary
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlternativeUiTextProvider.Message<FolderComputation>Allow other code to override the display name forFolderComputation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFolderComputation(ComputedFolder<I> folder, FolderComputation<I> previous) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoConsoleText(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Sends out the raw console output.voiddoConsoleText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.org.kohsuke.stapler.HttpResponsedoStop()Stops this build if it's still going.protected XmlFilelongMay be used byOldDataMonitorin itsmanageview.Returns an input stream that reads from the log file.getUrl()booleanbooleanvoidload()voidrun()voidsave()toString()voidwriteLogTo(long offset, org.apache.commons.jelly.XMLOutput out) voidMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.model.Queue.Executable
getConsoleUrl, getParentExecutableMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Field Details
-
DISPLAY_NAME
Allow other code to override the display name forFolderComputation.
-
-
Constructor Details
-
FolderComputation
protected FolderComputation(@NonNull ComputedFolder<I> folder, @CheckForNull FolderComputation<I> previous)
-
-
Method Details
-
run
public void run()- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable
-
save
- Specified by:
savein interfaceSaveable- Throws:
IOException
-
load
- Specified by:
loadin interfaceLoadable- Throws:
IOException
-
getLogFile
-
getEventsFile
-
createEventsListener
-
getDataFile
-
getCauses
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getFullName
May be used byOldDataMonitorin itsmanageview.- Returns:
AbstractItem.getFullName()
-
getFullDisplayName
- Specified by:
getFullDisplayNamein interfaceFullyNamedModelObject
-
getSearchUrl
- Specified by:
getSearchUrlin interfaceSearchItem
-
getParent
- Specified by:
getParentin interfaceQueue.Executable
-
getEstimatedDuration
public long getEstimatedDuration()- Specified by:
getEstimatedDurationin interfaceQueue.Executable
-
isBuilding
public boolean isBuilding() -
isLogUpdated
public boolean isLogUpdated() -
getLogText
-
getEventsText
-
writeLogTo
- Throws:
IOException
-
writeWholeLogTo
- Throws:
IOExceptionInterruptedException
-
doConsoleText
public void doConsoleText(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException Sends out the raw console output.- Parameters:
req- the requestrsp- the response.- Throws:
IOException- if things go wrong.
-
doConsoleText
@Deprecated @StaplerNotDispatchable public void doConsoleText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Deprecated.- Throws:
IOException
-
doStop
public org.kohsuke.stapler.HttpResponse doStop() throws IOException, jakarta.servlet.ServletExceptionStops this build if it's still going.- Returns:
- the Http response.
- Throws:
IOExceptionjakarta.servlet.ServletException
-
getLogInputStream
Returns an input stream that reads from the log file. It will use a gzip-compressed log file (log.gz) if that exists.- Returns:
- An input stream from the log file. If the log file does not exist, the error message will be returned to the output.
- Throws:
IOException- if things go wrong
-
getResult
-
getTimestamp
-
getDurationString
-
getUrl
-
getPreviousResult
-
getIconColor
-
getBuildStatusIconClassName
-
toString
- Specified by:
toStringin interfaceQueue.Executable- Overrides:
toStringin classObject
-
doConsoleText(StaplerRequest2, StaplerResponse2)