use of com.google.gerrit.common.data.WebLinkInfoCommon in project gerrit by GerritCodeReview.
the class WebLinks method getFileHistoryLinks.
/**
* @param project Project name.
* @param revision SHA1 of revision.
* @param file File name.
* @return Links for file history
*/
public List<WebLinkInfoCommon> getFileHistoryLinks(String project, String revision, String file) {
return FluentIterable.from(fileHistoryLinks).transform(webLink -> {
WebLinkInfo info = webLink.getFileHistoryWebLink(project, revision, file);
if (info == null) {
return null;
}
WebLinkInfoCommon commonInfo = new WebLinkInfoCommon();
commonInfo.name = info.name;
commonInfo.imageUrl = info.imageUrl;
commonInfo.url = info.url;
commonInfo.target = info.target;
return commonInfo;
}).filter(INVALID_WEBLINK_COMMON).toList();
}
Aggregations