]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.export.core/src/org/simantics/export/core/intf/ContentType.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.export.core / src / org / simantics / export / core / intf / ContentType.java
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
new file mode 100644 (file)
index 0000000..5aec810
--- /dev/null
@@ -0,0 +1,64 @@
+package org.simantics.export.core.intf;\r
+\r
+import java.util.Collection;\r
+import java.util.Map;\r
+\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.simantics.export.core.ExportContext;\r
+import org.simantics.export.core.error.ExportException;\r
+\r
+/**\r
+ * Content Type extension\r
+ *\r
+ * @author toni.kalajainen@semantum.fi\r
+ */\r
+public interface ContentType extends ContentTypeAction {\r
+       \r
+       /**\r
+        * The identifier for the content type. \r
+        * @return\r
+        */\r
+       String id();\r
+       \r
+       /**\r
+        * The ui label for the content type.\r
+        * @return\r
+        */\r
+       String label();\r
+       \r
+       /**\r
+        * The ui label for the content type in plural.\r
+        * @return\r
+        */\r
+       String plural();\r
+\r
+       /**\r
+        * Content-based icon for a content entity of this content type.\r
+        * @param content\r
+        * @return\r
+        */\r
+       ImageDescriptor icon(String contentUri);\r
+\r
+       /**\r
+        * Fixed icon for the content type\r
+        * @return (Optional) icon\r
+        */\r
+       ImageDescriptor icon();         \r
+\r
+       /**\r
+        * Returns true if the content type is a model type.\r
+        * @return\r
+        */\r
+       boolean isModel();\r
+\r
+       /**\r
+        * Read labels for a collection of contents\r
+        * \r
+        * @param ctx \r
+        * @param contents\r
+        * @return labels\r
+        * @throws ExportException if failed to get a label\r
+        */\r
+       Map<String, String> getLabels( ExportContext ctx, Collection<String> contents ) throws ExportException;\r
+\r
+}\r