blob: b895475dbdea085b4e97e8e5c5bb4e673de66b64 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*******************************************************************************
* Copyright (c) 2011 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.core.importing.provisional;
import java.util.Map;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.ScmUrlImportDescription;
/**
* A bundle importer delegate is contributed by a bundle importer extension and is capable
* of importing projects into the workspace from a repository based on bundle manifest entries.
* <p>
* Following is an example extension:
* <pre>
* <extension point="org.eclipse.team.core.bundleImporters">
* <importer
* id="com.example.ExampleIdentifier"
* class="com.example.ExampleBundleImporterDelegate">
* </importer>
* </extension>
* </pre>
* </p>
* <p>
* Clients contributing bundle importer extensions are intended to implement this interface.
* They can also subclass {@link BundleImporterDelegate}.
* </p>
* <p>
* <strong>EXPERIMENTAL</strong>. This interface has been added as
* part of a work in progress. There is no guarantee that this API will
* work or that it will remain the same. Please do not use this API without
* consulting with the Team team.
* </p>
* @since 3.6
* @noextend This interface is not intended to be extended by clients.
*/
public interface IBundleImporterDelegate {
/**
* Returns an array of objects describing how each given bundle (manifest headers and values)
* can be imported into a workspace project. A <code>null</code> entry in the returned array
* indicates the corresponding bundle cannot be imported by this delegate.
*
* @param manifests array of maps containing manifest headers and values of the associated bundles
* @return array of bundle import descriptions that may contain <code>null</code> entries
*/
public ScmUrlImportDescription[] validateImport(Map[] manifests);
/**
* Imports bundles into the workspace creating a project for each import description.
* Reports progress to the given monitor, if not <code>null</code>.
*
* @param descriptions description of bundles to import
* @param monitor progress monitor or <code>null</code>
* @return collection of projects created in the workspace or <code>null</code> if none
* @throws CoreException if unable to import projects
*/
public IProject[] performImport(ScmUrlImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException;
}
|