--- /dev/null
+argeo.osgi.start=\
+org.springframework.osgi.extender,\
+org.argeo.node.repofactory.jackrabbit,\
+org.argeo.node.repo.jackrabbit,\
+org.argeo.security.dao.jackrabbit,\
+org.argeo.security.services,\
+org.argeo.security.equinox,\
+
+org.argeo.security.ui.initialPerspective=org.argeo.osgi.ui.explorer.perspective
+
+#argeo.node.repo.uri=http://localhost:7070/org.argeo.jcr.webapp/remoting/node
+
+log4j.configuration=file:../../log4j.properties
+
+eclipse.application=org.argeo.security.ui.rcp.secureUi
org.argeo.server.ads.server,\
org.springframework.osgi.web.extender,\
-#org.argeo.security.ui.initialPerspective=org.argeo.jcr.ui.explorer.perspective
org.argeo.security.ui.initialPerspective=org.argeo.osgi.ui.explorer.perspective
-argeo.node.repo.home=~/.argeo/server_noderepo
-argeo.node.repo.dburl=jdbc:h2:file:~/.argeo/h2/server_noderepo_db
-
log4j.configuration=file:../../log4j.properties
## Levels
log4j.logger.org.argeo=DEBUG
log4j.logger.org.argeo.jackrabbit.remote.ExtendedDispatcherServlet=WARN
-
-log4j.logger.org.springframework.security=DEBUG
+log4j.logger.org.argeo.server.webextender.TomcatDeployer=WARN
log4j.logger.org.apache.catalina=INFO
-log4j.logger.org.apache.coyote=INFO
-log4j.logger.org.apache.tomcat=INFO
-
-log4j.logger.org.apache.directory.server=INFO
-log4j.logger.org.apache.directory.server.core.partition=ERROR
-log4j.logger.org.apache.directory.server.core.schema.bootstrap.BootstrapAttributeTypeRegistry=ERROR
-
-log4j.logger.org.apache.jackrabbit=WARN
+log4j.logger.org.apache.directory.server=ERROR
log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
## Appenders
this.repositoryRegister = repositoryRegister;
}
- /** Sends back the first level of the Tree. Independent from inputElement that can be null*/
+ /**
+ * Sends back the first level of the Tree. Independent from inputElement
+ * that can be null
+ */
public Object[] getElements(Object inputElement) {
List<Object> objs = new ArrayList<Object>();
- if (userSession != null)
- objs.add(JcrUtils.getUserHome(userSession));
+ if (userSession != null) {
+ Node userHome = JcrUtils.getUserHome(userSession);
+ if (userHome != null)
+ objs.add(userHome);
+ }
if (repositoryRegister != null)
objs.add(repositoryRegister);
return objs.toArray();
try {
if (element instanceof Node) {
Node node = (Node) element;
- if(!node.getPath().equals("/"))
- return node.getParent();
+ if (!node.getPath().equals("/"))
+ return node.getParent();
else
return null;
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.part.ViewPart;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
// State
column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setWidth(16);
+ column.getColumn().setWidth(18);
column.getColumn().setText("State");
column.setLabelProvider(new StateLabelProvider());
new ColumnViewerComparator<Bundle>(column, new Comparator<Bundle>() {
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
- xmlns:util="http://www.springframework.org/schema/util"\r
- xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
- http://www.springframework.org/schema/beans \r
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/util\r
- http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
-\r
- <!-- REFERENCE -->\r
-<!-- <reference id="authenticationManager" -->\r
-<!-- interface="org.springframework.security.AuthenticationManager" /> -->\r
-\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
- <bean id="secureUi" class="org.argeo.security.ui.rcp.SecureRcp">
-<!-- <property name="authenticationManager" ref="authenticationManager" /> -->
- </bean>
-</beans>
\ No newline at end of file
thread="main"
visible="true">
<run
- class="org.argeo.eclipse.spring.SpringExtensionFactory">
+ class="org.argeo.security.ui.rcp.SecureRcp">
</run>
</application>
</extension>
public Object start(IApplicationContext context) throws Exception {
// wait for the system to be initialized
- try {
- Thread.sleep(3000);
- } catch (Exception e2) {
- // silent
- }
+// try {
+// Thread.sleep(3000);
+// } catch (Exception e2) {
+// // silent
+// }
// choose login context
final ILoginContext loginContext;
argeo.node.repo.workspace=dev
# Repository base directory
-argeo.node.repo.home=${osgi.instance.area}/org/argeo/jackrabbit/node/repo
+argeo.node.repo.home=${osgi.instance.area}/node/repo
## H2 Embedded (DEFAULT)
argeo.node.repo.configuration=osgibundle:repository-h2.xml
-argeo.node.repo.dburl=jdbc:h2:${osgi.instance.area}/org/argeo/jackrabbit/node/h2
+argeo.node.repo.dburl=jdbc:h2:${osgi.instance.area}/node/h2/repo
argeo.node.repo.dbuser=sa
argeo.node.repo.dbpassword=
/** Actually creates a new repository. */
protected void createJackrabbitRepository() {
+ long begin = System.currentTimeMillis();
try {
// remote repository
if (uri != null && !uri.trim().equals("")) {
params.put(
org.apache.jackrabbit.commons.JcrUtils.REPOSITORY_URI,
uri);
- repository = (JackrabbitRepository) new Jcr2davRepositoryFactory()
+ repository = new Jcr2davRepositoryFactory()
.getRepository(params);
if (repository == null)
throw new ArgeoException("Remote Davex repository " + uri
else
repository = RepositoryImpl.create(repositoryConfig);
- log.info("Initialized Jackrabbit repository " + repository + " in "
- + getHomeDirectory() + " with config " + configuration);
+ double duration = ((double) (System.currentTimeMillis() - begin)) / 1000;
+ log.info("Initialized Jackrabbit repository in " + duration
+ + " s, home: " + getHomeDirectory() + ", config: "
+ + configuration);
} catch (Exception e) {
throw new ArgeoException("Cannot create Jackrabbit repository "
+ getHomeDirectory(), e);
/** Lazy init. */
protected File getHomeDirectory() {
- return homeDirectory;
- // if (home != null)
- // return home;
- //
- // try {
- // String osgiData = System.getProperty("osgi.instance.area");
- // if (osgiData != null)
- // osgiData = osgiData.substring("file:".length());
- // String path;
- // if (homeDirectory == null)
- // path = "./jackrabbit";
- // else
- // path = homeDirectory;
- // if (path.startsWith(".") && osgiData != null) {
- // home = new File(osgiData + '/' + path).getCanonicalFile();
- // } else
- // home = new File(path).getCanonicalFile();
- // return home;
- // } catch (Exception e) {
- // throw new ArgeoException("Cannot define Jackrabbit home based on "
- // + homeDirectory, e);
- // }
+ try {
+ return homeDirectory.getCanonicalFile();
+ } catch (IOException e) {
+ throw new ArgeoException("Cannot get canonical file for "
+ + homeDirectory, e);
+ }
}
public void dispose() throws Exception {
+ long begin = System.currentTimeMillis();
if (repository != null) {
if (repository instanceof JackrabbitRepository)
((JackrabbitRepository) repository).shutdown();
+ getHomeDirectory());
}
+ double duration = ((double) (System.currentTimeMillis() - begin)) / 1000;
if (uri != null && !uri.trim().equals(""))
log.info("Destroyed Jackrabbit repository with uri " + uri);
else
- log.info("Destroyed Jackrabbit repository " + repository + " in "
- + getHomeDirectory() + " with config " + configuration);
+ log.info("Destroyed Jackrabbit repository in " + duration
+ + " s, home: " + getHomeDirectory() + ", config "
+ + configuration);
}
/**