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,Loadable,ModelObjectWithContextMenu
public class FolderComputation<I extends TopLevelItem> extends Actionable implements Queue.Executable, Saveable, Loadable
A particular “run” ofComputedFolder.- 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
Fields Modifier and Type Field Description static AlternativeUiTextProvider.Message<FolderComputation>DISPLAY_NAMEAllow other code to override the display name forFolderComputation.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFolderComputation(ComputedFolder<I> folder, FolderComputation<I> previous)
-
Method Summary
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, 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.Queue.Executable
getParentExecutable
-
-
-
-
Field Detail
-
DISPLAY_NAME
public static final AlternativeUiTextProvider.Message<FolderComputation> DISPLAY_NAME
Allow other code to override the display name forFolderComputation.
-
-
Constructor Detail
-
FolderComputation
protected FolderComputation(@NonNull ComputedFolder<I> folder, @CheckForNull FolderComputation<I> previous)
-
-
Method Detail
-
run
public void run()
- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable
-
save
public void save() throws IOException- Specified by:
savein interfaceSaveable- Throws:
IOException
-
load
public void load() throws IOException- Specified by:
loadin interfaceLoadable- Throws:
IOException
-
getLogFile
@NonNull public File getLogFile()
-
getEventsFile
@NonNull public File getEventsFile()
-
createEventsListener
@WithBridgeMethods(hudson.model.TaskListener.class) @NonNull public StreamTaskListener createEventsListener()
-
getDataFile
@NonNull protected XmlFile getDataFile()
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject
-
getSearchUrl
public String getSearchUrl()
- Specified by:
getSearchUrlin interfaceSearchItem
-
getParent
@NonNull public ComputedFolder<I> getParent()
- Specified by:
getParentin interfaceQueue.Executable
-
getEstimatedDuration
public long getEstimatedDuration()
- Specified by:
getEstimatedDurationin interfaceQueue.Executable
-
isBuilding
public boolean isBuilding()
-
isLogUpdated
public boolean isLogUpdated()
-
getLogText
@NonNull public AnnotatedLargeText<FolderComputation<I>> getLogText()
-
getEventsText
@NonNull public AnnotatedLargeText<FolderComputation<I>> getEventsText()
-
writeLogTo
public void writeLogTo(long offset, org.apache.commons.jelly.XMLOutput out) throws IOException- Throws:
IOException
-
writeWholeLogTo
public void writeWholeLogTo(@NonNull OutputStream out) throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
doConsoleText
public void doConsoleText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOExceptionSends out the raw console output.- Parameters:
req- the requestrsp- the response.- Throws:
IOException- if things go wrong.
-
doStop
public org.kohsuke.stapler.HttpResponse doStop() throws IOException, javax.servlet.ServletExceptionStops this build if it's still going.- Returns:
- the Http response.
- Throws:
IOExceptionjavax.servlet.ServletException
-
getLogInputStream
@NonNull public InputStream getLogInputStream() throws IOException
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
@CheckForNull public Result getResult()
-
getTimestamp
@NonNull public Calendar getTimestamp()
-
getDurationString
@NonNull public String getDurationString()
-
getUrl
@NonNull public String getUrl()
-
getPreviousResult
@CheckForNull public Result getPreviousResult()
-
getIconColor
@NonNull public BallColor getIconColor()
-
getBuildStatusIconClassName
public String getBuildStatusIconClassName()
-
toString
public String toString()
- Specified by:
toStringin interfaceQueue.Executable- Overrides:
toStringin classObject
-
-