| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | private final GitblitClient gitblit;
|
| | |
|
| | | List<SyndicatedEntryModel> entries;
|
| | |
|
| | | enum Columns {
|
| | | Date, Repository, Author, Message, Branch;
|
| | | Date, Repository, Branch, Author, Message;
|
| | |
|
| | | @Override
|
| | | public String toString() {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public SyndicatedEntryTableModel(GitblitClient gitblit) {
|
| | | this.gitblit = gitblit;
|
| | | public SyndicatedEntryTableModel() {
|
| | | this.entries = new ArrayList<SyndicatedEntryModel>();
|
| | | }
|
| | |
|
| | |
| | | public Class<?> getColumnClass(int columnIndex) {
|
| | | if (Columns.Date.ordinal() == columnIndex) {
|
| | | return Date.class;
|
| | | } else if (Columns.Message.ordinal() == columnIndex) {
|
| | | return SyndicatedEntryModel.class;
|
| | | }
|
| | | return String.class;
|
| | | }
|
| | |
| | | case Author:
|
| | | return entry.author;
|
| | | case Message:
|
| | | Date lastRefresh = gitblit.getLastFeedRefresh(entry.repository, entry.branch);
|
| | | if (entry.published.after(lastRefresh)) {
|
| | | return "<html><body><b>" + entry.title;
|
| | | }
|
| | | return entry.title;
|
| | | return entry;
|
| | | }
|
| | | return null;
|
| | | }
|