Line | |
---|
1 | package org.expeditee.importer;
|
---|
2 |
|
---|
3 | import java.awt.Point;
|
---|
4 | import java.io.File;
|
---|
5 | import java.io.IOException;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Used for importing files (and folders) into Expeditee. A FileImporter
|
---|
9 | * may or maynot choose to import a file.
|
---|
10 | *
|
---|
11 | * @author Brook Novak
|
---|
12 | *
|
---|
13 | */
|
---|
14 | public interface FileImporter {
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Invoked when a file (or directory) is to be imported.
|
---|
18 | *
|
---|
19 | * The importer can choose whether or not to stop other importers to import
|
---|
20 | * the files by returning true.
|
---|
21 | *
|
---|
22 | * @param f
|
---|
23 | * The file to import. Not null.
|
---|
24 | *
|
---|
25 | * @param location
|
---|
26 | * The location in expeditee space where the import was requested.
|
---|
27 | * Null if not applicable.
|
---|
28 | *
|
---|
29 | * @return
|
---|
30 | * True to stop the import handling proccess for this file. False to allow other
|
---|
31 | * potential import handlers to also import the file.
|
---|
32 | * Should always return false if cannot handle the file.
|
---|
33 | *
|
---|
34 | * @throws IOException
|
---|
35 | * If the import procedure failed.
|
---|
36 | */
|
---|
37 | boolean importFile(File f, Point location) throws IOException;
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.