Class NoWebRepositoryViewer
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
-
- com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
-
- com.atlassian.bamboo.webrepository.AbstractWebRepositoryViewer
-
- com.atlassian.bamboo.webrepository.NoWebRepositoryViewer
-
- All Implemented Interfaces:
ConvertibleFromConfig
,InitablePluginModule
,BambooPluginModule
,BuildConfigurationAwarePlugin
,ConfigurablePlugin
,RenderableBuildConfiguration
,CommitUrlProvider
,WebRepositoryViewer
,Serializable
public class NoWebRepositoryViewer extends AbstractWebRepositoryViewer implements CommitUrlProvider
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PLUGIN_KEY
-
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptor, templateRenderer
-
Fields inherited from interface com.atlassian.bamboo.webrepository.WebRepositoryViewer
SELECTED_WEB_REPOSITORY_VIEWER, WEB_REPOSITORY
-
-
Constructor Summary
Constructors Constructor Description NoWebRepositoryViewer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEditHtml(@NotNull BuildConfiguration buildConfiguration, @Nullable Plan plan)
Returns HTML that represents the form fragment for editing the repository.String
getHtmlForCommitsFull(@NotNull ResultsSummary resultsSummary, @NotNull RepositoryChangeset repositoryChangeset, @NotNull RepositoryData repositoryDefinition)
Renders the html to display the full commits on the changes tab.String
getHtmlForCommitsSummary(@NotNull ResultsSummary resultsSummary, @NotNull RepositoryChangeset repositoryChangeset, @NotNull RepositoryData repositoryData, int maxChanges)
Renders the html to display a summary of the commits on the Build Results Summary tab.String
getViewHtml(@NotNull Plan plan)
Returns the HTML that represents the view of the repository configuration@Nullable String
getWebRepositoryUrlForCommit(Commit commit, @NotNull RepositoryData repositoryData)
Provide the url to link to the given commit in the web repositoryMap<Commit,String>
getWebRepositoryUrlForCommits(Collection<Commit> commits, RepositoryData repositoryDefinition)
Provide the urls to link all the given commits in the web repository@Nullable String
getWebRepositoryUrlForRevision(String revisionId, @NotNull RepositoryData repositoryData)
Provide the url to link to the given revision in the web repository-
Methods inherited from class com.atlassian.bamboo.webrepository.AbstractWebRepositoryViewer
getKey, getName, getShortKey, getSupportedRepositories, populateFromConfig, populateFromParams, toConfiguration
-
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
addDefaultValues, getTemplateRenderer, init, populateContextForEdit, populateContextForView, prepareConfigObject, setTemplateRenderer, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, isConfigurationMissing, prepareConfigObject, validate
-
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
-
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
-
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
-
Methods inherited from interface com.atlassian.bamboo.webrepository.WebRepositoryViewer
getKey, getName, getShortKey, getSupportedRepositories, populateFromParams
-
-
-
-
Field Detail
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHtmlForCommitsFull
public String getHtmlForCommitsFull(@NotNull @NotNull ResultsSummary resultsSummary, @NotNull @NotNull RepositoryChangeset repositoryChangeset, @NotNull @NotNull RepositoryData repositoryDefinition)
Description copied from interface:WebRepositoryViewer
Renders the html to display the full commits on the changes tab.- Specified by:
getHtmlForCommitsFull
in interfaceWebRepositoryViewer
- Parameters:
resultsSummary
- the summary to show commits forrepositoryDefinition
- the commits belong to aka the plans repository- Returns:
- Html to be displayed on the UI in the Changes Tab.
-
getHtmlForCommitsSummary
public String getHtmlForCommitsSummary(@NotNull @NotNull ResultsSummary resultsSummary, @NotNull @NotNull RepositoryChangeset repositoryChangeset, @NotNull @NotNull RepositoryData repositoryData, int maxChanges)
Description copied from interface:WebRepositoryViewer
Renders the html to display a summary of the commits on the Build Results Summary tab.- Specified by:
getHtmlForCommitsSummary
in interfaceWebRepositoryViewer
- Parameters:
resultsSummary
- the summary to show commits forrepositoryData
- the commits belong to aka the plans repositorymaxChanges
- maximum number of commits to be shown. Negative value means that all commits should be shown.- Returns:
- Html to displayed on the UI in the Build Results Summary Tab.
-
getViewHtml
public String getViewHtml(@NotNull @NotNull Plan plan)
Description copied from interface:RenderableBuildConfiguration
Returns the HTML that represents the view of the repository configuration- Specified by:
getViewHtml
in interfaceRenderableBuildConfiguration
- Overrides:
getViewHtml
in classBaseBuildConfigurationAwarePlugin
- Parameters:
plan
- for which view HTML has to be rendered.- Returns:
- HTML string. May be null.
-
getEditHtml
public String getEditHtml(@NotNull @NotNull BuildConfiguration buildConfiguration, @Nullable @Nullable Plan plan)
Description copied from interface:RenderableBuildConfiguration
Returns HTML that represents the form fragment for editing the repository. No opening and closing form tags are required.- Specified by:
getEditHtml
in interfaceRenderableBuildConfiguration
- Overrides:
getEditHtml
in classBaseBuildConfigurationAwarePlugin
- Parameters:
buildConfiguration
-BuildConfiguration
for which edit HTML has to be rendered.plan
-Plan
for which edit HTML has to be rendered. May be null during creation phase of plan.- Returns:
- HTML string. May be null.
-
getWebRepositoryUrlForCommit
@Nullable public @Nullable String getWebRepositoryUrlForCommit(Commit commit, @NotNull @NotNull RepositoryData repositoryData)
Description copied from interface:CommitUrlProvider
Provide the url to link to the given commit in the web repository- Specified by:
getWebRepositoryUrlForCommit
in interfaceCommitUrlProvider
- Parameters:
commit
- the commit to links torepositoryData
- the repository type the commit came from- Returns:
- a full url string.
-
getWebRepositoryUrlForRevision
@Nullable public @Nullable String getWebRepositoryUrlForRevision(String revisionId, @NotNull @NotNull RepositoryData repositoryData)
Description copied from interface:CommitUrlProvider
Provide the url to link to the given revision in the web repository- Specified by:
getWebRepositoryUrlForRevision
in interfaceCommitUrlProvider
- Parameters:
revisionId
- the revision to links torepositoryData
- the repository type the commit came from- Returns:
- a full url string.
-
getWebRepositoryUrlForCommits
public Map<Commit,String> getWebRepositoryUrlForCommits(Collection<Commit> commits, RepositoryData repositoryDefinition)
Description copied from interface:CommitUrlProvider
Provide the urls to link all the given commits in the web repository- Specified by:
getWebRepositoryUrlForCommits
in interfaceCommitUrlProvider
- Parameters:
commits
- to generate links forrepositoryDefinition
- the repository type the commit came from- Returns:
- a map of the commit to its url.
-
-