diff options
author | James Moger <james.moger@gitblit.com> | 2011-11-04 22:28:32 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-11-04 22:28:32 -0400 |
commit | e33b91aa4d43246ad62832e66e2acfad3dfb3608 (patch) | |
tree | 5777a8c9ca438f62605e7fe8a9ca25b407946158 /src/com/gitblit/client/GitblitClient.java | |
parent | fa5e6f97aab0faca8e11ab8a264b0190c145b07f (diff) | |
download | gitblit-e33b91aa4d43246ad62832e66e2acfad3dfb3608.tar.gz gitblit-e33b91aa4d43246ad62832e66e2acfad3dfb3608.zip |
Support pagination in RSS feeds. Standardize pg as page parameter.
Diffstat (limited to 'src/com/gitblit/client/GitblitClient.java')
-rw-r--r-- | src/com/gitblit/client/GitblitClient.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/com/gitblit/client/GitblitClient.java b/src/com/gitblit/client/GitblitClient.java index e8460f5f..588b6d80 100644 --- a/src/com/gitblit/client/GitblitClient.java +++ b/src/com/gitblit/client/GitblitClient.java @@ -101,13 +101,7 @@ public class GitblitClient implements Serializable { refreshSettings();
refreshAvailableFeeds();
refreshRepositories();
-
- try {
- // RSS feeds may be disabled by server
- refreshSubscribedFeeds();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ refreshSubscribedFeeds(0);
try {
// credentials may not have administrator access
@@ -253,14 +247,14 @@ public class GitblitClient implements Serializable { return availableFeeds;
}
- public List<SyndicatedEntryModel> refreshSubscribedFeeds() throws IOException {
+ public List<SyndicatedEntryModel> refreshSubscribedFeeds(int page) throws IOException {
Set<SyndicatedEntryModel> allEntries = new HashSet<SyndicatedEntryModel>();
if (reg.feeds.size() > 0) {
for (FeedModel feed : reg.feeds) {
feed.lastRefreshDate = feed.currentRefreshDate;
feed.currentRefreshDate = new Date();
List<SyndicatedEntryModel> entries = SyndicationUtils.readFeed(url,
- feed.repository, feed.branch, -1, account, password);
+ feed.repository, feed.branch, -1, page, account, password);
allEntries.addAll(entries);
}
}
@@ -308,9 +302,9 @@ public class GitblitClient implements Serializable { }
public List<SyndicatedEntryModel> search(String repository, String branch, String fragment,
- Constants.SearchType type, int numberOfEntries) throws IOException {
+ Constants.SearchType type, int numberOfEntries, int page) throws IOException {
return SyndicationUtils.readSearchFeed(url, repository, branch, fragment, type,
- numberOfEntries, account, password);
+ numberOfEntries, page, account, password);
}
public List<FederationModel> refreshFederationRegistrations() throws IOException {
|