Package org.jenkinsci.plugins.p4.scm
Class SwarmScmSource
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
-
- jenkins.scm.api.SCMSource
-
- org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource
-
- org.jenkinsci.plugins.p4.scm.SwarmScmSource
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.SCMSource>
public class SwarmScmSource extends AbstractP4ScmSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SwarmScmSource.DescriptorImpl
-
Nested classes/interfaces inherited from class jenkins.scm.api.SCMSource
jenkins.scm.api.SCMSource.SourceByItem
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource
credential, defaultExcludes
-
-
Constructor Summary
Constructors Constructor Description SwarmScmSource(String credential, String charset, String format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
findInclude(String path)
P4Browser
getBrowser()
List<P4SCMHead>
getHeads(TaskListener listener)
String
getProject()
P4SCMRevision
getRevision(net.sf.json.JSONObject payload)
A specific revision based on the Event Payload.P4SCMRevision
getRevision(TempClientHelper p4, P4SCMHead head)
Get the Latest change for the path specified in P4SCMHead.SwarmHelper
getSwarm()
List<P4SCMHead>
getTags(TaskListener listener)
Workspace
getWorkspace(P4Path path)
protected boolean
isCategoryEnabled(jenkins.scm.api.SCMHeadCategory category)
Enable specific SCMHeadCategory categories.protected List<Action>
retrieveActions(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, TaskListener listener)
SCMHead level action.void
setProject(String project)
void
setSwarm(SwarmHelper swarm)
-
Methods inherited from class org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource
build, createProbe, getCharset, getCredential, getExcludes, getFilter, getFormat, getIncludePaths, getIncludes, getPopulate, getProperty, getScanner, getScriptPathOrDefault, getTraits, retrieve, retrieveActions, retrieveActions, setCharset, setExcludes, setFilter, setFormat, setIncludes, setPopulate, setTraits, toLines
-
Methods inherited from class jenkins.scm.api.SCMSource
afterSave, build, canProbe, checkInterrupt, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTrustedRevision, hashCode, hasId, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveRevisions, retrieveRevisions, setId, setOwner, toString, withId
-
-
-
-
Method Detail
-
setProject
@DataBoundSetter public void setProject(String project)
-
getProject
public String getProject()
-
getSwarm
public SwarmHelper getSwarm() throws Exception
- Throws:
Exception
-
setSwarm
public void setSwarm(SwarmHelper swarm)
-
getBrowser
public P4Browser getBrowser()
- Specified by:
getBrowser
in classAbstractP4ScmSource
-
retrieveActions
protected List<Action> retrieveActions(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, TaskListener listener) throws IOException, InterruptedException
Description copied from class:AbstractP4ScmSource
SCMHead level action.- Overrides:
retrieveActions
in classAbstractP4ScmSource
- Parameters:
head
- Changes on a branchevent
- Optional event (might be null) use payload to help filter calls.listener
- the listener to report progress on.- Returns:
- the list of
Action
instances to persist. - Throws:
IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread has interrupted the current thread.
-
getTags
public List<P4SCMHead> getTags(@NonNull TaskListener listener) throws Exception
- Specified by:
getTags
in classAbstractP4ScmSource
- Throws:
Exception
-
getHeads
public List<P4SCMHead> getHeads(@NonNull TaskListener listener) throws Exception
- Specified by:
getHeads
in classAbstractP4ScmSource
- Throws:
Exception
-
getRevision
public P4SCMRevision getRevision(TempClientHelper p4, P4SCMHead head) throws Exception
Description copied from class:AbstractP4ScmSource
Get the Latest change for the path specified in P4SCMHead.- Overrides:
getRevision
in classAbstractP4ScmSource
- Parameters:
p4
- TempClient instancehead
- SCMHead- Returns:
- The latest change as a P4SCMRevision object
- Throws:
Exception
- pushed up stack
-
getRevision
public P4SCMRevision getRevision(net.sf.json.JSONObject payload)
A specific revision based on the Event Payload.- Overrides:
getRevision
in classAbstractP4ScmSource
- Parameters:
payload
- JSON payload from an external Event- Returns:
- the change as a P4SCMRevision object or null if no match.
-
findInclude
protected boolean findInclude(String path)
- Overrides:
findInclude
in classAbstractP4ScmSource
-
getWorkspace
public Workspace getWorkspace(P4Path path)
- Specified by:
getWorkspace
in classAbstractP4ScmSource
-
isCategoryEnabled
protected boolean isCategoryEnabled(@NonNull jenkins.scm.api.SCMHeadCategory category)
Description copied from class:AbstractP4ScmSource
Enable specific SCMHeadCategory categories.TagSCMHeadCategory: Branches, Streams, Swarm and Graph ChangeRequestSCMHeadCategory: Swarm and Graph
- Overrides:
isCategoryEnabled
in classAbstractP4ScmSource
- Parameters:
category
- the Category- Returns:
true
if the supplied category is enabled for thisSCMSource
instance.
-
-