Package com.google.gerrit.server
Class WebLinks
- java.lang.Object
-
- com.google.gerrit.server.WebLinks
-
public class WebLinks extends Object
-
-
Constructor Summary
Constructors Constructor Description WebLinks(DynamicSet<PatchSetWebLink> patchSetLinks, DynamicSet<ParentWebLink> parentLinks, DynamicSet<FileWebLink> fileLinks, DynamicSet<FileHistoryWebLink> fileLogLinks, DynamicSet<DiffWebLink> diffLinks, DynamicSet<ProjectWebLink> projectLinks, DynamicSet<BranchWebLink> branchLinks, DynamicSet<TagWebLink> tagLinks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<WebLinkInfo>
getBranchLinks(String project, String branch)
com.google.common.collect.ImmutableList<DiffWebLinkInfo>
getDiffLinks(String project, int changeId, Integer patchSetIdA, String revisionA, String fileA, int patchSetIdB, String revisionB, String fileB)
com.google.common.collect.ImmutableList<WebLinkInfo>
getFileHistoryLinks(String project, String revision, String file)
com.google.common.collect.ImmutableList<WebLinkInfo>
getFileLinks(String project, String revision, String file)
com.google.common.collect.ImmutableList<WebLinkInfo>
getParentLinks(Project.NameKey project, String revision, String commitMessage, String branchName)
com.google.common.collect.ImmutableList<WebLinkInfo>
getPatchSetLinks(Project.NameKey project, String commit, String commitMessage, String branchName)
com.google.common.collect.ImmutableList<WebLinkInfo>
getProjectLinks(String project)
com.google.common.collect.ImmutableList<WebLinkInfo>
getTagLinks(String project, String tag)
-
-
-
Constructor Detail
-
WebLinks
@Inject public WebLinks(DynamicSet<PatchSetWebLink> patchSetLinks, DynamicSet<ParentWebLink> parentLinks, DynamicSet<FileWebLink> fileLinks, DynamicSet<FileHistoryWebLink> fileLogLinks, DynamicSet<DiffWebLink> diffLinks, DynamicSet<ProjectWebLink> projectLinks, DynamicSet<BranchWebLink> branchLinks, DynamicSet<TagWebLink> tagLinks)
-
-
Method Detail
-
getPatchSetLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getPatchSetLinks(Project.NameKey project, String commit, String commitMessage, String branchName)
- Parameters:
project
- Project name.commit
- SHA1 of commit.commitMessage
- the commit message of the commit.branchName
- branch of the commit.- Returns:
- Links for patch sets.
-
getParentLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getParentLinks(Project.NameKey project, String revision, String commitMessage, String branchName)
- Parameters:
project
- Project name.revision
- SHA1 of the parent revision.commitMessage
- the commit message of the parent revision.branchName
- branch of the revision (and parent revision).- Returns:
- Links for patch sets.
-
getFileLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getFileLinks(String project, String revision, String file)
- Parameters:
project
- Project name.revision
- SHA1 of revision.file
- File name.- Returns:
- Links for files.
-
getFileHistoryLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getFileHistoryLinks(String project, String revision, String file)
- Parameters:
project
- Project name.revision
- SHA1 of revision.file
- File name.- Returns:
- Links for file history
-
getDiffLinks
public com.google.common.collect.ImmutableList<DiffWebLinkInfo> getDiffLinks(String project, int changeId, Integer patchSetIdA, String revisionA, String fileA, int patchSetIdB, String revisionB, String fileB)
- Parameters:
project
- Project name.patchSetIdA
- Patch set ID of side A,null
if no base patch set was selected.revisionA
- SHA1 of revision of side A.fileA
- File name of side A.patchSetIdB
- Patch set ID of side B.revisionB
- SHA1 of revision of side B.fileB
- File name of side B.- Returns:
- Links for file diffs.
-
getProjectLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getProjectLinks(String project)
- Parameters:
project
- Project name.- Returns:
- Links for projects.
-
getBranchLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getBranchLinks(String project, String branch)
- Parameters:
project
- Project namebranch
- Branch name- Returns:
- Links for branches.
-
getTagLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getTagLinks(String project, String tag)
- Parameters:
project
- Project nametag
- Tag name- Returns:
- Links for tags.
-
-