View Javadoc

1   package com.atlassian.user.search;
2   
3   import com.atlassian.user.search.page.Pager;
4   
5   import java.util.HashMap;
6   import java.util.Set;
7   
8   /**
9    * @deprecated since 2.1. This abstract class is not required.
10   */
11  public abstract class AbstractSearchResult implements SearchResult
12  {
13      protected HashMap<String, Pager> repositoriesToResults = new HashMap<String, Pager>();
14  
15      public void addToResults(String repositoryKey, Pager pager)
16      {
17          repositoriesToResults.put(repositoryKey, pager);
18      }
19  
20      public Pager pager(String repoKey)
21      {
22          return repositoriesToResults.get(repoKey);
23      }
24  
25      /**
26       * @return a list of {@link String} objects indcating the repositories with results in this
27       *         object.
28       */
29      public Set repositoryKeyset()
30      {
31          return repositoriesToResults.keySet();
32      }
33  }