]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java
Sync git svn branch with SVN repository r33144.
[simantics/platform.git] / bundles / org.simantics.fileimport / src / org / simantics / fileimport / IGenericFileImport.java
1 package org.simantics.fileimport;\r
2 \r
3 import java.nio.file.Path;\r
4 import java.util.Map;\r
5 import java.util.Optional;\r
6 \r
7 /**\r
8  * @author Jani Simomaa\r
9  *\r
10  */\r
11 public interface IGenericFileImport {\r
12 \r
13     /**\r
14      * Performs the import procedure for the given file\r
15      * \r
16      * @param file\r
17      *            file to import\r
18      */\r
19     Optional<String> perform(Path file) throws Exception;\r
20 \r
21     /**\r
22      * @param resource\r
23      */\r
24     void remove(String resource) throws Exception;\r
25     \r
26     /**\r
27      * Returns a key-value map for file extensions this importer can handle\r
28      * \r
29      * @return\r
30      */\r
31     Map<String, String> allowedExtensionsWithFilters();\r
32 \r
33 }\r