public class FisheyeWebRepositoryViewer extends AbstractWebRepositoryViewer implements DeploymentsAwareCommitUrlProvider
| Modifier and Type | Field and Description |
|---|---|
protected static String |
FISHEYE_REPOSITORY_NAME |
protected static String |
FISHEYE_REPOSITORY_PATH |
protected static String |
FISHEYE_REPOSITORY_URL |
moduleDescriptor, templateRendererSELECTED_WEB_REPOSITORY_VIEWER, WEB_REPOSITORY| Constructor and Description |
|---|
FisheyeWebRepositoryViewer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getHtmlForCommitsFull(ResultsSummary resultsSummary,
RepositoryChangeset repositoryChangeset,
RepositoryData repositoryData)
Renders the html to display the full commits on the changes tab.
|
String |
getHtmlForCommitsSummary(ResultsSummary resultsSummary,
RepositoryChangeset repositoryChangeset,
RepositoryData repositoryData,
int maxChanges)
Renders the html to display a summary of the commits on the Build Results Summary tab.
|
Collection<String> |
getSupportedRepositories()
The keys for the
Repository classes that the web viewer currently supports. |
String |
getWebRepositoryPath() |
String |
getWebRepositoryRepoName() |
String |
getWebRepositoryUrl() |
String |
getWebRepositoryUrlForCommit(Commit commit,
RepositoryData repositoryData)
Provide the url to link to the given commit in the web repository
|
Map<Commit,String> |
getWebRepositoryUrlForCommits(Collection<Commit> commits,
RepositoryData repositoryData)
Provide the urls to link all the given commits in the web repository
|
Map<DeploymentVersionVcsCommit,String> |
getWebRepositoryUrlForDeploymentVersionCommits(Collection<DeploymentVersionVcsCommit> commits,
RepositoryData repositoryData)
Provide the urls to link all the given commits in the web repository
|
String |
getWebRepositoryUrlForDiff(CommitFile file,
RepositoryData repositoryData) |
String |
getWebRepositoryUrlForFile(CommitFile file,
RepositoryData repositoryData)
Generate the link to a given file in a given repository
|
String |
getWebRepositoryUrlForRevision(CommitFile file,
RepositoryData repositoryData) |
String |
getWebRepositoryUrlForRevision(String revisionId,
RepositoryData repositoryData)
Provide the url to link to the given revision in the web repository
|
Map<String,String> |
getWebRepositoryUrlForRevisions(Collection<String> revisions,
RepositoryData repositoryData) |
void |
populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in the
HierarchicalConfiguration |
void |
populateFromParams(ActionParametersMap params)
takes the map of config data from action and extracts the parameters it needs
|
void |
setCustomVariableContext(CustomVariableContext customVariableContext) |
void |
setWebRepositoryPath(String webRepositoryPath) |
void |
setWebRepositoryRepoName(String webRepositoryRepoName) |
void |
setWebRepositoryUrl(String webRepositoryUrl) |
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Generate a
HierarchicalConfiguration from the current state of the object |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the
BuildConfiguration object. |
getKey, getName, getShortKeycustomizeBuildRequirements, removeBuildRequirementsaddDefaultValues, getEditHtml, getViewHtml, init, populateContextForEdit, populateContextForView, prepareConfigObject, setTemplateRendererclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKey, getName, getShortKeycustomizeBuildRequirements, removeBuildRequirementsaddDefaultValues, isConfigurationMissing, prepareConfigObjectinitgetEditHtml, getViewHtmlprotected static final String FISHEYE_REPOSITORY_URL
protected static final String FISHEYE_REPOSITORY_NAME
protected static final String FISHEYE_REPOSITORY_PATH
@NotNull public Collection<String> getSupportedRepositories()
WebRepositoryViewerRepository classes that the web viewer currently supports.
If list is empty or null it assumes support for all repositories.getSupportedRepositories in interface WebRepositoryViewergetSupportedRepositories in class AbstractWebRepositoryViewerpublic String getHtmlForCommitsFull(@NotNull ResultsSummary resultsSummary, @NotNull RepositoryChangeset repositoryChangeset, @NotNull RepositoryData repositoryData)
WebRepositoryViewergetHtmlForCommitsFull in interface WebRepositoryViewerresultsSummary - the summary to show commits forrepositoryData - the commits belong to aka the plans repositorypublic String getHtmlForCommitsSummary(@NotNull ResultsSummary resultsSummary, @NotNull RepositoryChangeset repositoryChangeset, @NotNull RepositoryData repositoryData, int maxChanges)
WebRepositoryViewergetHtmlForCommitsSummary in interface WebRepositoryViewerresultsSummary - 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.public void populateFromParams(@NotNull
ActionParametersMap params)
AbstractWebRepositoryViewerpopulateFromParams in interface WebRepositoryViewerpopulateFromParams in class AbstractWebRepositoryViewerparams - map of key (String), value (String []) pairs from actionpublic void populateFromConfig(@NotNull
org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfigHierarchicalConfigurationpopulateFromConfig in interface ConvertibleFromConfigpopulateFromConfig in class AbstractWebRepositoryViewer@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfigHierarchicalConfiguration from the current state of the objecttoConfiguration in interface ConvertibleFromConfigtoConfiguration in class AbstractWebRepositoryViewerHierarchicalConfiguration. Never null@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginBuildConfiguration object. The name of the properties match those passed
in through the form fragments in RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) template.validate in interface BuildConfigurationAwarePluginvalidate in class BaseBuildConfigurationAwarePluginbuildConfiguration - -ErrorCollection keyed by the field name.@Nullable public String getWebRepositoryUrlForFile(@NotNull CommitFile file, RepositoryData repositoryData)
file - The file we want to link to.repositoryData - For the build (and hense the repository file belongs to).@Nullable public String getWebRepositoryUrlForRevision(CommitFile file, RepositoryData repositoryData)
@Nullable public String getWebRepositoryUrlForDiff(CommitFile file, RepositoryData repositoryData)
public Map<Commit,String> getWebRepositoryUrlForCommits(Collection<Commit> commits, RepositoryData repositoryData)
CommitUrlProvidergetWebRepositoryUrlForCommits in interface CommitUrlProvidercommits - to generate links forrepositoryData - the repository type the commit came frompublic Map<DeploymentVersionVcsCommit,String> getWebRepositoryUrlForDeploymentVersionCommits(Collection<DeploymentVersionVcsCommit> commits, RepositoryData repositoryData)
DeploymentsAwareCommitUrlProvidergetWebRepositoryUrlForDeploymentVersionCommits in interface DeploymentsAwareCommitUrlProvidercommits - to generate links forrepositoryData - the repository the commit came from@Nullable public String getWebRepositoryUrlForCommit(Commit commit, @NotNull RepositoryData repositoryData)
CommitUrlProvidergetWebRepositoryUrlForCommit in interface CommitUrlProvidercommit - the commit to links torepositoryData - the repository type the commit came from@Nullable public String getWebRepositoryUrlForRevision(String revisionId, @NotNull RepositoryData repositoryData)
CommitUrlProvidergetWebRepositoryUrlForRevision in interface CommitUrlProviderrevisionId - the revision to links torepositoryData - the repository type the commit came frompublic Map<String,String> getWebRepositoryUrlForRevisions(Collection<String> revisions, RepositoryData repositoryData)
public String getWebRepositoryUrl()
public void setWebRepositoryUrl(@Nullable
String webRepositoryUrl)
public String getWebRepositoryPath()
public void setWebRepositoryPath(@Nullable
String webRepositoryPath)
public String getWebRepositoryRepoName()
public void setWebRepositoryRepoName(@Nullable
String webRepositoryRepoName)
public void setCustomVariableContext(CustomVariableContext customVariableContext)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.