]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - dist/argeo-node/base/share/argeo/cms.js
3e8bc827d790e81fda883e1093c5b1d05ec2e56e
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.equinox.ds");
11 osgi
.start(2, "org.eclipse.rap.rwt.osgi");
12 osgi
.start(3, "org.argeo.cms");
13 osgi
.start(4, "org.eclipse.gemini.blueprint.extender");
14 osgi
.start(4, "org.eclipse.equinox.http.registry");
15 // specific properties
16 osgi
.conf("org.eclipse.rap.workbenchAutostart", "false");
17 osgi
.conf("org.eclipse.equinox.http.jetty.autostart", "false");
18 osgi
.conf("org.osgi.framework.bootdelegation", "com.sun.jndi.ldap,"
19 + "com.sun.jndi.ldap.sasl," + "com.sun.security.jgss,"
20 + "com.sun.jndi.dns," + "com.sun.nio.file," + "com.sun.nio.sctp");
22 var homeUri
= java
.nio
.file
.Paths
23 .get(java
.lang
.System
.getProperty("user.home")).toUri().toString();
24 if (typeof app
!== 'undefined') {
25 if (typeof appHome
== 'undefined') {
26 var appHome
= homeUri
+ "/.a2/var/lib/" + app
;
28 if (typeof appConf
== 'undefined') {
29 var appConf
= homeUri
+ "/.a2/etc/" + app
;
31 if (typeof policyFile
== 'undefined') {
32 var policyFile
= "node.policy";
34 osgi
.conf("osgi.configuration.area", appHome
+ "/state");
35 osgi
.conf("osgi.instance.area", appHome
+ "/data");
36 System
.setProperty("java.security.manager", "");
37 System
.setProperty("java.security.policy", appConf
+ "/" + policyFile
);
38 System
.setProperty("log4j.configuration", appConf
+ "/log4j.properties");
41 function openWorkbench() {
42 osgi
.spring("org.argeo.cms.ui.workbench.rap");
43 var appUrl
= "http://127.0.0.1:" + osgi
.httpPort
+ "/ui/node";
44 $EXEC("chrome --app=" + appUrl
);
45 // shutdown when the window is closed