]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - dist/argeo-node/rpm/usr/share/node/jjs/cms.js
1 var System
= Java
.type("java.lang.System");
2 var OsgiBuilder
= Java
.type("org.argeo.osgi.boot.OsgiBuilder");
4 var osgi
= new OsgiBuilder();
6 osgi
.start(2, "org.eclipse.equinox.http.servlet");
7 osgi
.start(2, "org.eclipse.equinox.http.jetty");
8 osgi
.start(2, "org.eclipse.equinox.metatype");
9 osgi
.start(2, "org.eclipse.equinox.cm");
10 osgi
.start(2, "org.eclipse.rap.rwt.osgi");
11 osgi
.start(3, "org.argeo.cms");
12 osgi
.start(4, "org.eclipse.gemini.blueprint.extender");
13 osgi
.start(4, "org.eclipse.equinox.http.registry");
14 // specific properties
15 osgi
.conf("org.eclipse.rap.workbenchAutostart", "false");
16 osgi
.conf("org.eclipse.equinox.http.jetty.autostart", "false");
17 osgi
.conf("org.osgi.framework.bootdelegation", "com.sun.jndi.ldap,"
18 + "com.sun.jndi.ldap.sasl," + "com.sun.security.jgss,"
19 + "com.sun.jndi.dns," + "com.sun.nio.file," + "com.sun.nio.sctp");
21 var homeUri
= java
.nio
.file
.Paths
22 .get(java
.lang
.System
.getProperty("user.home")).toUri().toString();
23 if (typeof app
!== 'undefined') {
24 if (typeof appHome
== 'undefined') {
25 var appHome
= homeUri
+ "/.a2/var/lib/" + app
;
27 if (typeof appConf
== 'undefined') {
28 var appConf
= homeUri
+ "/.a2/etc/" + app
;
30 if (typeof policyFile
== 'undefined') {
31 var policyFile
= "node.policy";
33 osgi
.conf("osgi.configuration.area", appHome
+ "/state");
34 osgi
.conf("osgi.instance.area", appHome
+ "/data");
35 System
.setProperty("java.security.manager", "");
36 System
.setProperty("java.security.policy", appConf
+ "/" + policyFile
);
37 System
.setProperty("log4j.configuration", appConf
+ "/log4j.properties");
40 function openWorkbench() {
41 osgi
.spring("org.argeo.cms.ui.workbench.rap");
42 var appUrl
= "http://127.0.0.1:" + osgi
.httpPort
+ "/ui/node";
43 $EXEC("chrome --app=" + appUrl
);
44 // shutdown when the window is closed