X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.fileimport%2Fsrc%2Forg%2Fsimantics%2Ffileimport%2FIGenericFileImport.java;h=07c0edc467f594d90cebcdf5750344a7397d4d8c;hp=2de1cc7427dd5f03367b9ea310731011a7e701a8;hb=b809a171b6dfb81ed9ef9e84870dcbcbc5912f0e;hpb=0e8cf1e1708870e179330c2f9af2d03589d553ab diff --git a/bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java b/bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java index 2de1cc742..07c0edc46 100644 --- a/bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java +++ b/bundles/org.simantics.fileimport/src/org/simantics/fileimport/IGenericFileImport.java @@ -5,28 +5,36 @@ import java.util.Map; import java.util.Optional; /** + * Base interface for performing file imports. + * + * Usually with Simantics products every file that will be imported will become + * a resource in the Simantics database. For these cases see {@link SimanticsResourceFileImport} + * * @author Jani Simomaa * */ public interface IGenericFileImport { /** - * Performs the import procedure for the given file + * Performs the import for the given file * - * @param file - * file to import + * @param file Path to file to import + * @return Optional string which will be the identifier of the imported file which can later be used for removing the imported entity + * @throws Exception */ Optional perform(Path file) throws Exception; /** - * @param resource + * Remove the entity + * + * @param identifier String identifier which can be used to remove the imported entity */ - void remove(String resource) throws Exception; + void remove(String identifier) throws Exception; /** * Returns a key-value map for file extensions this importer can handle * - * @return + * @return Map allowed extensions this service can handle. Key is the extension e.g. .sharedLibrary and the value is the description of the extension */ Map allowedExtensionsWithFilters();