Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-12-06 08:33:58 -0500
committerUwe Stieber2011-12-06 08:33:58 -0500
commit69a6318c280f1069c49f5ada45f70a98245a5c83 (patch)
tree8e778b81f1a7c19daadbda2849e631a1c1fc49f7 /target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence
parenta9e5699bf2d845c2b8d8e941a3eaa32062de05f5 (diff)
downloadorg.eclipse.tcf-69a6318c280f1069c49f5ada45f70a98245a5c83.tar.gz
org.eclipse.tcf-69a6318c280f1069c49f5ada45f70a98245a5c83.tar.xz
org.eclipse.tcf-69a6318c280f1069c49f5ada45f70a98245a5c83.zip
Target Explorer: Added IPersistableNameProvider interface
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java10
2 files changed, 28 insertions, 10 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java
new file mode 100644
index 000000000..2ab45f64d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
+
+/**
+ * Interface to be implemented by persistable elements which requires a
+ * custom persistence store naming schema.
+ */
+public interface IPersistableNameProvider {
+
+ /**
+ * Returns the name to use to store the data object to the persistence storage.
+ * <p>
+ * <b>Note:</b> The name returned by this method is expected to be a valid name to the persistence
+ * storage provider. The name will be passed on as returned.
+ *
+ * @param data The data object. Must not be <code>null</code>.
+ * @return The persistable name for the given data object or <code<null</code>.
+ */
+ public String getName(Object data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java
index 4c85529fe..cb5058d33 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java
@@ -23,14 +23,4 @@ public interface IPersistableNodeProperties {
* The property itself is a transient property.
*/
public static final String PROPERTY_URI = "URI.transient"; //$NON-NLS-1$
-
- /**
- * The node name to use to store the node to the persistence storage. Typically prepended with
- * segments describing the persistence storage hierarchy, like an absolute file path in case of
- * a file system based persistence storage.
- * <p>
- * The node name is free text, but all non-word characters are replaced by '_' before creating
- * the persistence node.
- */
- public static final String PROPERTY_NODE_NAME = "persistenceNodeName"; //$NON-NLS-1$
}

Back to the top