X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.export.core%2Fsrc%2Forg%2Fsimantics%2Fexport%2Fcore%2Fintf%2FPublisherClass.java;h=2e27ec16921b24b56af268c5e4d9761f998eec25;hb=99395a7780ef1626d3ae97183ef4ae717f32b215;hp=43866c32241bd90902a81fae7cca3dde907b9b5b;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/PublisherClass.java b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/PublisherClass.java index 43866c322..2e27ec169 100644 --- a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/PublisherClass.java +++ b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/PublisherClass.java @@ -1,108 +1,108 @@ -package org.simantics.export.core.intf; - -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; - -/** - * Interface for publisher implementations. - * - * @author toni.kalajainen@semantum.fi - */ -public interface PublisherClass { - - /** - * Publish content - * - * @param ctx - * @param contents - * @param options all options - * @param location location settings - * @param progress (Optional) progress monitor - * @throws ExportException - */ - void publish( ExportContext ctx, List contents, Variant options, Variant location, IProgressMonitor progress ) throws ExportException; - - /** - * Validate before publish - * - * @param ctx - * @param contents - * @param options overall all options - * @param location location settings - * @return - * @throws ExportException - */ - List validate( ExportContext ctx, List contents, Variant options, Variant location ) throws ExportException; - - //// Location Management //// - - /** - * Get all location options (even the ones that are hidden from the end-user) - * - * @param ctx - * @param contents contents to publish - * @param options all options - * @return - * @throws ExportException - */ - RecordType locationOptions( ExportContext ctx, List contents ) throws ExportException; - - /** - * Create or edit location. This may cause blocking UI operation. - * - * @param ctx - * @param location Some location settings - * @return new or modified location - * @throws ExportException - */ - Variant createLocation( ExportContext ctx, Variant location ) throws ExportException; - - /** - * Checks if location exists. - * - * @param ctx - * @param location - * @return true if location exists - * @throws ExportException - */ - boolean locationExists( ExportContext ctx, Variant location ) throws ExportException; - - /** - * Fill default location values to location - * - * @param ctx - * @param contents - * @param options - * @param locationOptions - * @throws ExportException - */ - void fillDefaultPrefs( ExportContext ctx, List contents, Variant options, Variant locationOptions ) throws ExportException; - - /** - * Save location options to preferences node(s). - * - * @param locationOptions - * @param contentScopePrefs - * @param workspaceScopePrefs - * @throws ExportException - */ - void savePref( Variant locationOptions, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; - - /** - * Load location options from preferences node(s). - * - * @param locationOptions - * @param contentScopePrefs - * @param workspaceScopePrefs - * @throws ExportException - */ - void loadPref( Variant locationOptions, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; - -} +package org.simantics.export.core.intf; + +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; + +/** + * Interface for publisher implementations. + * + * @author toni.kalajainen@semantum.fi + */ +public interface PublisherClass { + + /** + * Publish content + * + * @param ctx + * @param contents + * @param options all options + * @param location location settings + * @param progress (Optional) progress monitor + * @throws ExportException + */ + void publish( ExportContext ctx, List contents, Variant options, Variant location, IProgressMonitor progress ) throws ExportException; + + /** + * Validate before publish + * + * @param ctx + * @param contents + * @param options overall all options + * @param location location settings + * @return + * @throws ExportException + */ + List validate( ExportContext ctx, List contents, Variant options, Variant location ) throws ExportException; + + //// Location Management //// + + /** + * Get all location options (even the ones that are hidden from the end-user) + * + * @param ctx + * @param contents contents to publish + * @param options all options + * @return + * @throws ExportException + */ + RecordType locationOptions( ExportContext ctx, List contents ) throws ExportException; + + /** + * Create or edit location. This may cause blocking UI operation. + * + * @param ctx + * @param location Some location settings + * @return new or modified location + * @throws ExportException + */ + Variant createLocation( ExportContext ctx, Variant location ) throws ExportException; + + /** + * Checks if location exists. + * + * @param ctx + * @param location + * @return true if location exists + * @throws ExportException + */ + boolean locationExists( ExportContext ctx, Variant location ) throws ExportException; + + /** + * Fill default location values to location + * + * @param ctx + * @param contents + * @param options + * @param locationOptions + * @throws ExportException + */ + void fillDefaultPrefs( ExportContext ctx, List contents, Variant options, Variant locationOptions ) throws ExportException; + + /** + * Save location options to preferences node(s). + * + * @param locationOptions + * @param contentScopePrefs + * @param workspaceScopePrefs + * @throws ExportException + */ + void savePref( Variant locationOptions, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; + + /** + * Load location options from preferences node(s). + * + * @param locationOptions + * @param contentScopePrefs + * @param workspaceScopePrefs + * @throws ExportException + */ + void loadPref( Variant locationOptions, Preferences contentScopePrefs, Preferences workspaceScopePrefs ) throws ExportException; + +}