Package org.reviewboard.rbjenkins.config
Class ReviewBoardServerConfiguration
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ReviewBoardServerConfiguration>
-
- org.reviewboard.rbjenkins.config.ReviewBoardServerConfiguration
-
- All Implemented Interfaces:
Describable<ReviewBoardServerConfiguration>
public class ReviewBoardServerConfiguration extends AbstractDescribableImpl<ReviewBoardServerConfiguration>
Stores configuration details for a Review Board server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReviewBoardServerConfiguration.DescriptorImpl
Provides the description of the notification build step and validation functions for fields in its configuration form.
-
Constructor Summary
Constructors Constructor Description ReviewBoardServerConfiguration(String reviewBoardURL, String credentialsId)
Constructs the server configuration with the given name, Review Board URL and API token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCredentialsId()
Returns the credentials ID, which is used to store the API token.String
getReviewBoardAPIToken()
Fetch the Review Board API token from the credential provider.String
getReviewBoardURL()
Returns the Review Board endpoint.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
ReviewBoardServerConfiguration
@DataBoundConstructor public ReviewBoardServerConfiguration(String reviewBoardURL, String credentialsId)
Constructs the server configuration with the given name, Review Board URL and API token.- Parameters:
reviewBoardURL
- Review Board server URLcredentialsId
- Credentials identifier
-
-
Method Detail
-
getReviewBoardURL
public String getReviewBoardURL()
Returns the Review Board endpoint. This is required for Jenkins to display the endpoint details in the GUI.- Returns:
- Review Board endpoint
-
getCredentialsId
public String getCredentialsId()
Returns the credentials ID, which is used to store the API token.- Returns:
- Credentials ID
-
getReviewBoardAPIToken
public String getReviewBoardAPIToken()
Fetch the Review Board API token from the credential provider.- Returns:
- The API token, or "UNKNOWN" if not found.
-
-