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 classBitbucketSCMSource.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 voidafterSave()SCMbuild(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision)protected jenkins.scm.api.SCMProbecreateProbe(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision)BitbucketSCMRepositorygetBitbucketSCMRepository()Optional<com.cloudbees.plugins.credentials.Credentials>getCredentials()StringgetCredentialsId()StringgetMirrorName()StringgetProjectKey()StringgetProjectName()StringgetRemote()StringgetRepositoryName()StringgetRepositorySlug()StringgetServerId()StringgetSshCredentialsId()List<jenkins.scm.api.trait.SCMSourceTrait>getTraits()booleanisEventApplicable(jenkins.scm.api.SCMHeadEvent<?> event)booleanisValid()booleanisWebhookRegistered()protected ObjectreadResolve()This method gets invoked by XStream after theBitbucketSCMSourceobject is unmarshalled.protected jenkins.scm.api.SCMRevisionretrieve(jenkins.scm.api.SCMHead head, TaskListener listener)protected voidretrieve(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)voidsetWebhookRegistered(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:
afterSavein classjenkins.scm.api.SCMSource
-
build
public SCM build(jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision)
- Specified by:
buildin 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:
getTraitsin 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:
createProbein classjenkins.scm.api.SCMSource- Throws:
IOException
-
readResolve
protected Object readResolve()
This method gets invoked by XStream after theBitbucketSCMSourceobject 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:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieve
protected jenkins.scm.api.SCMRevision retrieve(jenkins.scm.api.SCMHead head, TaskListener listener) throws IOException, InterruptedException- Overrides:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieveActions
protected List<Action> retrieveActions(jenkins.scm.api.SCMSourceEvent event, TaskListener listener) throws IOException, InterruptedException
- Overrides:
retrieveActionsin classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieveActions
protected List<Action> retrieveActions(jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMHeadEvent event, TaskListener listener) throws IOException, InterruptedException
- Overrides:
retrieveActionsin classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
-