Package org.jenkinsci.plugins.p4.tasks
Class CheckoutTask
- java.lang.Object
-
- org.jenkinsci.plugins.p4.tasks.AbstractTask
-
- org.jenkinsci.plugins.p4.tasks.CheckoutTask
-
- All Implemented Interfaces:
FilePath.FileCallable<Boolean>
,Serializable
,org.jenkinsci.remoting.RoleSensitive
public class CheckoutTask extends AbstractTask implements FilePath.FileCallable<Boolean>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CheckoutTask(String credential, Run<?,?> run, TaskListener listener, Populate populate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkRoles(org.jenkinsci.remoting.RoleChecker checker)
P4Ref
getBuildChange()
List<P4ChangeEntry>
getChangesFull(List<P4Ref> lastRefs)
P4ChangeEntry
getCurrentChange()
long
getReview()
CheckoutStatus
getStatus()
List<P4Ref>
getSyncChange()
void
initialise()
Boolean
invoke(File workspace, hudson.remoting.VirtualChannel channel)
Invoke sync on build node (master or remote node).void
setBuildChange(P4Ref parentChange)
void
setIncrementalChanges(List<P4Ref> changes)
Object
task(ClientHelper p4)
Implements the Perforce task to retry if necessary-
Methods inherited from class org.jenkinsci.plugins.p4.tasks.AbstractTask
checkConnection, getClientName, getCredential, getListener, getSyncID, getWorkspace, setEnvironment, setup, setWorkspace, tryTask
-
-
-
-
Constructor Detail
-
CheckoutTask
public CheckoutTask(String credential, Run<?,?> run, TaskListener listener, Populate populate)
Constructor- Parameters:
credential
- Credential IDrun
- Jenkins Runlistener
- TaskListenerpopulate
- Populate options
-
-
Method Detail
-
initialise
public void initialise() throws AbortException
- Throws:
AbortException
-
invoke
public Boolean invoke(File workspace, hudson.remoting.VirtualChannel channel) throws IOException
Invoke sync on build node (master or remote node).- Specified by:
invoke
in interfaceFilePath.FileCallable<Boolean>
- Returns:
- true if updated, false if no change.
- Throws:
IOException
-
task
public Object task(ClientHelper p4) throws Exception
Description copied from class:AbstractTask
Implements the Perforce task to retry if necessary- Specified by:
task
in classAbstractTask
- Parameters:
p4
- Perforce connection helper- Returns:
- Task object
- Throws:
Exception
- push up stack
-
getChangesFull
public List<P4ChangeEntry> getChangesFull(List<P4Ref> lastRefs)
-
getCurrentChange
public P4ChangeEntry getCurrentChange()
-
getStatus
public CheckoutStatus getStatus()
-
getBuildChange
public P4Ref getBuildChange()
-
setBuildChange
public void setBuildChange(P4Ref parentChange)
-
getReview
public long getReview()
-
checkRoles
public void checkRoles(org.jenkinsci.remoting.RoleChecker checker) throws SecurityException
- Specified by:
checkRoles
in interfaceorg.jenkinsci.remoting.RoleSensitive
- Throws:
SecurityException
-
-