Class BitbucketSCMSource
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
-
- jenkins.scm.api.SCMSource
-
- com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.SCMSource>
public class BitbucketSCMSource extends jenkins.scm.api.SCMSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BitbucketSCMSource.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
-
-
Constructor Summary
Constructors Constructor Description BitbucketSCMSource(BitbucketSCMSource oldScm)
Regenerate SCM by looking up new repo URLs etc.BitbucketSCMSource(String id, String credentialsId, String sshCredentialsId, List<jenkins.scm.api.trait.SCMSourceTrait> traits, String projectName, String repositoryName, String serverId, String mirrorName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterSave()
SCM
build(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision)
protected jenkins.scm.api.SCMProbe
createProbe(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision)
BitbucketSCMRepository
getBitbucketSCMRepository()
Optional<com.cloudbees.plugins.credentials.Credentials>
getCredentials()
String
getCredentialsId()
String
getMirrorName()
String
getProjectKey()
String
getProjectName()
String
getRemote()
String
getRepositoryName()
String
getRepositorySlug()
String
getServerId()
String
getSshCredentialsId()
List<jenkins.scm.api.trait.SCMSourceTrait>
getTraits()
boolean
isEventApplicable(jenkins.scm.api.SCMHeadEvent<?> event)
boolean
isValid()
boolean
isWebhookRegistered()
protected Object
readResolve()
This method gets invoked by XStream after theBitbucketSCMSource
object is unmarshalled.protected jenkins.scm.api.SCMRevision
retrieve(jenkins.scm.api.SCMHead head, TaskListener listener)
protected void
retrieve(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener)
protected List<Action>
retrieveActions(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, TaskListener listener)
protected List<Action>
retrieveActions(jenkins.scm.api.SCMSourceEvent event, TaskListener listener)
void
setWebhookRegistered(boolean webhookRegistered)
-
Methods inherited from class jenkins.scm.api.SCMSource
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, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveActions, retrieveRevisions, retrieveRevisions, setId, setOwner, setTraits, toString, withId
-
-
-
-
Constructor Detail
-
BitbucketSCMSource
@DataBoundConstructor public BitbucketSCMSource(@CheckForNull String id, @CheckForNull String credentialsId, @CheckForNull String sshCredentialsId, @CheckForNull List<jenkins.scm.api.trait.SCMSourceTrait> traits, @CheckForNull String projectName, @CheckForNull String repositoryName, @CheckForNull String serverId, @CheckForNull String mirrorName)
-
BitbucketSCMSource
public BitbucketSCMSource(BitbucketSCMSource oldScm)
Regenerate SCM by looking up new repo URLs etc.- Parameters:
oldScm
- old scm to copy values from
-
-
Method Detail
-
afterSave
public void afterSave()
- Overrides:
afterSave
in classjenkins.scm.api.SCMSource
-
build
public SCM build(jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision)
- Specified by:
build
in classjenkins.scm.api.SCMSource
-
getBitbucketSCMRepository
public BitbucketSCMRepository getBitbucketSCMRepository()
-
getCredentials
public Optional<com.cloudbees.plugins.credentials.Credentials> getCredentials()
-
getCredentialsId
@CheckForNull public String getCredentialsId()
-
getMirrorName
public String getMirrorName()
-
getProjectKey
public String getProjectKey()
-
getProjectName
public String getProjectName()
-
getRemote
public String getRemote()
-
getRepositoryName
public String getRepositoryName()
-
getRepositorySlug
public String getRepositorySlug()
-
getServerId
@CheckForNull public String getServerId()
-
getSshCredentialsId
@CheckForNull public String getSshCredentialsId()
-
getTraits
public List<jenkins.scm.api.trait.SCMSourceTrait> getTraits()
- Overrides:
getTraits
in classjenkins.scm.api.SCMSource
-
isEventApplicable
public boolean isEventApplicable(@CheckForNull jenkins.scm.api.SCMHeadEvent<?> event)
-
isValid
public boolean isValid()
-
isWebhookRegistered
public boolean isWebhookRegistered()
-
setWebhookRegistered
public void setWebhookRegistered(boolean webhookRegistered)
-
createProbe
protected jenkins.scm.api.SCMProbe createProbe(jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision) throws IOException
- Overrides:
createProbe
in classjenkins.scm.api.SCMSource
- Throws:
IOException
-
readResolve
protected Object readResolve()
This method gets invoked by XStream after theBitbucketSCMSource
object is unmarshalled.
-
retrieve
protected void retrieve(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, @CheckForNull jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener) throws IOException, InterruptedException
- Specified by:
retrieve
in classjenkins.scm.api.SCMSource
- Throws:
IOException
InterruptedException
-
retrieve
protected jenkins.scm.api.SCMRevision retrieve(jenkins.scm.api.SCMHead head, TaskListener listener) throws IOException, InterruptedException
- Overrides:
retrieve
in classjenkins.scm.api.SCMSource
- Throws:
IOException
InterruptedException
-
retrieveActions
protected List<Action> retrieveActions(jenkins.scm.api.SCMSourceEvent event, TaskListener listener) throws IOException, InterruptedException
- Overrides:
retrieveActions
in classjenkins.scm.api.SCMSource
- Throws:
IOException
InterruptedException
-
retrieveActions
protected List<Action> retrieveActions(jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMHeadEvent event, TaskListener listener) throws IOException, InterruptedException
- Overrides:
retrieveActions
in classjenkins.scm.api.SCMSource
- Throws:
IOException
InterruptedException
-
-