KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > wizards > datatransfer > ILeveledImportStructureProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * Red Hat, Inc - setStrip(int), getStrip()
11  *******************************************************************************/

12
13 package org.eclipse.ui.internal.wizards.datatransfer;
14
15
16 import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
17
18 /**
19  * Interface which can provide structure and content information for an archive
20  * element. Used by the import wizards to abstract the commonalities between
21  * importing from the a zip file and importing from a tar file.
22  *
23  * @since 3.1
24  */

25 interface ILeveledImportStructureProvider extends IImportStructureProvider {
26     /**
27      * Returns the entry that this importer uses as the root sentinel.
28      *
29      * @return root entry of the archive file
30      */

31     public abstract Object JavaDoc getRoot();
32
33     /**
34      * Tells the provider to strip N number of directories from the path of any
35      * path or file name returned by the IImportStructureProvider (Default=0).
36      *
37      * @param level
38      * The number of directories to strip
39      */

40     public abstract void setStrip(int level);
41
42     /**
43      * Returns the number of directories that this IImportStructureProvider is
44      * stripping from the file name
45      *
46      * @return int Number of entries
47      */

48     public abstract int getStrip();
49     
50     /**
51      * Close the archive file that was used to create this leveled structure provider.
52      *
53      * @return <code>true</code> if the archive was closed successfully
54      */

55     public boolean closeArchive();
56 }
57
Popular Tags