com.atlassian.bamboo.webrepository.fisheye
Class FisheyeWebRepositoryViewer

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
      extended by com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
          extended by com.atlassian.bamboo.webrepository.AbstractWebRepositoryViewer
              extended by com.atlassian.bamboo.webrepository.fisheye.FisheyeWebRepositoryViewer
All Implemented Interfaces:
ConvertibleFromConfig, InitablePluginModule, BambooPluginModule, BuildConfigurationAwarePlugin, ConfigurablePlugin, RenderableBuildConfiguration, CommitUrlProvider, WebRepositoryViewer, java.io.Serializable
Direct Known Subclasses:
AppLinksWebRepositoryViewer

public class FisheyeWebRepositoryViewer
extends AbstractWebRepositoryViewer
implements CommitUrlProvider

URL FORMATS: file https://atlaseye.atlassian.com/browse/bamboo/branches/atlassian_bamboo_2_4_branch/atlassian-ide-plugin.shared.xml#r68584 url/browse/reponame/file~ revision https://atlaseye.atlassian.com/browse/bamboo/trunk/atlassian-ide-plugin.shared.xml?r=68584 url/browse/reponame/file?r=XXX diff https://atlaseye.atlassian.com/browse/bamboo/trunk/atlassian-ide-plugin.shared.xml?r2=68584&r1=68581 url/browse/reponame/file?r2=XX&r1=YYY -- is this working for perforce yet? - no. need to use blank, however this only works in some versions of fisheye changeset https://atlaseye.atlassian.com/changelog/bamboo?cs=68584 url/changelog/reponame?cs=blah

See Also:
Serialized Form

Field Summary
protected static java.lang.String FISHEYE_REPOSITORY_NAME
           
protected static java.lang.String FISHEYE_REPOSITORY_PATH
           
