class RequestDetailsViewMapperDecorator implements RequestDetailsViewMapper {

    @Override
    public RequestDetailsView map(RequestDto r) {
        RequestDetailsView view = delegate.map(r);
        if (view != null) {
            IssueInformationDto issueInfo = r.getIssueInformation();
            view.setIcon("https://github.com/" + issueInfo.getOwner() + ".png");
            view.setPlatform(issueInfo.getPlatform().name());
            view.setOwner(issueInfo.getOwner());
            view.setRepo(issueInfo.getRepo());
            view.setIssueNumber(issueInfo.getNumber());
            view.setTitle(issueInfo.getTitle());
            view.setStarred(r.isLoggedInUserIsWatcher());
            view.setDescription(githubGateway.getIssue(issueInfo.getOwner(), issueInfo.getRepo(), issueInfo.getNumber()).getBodyHtml());
            view.setPhase(enumToCapitalizedStringMapper.map(r.getStatus().getPhase()));
            view.setStatus(enumToCapitalizedStringMapper.map(r.getStatus()));
        }
        return view;
    }

}