|
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.previewer.core; |
|
20 |
|
21 import java.io.InputStream; |
|
22 |
|
23 import org.eclipse.core.resources.IFile; |
|
24 import org.eclipse.core.resources.IProject; |
|
25 import org.eclipse.core.runtime.CoreException; |
|
26 import org.eclipse.core.runtime.IPath; |
|
27 |
|
28 /** |
|
29 * This interface provides application structure as it will be used in web |
|
30 * runtime. Note that project layout may not directly correspond to application |
|
31 * layout. |
|
32 * |
|
33 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
|
34 */ |
|
35 public interface IApplicationLayoutProvider { |
|
36 /** |
|
37 * @param file workspace resource |
|
38 * @return path relative to application package root |
|
39 */ |
|
40 IPath getResourcePath(IFile file); |
|
41 |
|
42 /** |
|
43 * @param path path relative to application root |
|
44 * @return workspace resource |
|
45 * @throws CoreException if cannot access resource contents |
|
46 */ |
|
47 InputStream getResourceFromPath(IProject project, IPath path) throws CoreException; |
|
48 |
|
49 /** |
|
50 * @return workspace file that corresponds to applicationPath or |
|
51 * <code>null</code> if none |
|
52 */ |
|
53 IFile getWorkspaceFile(IProject project, IPath applicationPath) throws CoreException; |
|
54 } |