plugins/org.symbian.tools.tmw.core/src/org/symbian/tools/tmw/core/runtimes/IApplicationLayoutProvider.java
author Eugene Ostroukhov <eugeneo@symbian.org>
Tue, 31 Aug 2010 11:58:53 -0700
changeset 479 518afa7c6d2f
child 484 f5df819c1852
permissions -rw-r--r--
Minor refactoring to make API more clear
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
479
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     1
/**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     2
 * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     3
 * All rights reserved.
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     5
 * under the terms of the License "Eclipse Public License v1.0"
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     8
 *
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     9
 * Initial Contributors:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    10
 * Symbian Foundation - initial contribution.
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    11
 * Contributors:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    12
 * Description:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    13
 * Overview:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    14
 * Details:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    15
 * Platforms/Drives/Compatibility:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    16
 * Assumptions/Requirement/Pre-requisites:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    17
 * Failures and causes:
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    18
 */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    19
package org.symbian.tools.tmw.core.runtimes;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    20
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    21
import java.io.InputStream;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    22
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    23
import org.eclipse.core.resources.IFile;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    24
import org.eclipse.core.resources.IProject;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    25
import org.eclipse.core.runtime.CoreException;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    26
import org.eclipse.core.runtime.IPath;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    27
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    28
/**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    29
 * This interface provides application structure as it will be used in web 
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    30
 * runtime. Note that project layout may not directly correspond to application
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    31
 * layout.
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    32
 * 
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    33
 * @author Eugene Ostroukhov (eugeneo@symbian.org)
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    34
 */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    35
public interface IApplicationLayoutProvider {
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    36
    /**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    37
     * @param file workspace resource
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    38
     * @return path relative to application package root
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    39
     */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    40
    IPath getResourcePath(IFile file);
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    41
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    42
    /**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    43
     * @param path path relative to application root
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    44
     * @return workspace resource
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    45
     * @throws CoreException if cannot access resource contents 
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    46
     */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    47
    InputStream getResourceFromPath(IProject project, IPath path) throws CoreException;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    48
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    49
    /**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    50
     * @return workspace file that corresponds to applicationPath or 
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    51
     * <code>null</code> if none
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    52
     */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    53
    IFile getWorkspaceFile(IProject project, IPath applicationPath) throws CoreException;
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    54
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    55
    /**
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    56
     * @return main HTML page (application entry point)
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    57
     */
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    58
    IFile getIndexPage(IProject project);
518afa7c6d2f Minor refactoring to make API more clear
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    59
}