Package com.gitblit.models

Examples of com.gitblit.models.FeedModel


      }
    }
  }

  public Date getLastFeedRefresh(String repository, String branch) {
    FeedModel feed = new FeedModel();
    feed.repository = repository;
    feed.branch = branch;
    if (reg.feeds.contains(feed)) {
      int idx = reg.feeds.indexOf(feed);
      feed = reg.feeds.get(idx);
View Full Code Here


      throws IOException {
    List<FeedModel> feeds = new ArrayList<FeedModel>();
    Map<String, Collection<String>> allBranches = getBranches(serverUrl, account, password);
    for (Map.Entry<String, Collection<String>> entry : allBranches.entrySet()) {
      for (String branch : entry.getValue()) {
        FeedModel feed = new FeedModel();
        feed.repository = entry.getKey();
        feed.branch = branch;
        feeds.add(feed);
      }
    }
View Full Code Here

    return false;
  }

  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
    FeedModel model = list.get(rowIndex);
    Columns col = Columns.values()[columnIndex];
    switch (col) {
    case Repository:
      return model.repository;
    case Branch:
View Full Code Here

      }
    }
  }

  public Date getLastFeedRefresh(String repository, String branch) {
    FeedModel feed = new FeedModel();
    feed.repository = repository;
    feed.branch = branch;
    if (reg.feeds.contains(feed)) {
      int idx = reg.feeds.indexOf(feed);
      feed = reg.feeds.get(idx);
View Full Code Here

  public void updateSubscribedFeeds(List<FeedModel> list) {
    for (FeedModel feed : list) {
      if (feeds.contains(feed)) {
        // possibly unsubscribe/remove feed
        int index = feeds.indexOf(feed);
        FeedModel existingFeed = feeds.get(index);
        existingFeed.subscribed = feed.subscribed;
        if (!existingFeed.subscribed) {
          feeds.remove(index);
        }
      } else if (feed.subscribed) {
View Full Code Here

      throws IOException {
    List<FeedModel> feeds = new ArrayList<FeedModel>();
    Map<String, Collection<String>> allBranches = getBranches(serverUrl, account, password);
    for (Map.Entry<String, Collection<String>> entry : allBranches.entrySet()) {
      for (String branch : entry.getValue()) {
        FeedModel feed = new FeedModel();
        feed.repository = entry.getKey();
        feed.branch = branch;
        feeds.add(feed);
      }
    }
View Full Code Here

        };
        String[] feeds = config.getStringList(SERVER, server, FEED);
        if (feeds != null) {
          // deserialize the field definitions
          for (String definition : feeds) {
            FeedModel feed = new FeedModel(definition);
            reg.feeds.add(feed);
          }
        }
        reg.lastLogin = lastLogin;
        loadFeedCache(reg);
View Full Code Here

        int viewRow = feedsTable.getSelectedRow();
        if (viewRow == -1) {
          return;
        }
        int modelRow = feedsTable.convertRowIndexToModel(viewRow);
        FeedModel feed = model.get(modelRow);
        feed.subscribed = !feed.subscribed;
        model.fireTableDataChanged();
      }
    });
View Full Code Here

TOP

Related Classes of com.gitblit.models.FeedModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.