Class BitbucketServerConfiguration
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<BitbucketServerConfiguration>
-
- com.atlassian.bitbucket.jenkins.internal.config.BitbucketServerConfiguration
-
- All Implemented Interfaces:
Describable<BitbucketServerConfiguration>
public class BitbucketServerConfiguration extends AbstractDescribableImpl<BitbucketServerConfiguration>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BitbucketServerConfiguration.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description BitbucketServerConfiguration(String adminCredentialsId, String baseUrl, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAdminCredentialsId()
String
getBaseUrl()
Returns the URL location of the server instanceGlobalCredentialsProvider
getGlobalCredentialsProvider(Item item)
For a given item, returns a global credential provider.GlobalCredentialsProvider
getGlobalCredentialsProvider(String context)
Similar togetGlobalCredentialsProvider(Item)
but without item.String
getId()
String
getServerName()
Returns the name assigned to the server in Jenkinsvoid
setBaseUrl(String baseUrl)
Sets the URL location of the server instancevoid
setServerName(String serverName)
Sets the name assigned to the server in JenkinsFormValidation
validate()
Checks that the configuration is valid-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
getGlobalCredentialsProvider
public GlobalCredentialsProvider getGlobalCredentialsProvider(Item item)
For a given item, returns a global credential provider. The credentials are tracked and this should be the only way to fetch credentials.- Parameters:
item
- which will use the credential.- Returns:
- credential provider
-
getGlobalCredentialsProvider
public GlobalCredentialsProvider getGlobalCredentialsProvider(String context)
Similar togetGlobalCredentialsProvider(Item)
but without item. This is usually a case when fetching credentials as part of `doFill` methods.- Parameters:
context
- a context which will be logged- Returns:
- credential provider
-
getAdminCredentialsId
public String getAdminCredentialsId()
-
getBaseUrl
public String getBaseUrl()
Returns the URL location of the server instance- Returns:
- the bitbucket server base URL
-
setBaseUrl
@DataBoundSetter public void setBaseUrl(String baseUrl)
Sets the URL location of the server instance- Parameters:
baseUrl
- the Bitbucket Server base URL
-
getId
public String getId()
-
getServerName
@Nullable public String getServerName()
Returns the name assigned to the server in Jenkins- Returns:
- the server name
-
setServerName
@DataBoundSetter public void setServerName(String serverName)
Sets the name assigned to the server in Jenkins- Parameters:
serverName
- the server name
-
validate
public FormValidation validate()
Checks that the configuration is valid- Returns:
- true if valid; false otherwise
-
-