]> source.dussan.org Git - gitblit.git/commitdiff
Log feature based on Search dialog. Renamed some classes.
authorJames Moger <james.moger@gitblit.com>
Tue, 8 Nov 2011 03:12:38 +0000 (22:12 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 8 Nov 2011 03:12:38 +0000 (22:12 -0500)
13 files changed:
build.xml
src/com/gitblit/SyndicationServlet.java
src/com/gitblit/client/FeedEntryTableModel.java [new file with mode: 0644]
src/com/gitblit/client/FeedsPanel.java
src/com/gitblit/client/GitblitClient.java
src/com/gitblit/client/MessageRenderer.java
src/com/gitblit/client/RepositoriesPanel.java
src/com/gitblit/client/SearchDialog.java
src/com/gitblit/client/SyndicatedEntryTableModel.java [deleted file]
src/com/gitblit/models/FeedEntryModel.java [new file with mode: 0644]
src/com/gitblit/models/SyndicatedEntryModel.java [deleted file]
src/com/gitblit/utils/SyndicationUtils.java
tests/com/gitblit/tests/SyndicationUtilsTest.java

index 085bc280f3b2056e25053596913e3d326b1a4f87..a896cb2716445ea05c61081dd776bc8b2eda8fe0 100644 (file)
--- a/build.xml
+++ b/build.xml
                        <resource file="${basedir}/resources/feed_16x16.png" />\r
                        <resource file="${basedir}/resources/bullet_feed.png" />\r
                        <resource file="${basedir}/resources/search-icon.png" />\r
+                       <resource file="${basedir}/resources/commit_changes_16x16.png" />\r
                        <resource file="${basedir}/resources/blank.png" />\r
                        <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />\r
                                \r
index 39e37ca952172d48306f591346beef4ff1e10e80..66415d10e4b04e9a8ad4e84988ea5f24053a5db3 100644 (file)
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
 \r
 import com.gitblit.models.RefModel;\r
 import com.gitblit.models.RepositoryModel;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.gitblit.utils.HttpUtils;\r
 import com.gitblit.utils.JGitUtils;\r
 import com.gitblit.utils.StringUtils;\r
@@ -169,7 +169,7 @@ public class SyndicationServlet extends HttpServlet {
                                        offset, length);\r
                }\r
                Map<ObjectId, List<RefModel>> allRefs = JGitUtils.getAllRefs(repository);\r
-               List<SyndicatedEntryModel> entries = new ArrayList<SyndicatedEntryModel>();\r
+               List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();\r
 \r
                boolean mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true);\r
                String urlPattern;\r
