summaryrefslogtreecommitdiff
path: root/scripting/java
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-31 16:35:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-03-31 16:35:38 +0100
commit41434439f615b8ffd2a0a8835e720a9906497713 (patch)
treeb327baa34e9a7d4e63bea5f3885097d8f9c01ff3 /scripting/java
parent5a6c4a3d50260d23c8d5f4219ae43a6021fb2a0b (diff)
restore old-style __writeRegistryServiceInfo to deploy these as extensions
Diffstat (limited to 'scripting/java')
-rwxr-xr-xscripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java35
-rwxr-xr-xscripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java34
2 files changed, 69 insertions, 0 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
index 95c727881427..d3a0fdf3bc82 100755
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
@@ -123,6 +123,41 @@ public class ScriptProviderForBeanShell
return xSingleServiceFactory;
}
+
+
+ /**
+ * Writes the service information into the given registry key.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ *
+ * @param regKey the registryKey
+ * @return returns true if the operation succeeded
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static boolean __writeRegistryServiceInfo( XRegistryKey regKey )
+ {
+ String impl = "com.sun.star.script.framework.provider.beanshell." +
+ "ScriptProviderForBeanShell$_ScriptProviderForBeanShell";
+
+ String service1 = "com.sun.star.script.provider." +
+ "ScriptProvider";
+ String service2 = "com.sun.star.script.provider." +
+ "LanguageScriptProvider";
+ String service3 = "com.sun.star.script.provider." +
+ "ScriptProviderForBeanShell";
+ String service4 = "com.sun.star.script.browse." +
+ "BrowseNode";
+
+ if ( FactoryHelper.writeRegistryServiceInfo(impl, service1, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service2, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service3, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service4, regKey) )
+ {
+ return true;
+ }
+ return false;
+ }
+
}
class ScriptImpl implements XScript
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
index 9f04d9105374..c053b4166063 100755
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
@@ -124,6 +124,40 @@ public class ScriptProviderForJavaScript
return xSingleServiceFactory;
}
+
+
+ /**
+ * Writes the service information into the given registry key.
+ * This method is called by the <code>JavaLoader</code>
+ * <p>
+ *
+ * @param regKey the registryKey
+ * @return returns true if the operation succeeded
+ * @see com.sun.star.comp.loader.JavaLoader
+ */
+ public static boolean __writeRegistryServiceInfo( XRegistryKey regKey )
+ {
+ String impl = "com.sun.star.script.framework.provider.javascript." +
+ "ScriptProviderForJavaScript$_ScriptProviderForJavaScript";
+
+ String service1 = "com.sun.star.script.provider." +
+ "ScriptProvider";
+ String service2 = "com.sun.star.script.provider." +
+ "LanguageScriptProvider";
+ String service3 = "com.sun.star.script.provider." +
+ "ScriptProviderForJavaScript";
+ String service4 = "com.sun.star.script.browse." +
+ "BrowseNode";
+
+ if ( FactoryHelper.writeRegistryServiceInfo(impl, service1, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service2, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service3, regKey) &&
+ FactoryHelper.writeRegistryServiceInfo(impl, service4, regKey) )
+ {
+ return true;
+ }
+ return false;
+ }
}
class ScriptImpl implements XScript
{