Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0dbf701a3ea07eae31f014a47dd3b2dbb0cc51b9 (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
49
50
51
52
53
/*******************************************************************************
 * Copyright (c) 2008-2010 Sonatype, Inc.
 * 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:
 *      Sonatype, Inc. - initial API and implementation
 *******************************************************************************/

package org.eclipse.m2e.core.index;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;


public interface IndexManager {

  // well-known indexes

  String LOCAL_INDEX = "local"; //$NON-NLS-1$

  String WORKSPACE_INDEX = "workspace"; //$NON-NLS-1$

  // 

  IMutableIndex getWorkspaceIndex();

  IMutableIndex getLocalIndex();

  /**
   * For Maven projects, returns index of all repositories configured for the project. Index includes repositories
   * defined in the project pom.xml, inherited from parent projects and defined in enabled profiles in settings.xml. If
   * project is null or is not a maven project, returns index that includes repositories defined in profiles enabled by
   * default in settings.xml.
   */
  IIndex getIndex(IProject project) throws CoreException;

  /**
   * Returns index aggregating all indexes enabled for repositories defined in settings.xml
   * 
   * @return
   * @throws CoreException
   */
  IIndex getAllIndexes() throws CoreException;

  //

  void removeIndexListener(IndexListener listener);

  void addIndexListener(IndexListener listener);
}

Back to the top