X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.export.core%2Fsrc%2Forg%2Fsimantics%2Fexport%2Fcore%2Fintf%2FExportClass.java;h=76a22aac727ccc1a19a239becc899569d57bb2c7;hb=refs%2Fchanges%2F38%2F238%2F2;hp=29cee934be6bf17c53754d432c8057151119a731;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ExportClass.java b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ExportClass.java index 29cee934b..76a22aac7 100644 --- a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ExportClass.java +++ b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ExportClass.java @@ -1,89 +1,89 @@ -package org.simantics.export.core.intf; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.osgi.service.prefs.Preferences; -import org.simantics.databoard.binding.mutable.Variant; -import org.simantics.databoard.type.RecordType; -import org.simantics.export.core.ExportContext; -import org.simantics.export.core.error.ExportException; -import org.simantics.export.core.manager.Content; -import org.simantics.utils.datastructures.MapList; - -public interface ExportClass { - - /** - * Get extension specific options. - * - * @param ctx - * @param contentUris - * @return a record type describing options - */ - RecordType options( ExportContext ctx, Collection contentUris ) throws ExportException; - - /** - * Validate that the content can be exported. If not, an exception is thrown. - * - * @param contentUri - * @param writer - * @param context - * @param monitor - * @param options - * @return list of errors - */ - List validate( - String contentUri, - ExportContext context, - Variant options); - - /** - * Write format specific content to a content writer. - * - * @param contentUris a list of uris - * @param writer a writer object that is created with format extension - * @param ctx export context - * @param options all export options in a variant - * @param monitor - * @param attachmentMap (optional) attachments - * @throws ExportException - */ - void export( - List contents, - Object writer, - ExportContext ctx, - Variant options, - IProgressMonitor monitor, - MapList attachmentMap - ) throws ExportException; - - /** - * Fill the options object with default values. - * - * @param ctx - * @param options - */ - void fillDefaultPrefs( ExportContext ctx, Variant options ) throws ExportException; - - /** - * Save export options to preferences node(s). - * - * @param options - * @param contentScopePrefs - * @param workspaceScopePrefs - * @throws ExportException - */ - void savePref( Variant options, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; - - /** - * Load export options from preferences node(s). - * - * @param options - * @param contentScopeNode - * @param workspaceScopePrefs - * @throws ExportException - */ - void loadPref( Variant options, Preferences contentScopeNode, Preferences workspaceScopePrefs ) throws ExportException; - -} +package org.simantics.export.core.intf; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.osgi.service.prefs.Preferences; +import org.simantics.databoard.binding.mutable.Variant; +import org.simantics.databoard.type.RecordType; +import org.simantics.export.core.ExportContext; +import org.simantics.export.core.error.ExportException; +import org.simantics.export.core.manager.Content; +import org.simantics.utils.datastructures.MapList; + +public interface ExportClass { + + /** + * Get extension specific options. + * + * @param ctx + * @param contentUris + * @return a record type describing options + */ + RecordType options( ExportContext ctx, Collection contentUris ) throws ExportException; + + /** + * Validate that the content can be exported. If not, an exception is thrown. + * + * @param contentUri + * @param writer + * @param context + * @param monitor + * @param options + * @return list of errors + */ + List validate( + String contentUri, + ExportContext context, + Variant options); + + /** + * Write format specific content to a content writer. + * + * @param contentUris a list of uris + * @param writer a writer object that is created with format extension + * @param ctx export context + * @param options all export options in a variant + * @param monitor + * @param attachmentMap (optional) attachments + * @throws ExportException + */ + void export( + List contents, + Object writer, + ExportContext ctx, + Variant options, + IProgressMonitor monitor, + MapList attachmentMap + ) throws ExportException; + + /** + * Fill the options object with default values. + * + * @param ctx + * @param options + */ + void fillDefaultPrefs( ExportContext ctx, Variant options ) throws ExportException; + + /** + * Save export options to preferences node(s). + * + * @param options + * @param contentScopePrefs + * @param workspaceScopePrefs + * @throws ExportException + */ + void savePref( Variant options, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; + + /** + * Load export options from preferences node(s). + * + * @param options + * @param contentScopeNode + * @param workspaceScopePrefs + * @throws ExportException + */ + void loadPref( Variant options, Preferences contentScopeNode, Preferences workspaceScopePrefs ) throws ExportException; + +}