--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.browsing.ui;\r
+\r
+import org.simantics.browsing.ui.NodeContext.PrimitiveQueryKey;\r
+import org.simantics.browsing.ui.exception.NoDataSourceException;\r
+\r
+/**\r
+ * \r
+ */\r
+public interface PrimitiveQueryUpdater {\r
+\r
+ /**\r
+ * A unique object representing a certain exploring context. This must be\r
+ * different for separate graph explorer instances.\r
+ * \r
+ * @return an object representing the current exploring context\r
+ */\r
+ Object getExplorerContext();\r
+\r
+ /**\r
+ * @param <T>\r
+ * @param clazz\r
+ * @return <code>null</code> if no data source is available\r
+ */\r
+ <T> DataSource<T> tryGetDataSource(Class<T> clazz);\r
+\r
+ /**\r
+ * @param <T>\r
+ * @param clazz\r
+ * @return a data source of the requested type.\r
+ * @throws NoDataSourceException if data source was not found\r
+ */\r
+ <T> DataSource<T> getDataSource(Class<T> clazz) throws NoDataSourceException;\r
+\r
+ /**\r
+ * @param <T>\r
+ * @param context\r
+ * @param key\r
+ * @param newResult\r
+ */\r
+ <T> void scheduleReplace(NodeContext context, PrimitiveQueryKey<T> key, T newResult);\r
+ // <T> void scheduleClear(INodeContext context, PrimitiveQueryKey<T> key);\r
+\r
+ /**\r
+ * Tells whether this primitive query updater is disposed or not. Don't use\r
+ * the updater after it is disposed. Disposal always happens in the UI\r
+ * thread.\r
+ * \r
+ * @return <code>true</code> if disposed\r
+ */\r
+ boolean isDisposed();\r
+ boolean isShown(NodeContext context);\r
+ \r
+ void incRef(NodeContext context);\r
+ void decRef(NodeContext context);\r
+\r
+}
\ No newline at end of file