summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-02-27 04:38:31 (EST)
committerStefan Liebig2008-02-27 04:38:31 (EST)
commit041f1ff4da74d9aa0c5d5acd0ace7ffc805b2841 (patch)
treea976a16e3b467b66b1b139f2429f01726e825cfc
parentb570245901cebca4aade20dee02d0587bb1e736e (diff)
downloadorg.eclipse.riena-041f1ff4da74d9aa0c5d5acd0ace7ffc805b2841.zip
org.eclipse.riena-041f1ff4da74d9aa0c5d5acd0ace7ffc805b2841.tar.gz
org.eclipse.riena-041f1ff4da74d9aa0c5d5acd0ace7ffc805b2841.tar.bz2
added riena default service properties
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/service/ServiceId.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/service/ServiceId.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/service/ServiceId.java
index 95fd868..5b9a893 100644
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/service/ServiceId.java
+++ b/org.eclipse.riena.core/src/org/eclipse/riena/core/service/ServiceId.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.riena.core.service;
+import java.util.Hashtable;
+
+import org.osgi.framework.Constants;
+
/**
* ServiceId and Injector simplify finding of OSGi Services and injects them
* into a target object. To do so the Injector contains a service tracker
@@ -108,6 +112,20 @@ public class ServiceId {
}
/**
+ * Get almost empty service properties but set with the default ranking for
+ * riena services, i.e. the riena default ranking is lower than the (OSGi)
+ * default ranking so that service created with (OSGi) default ranking will
+ * override services with riena default ranking.
+ *
+ * @return default service properties
+ */
+ public static Hashtable<String, Object> newDefaultServiceProperties() {
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ props.put(Constants.SERVICE_RANKING, DEFAULT_RANKING);
+ return props;
+ }
+
+ /**
* @return
*/
String getServiceId() {