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