X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.export.core%2Fsrc%2Forg%2Fsimantics%2Fexport%2Fcore%2Fintf%2FContentType.java;h=1d226fc2d4c7bc233c131a2dded79a2e00b20b33;hp=5aec810fe13e1de24c4ef2f8c13f12897482f3fd;hb=48ea5bf055156f92d497a9a45bc05ac9d85b6f43;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ContentType.java b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ContentType.java index 5aec810fe..1d226fc2d 100644 --- a/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ContentType.java +++ b/bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ContentType.java @@ -1,64 +1,64 @@ -package org.simantics.export.core.intf; - -import java.util.Collection; -import java.util.Map; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.simantics.export.core.ExportContext; -import org.simantics.export.core.error.ExportException; - -/** - * Content Type extension - * - * @author toni.kalajainen@semantum.fi - */ -public interface ContentType extends ContentTypeAction { - - /** - * The identifier for the content type. - * @return - */ - String id(); - - /** - * The ui label for the content type. - * @return - */ - String label(); - - /** - * The ui label for the content type in plural. - * @return - */ - String plural(); - - /** - * Content-based icon for a content entity of this content type. - * @param content - * @return - */ - ImageDescriptor icon(String contentUri); - - /** - * Fixed icon for the content type - * @return (Optional) icon - */ - ImageDescriptor icon(); - - /** - * Returns true if the content type is a model type. - * @return - */ - boolean isModel(); - - /** - * Read labels for a collection of contents - * - * @param ctx - * @param contents - * @return labels - * @throws ExportException if failed to get a label - */ - Map getLabels( ExportContext ctx, Collection contents ) throws ExportException; - -} +package org.simantics.export.core.intf; + +import java.util.Collection; +import java.util.Map; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.export.core.ExportContext; +import org.simantics.export.core.error.ExportException; + +/** + * Content Type extension + * + * @author toni.kalajainen@semantum.fi + */ +public interface ContentType extends ContentTypeAction { + + /** + * The identifier for the content type. + * @return + */ + String id(); + + /** + * The ui label for the content type. + * @return + */ + String label(); + + /** + * The ui label for the content type in plural. + * @return + */ + String plural(); + + /** + * Content-based icon for a content entity of this content type. + * @param content + * @return + */ + ImageDescriptor icon(String contentUri); + + /** + * Fixed icon for the content type + * @return (Optional) icon + */ + ImageDescriptor icon(); + + /** + * Returns true if the content type is a model type. + * @return + */ + boolean isModel(); + + /** + * Read labels for a collection of contents + * + * @param ctx + * @param contents + * @return labels + * @throws ExportException if failed to get a label + */ + Map getLabels( ExportContext ctx, Collection contents ) throws ExportException; + +}