use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class SearchDialog method viewTree.
protected void viewTree() {
FeedEntryModel entry = getSelectedSyndicatedEntry();
Utils.browse(entry.link.replace("/commit/", "/tree/"));
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class FeedsPanel method viewCommitDiff.
protected void viewCommitDiff() {
FeedEntryModel entry = getSelectedSyndicatedEntry();
Utils.browse(entry.link.replace("/commit/", "/commitdiff/"));
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class FeedsPanel method updateAuthors.
private void updateAuthors() {
String repository = ALL;
if (repositorySelector.getSelectedIndex() > -1) {
repository = repositorySelector.getSelectedItem().toString();
}
// determine unique repositories and authors
Set<String> uniqueAuthors = new HashSet<String>();
for (FeedEntryModel entry : tableModel.entries) {
if (repository.equals(ALL) || entry.repository.equalsIgnoreCase(repository)) {
uniqueAuthors.add(entry.author);
}
}
// authors
List<String> sortedAuthors = new ArrayList<String>(uniqueAuthors);
Collections.sort(sortedAuthors);
authorChoices.removeAllElements();
authorChoices.addElement(ALL);
for (String author : sortedAuthors) {
authorChoices.addElement(author);
}
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class GitblitClient method refreshSubscribedFeeds.
public List<FeedEntryModel> refreshSubscribedFeeds(int page) throws IOException {
Set<FeedEntryModel> allEntries = new HashSet<FeedEntryModel>();
if (reg.feeds.size() > 0) {
for (FeedModel feed : reg.feeds) {
feed.lastRefreshDate = feed.currentRefreshDate;
feed.currentRefreshDate = new Date();
List<FeedEntryModel> entries = SyndicationUtils.readFeed(url, feed.repository, feed.branch, -1, page, account, password);
allEntries.addAll(entries);
}
}
reg.cacheFeeds();
syndicatedEntries.clear();
syndicatedEntries.addAll(allEntries);
Collections.sort(syndicatedEntries);
return syndicatedEntries;
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class FeedEntryTableModel method getValueAt.
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
FeedEntryModel entry = entries.get(rowIndex);
Columns col = Columns.values()[columnIndex];
switch(col) {
case Date:
return entry.published;
case Repository:
return entry.repository;
case Branch:
return entry.branch;
case Author:
return entry.author;
case Message:
return entry;
}
return null;
}
Aggregations