Skip to main content
summaryrefslogtreecommitdiffstats
blob: d194c1a845d079b05fd20684421f61ecaf0dcc48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*******************************************************************************
 * Copyright (c) 2011 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.display.presenter.mocks;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.display.api.components.SearchResultComponent;
import org.eclipse.osee.display.api.data.SearchResultMatch;
import org.eclipse.osee.display.api.data.WebArtifact;

/**
 * @author John Misinco
 */
public class MockSearchResultComponent implements SearchResultComponent {

   private WebArtifact artifact;
   private final List<SearchResultMatch> matches = new ArrayList<SearchResultMatch>();

   public WebArtifact getArtifact() {
      return artifact;
   }

   public List<SearchResultMatch> getMatches() {
      return matches;
   }

   @Override
   public void setArtifact(WebArtifact artifact) {
      this.artifact = artifact;
   }

   @Override
   public void addSearchResultMatch(SearchResultMatch match) {
      this.matches.add(match);
   }

   @Override
   public void setErrorMessage(String message) {
   }
}

Back to the top