1 /** |
|
2 * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Symbian Foundation - initial contribution. |
|
11 * Contributors: |
|
12 * Description: |
|
13 * Overview: |
|
14 * Details: |
|
15 * Platforms/Drives/Compatibility: |
|
16 * Assumptions/Requirement/Pre-requisites: |
|
17 * Failures and causes: |
|
18 */ |
|
19 package org.symbian.tools.mtw.ui.deployment; |
|
20 |
|
21 import org.eclipse.core.runtime.CoreException; |
|
22 import org.eclipse.core.runtime.IProgressMonitor; |
|
23 import org.eclipse.core.runtime.jobs.ISchedulingRule; |
|
24 import org.symbian.tools.mtw.core.projects.IMTWProject; |
|
25 |
|
26 /** |
|
27 * This interface is for deployment targets providers. |
|
28 * |
|
29 * @author Eugene |
|
30 */ |
|
31 public interface IDeploymentTargetProvider { |
|
32 /** |
|
33 * Returns list of the targets that accept provided project. Project |
|
34 * cannot be <code>null</code>. |
|
35 * @return List of the valid deployment targets. Both <code>null</code> and |
|
36 * empty array are a valid return value when there are no available targets. |
|
37 */ |
|
38 IDeploymentTarget[] getTargets(IMTWProject project); |
|
39 |
|
40 /** |
|
41 * Discovers targets. This can be a long-running task and in most cases |
|
42 * will be triggered by the user. |
|
43 */ |
|
44 void discoverTargets(IProgressMonitor monitor) throws CoreException; |
|
45 |
|
46 /** |
|
47 * Find target based on project and target ID. This method returns |
|
48 * <code>null</code> if target with given ID cannot be found or if |
|
49 * the target does not accept project any longer. |
|
50 */ |
|
51 IDeploymentTarget findTarget(IMTWProject project, String id); |
|
52 |
|
53 /** |
|
54 * Return <code>false</code> if user needs to trigger long-running |
|
55 * discovery to see all potential deployment targets. |
|
56 */ |
|
57 boolean targetsDiscovered(); |
|
58 |
|
59 /** |
|
60 * @param target that will be used by a {@link org.eclipse.core.runtime.jobs.Job} |
|
61 * @return scheduling rule that will be used to properly schedule jobs to |
|
62 * avoid resource access conflicts. Can be <code>null</code> |
|
63 */ |
|
64 ISchedulingRule getSchedulingRule(IDeploymentTarget target); |
|
65 } |
|