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<ResolveConflictsWebLink> resolveConflictsLinks, DynamicSet<ParentWebLink> parentLinks, DynamicSet<EditWebLink> editLinks, 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)
Returns links for branchescom.google.common.collect.ImmutableList<DiffWebLinkInfo>
getDiffLinks(String project, int changeId, Integer patchSetIdA, String revisionA, String fileA, int patchSetIdB, String revisionB, String fileB)
Returns links for file diffscom.google.common.collect.ImmutableList<WebLinkInfo>
getEditLinks(String project, String revision, String file)
Returns links for editingcom.google.common.collect.ImmutableList<WebLinkInfo>
getFileHistoryLinks(String project, String revision, String file)
Returns links for file historycom.google.common.collect.ImmutableList<WebLinkInfo>
getFileLinks(String project, String revision, String hash, String file)
Returns links for filescom.google.common.collect.ImmutableList<WebLinkInfo>
getParentLinks(Project.NameKey project, String revision, String commitMessage, String branchName)
Returns links for patch setscom.google.common.collect.ImmutableList<WebLinkInfo>
getPatchSetLinks(Project.NameKey project, String commit, String commitMessage, String branchName, String changeKey)
Returns links for patch setscom.google.common.collect.ImmutableList<WebLinkInfo>
getProjectLinks(String project)
Returns links for projectscom.google.common.collect.ImmutableList<WebLinkInfo>
getResolveConflictsLinks(Project.NameKey project, String commit, String commitMessage, String branchName)
Returns links for resolving conflictscom.google.common.collect.ImmutableList<WebLinkInfo>
getTagLinks(String project, String tag)
Returns links for the tag
-
-
-
Constructor Detail
-
WebLinks
@Inject public WebLinks(DynamicSet<PatchSetWebLink> patchSetLinks, DynamicSet<ResolveConflictsWebLink> resolveConflictsLinks, DynamicSet<ParentWebLink> parentLinks, DynamicSet<EditWebLink> editLinks, 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, String changeKey)
Returns links for patch sets- Parameters:
project
- Project name.commit
- SHA1 of commit.commitMessage
- the commit message of the commit.branchName
- branch of the commit.changeKey
- change Identifier for this change
-
getResolveConflictsLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getResolveConflictsLinks(Project.NameKey project, String commit, String commitMessage, String branchName)
Returns links for resolving conflicts- Parameters:
project
- Project name.commit
- SHA1 of commit.commitMessage
- the commit message of the commit.branchName
- branch of the commit.
-
getParentLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getParentLinks(Project.NameKey project, String revision, String commitMessage, String branchName)
Returns links for patch sets- 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).
-
getEditLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getEditLinks(String project, String revision, String file)
Returns links for editing- Parameters:
project
- Project name.revision
- SHA1 of revision.file
- File name.
-
getFileLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getFileLinks(String project, String revision, String hash, String file)
Returns links for files- Parameters:
project
- Project name.revision
- Name of the revision (e.g. branch or commit ID)hash
- SHA1 of revision.file
- File name.
-
getFileHistoryLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getFileHistoryLinks(String project, String revision, String file)
Returns links for file history- Parameters:
project
- Project name.revision
- SHA1 of revision.file
- File name.
-
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)
Returns links for file diffs- 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.
-
getProjectLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getProjectLinks(String project)
Returns links for projects- Parameters:
project
- Project name.
-
getBranchLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getBranchLinks(String project, String branch)
Returns links for branches- Parameters:
project
- Project namebranch
- Branch name
-
getTagLinks
public com.google.common.collect.ImmutableList<WebLinkInfo> getTagLinks(String project, String tag)
Returns links for the tag- Parameters:
project
- Project nametag
- Tag name
-
-