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.IAdaptable; |
|
23 import org.eclipse.core.runtime.IProgressMonitor; |
|
24 import org.eclipse.core.runtime.IStatus; |
|
25 import org.eclipse.ui.IMemento; |
|
26 import org.symbian.tools.mtw.core.projects.IMTWProject; |
|
27 import org.symbian.tools.mtw.core.runtimes.IPackager; |
|
28 |
|
29 /** |
|
30 * <p>This is particular deployment target instance. It can be a Bluetooth phone |
|
31 * connection, installed device emulator, FTP server, etc.</p> |
|
32 * |
|
33 * <p>Targets can be cached and {@link #setProject(WRTProject)} will be called |
|
34 * if active project was changed. Targets are single-threaded. This class |
|
35 * methods can be called from non-SWT thread.</p> |
|
36 * |
|
37 * <p>Following adapters can be provided by either overriding getAdapter method |
|
38 * or by contributing to org.eclipse.core.runtime.adapters extension point:</p> |
|
39 * <ul><li>{@link org.eclipse.ui.IPersistable} - to persist advanced per- |
|
40 * project target configuration</li><li> |
|
41 * {@link org.eclipse.ui.model.IWorkbenchAdapter} or |
|
42 * {@link org.eclipse.ui.model.IWorkbenchAdapter2} to customize target |
|
43 * presentation in IDE user interface.</li></ul> |
|
44 * |
|
45 * <p>Overwriting <code>equals</code> and <code>hashCode</code> might be desirable |
|
46 * if new objects are created each time user does discovery process.</p> |
|
47 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
|
48 */ |
|
49 public interface IDeploymentTarget extends IAdaptable { |
|
50 /** |
|
51 * Returns unique ID. There is no restriction on ID string format. Cannot |
|
52 * be <code>null</code> |
|
53 */ |
|
54 String getId(); |
|
55 |
|
56 /** |
|
57 * <p>Returns user-readable name. Can be null if |
|
58 * {@link org.eclipse.ui.model.IWorkbenchAdapter} is provided.<p> |
|
59 * <p>Name is not used for purposes other then presentation and may change |
|
60 * between invocations</p> |
|
61 */ |
|
62 String getName(); |
|
63 |
|
64 /** |
|
65 * Provides more details about target. This information is only displayed |
|
66 * to the user and is not important for the application. |
|
67 */ |
|
68 String getDescription(); |
|
69 |
|
70 /** |
|
71 * Deploy application to this target. |
|
72 * |
|
73 * @param project project to deploy to the target |
|
74 * @param runtime runtime that will be used to run packaged application |
|
75 * @param monitor progress monitor to report deployment progress |
|
76 */ |
|
77 IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) throws CoreException; |
|
78 |
|
79 /** |
|
80 * Save project-specific settings to the memento. Workspace-wide settings |
|
81 * should be managed separately. |
|
82 */ |
|
83 void save(IMemento memento); |
|
84 |
|
85 /** |
|
86 * Initialize target for project deployment. |
|
87 */ |
|
88 void init(IMTWProject project, IPackager packager, IMemento memento); |
|
89 } |
|