P - the type of project that the branch projects consist of.R - the type of runs that the branch projects use.public static class MultiBranchProject.BranchIndexing<P extends hudson.model.AbstractProject<P,R> & hudson.model.TopLevelItem,R extends hudson.model.AbstractBuild<P,R>>
extends hudson.model.Actionable
implements hudson.model.Queue.Executable, hudson.model.Saveable
| Modifier and Type | Field and Description |
|---|---|
protected String |
charset
Charset in which the log file is written.
|
| Constructor and Description |
|---|
MultiBranchProject.BranchIndexing(MultiBranchProject.BranchIndexing<P,R> previousIndexing)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doConsoleText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Renders the progressive console log.
|
String |
getBuildStatusUrl()
Returns the build status icon URL.
|
hudson.model.Node |
getBuiltOn()
Returns a
Slave on which this build was done. |
String |
getBuiltOnStr()
Returns the name of the slave it was built on; null or "" if built by the master.
|
List<hudson.model.Cause> |
getCauses()
Returns the
Causes that triggered a build. |
Charset |
getCharset()
Gets the charset in which the log file is written.
|
String |
getDisplayName() |
String |
getDurationString()
Gets the string that says how long the build took to run.
|
long |
getEstimatedDuration() |
hudson.model.BallColor |
getIconColor()
Gets the icon color for display.
|
File |
getLogFile()
Returns the log file.
|
InputStream |
getLogInputStream()
Returns an input stream that reads from the log file.
|
Reader |
getLogReader()
Returns a
Reader of the log content. |
hudson.console.AnnotatedLargeText |
getLogText()
Used to URL-bind
AnnotatedLargeText. |
String |
getName()
Returns the name of this
MultiBranchProject.BranchIndexing's parent. |
MultiBranchProject<P,R> |
getParent()
Returns the parent.
|
hudson.model.Result |
getPreviousResult()
Returns the previous
Result or null if there is none. |
MultiBranchProject<P,R> |
getProject()
Returns the parent.
|
hudson.model.Result |
getResult()
Returns the result of indexing.
|
String |
getSearchUrl() |
Date |
getTime()
Same as
getTimestamp() but in a different type. |
long |
getTimeInMillis()
Same as
getTimestamp() but in a different type, that is since the time of the epoc. |
Calendar |
getTimestamp()
When the build is scheduled.
|
String |
getTimestampString()
Gets the string that says how long since this build has started.
|
String |
getTimestampString2()
Returns the timestamp formatted in xs:dateTime.
|
String |
getUrl()
Mimic method.
|
boolean |
isBuilding()
Returns
true if this indexing is in progress. |
boolean |
isLogUpdated()
Returns true if the log file is still being updated.
|
void |
run() |
void |
save()
Save the settings to a file.
|
void |
setProject(MultiBranchProject<P,R> project)
Sets the parent.
|
void |
writeLogTo(long offset,
org.apache.commons.jelly.XMLOutput out)
Used from console.jelly to write annotated log to the given output.
|
void |
writeWholeLogTo(OutputStream out)
Writes the complete log from the start to finish to the
OutputStream. |
addAction, doContextMenu, getAction, getAction, getActions, getActions, getDynamicgetSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError@CheckForNull protected String charset
Charset.getCharset()public MultiBranchProject.BranchIndexing(@CheckForNull
MultiBranchProject.BranchIndexing<P,R> previousIndexing)
previousIndexing - any previous indexing.@CheckForNull public MultiBranchProject<P,R> getProject()
@CheckForNull public MultiBranchProject<P,R> getParent()
getParent in interface hudson.model.Queue.Executablepublic void setProject(@CheckForNull
MultiBranchProject<P,R> project)
project - the parent.public void save()
throws IOException
save in interface hudson.model.SaveableIOException@CheckForNull public File getLogFile()
public boolean isBuilding()
true if this indexing is in progress.true if this indexing is in progress.public boolean isLogUpdated()
@CheckForNull public String getName()
MultiBranchProject.BranchIndexing's parent.MultiBranchProject.BranchIndexing's parent.public String getDisplayName()
getDisplayName in interface hudson.model.ModelObjectpublic String getUrl()
public hudson.model.Node getBuiltOn()
Slave on which this build was done.null, for example if the slave that this build run no longer exists.@Exported(name="builtOn") public String getBuiltOnStr()
@NonNull public final Charset getCharset()
null.@NonNull public hudson.console.AnnotatedLargeText getLogText()
AnnotatedLargeText.@NonNull public InputStream getLogInputStream() throws IOException
IOException@NonNull public Reader getLogReader() throws IOException
Reader of the log content.Reader of the log content.IOException - if the log content cannot be read.public void doConsoleText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
req - the request.rsp - the response.IOException - if things go wrong.public void writeLogTo(long offset,
org.apache.commons.jelly.XMLOutput out)
throws IOException
IOExceptionpublic void writeWholeLogTo(OutputStream out) throws IOException, InterruptedException
OutputStream.
If someone is still writing to the log, this method will not return until the whole log
file gets written out.IOExceptionInterruptedExceptionpublic String getBuildStatusUrl()
public List<hudson.model.Cause> getCauses()
Causes that triggered a build.
If a build sits in the queue for a long time, multiple build requests made during this period
are all rolled up into one build, hence this method may return a list.@Exported @NonNull public hudson.model.Result getResult()
@Exported @NonNull public Calendar getTimestamp()
@NonNull public final Date getTime()
getTimestamp() but in a different type.public final long getTimeInMillis()
getTimestamp() but in a different type, that is since the time of the epoc.@NonNull public String getTimestampString()
@NonNull public String getTimestampString2()
@NonNull public String getDurationString()
public hudson.model.BallColor getIconColor()
public void run()
public long getEstimatedDuration()
getEstimatedDuration in interface hudson.model.Queue.Executablepublic String getSearchUrl()
getSearchUrl in interface hudson.search.SearchItem@CheckForNull public hudson.model.Result getPreviousResult()
Result or null if there is none.Result or null if there is none.Copyright © 2004-2013. All Rights Reserved.