protected static java.lang.String FISHEYE_REPOSITORY_URL
           
 
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
FisheyeWebRepositoryViewer()
           
 
Method Summary
 java.lang.String getHtmlForCommitsFull(ResultsSummary resultsSummary, RepositoryChangeset repositoryChangeset, RepositoryData repositoryData)
          Renders the html to display the full commits on the changes tab.
 java.lang.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.
 java.util.Collection<java.lang.String> getSupportedRepositories()
          The keys for the Repository classes that the web viewer currently supports.
 java.lang.String getWebRepositoryPath()
           
 java.lang.String getWebRepositoryRepoName()
           
 java.lang.String getWebRepositoryUrl()
           
 java.lang.String getWebRepositoryUrlForCommit(Commit commit, RepositoryData repositoryData)
          Provide the url to link to the given commit in the web repository
 java.util.Map<Commit,java.lang.String> getWebRepositoryUrlForCommits(java.util.Collection<Commit> commits, RepositoryData repositoryData)
          Provide the urls to link all the given commits in the web repository
 java.lang.String getWebRepositoryUrlForDiff(CommitFile file, RepositoryData repositoryData)
           
 java.lang.String getWebRepositoryUrlForFile(CommitFile file, RepositoryData repositoryData)
          Generate the link to a given file in a given repository
 java.lang.String getWebRepositoryUrlForRevision(CommitFile file, RepositoryData repositoryData)
           
 java.lang.String getWebRepositoryUrlForRevision(java.lang.String revisionId, RepositoryData repositoryData)
          Provide the url to link to the given revision in the web repository
 java.util.Map<java.lang.String,java.lang.String> getWebRepositoryUrlForRevisions(java.util.Collection<java.lang.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(java.lang.String webRepositoryPath)
           
 void setWebRepositoryRepoName(java.lang.String webRepositoryRepoName)
           
 void setWebRepositoryUrl(java.lang.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.
 
Methods inherited from class com.atlassian.bamboo.webrepository.AbstractWebRepositoryViewer
getKey, getName, getShortKey
 
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
customizeBuildRequirements, customizeBuildRequirements, removeBuildRequirements, removeBuildRequirements
 
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
addDefaultValues, getEditHtml, getViewHtml, init, isConfigurationMissing, populateContextForEdit, populateContextForView, prepareConfigObject, setTemplateRenderer
 
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.webrepository.WebRepositoryViewer
getKey, getName, getShortKey
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, prepareConfigObject
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
 

Field Detail

FISHEYE_REPOSITORY_URL

protected static final java.lang.String FISHEYE_REPOSITORY_URL
See Also:
Constant Field Values

FISHEYE_REPOSITORY_NAME

protected static final java.lang.String FISHEYE_REPOSITORY_NAME
See Also:
Constant Field Values

FISHEYE_REPOSITORY_PATH

protected static final java.lang.String FISHEYE_REPOSITORY_PATH
See Also:
Constant Field Values
Constructor Detail

FisheyeWebRepositoryViewer

public FisheyeWebRepositoryViewer()
Method Detail

getSupportedRepositories

@NotNull
public java.util.Collection<java.lang.String> getSupportedRepositories()
Description copied from interface: WebRepositoryViewer
The keys for the Repository classes that the web viewer currently supports. If list is empty or null it assumes support for all repositories.

Specified by:
getSupportedRepositories in interface WebRepositoryViewer
Overrides:
getSupportedRepositories in class AbstractWebRepositoryViewer
Returns:
a list of repositories which can be rendered by this WebRepositoryViewer.

getHtmlForCommitsFull

public java.lang.String getHtmlForCommitsFull(@NotNull
                                              ResultsSummary resultsSummary,
                                              @NotNull
                                              RepositoryChangeset repositoryChangeset,
                                              @NotNull
                                              RepositoryData repositoryData)
Description copied from interface: WebRepositoryViewer
Renders the html to display the full commits on the changes tab.

Specified by:
getHtmlForCommitsFull in interface WebRepositoryViewer
Overrides:
getHtmlForCommitsFull in class AbstractWebRepositoryViewer
Parameters:
resultsSummary - the summary to show commits for
repositoryData - the commits belong to aka the plans repository
Returns:
Html to be displayed on the UI in the Changes Tab.

getHtmlForCommitsSummary

public java.lang.String getHtmlForCommitsSummary(@NotNull
                                                 ResultsSummary resultsSummary,
                                                 @NotNull
                                                 RepositoryChangeset repositoryChangeset,
                                                 @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 interface WebRepositoryViewer
Overrides:
getHtmlForCommitsSummary in class AbstractWebRepositoryViewer
Parameters:
resultsSummary - the summary to show commits for
repositoryData - the commits belong to aka the plans repository
maxChanges - 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.

populateFromParams

public void populateFromParams(@NotNull
                               ActionParametersMap params)
Description copied from class: AbstractWebRepositoryViewer
takes the map of config data from action and extracts the parameters it needs

Specified by:
populateFromParams in interface WebRepositoryViewer
Overrides:
populateFromParams in class AbstractWebRepositoryViewer
Parameters:
params - map of key (String), value (String []) pairs from action

populateFromConfig

public void populateFromConfig(@NotNull
                               org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface: ConvertibleFromConfig
Update the current object with data in the HierarchicalConfiguration

Specified by:
populateFromConfig in interface ConvertibleFromConfig
Overrides:
populateFromConfig in class AbstractWebRepositoryViewer

toConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface: ConvertibleFromConfig
Generate a HierarchicalConfiguration from the current state of the object

Specified by:
toConfiguration in interface ConvertibleFromConfig
Overrides:
toConfiguration in class AbstractWebRepositoryViewer
Returns:
Always returns an HierarchicalConfiguration. Never null

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        BuildConfiguration buildConfiguration)
Description copied from interface: BuildConfigurationAwarePlugin
Validates the properties in the BuildConfiguration 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.

Specified by:
validate in interface BuildConfigurationAwarePlugin
Overrides:
validate in class BaseBuildConfigurationAwarePlugin
Parameters:
buildConfiguration - - @NotNull
Returns:
ErrorCollection keyed by the field name. @NotNull

getWebRepositoryUrlForFile

@Nullable
public java.lang.String getWebRepositoryUrlForFile(@NotNull
                                                            CommitFile file,
                                                            RepositoryData repositoryData)
Generate the link to a given file in a given repository

Parameters:
file - The file we want to link to.
repositoryData - For the build (and hense the repository file belongs to).
Returns:
The url

getWebRepositoryUrlForRevision

@Nullable
public java.lang.String getWebRepositoryUrlForRevision(CommitFile file,
                                                                RepositoryData repositoryData)

getWebRepositoryUrlForDiff

@Nullable
public java.lang.String getWebRepositoryUrlForDiff(CommitFile file,
                                                            RepositoryData repositoryData)

getWebRepositoryUrlForCommits

public java.util.Map<Commit,java.lang.String> getWebRepositoryUrlForCommits(java.util.Collection<Commit> commits,
                                                                            RepositoryData repositoryData)
Description copied from interface: CommitUrlProvider
Provide the urls to link all the given commits in the web repository

Specified by:
getWebRepositoryUrlForCommits in interface CommitUrlProvider
Parameters:
commits - to generate links for
repositoryData - the repository type the commit came from
Returns:
a map of the commit to its url.

getWebRepositoryUrlForCommit

@Nullable
public java.lang.String getWebRepositoryUrlForCommit(Commit commit,
                                                              @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 interface CommitUrlProvider
Parameters:
commit - the commit to links to
repositoryData - the repository type the commit came from
Returns:
a full url string.

getWebRepositoryUrlForRevision

@Nullable
public java.lang.String getWebRepositoryUrlForRevision(java.lang.String revisionId,
                                                                @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 interface CommitUrlProvider
Parameters:
revisionId - the revision to links to
repositoryData - the repository type the commit came from
Returns:
a full url string.

getWebRepositoryUrlForRevisions

public java.util.Map<java.lang.String,java.lang.String> getWebRepositoryUrlForRevisions(java.util.Collection<java.lang.String> revisions,
                                                                                        RepositoryData repositoryData)

getWebRepositoryUrl

public java.lang.String getWebRepositoryUrl()

setWebRepositoryUrl

public void setWebRepositoryUrl(@Nullable
                                java.lang.String webRepositoryUrl)

getWebRepositoryPath

public java.lang.String getWebRepositoryPath()

setWebRepositoryPath

public void setWebRepositoryPath(@Nullable
                                 java.lang.String webRepositoryPath)

getWebRepositoryRepoName

public java.lang.String getWebRepositoryRepoName()

setWebRepositoryRepoName

public void setWebRepositoryRepoName(@Nullable
                                     java.lang.String webRepositoryRepoName)

setCustomVariableContext

public void setCustomVariableContext(CustomVariableContext customVariableContext)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.