01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: * Red Hat, Inc - setStrip(int), getStrip()
11: *******************************************************************************/package org.eclipse.ui.internal.wizards.datatransfer;
12:
13: import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
14:
15: /**
16: * Interface which can provide structure and content information for an archive
17: * element. Used by the import wizards to abstract the commonalities between
18: * importing from the a zip file and importing from a tar file.
19: *
20: * @since 3.1
21: */
22: interface ILeveledImportStructureProvider extends
23: IImportStructureProvider {
24: /**
25: * Returns the entry that this importer uses as the root sentinel.
26: *
27: * @return root entry of the archive file
28: */
29: public abstract Object getRoot();
30:
31: /**
32: * Tells the provider to strip N number of directories from the path of any
33: * path or file name returned by the IImportStructureProvider (Default=0).
34: *
35: * @param level
36: * The number of directories to strip
37: */
38: public abstract void setStrip(int level);
39:
40: /**
41: * Returns the number of directories that this IImportStructureProvider is
42: * stripping from the file name
43: *
44: * @return int Number of entries
45: */
46: public abstract int getStrip();
47:
48: /**
49: * Close the archive file that was used to create this leveled structure provider.
50: *
51: * @return <code>true</code> if the archive was closed successfully
52: */
53: public boolean closeArchive();
54: }
|