com.atlassian.bamboo.repository
Class ViewCvsFileLinkGenerator

java.lang.Object
  extended by com.atlassian.bamboo.repository.ViewCvsFileLinkGenerator
All Implemented Interfaces:
WebRepositoryViewer

public class ViewCvsFileLinkGenerator
extends java.lang.Object
implements WebRepositoryViewer

This class provides generates the viewcvs url for a given file


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.repository.WebRepositoryViewer
CVS_REPO_TYPE, PERFORCE_REPO_TYPE, SVN_REPO_TYPE
 
Constructor Summary
ViewCvsFileLinkGenerator(java.lang.String repositoryBaseUrl)
           
 
Method Summary
 java.lang.String getWebRepositoryUrlForCommit(Commit commit, java.lang.String repositoryName, java.lang.String repositoryType)
           
 java.lang.String getWebRepositoryUrlForDiff(CommitFile file, java.lang.String repositoryName, java.lang.String repositoryType)
           
 java.lang.String getWebRepositoryUrlForFile(CommitFile file, java.lang.String repositoryName, java.lang.String repositoryType)
          Generate the link to a given file in a given repository
 java.lang.String getWebRepositoryUrlForRevision(CommitFile file, java.lang.String repositoryName, java.lang.String repositoryType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewCvsFileLinkGenerator

public ViewCvsFileLinkGenerator(java.lang.String repositoryBaseUrl)
Method Detail

getWebRepositoryUrlForFile

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

Specified by:
getWebRepositoryUrlForFile in interface WebRepositoryViewer
Parameters:
file - The file we want to link to.
repositoryName - An optional repository. This is used when the viewcvs baseurl points to a multi-build repository
repositoryType - One of IS_CVS_REPO_LINK or SVN_REPO_TYPE.
Returns:
The url

getWebRepositoryUrlForRevision

public java.lang.String getWebRepositoryUrlForRevision(CommitFile file,
                                                       java.lang.String repositoryName,
                                                       java.lang.String repositoryType)

getWebRepositoryUrlForDiff

public java.lang.String getWebRepositoryUrlForDiff(CommitFile file,
                                                   java.lang.String repositoryName,
                                                   java.lang.String repositoryType)

getWebRepositoryUrlForCommit

public java.lang.String getWebRepositoryUrlForCommit(Commit commit,
                                                     java.lang.String repositoryName,
                                                     java.lang.String repositoryType)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.