]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 package org.simantics.export.core.intf;\r
2 \r
3 import java.util.Collection;\r
4 import java.util.Map;\r
5 \r
6 import org.eclipse.jface.resource.ImageDescriptor;\r
7 import org.simantics.export.core.ExportContext;\r
8 import org.simantics.export.core.error.ExportException;\r
9 \r
10 /**\r
11  * Content Type extension\r
12  *\r
13  * @author toni.kalajainen@semantum.fi\r
14  */\r
15 public interface ContentType extends ContentTypeAction {\r
16         \r
17         /**\r
18          * The identifier for the content type. \r
19          * @return\r
20          */\r
21         String id();\r
22         \r
23         /**\r
24          * The ui label for the content type.\r
25          * @return\r
26          */\r
27         String label();\r
28         \r
29         /**\r
30          * The ui label for the content type in plural.\r
31          * @return\r
32          */\r
33         String plural();\r
34 \r
35         /**\r
36          * Content-based icon for a content entity of this content type.\r
37          * @param content\r
38          * @return\r
39          */\r
40         ImageDescriptor icon(String contentUri);\r
41 \r
42         /**\r
43          * Fixed icon for the content type\r
44          * @return (Optional) icon\r
45          */\r
46         ImageDescriptor icon();         \r
47 \r
48         /**\r
49          * Returns true if the content type is a model type.\r
50          * @return\r
51          */\r
52         boolean isModel();\r
53 \r
54         /**\r
55          * Read labels for a collection of contents\r
56          * \r
57          * @param ctx \r
58          * @param contents\r
59          * @return labels\r
60          * @throws ExportException if failed to get a label\r
61          */\r
62         Map<String, String> getLabels( ExportContext ctx, Collection<String> contents ) throws ExportException;\r
63 \r
64 }\r