Package hudson.plugins.batch_task
Class BatchTask
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.plugins.batch_task.BatchTask
-
- All Implemented Interfaces:
ModelObject
,SubTask
,Queue.Task
,ResourceActivity
,SearchableModelObject
,SearchItem
,AccessControlled
public final class BatchTask extends AbstractModelObject implements Queue.Task, AccessControlled
A batch task.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
-
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, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.Queue.Task
getAffinityKey, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2
-
-
-
-
Method Detail
-
getParent
public BatchTaskProperty getParent()
-
getSearchUrl
public String getSearchUrl()
- Specified by:
getSearchUrl
in interfaceSearchItem
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
- Specified by:
getDisplayName
in interfaceResourceActivity
-
getFullDisplayName
public String getFullDisplayName()
- Specified by:
getFullDisplayName
in interfaceQueue.Task
-
isBuildBlocked
public boolean isBuildBlocked()
- Specified by:
isBuildBlocked
in interfaceQueue.Task
-
getWhyBlocked
public String getWhyBlocked()
- Specified by:
getWhyBlocked
in interfaceQueue.Task
-
getCauseOfBlockage
public CauseOfBlockage getCauseOfBlockage()
- Specified by:
getCauseOfBlockage
in interfaceQueue.Task
-
getName
public String getName()
- Specified by:
getName
in interfaceQueue.Task
-
isConcurrentBuild
public boolean isConcurrentBuild()
- Specified by:
isConcurrentBuild
in interfaceQueue.Task
-
getEstimatedDuration
public long getEstimatedDuration()
- Specified by:
getEstimatedDuration
in interfaceSubTask
-
getAssignedLabel
public Label getAssignedLabel()
- Specified by:
getAssignedLabel
in interfaceSubTask
-
getLastBuiltOn
public Node getLastBuiltOn()
- Specified by:
getLastBuiltOn
in interfaceSubTask
-
getBuildStatusUrl
public String getBuildStatusUrl()
-
getIconColor
public BallColor getIconColor()
-
getLastSuccessfulRun
public BatchRun getLastSuccessfulRun()
-
getLastFailedRun
public BatchRun getLastFailedRun()
-
createHistoryWidget
public HistoryWidget createHistoryWidget()
-
createExecutable
public BatchRun createExecutable() throws IOException
- Specified by:
createExecutable
in interfaceSubTask
- Throws:
IOException
-
getNextBuildNumber
public String getNextBuildNumber()
Gets the expected build number assigned to the next run.- Returns:
- string like "5-3"
-
getACL
public ACL getACL()
Returns theACL
for this object.- Specified by:
getACL
in interfaceAccessControlled
-
checkAbortPermission
public void checkAbortPermission()
- Specified by:
checkAbortPermission
in interfaceQueue.Task
-
hasAbortPermission
public boolean hasAbortPermission()
- Specified by:
hasAbortPermission
in interfaceQueue.Task
-
hasBuildPermission
public boolean hasBuildPermission()
-
hasDeletePermission
public boolean hasDeletePermission()
-
hasConfigurePermission
public boolean hasConfigurePermission()
-
getResourceList
public ResourceList getResourceList()
BatchTask
requires exclusive access to the workspace.- Specified by:
getResourceList
in interfaceResourceActivity
-
getDynamic
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
-
doExecute
@POST public void doExecute(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Schedules the execution- Throws:
IOException
javax.servlet.ServletException
-
doDoDelete
@POST public void doDoDelete(org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Deletes this task.- Throws:
IOException
javax.servlet.ServletException
-
doCancelQueue
@POST public void doCancelQueue(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
getUrl
public String getUrl()
- Specified by:
getUrl
in interfaceQueue.Task
-
getSubTasks
public Collection<? extends SubTask> getSubTasks()
- Specified by:
getSubTasks
in interfaceQueue.Task
-
getDefaultAuthentication
@Nonnull public Authentication getDefaultAuthentication()
- Specified by:
getDefaultAuthentication
in interfaceQueue.Task
-
getOwnerTask
public Queue.Task getOwnerTask()
- Specified by:
getOwnerTask
in interfaceSubTask
-
getSameNodeConstraint
public Object getSameNodeConstraint()
- Specified by:
getSameNodeConstraint
in interfaceSubTask
-
-