]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/INode.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / model / INode.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.modeling.ui.modelBrowser.model;\r
13 \r
14 import java.util.Collection;\r
15 \r
16 import org.eclipse.core.runtime.IAdaptable;\r
17 import org.eclipse.jface.resource.ImageDescriptor;\r
18 import org.eclipse.jface.viewers.ISelection;\r
19 import org.simantics.browsing.ui.common.node.IDeletable;\r
20 import org.simantics.browsing.ui.common.node.IModifiable;\r
21 import org.simantics.browsing.ui.common.node.IRefreshable;\r
22 import org.simantics.browsing.ui.content.Labeler.Modifier;\r
23 import org.simantics.db.ReadGraph;\r
24 import org.simantics.db.Session;\r
25 import org.simantics.db.WriteGraph;\r
26 import org.simantics.db.exception.DatabaseException;\r
27 \r
28 /**\r
29  * INode represents a node in the graph based object model.\r
30  * \r
31  * @see IDeletable\r
32  * @see IModifiable\r
33  * @see IRefreshable\r
34  * @see IOpenable\r
35  * \r
36  * @deprecated <a href="https://www.simantics.org/wiki/index.php/Org.simantics.browsing.ui_Manual">See tutorial for new features</a>\r
37  */\r
38 @Deprecated\r
39 public interface INode extends IAdaptable {\r
40     String getLabel(ReadGraph graph) throws DatabaseException;\r
41     int getCategory(ReadGraph graph) throws DatabaseException;\r
42     Collection<?> getChildren(ReadGraph graph) throws DatabaseException;\r
43     boolean hasChildren(ReadGraph graph) throws DatabaseException;\r
44     ImageDescriptor getImage(ReadGraph graph) throws DatabaseException;\r
45     void handleDrop(Session session, ISelection selection);\r
46     Modifier getModifier(Session session, String columnId);\r
47 \r
48     /**\r
49      * Delete node in the background system. The node is considered deletable\r
50      * only if it implements {@link IDeletable}.\r
51      */\r
52     void handleDelete(WriteGraph graph) throws DatabaseException;\r
53 }\r