]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java
Sync git svn branch with SVN repository r33189.
[simantics/platform.git] / bundles / org.simantics.fileimport / src / org / simantics / fileimport / IGenericFileImport.java
index 2de1cc7427dd5f03367b9ea310731011a7e701a8..07c0edc467f594d90cebcdf5750344a7397d4d8c 100644 (file)
@@ -5,28 +5,36 @@ import java.util.Map;
 import java.util.Optional;\r
 \r
 /**\r
+ * Base interface for performing file imports. \r
+ * \r
+ * Usually with Simantics products every file that will be imported will become \r
+ * a resource in the Simantics database. For these cases see {@link SimanticsResourceFileImport}\r
+ * \r
  * @author Jani Simomaa\r
  *\r
  */\r
 public interface IGenericFileImport {\r
 \r
     /**\r
-     * Performs the import procedure for the given file\r
+     * Performs the import for the given file\r
      * \r
-     * @param file\r
-     *            file to import\r
+     * @param file Path to file to import\r
+     * @return Optional string which will be the identifier of the imported file which can later be used for removing the imported entity\r
+     * @throws Exception\r
      */\r
     Optional<String> perform(Path file) throws Exception;\r
 \r
     /**\r
-     * @param resource\r
+     * Remove the entity\r
+     * \r
+     * @param identifier String identifier which can be used to remove the imported entity\r
      */\r
-    void remove(String resource) throws Exception;\r
+    void remove(String identifier) throws Exception;\r
     \r
     /**\r
      * Returns a key-value map for file extensions this importer can handle\r
      * \r
-     * @return\r
+     * @return Map<String, String> allowed extensions this service can handle. Key is the extension e.g. <code>.sharedLibrary</code> and the value is the description of the extension\r
      */\r
     Map<String, String> allowedExtensionsWithFilters();\r
 \r