@@ -183,7 +183,7 @@ public class SyndicationServlet extends HttpServlet {
                String gitblitUrl = HttpUtils.getGitblitURL(request);\r
                // convert RevCommit to SyndicatedEntryModel\r
                for (RevCommit commit : commits) {\r
-                       SyndicatedEntryModel entry = new SyndicatedEntryModel();\r
+                       FeedEntryModel entry = new FeedEntryModel();\r
                        entry.title = commit.getShortMessage();\r
                        entry.author = commit.getAuthorIdent().getName();\r
                        entry.link = MessageFormat.format(urlPattern, gitblitUrl,\r
diff --git a/src/com/gitblit/client/FeedEntryTableModel.java b/src/com/gitblit/client/FeedEntryTableModel.java
new file mode 100644 (file)
index 0000000..0b0ef17
--- /dev/null
@@ -0,0 +1,123 @@
+/*\r
+ * Copyright 2011 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit.client;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.Date;\r
+import java.util.List;\r
+\r
+import javax.swing.table.AbstractTableModel;\r
+\r
+import com.gitblit.models.FeedEntryModel;\r
+\r
+/**\r
+ * Table model for a list of retrieved feed entries.\r
+ * \r
+ * @author James Moger\r
+ * \r
+ */\r
+public class FeedEntryTableModel extends AbstractTableModel {\r
+\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       List<FeedEntryModel> entries;\r
+\r
+       enum Columns {\r
+               Date, Repository, Branch, Author, Message;\r
+\r
+               @Override\r
+               public String toString() {\r
+                       return name().replace('_', ' ');\r
+               }\r
+       }\r
+\r
+       public FeedEntryTableModel() {\r
+               this.entries = new ArrayList<FeedEntryModel>();\r
+       }\r
+\r
+       public void setEntries(List<FeedEntryModel> entries) {\r
+               this.entries = entries;\r
+               Collections.sort(entries);\r
+       }\r
+\r
+       @Override\r
+       public int getRowCount() {\r
+               return entries.size();\r
+       }\r
+\r
+       @Override\r
+       public int getColumnCount() {\r
+               return Columns.values().length;\r
+       }\r
+\r
+       @Override\r
+       public String getColumnName(int column) {\r
+               Columns col = Columns.values()[column];\r
+               switch (col) {\r
+               case Date:\r
+                       return Translation.get("gb.date");\r
+               case Repository:\r
+                       return Translation.get("gb.repository");\r
+               case Branch:\r
+                       return Translation.get("gb.branch");\r
+               case Author:\r
+                       return Translation.get("gb.author");\r
+               case Message:\r
+                       return Translation.get("gb.message");\r
+               }\r
+               return "";\r
+       }\r
+\r
+       /**\r
+        * Returns <code>Object.class</code> regardless of <code>columnIndex</code>.\r
+        * \r
+        * @param columnIndex\r
+        *            the column being queried\r
+        * @return the Object.class\r
+        */\r
+       public Class<?> getColumnClass(int columnIndex) {\r
+               if (Columns.Date.ordinal() == columnIndex) {\r
+                       return Date.class;\r
+               } else if (Columns.Message.ordinal() == columnIndex) {\r
+                       return FeedEntryModel.class;\r
+               }\r
+               return String.class;\r
+       }\r
+\r
+       @Override\r
+       public Object getValueAt(int rowIndex, int columnIndex) {\r
+               FeedEntryModel entry = entries.get(rowIndex);\r
+               Columns col = Columns.values()[columnIndex];\r
+               switch (col) {\r
+               case Date:\r
+                       return entry.published;\r
+               case Repository:\r
+                       return entry.repository;\r
+               case Branch:\r
+                       return entry.branch;\r
+               case Author:\r
+                       return entry.author;\r
+               case Message:\r
+                       return entry;\r
+               }\r
+               return null;\r
+       }\r
+\r
+       public FeedEntryModel get(int modelRow) {\r
+               return entries.get(modelRow);\r
+       }\r
+}\r
index 97764db7a328dffbadb247fa3ed7247ae94e6d49..9f8de8c3e4ece7cd7e6b79ee2544ec3691ac4461 100644 (file)
@@ -43,7 +43,7 @@ import javax.swing.event.ListSelectionListener;
 import javax.swing.table.TableRowSorter;\r
 \r
 import com.gitblit.models.FeedModel;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.gitblit.utils.StringUtils;\r
 \r
 /**\r
@@ -61,9 +61,9 @@ public abstract class FeedsPanel extends JPanel {
 \r
        private final String ALL = "*";\r
 \r
-       private SyndicatedEntryTableModel tableModel;\r
+       private FeedEntryTableModel tableModel;\r
 \r
-       private TableRowSorter<SyndicatedEntryTableModel> defaultSorter;\r
+       private TableRowSorter<FeedEntryTableModel> defaultSorter;\r
 \r
        private HeaderPanel header;\r
 \r
@@ -155,20 +155,20 @@ public abstract class FeedsPanel extends JPanel {
                controls.add(viewTree);\r
 \r
                NameRenderer nameRenderer = new NameRenderer();\r
-               tableModel = new SyndicatedEntryTableModel();\r
+               tableModel = new FeedEntryTableModel();\r
                header = new HeaderPanel(Translation.get("gb.activity"), "feed_16x16.png");\r
                table = Utils.newTable(tableModel, Utils.DATE_FORMAT);\r
-               defaultSorter = new TableRowSorter<SyndicatedEntryTableModel>(tableModel);\r
-               String name = table.getColumnName(SyndicatedEntryTableModel.Columns.Author.ordinal());\r
+               defaultSorter = new TableRowSorter<FeedEntryTableModel>(tableModel);\r
+               String name = table.getColumnName(FeedEntryTableModel.Columns.Author.ordinal());\r
                table.setRowHeight(nameRenderer.getFont().getSize() + 8);\r
                table.getColumn(name).setCellRenderer(nameRenderer);\r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Repository.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Repository.ordinal());\r
                table.getColumn(name).setCellRenderer(nameRenderer);\r
 \r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Branch.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Branch.ordinal());\r
                table.getColumn(name).setCellRenderer(new BranchRenderer());\r
 \r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Message.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Message.ordinal());\r
                table.getColumn(name).setCellRenderer(new MessageRenderer(gitblit));\r
 \r
                table.addMouseListener(new MouseAdapter() {\r
@@ -283,7 +283,7 @@ public abstract class FeedsPanel extends JPanel {
                if (page == 0) {\r
                        // determine unique repositories\r
                        Set<String> uniqueRepositories = new HashSet<String>();\r
-                       for (SyndicatedEntryModel entry : tableModel.entries) {\r
+                       for (FeedEntryModel entry : tableModel.entries) {\r
                                uniqueRepositories.add(entry.repository);\r
                        }\r
 \r
@@ -310,7 +310,7 @@ public abstract class FeedsPanel extends JPanel {
 \r
                // determine unique repositories and authors\r
                Set<String> uniqueAuthors = new HashSet<String>();\r
-               for (SyndicatedEntryModel entry : tableModel.entries) {\r
+               for (FeedEntryModel entry : tableModel.entries) {\r
                        if (repository.equals(ALL) || entry.repository.equalsIgnoreCase(repository)) {\r
                                uniqueAuthors.add(entry.author);\r
                        }\r
@@ -325,25 +325,25 @@ public abstract class FeedsPanel extends JPanel {
                }\r
        }\r
 \r
-       protected SyndicatedEntryModel getSelectedSyndicatedEntry() {\r
+       protected FeedEntryModel getSelectedSyndicatedEntry() {\r
                int viewRow = table.getSelectedRow();\r
                int modelRow = table.convertRowIndexToModel(viewRow);\r
-               SyndicatedEntryModel entry = tableModel.get(modelRow);\r
+               FeedEntryModel entry = tableModel.get(modelRow);\r
                return entry;\r
        }\r
 \r
        protected void viewCommit() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link);\r
        }\r
 \r
        protected void viewCommitDiff() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link.replace("/commit/", "/commitdiff/"));\r
        }\r
 \r
        protected void viewTree() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link.replace("/commit/", "/tree/"));\r
        }\r
 \r
@@ -366,30 +366,30 @@ public abstract class FeedsPanel extends JPanel {
                        table.setRowSorter(defaultSorter);\r
                        return;\r
                }\r
-               final int repositoryIndex = SyndicatedEntryTableModel.Columns.Repository.ordinal();\r
-               final int authorIndex = SyndicatedEntryTableModel.Columns.Author.ordinal();\r
-               RowFilter<SyndicatedEntryTableModel, Object> containsFilter;\r
+               final int repositoryIndex = FeedEntryTableModel.Columns.Repository.ordinal();\r
+               final int authorIndex = FeedEntryTableModel.Columns.Author.ordinal();\r
+               RowFilter<FeedEntryTableModel, Object> containsFilter;\r
                if (repository.equals(ALL)) {\r
                        // author filter\r
-                       containsFilter = new RowFilter<SyndicatedEntryTableModel, Object>() {\r
+                       containsFilter = new RowFilter<FeedEntryTableModel, Object>() {\r
                                public boolean include(\r
-                                               Entry<? extends SyndicatedEntryTableModel, ? extends Object> entry) {\r
+                                               Entry<? extends FeedEntryTableModel, ? extends Object> entry) {\r
                                        return entry.getStringValue(authorIndex).equalsIgnoreCase(author);\r
                                }\r
                        };\r
                } else if (author.equals(ALL)) {\r
                        // repository filter\r
-                       containsFilter = new RowFilter<SyndicatedEntryTableModel, Object>() {\r
+                       containsFilter = new RowFilter<FeedEntryTableModel, Object>() {\r
                                public boolean include(\r
-                                               Entry<? extends SyndicatedEntryTableModel, ? extends Object> entry) {\r
+                                               Entry<? extends FeedEntryTableModel, ? extends Object> entry) {\r
                                        return entry.getStringValue(repositoryIndex).equalsIgnoreCase(repository);\r
                                }\r
                        };\r
                } else {\r
                        // repository-author filter\r
-                       containsFilter = new RowFilter<SyndicatedEntryTableModel, Object>() {\r
+                       containsFilter = new RowFilter<FeedEntryTableModel, Object>() {\r
                                public boolean include(\r
-                                               Entry<? extends SyndicatedEntryTableModel, ? extends Object> entry) {\r
+                                               Entry<? extends FeedEntryTableModel, ? extends Object> entry) {\r
                                        boolean authorMatch = entry.getStringValue(authorIndex)\r
                                                        .equalsIgnoreCase(author);\r
                                        boolean repositoryMatch = entry.getStringValue(repositoryIndex)\r
@@ -398,7 +398,7 @@ public abstract class FeedsPanel extends JPanel {
                                }\r
                        };\r
                }\r
-               TableRowSorter<SyndicatedEntryTableModel> sorter = new TableRowSorter<SyndicatedEntryTableModel>(\r
+               TableRowSorter<FeedEntryTableModel> sorter = new TableRowSorter<FeedEntryTableModel>(\r
                                tableModel);\r
                sorter.setRowFilter(containsFilter);\r
                table.setRowSorter(sorter);\r
index 588b6d805cd4bc0d766c3fd20f9051ad63dc1948..c590dcccebe0f2eef3a9b2aba1187f85d2f5beae 100644 (file)
@@ -36,7 +36,7 @@ import com.gitblit.models.FeedModel;
 import com.gitblit.models.RepositoryModel;\r
 import com.gitblit.models.ServerSettings;\r
 import com.gitblit.models.ServerStatus;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.gitblit.models.UserModel;\r
 import com.gitblit.utils.RpcUtils;\r
 import com.gitblit.utils.StringUtils;\r
@@ -77,7 +77,7 @@ public class GitblitClient implements Serializable {
 \r
        private final List<FeedModel> availableFeeds;\r
 \r
-       private final List<SyndicatedEntryModel> syndicatedEntries;\r
+       private final List<FeedEntryModel> syndicatedEntries;\r
 \r
        private final Set<String> subscribedRepositories;\r
 \r
@@ -93,7 +93,7 @@ public class GitblitClient implements Serializable {
                this.allRepositories = new ArrayList<RepositoryModel>();\r
                this.federationRegistrations = new ArrayList<FederationModel>();\r
                this.availableFeeds = new ArrayList<FeedModel>();\r
-               this.syndicatedEntries = new ArrayList<SyndicatedEntryModel>();\r
+               this.syndicatedEntries = new ArrayList<FeedEntryModel>();\r
                this.subscribedRepositories = new HashSet<String>();\r
        }\r
 \r
@@ -247,13 +247,13 @@ public class GitblitClient implements Serializable {
                return availableFeeds;\r
        }\r
 \r
-       public List<SyndicatedEntryModel> refreshSubscribedFeeds(int page) throws IOException {\r
-               Set<SyndicatedEntryModel> allEntries = new HashSet<SyndicatedEntryModel>();\r
+       public List<FeedEntryModel> refreshSubscribedFeeds(int page) throws IOException {\r
+               Set<FeedEntryModel> allEntries = new HashSet<FeedEntryModel>();\r
                if (reg.feeds.size() > 0) {\r
                        for (FeedModel feed : reg.feeds) {\r
                                feed.lastRefreshDate = feed.currentRefreshDate;\r
                                feed.currentRefreshDate = new Date();\r
-                               List<SyndicatedEntryModel> entries = SyndicationUtils.readFeed(url,\r
+                               List<FeedEntryModel> entries = SyndicationUtils.readFeed(url,\r
                                                feed.repository, feed.branch, -1, page, account, password);\r
                                allEntries.addAll(entries);\r
                        }\r
@@ -297,11 +297,17 @@ public class GitblitClient implements Serializable {
                return subscribedRepositories.contains(repository.name.toLowerCase());\r
        }\r
 \r
-       public List<SyndicatedEntryModel> getSyndicatedEntries() {\r
+       public List<FeedEntryModel> getSyndicatedEntries() {\r
                return syndicatedEntries;\r
        }\r
 \r
-       public List<SyndicatedEntryModel> search(String repository, String branch, String fragment,\r
+       public List<FeedEntryModel> log(String repository, String branch, int numberOfEntries,\r
+                       int page) throws IOException {\r
+               return SyndicationUtils.readFeed(url, repository, branch, numberOfEntries, page, account,\r
+                               password);\r
+       }\r
+\r
+       public List<FeedEntryModel> search(String repository, String branch, String fragment,\r
                        Constants.SearchType type, int numberOfEntries, int page) throws IOException {\r
                return SyndicationUtils.readSearchFeed(url, repository, branch, fragment, type,\r
                                numberOfEntries, page, account, password);\r
index 3629e21d2b1aef857cdd2fc1a2ca75b73061018a..9769c196f2e7b0b7cf976c51d01b42fde306a27a 100644 (file)
@@ -28,7 +28,7 @@ import javax.swing.border.Border;
 import javax.swing.border.LineBorder;\r
 import javax.swing.table.TableCellRenderer;\r
 \r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 \r
 /**\r
  * Message renderer displays the short log message and then any refs in a style\r
@@ -81,7 +81,7 @@ public class MessageRenderer extends JPanel implements TableCellRenderer, Serial
                if (value == null) {\r
                        return this;\r
                }\r
-               SyndicatedEntryModel entry = (SyndicatedEntryModel) value;\r
+               FeedEntryModel entry = (FeedEntryModel) value;\r
 \r
                if (gitblit == null) {\r
                        // no gitblit client, just display message\r
index 3e156e97a387f8470851444475e6d57235954ed3..70ff6cfbcf5223e4b662fa100cbe6f19044d57ed 100644 (file)
@@ -134,12 +134,21 @@ public abstract class RepositoriesPanel extends JPanel {
                        }\r
                });\r
 \r
+               final JButton logRepository = new JButton(Translation.get("gb.log") + "...");\r
+               logRepository.setEnabled(false);\r
+               logRepository.addActionListener(new ActionListener() {\r
+                       public void actionPerformed(ActionEvent e) {\r
+                               RepositoryModel model = getSelectedRepositories().get(0);\r
+                               showSearchDialog(false, model);\r
+                       }\r
+               });\r
+\r
                final JButton searchRepository = new JButton(Translation.get("gb.search") + "...");\r
                searchRepository.setEnabled(false);\r
                searchRepository.addActionListener(new ActionListener() {\r
                        public void actionPerformed(ActionEvent e) {\r
                                RepositoryModel model = getSelectedRepositories().get(0);\r
-                               searchRepository(model);\r
+                               showSearchDialog(true, model);\r
                        }\r
                });\r
 \r
@@ -173,18 +182,20 @@ public abstract class RepositoriesPanel extends JPanel {
                                        return;\r
                                }\r
                                boolean singleSelection = table.getSelectedRowCount() == 1;\r
-                               boolean selected = table.getSelectedRow() > -1;                         \r
+                               boolean selected = table.getSelectedRow() > -1;\r
                                if (singleSelection) {\r
                                        RepositoryModel repository = getSelectedRepositories().get(0);\r
                                        browseRepository.setEnabled(repository.hasCommits);\r
+                                       logRepository.setEnabled(repository.hasCommits);\r
                                        searchRepository.setEnabled(repository.hasCommits);\r
                                        subscribeRepository.setEnabled(repository.hasCommits);\r
                                } else {\r
                                        browseRepository.setEnabled(false);\r
+                                       logRepository.setEnabled(false);\r
                                        searchRepository.setEnabled(false);\r
                                        subscribeRepository.setEnabled(false);\r
                                }\r
-                               delRepository.setEnabled(selected);                             \r
+                               delRepository.setEnabled(selected);\r
                                if (selected) {\r
                                        int viewRow = table.getSelectedRow();\r
                                        int modelRow = table.convertRowIndexToModel(viewRow);\r
@@ -233,6 +244,7 @@ public abstract class RepositoriesPanel extends JPanel {
                repositoryControls.add(editRepository);\r
                repositoryControls.add(delRepository);\r
                repositoryControls.add(subscribeRepository);\r
+               repositoryControls.add(logRepository);\r
                repositoryControls.add(searchRepository);\r
 \r
                setLayout(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
@@ -467,12 +479,12 @@ public abstract class RepositoriesPanel extends JPanel {
                }\r
        }\r
 \r
-       protected void searchRepository(final RepositoryModel repository) {\r
-               SearchDialog searchDialog = new SearchDialog(gitblit);\r
+       private void showSearchDialog(boolean isSearch, final RepositoryModel repository) {\r
+               final SearchDialog dialog = new SearchDialog(gitblit, isSearch);\r
                if (repository != null) {\r
-                       searchDialog.selectRepository(repository);\r
+                       dialog.selectRepository(repository);\r
                }\r
-               searchDialog.setLocationRelativeTo(this);\r
-               searchDialog.setVisible(true);\r
+               dialog.setLocationRelativeTo(this);\r
+               dialog.setVisible(true);\r
        }\r
 }\r
index 448aaef802bb7777e123d71e032e6d4168e42bf7..8c94a5bb9c3e99e04d3226b0bbab10e4b58cc6ca 100644 (file)
@@ -44,7 +44,7 @@ import javax.swing.event.ListSelectionListener;
 \r
 import com.gitblit.Constants;\r
 import com.gitblit.models.RepositoryModel;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.gitblit.utils.StringUtils;\r
 \r
 /**\r
@@ -58,9 +58,11 @@ public class SearchDialog extends JFrame {
 \r
        private static final long serialVersionUID = 1L;\r
 \r
+       private final boolean isSearch;\r
+\r
        private final GitblitClient gitblit;\r
 \r
-       private SyndicatedEntryTableModel tableModel;\r
+       private FeedEntryTableModel tableModel;\r
 \r
        private HeaderPanel header;\r
 \r
@@ -84,13 +86,15 @@ public class SearchDialog extends JFrame {
 \r
        private JButton next;\r
 \r
-       public SearchDialog(GitblitClient gitblit) {\r
+       public SearchDialog(GitblitClient gitblit, boolean isSearch) {\r
                super();\r
                this.gitblit = gitblit;\r
-               setTitle(Translation.get("gb.search"));\r
-               setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());\r
+               this.isSearch = isSearch;\r
+               setTitle(Translation.get(isSearch ? "gb.search" : "gb.log"));\r
+               setIconImage(new ImageIcon(getClass().getResource(\r
+                               isSearch ? "/gitblt-favicon.png" : "/commit_changes_16x16.png")).getImage());\r
                initialize();\r
-               setSize(900, 400);\r
+               setSize(900, 550);\r
        }\r
 \r
        private void initialize() {\r
@@ -113,7 +117,7 @@ public class SearchDialog extends JFrame {
                        }\r
                });\r
 \r
-               final JButton search = new JButton(Translation.get("gb.search"));\r
+               final JButton search = new JButton(Translation.get(isSearch ? "gb.search" : "gb.refresh"));\r
                search.addActionListener(new ActionListener() {\r
                        public void actionPerformed(ActionEvent e) {\r
                                search(0);\r
@@ -150,20 +154,21 @@ public class SearchDialog extends JFrame {
                controls.add(viewTree);\r
 \r
                NameRenderer nameRenderer = new NameRenderer();\r
-               tableModel = new SyndicatedEntryTableModel();\r
-               header = new HeaderPanel(Translation.get("gb.search"), "search-icon.png");\r
+               tableModel = new FeedEntryTableModel();\r
+               header = new HeaderPanel(Translation.get(isSearch ? "gb.search" : "gb.log"),\r
+                               isSearch ? "search-icon.png" : "commit_changes_16x16.png");\r
                table = Utils.newTable(tableModel, Utils.DATE_FORMAT);\r
 \r
-               String name = table.getColumnName(SyndicatedEntryTableModel.Columns.Author.ordinal());\r
+               String name = table.getColumnName(FeedEntryTableModel.Columns.Author.ordinal());\r
                table.setRowHeight(nameRenderer.getFont().getSize() + 8);\r
                table.getColumn(name).setCellRenderer(nameRenderer);\r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Repository.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Repository.ordinal());\r
                table.getColumn(name).setCellRenderer(nameRenderer);\r
 \r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Branch.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Branch.ordinal());\r
                table.getColumn(name).setCellRenderer(new BranchRenderer());\r
 \r
-               name = table.getColumnName(SyndicatedEntryTableModel.Columns.Message.ordinal());\r
+               name = table.getColumnName(FeedEntryTableModel.Columns.Message.ordinal());\r
                table.getColumn(name).setCellRenderer(new MessageRenderer());\r
 \r
                table.addMouseListener(new MouseAdapter() {\r
@@ -220,7 +225,7 @@ public class SearchDialog extends JFrame {
 \r
                branchChoices = new DefaultComboBoxModel();\r
                branchSelector = new JComboBox(branchChoices);\r
-               branchSelector.setRenderer(new BranchRenderer());               \r
+               branchSelector.setRenderer(new BranchRenderer());\r
 \r
                searchTypeSelector = new JComboBox(Constants.SearchType.values());\r
                searchTypeSelector.setSelectedItem(Constants.SearchType.COMMIT);\r
@@ -240,8 +245,10 @@ public class SearchDialog extends JFrame {
                queryPanel.add(repositorySelector);\r
                queryPanel.add(new JLabel(Translation.get("gb.branch")));\r
                queryPanel.add(branchSelector);\r
-               queryPanel.add(new JLabel(Translation.get("gb.type")));\r
-               queryPanel.add(searchTypeSelector);\r
+               if (isSearch) {\r
+                       queryPanel.add(new JLabel(Translation.get("gb.type")));\r
+                       queryPanel.add(searchTypeSelector);\r
+               }\r
                queryPanel.add(new JLabel(Translation.get("gb.maxHits")));\r
                queryPanel.add(maxHitsSelector);\r
 \r
@@ -252,9 +259,10 @@ public class SearchDialog extends JFrame {
 \r
                JPanel northControls = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
                northControls.add(queryPanel, BorderLayout.WEST);\r
-               northControls.add(searchFragment, BorderLayout.CENTER);\r
+               if (isSearch) {\r
+                       northControls.add(searchFragment, BorderLayout.CENTER);\r
+               }\r
                northControls.add(actionsPanel, BorderLayout.EAST);\r
-               \r
 \r
                JPanel northPanel = new JPanel(new BorderLayout(0, Utils.MARGIN));\r
                northPanel.add(header, BorderLayout.NORTH);\r
@@ -275,17 +283,19 @@ public class SearchDialog extends JFrame {
                contentPanel.add(controls, BorderLayout.SOUTH);\r
                setLayout(new BorderLayout());\r
                add(contentPanel, BorderLayout.CENTER);\r
-               addWindowListener(new WindowAdapter() {\r
-                       @Override\r
-                       public void windowOpened(WindowEvent event) {\r
-                               searchFragment.requestFocus();\r
-                       }\r
+               if (isSearch) {\r
+                       addWindowListener(new WindowAdapter() {\r
+                               @Override\r
+                               public void windowOpened(WindowEvent event) {\r
+                                       searchFragment.requestFocus();\r
+                               }\r
 \r
-                       @Override\r
-                       public void windowActivated(WindowEvent event) {\r
-                               searchFragment.requestFocus();\r
-                       }\r
-               });\r
+                               @Override\r
+                               public void windowActivated(WindowEvent event) {\r
+                                       searchFragment.requestFocus();\r
+                               }\r
+                       });\r
+               }\r
        }\r
 \r
        public void selectRepository(RepositoryModel repository) {\r
@@ -311,25 +321,33 @@ public class SearchDialog extends JFrame {
                                .getSelectedItem().toString() : null;\r
                final Constants.SearchType searchType = (Constants.SearchType) searchTypeSelector\r
                                .getSelectedItem();\r
-               final String fragment = searchFragment.getText();\r
+               final String fragment = isSearch ? searchFragment.getText() : null;\r
                final int maxEntryCount = maxHitsSelector.getSelectedIndex() > -1 ? ((Integer) maxHitsSelector\r
                                .getSelectedItem()) : -1;\r
 \r
-               if (StringUtils.isEmpty(fragment)) {\r
+               if (isSearch && StringUtils.isEmpty(fragment)) {\r
                        return;\r
                }\r
-               SwingWorker<List<SyndicatedEntryModel>, Void> worker = new SwingWorker<List<SyndicatedEntryModel>, Void>() {\r
+               SwingWorker<List<FeedEntryModel>, Void> worker = new SwingWorker<List<FeedEntryModel>, Void>() {\r
                        @Override\r
-                       protected List<SyndicatedEntryModel> doInBackground() throws IOException {\r
-                               return gitblit\r
-                                               .search(repository, branch, fragment, searchType, maxEntryCount, page);\r
+                       protected List<FeedEntryModel> doInBackground() throws IOException {\r
+                               if (isSearch) {\r
+                                       return gitblit.search(repository, branch, fragment, searchType, maxEntryCount,\r
+                                                       page);\r
+                               } else {\r
+                                       return gitblit.log(repository, branch, maxEntryCount, page);\r
+                               }\r
                        }\r
 \r
                        @Override\r
                        protected void done() {\r
                                try {\r
-                                       List<SyndicatedEntryModel> results = get();\r
-                                       updateTable(true, fragment, results);\r
+                                       List<FeedEntryModel> results = get();\r
+                                       if (isSearch) {\r
+                                               updateTable(true, fragment, results);\r
+                                       } else {\r
+                                               updateTable(true, branch == null ? "" : branch, results);\r
+                                       }\r
                                } catch (Throwable t) {\r
                                        Utils.showException(SearchDialog.this, t);\r
                                }\r
@@ -338,12 +356,12 @@ public class SearchDialog extends JFrame {
                worker.execute();\r
        }\r
 \r
-       protected void updateTable(boolean pack, String fragment, List<SyndicatedEntryModel> entries) {\r
+       protected void updateTable(boolean pack, String text, List<FeedEntryModel> entries) {\r
                tableModel.entries.clear();\r
                tableModel.entries.addAll(entries);\r
                tableModel.fireTableDataChanged();\r
-               setTitle(Translation.get("gb.search") + ": " + fragment + " (" + entries.size()\r
-                               + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
+               setTitle(Translation.get(isSearch ? "gb.search" : "gb.log") + ": " + text + " ("\r
+                               + entries.size() + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
                header.setText(getTitle());\r
                if (pack) {\r
                        Utils.packColumns(table, Utils.MARGIN);\r
@@ -356,25 +374,25 @@ public class SearchDialog extends JFrame {
                prev.setEnabled(page > 0);\r
        }\r
 \r
-       protected SyndicatedEntryModel getSelectedSyndicatedEntry() {\r
+       protected FeedEntryModel getSelectedSyndicatedEntry() {\r
                int viewRow = table.getSelectedRow();\r
                int modelRow = table.convertRowIndexToModel(viewRow);\r
-               SyndicatedEntryModel entry = tableModel.get(modelRow);\r
+               FeedEntryModel entry = tableModel.get(modelRow);\r
                return entry;\r
        }\r
 \r
        protected void viewCommit() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link);\r
        }\r
 \r
        protected void viewCommitDiff() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link.replace("/commit/", "/commitdiff/"));\r
        }\r
 \r
        protected void viewTree() {\r
-               SyndicatedEntryModel entry = getSelectedSyndicatedEntry();\r
+               FeedEntryModel entry = getSelectedSyndicatedEntry();\r
                Utils.browse(entry.link.replace("/commit/", "/tree/"));\r
        }\r
 }\r
diff --git a/src/com/gitblit/client/SyndicatedEntryTableModel.java b/src/com/gitblit/client/SyndicatedEntryTableModel.java
deleted file mode 100644 (file)
index 8fcdb47..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*\r
- * Copyright 2011 gitblit.com.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package com.gitblit.client;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.swing.table.AbstractTableModel;\r
-\r
-import com.gitblit.models.SyndicatedEntryModel;\r
-\r
-/**\r
- * Table model for a list of retrieved feed entries.\r
- * \r
- * @author James Moger\r
- * \r
- */\r
-public class SyndicatedEntryTableModel extends AbstractTableModel {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       List<SyndicatedEntryModel> entries;\r
-\r
-       enum Columns {\r
-               Date, Repository, Branch, Author, Message;\r
-\r
-               @Override\r
-               public String toString() {\r
-                       return name().replace('_', ' ');\r
-               }\r
-       }\r
-\r
-       public SyndicatedEntryTableModel() {\r
-               this.entries = new ArrayList<SyndicatedEntryModel>();\r
-       }\r
-\r
-       public void setEntries(List<SyndicatedEntryModel> entries) {\r
-               this.entries = entries;\r
-               Collections.sort(entries);\r
-       }\r
-\r
-       @Override\r
-       public int getRowCount() {\r
-               return entries.size();\r
-       }\r
-\r
-       @Override\r
-       public int getColumnCount() {\r
-               return Columns.values().length;\r
-       }\r
-\r
-       @Override\r
-       public String getColumnName(int column) {\r
-               Columns col = Columns.values()[column];\r
-               switch (col) {\r
-               case Date:\r
-                       return Translation.get("gb.date");\r
-               case Repository:\r
-                       return Translation.get("gb.repository");\r
-               case Branch:\r
-                       return Translation.get("gb.branch");\r
-               case Author:\r
-                       return Translation.get("gb.author");\r
-               case Message:\r
-                       return Translation.get("gb.message");\r
-               }\r
-               return "";\r
-       }\r
-\r
-       /**\r
-        * Returns <code>Object.class</code> regardless of <code>columnIndex</code>.\r
-        * \r
-        * @param columnIndex\r
-        *            the column being queried\r
-        * @return the Object.class\r
-        */\r
-       public Class<?> getColumnClass(int columnIndex) {\r
-               if (Columns.Date.ordinal() == columnIndex) {\r
-                       return Date.class;\r
-               } else if (Columns.Message.ordinal() == columnIndex) {\r
-                       return SyndicatedEntryModel.class;\r
-               }\r
-               return String.class;\r
-       }\r
-\r
-       @Override\r
-       public Object getValueAt(int rowIndex, int columnIndex) {\r
-               SyndicatedEntryModel entry = entries.get(rowIndex);\r
-               Columns col = Columns.values()[columnIndex];\r
-               switch (col) {\r
-               case Date:\r
-                       return entry.published;\r
-               case Repository:\r
-                       return entry.repository;\r
-               case Branch:\r
-                       return entry.branch;\r
-               case Author:\r
-                       return entry.author;\r
-               case Message:\r
-                       return entry;\r
-               }\r
-               return null;\r
-       }\r
-\r
-       public SyndicatedEntryModel get(int modelRow) {\r
-               return entries.get(modelRow);\r
-       }\r
-}\r
diff --git a/src/com/gitblit/models/FeedEntryModel.java b/src/com/gitblit/models/FeedEntryModel.java
new file mode 100644 (file)
index 0000000..e1c00c3
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright 2011 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit.models;\r
+\r
+import java.io.Serializable;\r
+import java.util.Date;\r
+import java.util.List;\r
+\r
+/**\r
+ * FeedEntryModel represents an entry in a syndication (RSS) feed.\r
+ * \r
+ * @author James Moger\r
+ */\r
+public class FeedEntryModel implements Serializable, Comparable<FeedEntryModel> {\r
+\r
+       public String repository;\r
+       public String branch;\r
+       public String title;\r
+       public String author;\r
+       public Date published;\r
+       public String link;\r
+       public String content;\r
+       public String contentType;\r
+       public List<String> tags;\r
+\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       public FeedEntryModel() {\r
+       }\r
+\r
+       @Override\r
+       public int compareTo(FeedEntryModel o) {\r
+               return o.published.compareTo(published);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return link.hashCode();\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(Object o) {\r
+               if (o instanceof FeedEntryModel) {\r
+                       return hashCode() == o.hashCode();\r
+               }\r
+               return false;\r
+       }\r
+}\r
diff --git a/src/com/gitblit/models/SyndicatedEntryModel.java b/src/com/gitblit/models/SyndicatedEntryModel.java
deleted file mode 100644 (file)
index f59418e..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*\r
- * Copyright 2011 gitblit.com.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package com.gitblit.models;\r
-\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-/**\r
- * SyndicationEntryModel represents an entry in a syndication (RSS) feed.\r
- * \r
- * @author James Moger\r
- */\r
-public class SyndicatedEntryModel implements Serializable, Comparable<SyndicatedEntryModel> {\r
-\r
-       public String repository;\r
-       public String branch;\r
-       public String title;\r
-       public String author;\r
-       public Date published;\r
-       public String link;\r
-       public String content;\r
-       public String contentType;\r
-       public List<String> tags;\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public SyndicatedEntryModel() {\r
-       }\r
-\r
-       @Override\r
-       public int compareTo(SyndicatedEntryModel o) {\r
-               return o.published.compareTo(published);\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               return link.hashCode();\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object o) {\r
-               if (o instanceof SyndicatedEntryModel) {\r
-                       return hashCode() == o.hashCode();\r
-               }\r
-               return false;\r
-       }\r
-}\r
index 6919cd2480c39e2a7b06934621039d1276023370..6ba8d738bf0f6cbd7443742dd704fcbc21550c6a 100644 (file)
@@ -26,7 +26,7 @@ import java.util.List;
 \r
 import com.gitblit.Constants;\r
 import com.gitblit.GitBlitException;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.sun.syndication.feed.synd.SyndCategory;\r
 import com.sun.syndication.feed.synd.SyndCategoryImpl;\r
 import com.sun.syndication.feed.synd.SyndContent;\r
@@ -63,7 +63,7 @@ public class SyndicationUtils {
         * @throws FeedException\r
         */\r
        public static void toRSS(String hostUrl, String feedLink, String title, String description,\r
-                       String repository, List<SyndicatedEntryModel> entryModels, OutputStream os)\r
+                       String repository, List<FeedEntryModel> entryModels, OutputStream os)\r
                        throws IOException, FeedException {\r
 \r
                SyndFeed feed = new SyndFeedImpl();\r
@@ -79,7 +79,7 @@ public class SyndicationUtils {
                feed.setImage(image);\r
 \r
                List<SyndEntry> entries = new ArrayList<SyndEntry>();\r
-               for (SyndicatedEntryModel entryModel : entryModels) {\r
+               for (FeedEntryModel entryModel : entryModels) {\r
                        SyndEntry entry = new SyndEntryImpl();\r
                        entry.setTitle(entryModel.title);\r
                        entry.setAuthor(entryModel.author);\r
@@ -130,7 +130,7 @@ public class SyndicationUtils {
         * @return a list of SyndicationModel entries\r
         * @throws {@link IOException}\r
         */\r
-       public static List<SyndicatedEntryModel> readFeed(String url, String repository, String branch,\r
+       public static List<FeedEntryModel> readFeed(String url, String repository, String branch,\r
                        int numberOfEntries, int page, String username, char[] password) throws IOException {\r
                // build feed url\r
                List<String> parameters = new ArrayList<String>();\r
@@ -167,7 +167,7 @@ public class SyndicationUtils {
         * @return a list of SyndicationModel entries\r
         * @throws {@link IOException}\r
         */\r
-       public static List<SyndicatedEntryModel> readSearchFeed(String url, String repository,\r
+       public static List<FeedEntryModel> readSearchFeed(String url, String repository,\r
                        String branch, String fragment, Constants.SearchType searchType, int numberOfEntries,\r
                        int page, String username, char[] password) throws IOException {\r
                // determine parameters\r
@@ -202,7 +202,7 @@ public class SyndicationUtils {
         * @return a list of SyndicationModel entries\r
         * @throws {@link IOException}\r
         */\r
-       private static List<SyndicatedEntryModel> readFeed(String url, List<String> parameters,\r
+       private static List<FeedEntryModel> readFeed(String url, List<String> parameters,\r
                        String repository, String branch, String username, char[] password) throws IOException {\r
                // build url\r
                StringBuilder sb = new StringBuilder();\r
@@ -230,10 +230,10 @@ public class SyndicationUtils {
                        throw new GitBlitException(f);\r
                }\r
                is.close();\r
-               List<SyndicatedEntryModel> entries = new ArrayList<SyndicatedEntryModel>();\r
+               List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();\r
                for (Object o : feed.getEntries()) {\r
                        SyndEntryImpl entry = (SyndEntryImpl) o;\r
-                       SyndicatedEntryModel model = new SyndicatedEntryModel();\r
+                       FeedEntryModel model = new FeedEntryModel();\r
                        model.repository = repository;\r
                        model.branch = branch;\r
                        model.title = entry.getTitle();\r
index 0746642c469f9a96a8144485f332749472ef6906..0a2420f6919416732a04f7a720fad19dbdf032fd 100644 (file)
@@ -25,15 +25,15 @@ import java.util.Set;
 import junit.framework.TestCase;\r
 \r
 import com.gitblit.Constants.SearchType;\r
-import com.gitblit.models.SyndicatedEntryModel;\r
+import com.gitblit.models.FeedEntryModel;\r
 import com.gitblit.utils.SyndicationUtils;\r
 \r
 public class SyndicationUtilsTest extends TestCase {\r
 \r
        public void testSyndication() throws Exception {\r
-               List<SyndicatedEntryModel> entries = new ArrayList<SyndicatedEntryModel>();\r
+               List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();\r
                for (int i = 0; i < 10; i++) {\r
-                       SyndicatedEntryModel entry = new SyndicatedEntryModel();\r
+                       FeedEntryModel entry = new FeedEntryModel();\r
                        entry.title = "Title " + i;\r
                        entry.author = "Author " + i;\r
                        entry.link = "Link " + i;\r
@@ -61,13 +61,13 @@ public class SyndicationUtilsTest extends TestCase {
        public void testFeedRead() throws Exception {\r
                Set<String> links = new HashSet<String>();\r
                for (int i = 0; i < 2; i++) {\r
-                       List<SyndicatedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url,\r
+                       List<FeedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url,\r
                                        "ticgit.git", "master", 5, i, GitBlitSuite.account,\r
                                        GitBlitSuite.password.toCharArray());\r
                        assertTrue(feed != null);\r
                        assertTrue(feed.size() > 0);\r
                        assertEquals(5, feed.size());\r
-                       for (SyndicatedEntryModel entry : feed) {\r
+                       for (FeedEntryModel entry : feed) {\r
                                links.add(entry.link);\r
                        }\r
                }\r
@@ -76,7 +76,7 @@ public class SyndicationUtilsTest extends TestCase {
        }\r
 \r
        public void testSearchFeedRead() throws Exception {\r
-               List<SyndicatedEntryModel> feed = SyndicationUtils.readSearchFeed(GitBlitSuite.url,\r
+               List<FeedEntryModel> feed = SyndicationUtils.readSearchFeed(GitBlitSuite.url,\r
                                "ticgit.git", null, "test", null, 5, 0, GitBlitSuite.account,\r
                                GitBlitSuite.password.toCharArray());\r
                assertTrue(feed != null);\r