From: Mathieu Baudier Date: Mon, 24 Nov 2014 12:47:08 +0000 (+0000) Subject: Remove unused directories X-Git-Tag: argeo-commons-2.1.30~543 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=075368d6da2e88d05bdd3d047cd4e17617176afa;p=lgpl%2Fargeo-commons.git Remove unused directories git-svn-id: https://svn.argeo.org/commons/trunk@7495 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/base/plugins/pom.xml b/base/plugins/pom.xml deleted file mode 100644 index 4eb1ec8ad..000000000 --- a/base/plugins/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - org.argeo.commons - base - 2.1.12-SNAPSHOT - .. - - org.argeo.commons - argeo-commons - Commons OSGi Eclipse Plugins - pom - - org.argeo.osgi.ui.explorer - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - - - - org.apache.maven.plugins - maven-source-plugin - - - - plugin.xml - META-INF/MANIFEST.MF - - - - - - diff --git a/base/pom.xml b/base/pom.xml deleted file mode 100644 index 8aa1c284b..000000000 --- a/base/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - base - Commons Base - Standalone building blocks, extending Java or some libraries - pom - - dep - runtime - plugins - dist - - \ No newline at end of file diff --git a/base/runtime/pom.xml b/base/runtime/pom.xml deleted file mode 100644 index c3ec59765..000000000 --- a/base/runtime/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - 4.0.0 - - org.argeo.commons - base - 2.1.12-SNAPSHOT - .. - - org.argeo.commons - argeo-commons - Commons Base Runtime - pom - - org.argeo.util - org.argeo.support.junit - org.argeo.osgi.boot - org.argeo.eclipse.ui - org.argeo.eclipse.ui.rap - org.argeo.eclipse.ui.rcp - org.argeo.eclipse.ui.jcr - - diff --git a/doc/files/etc/yum.repos.d/argeo-staging.repo b/doc/files/etc/yum.repos.d/argeo-staging.repo deleted file mode 100644 index f15e34dde..000000000 --- a/doc/files/etc/yum.repos.d/argeo-staging.repo +++ /dev/null @@ -1,6 +0,0 @@ -[argeo-osgi-staging] -name=Argeo OSGi Staging -baseurl=file:///srv/rpmfactory/argeo-osgi-1-staging/6/x86_64 -gpgcheck=0 -http_caching=none -metadata_expire=0 diff --git a/doc/pom.xml b/doc/pom.xml deleted file mode 100644 index 5bf01e7f5..000000000 --- a/doc/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 1.1.8-SNAPSHOT - argeo-commons - .. - - doc - Commons Doc - pom - - - - com.agilejava.docbkx - docbkx-maven-plugin - - css/style.css - - - - - - - - - - - - - generate-html - generate-pdf - - pre-site - - - - - - diff --git a/doc/reference/commons-gettingStarted.xml b/doc/reference/commons-gettingStarted.xml deleted file mode 100644 index 2b680e1a3..000000000 --- a/doc/reference/commons-gettingStarted.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Getting started - -
- Development environment - The following instructions are about setting up an Argeo - development environment. - -
- Software requirements - - The following elements are required to install the development - environment: - - - Java - - - Eclipse - - - -
- -
- Client installation - - -
-
-
diff --git a/doc/reference/css/style.css b/doc/reference/css/style.css deleted file mode 100644 index 0f446b9f7..000000000 --- a/doc/reference/css/style.css +++ /dev/null @@ -1,303 +0,0 @@ -body { - text-align: justify; - margin-right: 2em; - margin-left: 2em; -} - -a, -a[accesskey^="h"], -a[accesskey^="n"], -a[accesskey^="u"], -a[accesskey^="p"] { - font-family: Verdana, Arial, helvetica, sans-serif; - font-size: 12px; - color: #003399; -} - -a:active { - color: #003399; -} - -a:visited { - color: #888888; -} - -p { - font-family: Verdana, Arial, sans-serif; -} - -dt { - font-family: Verdana, Arial, sans-serif; - font-size: 12px; -} - -p, dl, dt, dd, blockquote { - color: #000000; - margin-bottom: 3px; - margin-top: 3px; - padding-top: 0; -} - -ol, ul, p { - margin-top: 6px; - margin-bottom: 6px; -} - -p, blockquote { - font-size: 90%; -} - -p.releaseinfo { - font-size: 100%; - font-weight: bold; - font-family: Verdana, Arial, helvetica, sans-serif; - padding-top: 10px; -} - -p.pubdate { - font-size: 120%; - font-weight: bold; - font-family: Verdana, Arial, helvetica, sans-serif; -} - -td { - font-size: 80%; -} - -td, th, span { - color: #000000; -} - -td[width^="40%"] { - font-family: Verdana, Arial, helvetica, sans-serif; - font-size: 12px; - color: #003399; -} - -table[summary^="Navigation header"] tbody tr th[colspan^="3"] { - font-family: Verdana, Arial, helvetica, sans-serif; -} - -blockquote { - margin-right: 0; -} - -h1, h2, h3, h4, h6 { - color: #000000; - font-weight: 500; - margin-top: 0; - padding-top: 14px; - font-family: Verdana, Arial, helvetica, sans-serif; - margin-bottom: 0; -} - -h2.title { - font-weight: 800; - margin-bottom: 8px; -} - -h2.subtitle { - font-weight: 800; - margin-bottom: 20px; -} - -.firstname, .surname { - font-size: 12px; - font-family: Verdana, Arial, helvetica, sans-serif; -} - -table { - border-collapse: collapse; - border-spacing: 0; - border: 1px black; - empty-cells: hide; - margin: 10px 0 30px 50px; - width: 90%; -} - -div.table { - margin: 30px 0 10px 0; - border: 1px dashed gray; - padding: 10px; -} - -div .table-contents table { - border: 1px solid black; -} - -div.table > p.title { - padding-left: 10px; -} - -table[summary^="Navigation footer"] { - border-collapse: collapse; - border-spacing: 0; - border: 1px black; - empty-cells: hide; - margin: 0px; - width: 100%; -} - -table[summary^="Note"], -table[summary^="Warning"], -table[summary^="Tip"] { - border-collapse: collapse; - border-spacing: 0; - border: 1px black; - empty-cells: hide; - margin: 10px 0px 10px -20px; - width: 100%; -} - -td { - padding: 4pt; - font-family: Verdana, Arial, helvetica, sans-serif; -} - -div.warning TD { - text-align: justify; -} - -h1 { - font-size: 150%; -} - -h2 { - font-size: 110%; -} - -h3 { - font-size: 100%; font-weight: bold; -} - -h4 { - font-size: 90%; font-weight: bold; -} - -h5 { - font-size: 90%; font-style: italic; -} - -h6 { - font-size: 100%; font-style: italic; -} - -tt { - font-size: 110%; - font-family: "Courier New", Courier, monospace; - color: #000000; -} - -.navheader, .navfooter { - border: none; -} - -div.navfooter table { - border-style: dashed; - border-color: gray; - border-width: 1px 1px 1px 1px; - background-color: #cde48d; -} - -pre { - font-size: 110%; - padding: 5px; - border-style: solid; - border-width: 1px; - border-color: #CCCCCC; - background-color: #f3f5e9; -} - -ul, ol, li { - list-style: disc; -} - -hr { - width: 100%; - height: 1px; - background-color: #CCCCCC; - border-width: 0; - padding: 0; -} - -.variablelist { - padding-top: 10px; - padding-bottom: 10px; - margin: 0; -} - -.term { - font-weight:bold; -} - -.mediaobject { - padding-top: 30px; - padding-bottom: 30px; -} - -.legalnotice { - font-family: Verdana, Arial, helvetica, sans-serif; - font-size: 12px; - font-style: italic; -} - -.sidebar { - float: right; - margin: 10px 0 10px 30px; - padding: 10px 20px 20px 20px; - width: 33%; - border: 1px solid black; - background-color: #F4F4F4; - font-size: 14px; -} - -.property { - font-family: "Courier New", Courier, monospace; -} - -a code { - font-family: Verdana, Arial, monospace; - font-size: 12px; -} - -td code { - font-size: 110%; -} - -div.note * td, -div.tip * td, -div.warning * td, -div.calloutlist * td { - text-align: justify; - font-size: 100%; -} - -.programlisting { - clear: both; -} - -.programlisting .interfacename, -.programlisting .literal, -.programlisting .classname { - font-size: 95%; -} - -.title .interfacename, -.title .literal, -.title .classname { - font-size: 130%; -} - -/* everything in a is displayed in a coloured, comment-like font */ -.programlisting * .lineannotation, -.programlisting * .lineannotation * { - color: green; -} - -.question * p { - font-size: 100%; -} - -.answer * p { - font-size: 100%; -} \ No newline at end of file diff --git a/doc/site/apt/index.apt b/doc/site/apt/index.apt deleted file mode 100644 index 3753a3eee..000000000 --- a/doc/site/apt/index.apt +++ /dev/null @@ -1,3 +0,0 @@ -Argeo Commons - - Commons groups the generic layers developed and maintained by Argeo. They factorize complex but generic logic in fields like security, default configurations, etc. diff --git a/doc/site/site.xml b/doc/site/site.xml deleted file mode 100644 index af6484f0e..000000000 --- a/doc/site/site.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - org.apache.maven.skins - maven-default-skin - 1.0 - - - diff --git a/security/dep/pom.xml b/security/dep/pom.xml deleted file mode 100644 index 21884a008..000000000 --- a/security/dep/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - security - .. - - org.argeo.commons - dep - Commons Security Features - pom - - org.argeo.security.dep.node - org.argeo.security.dep.node.eclipse - org.argeo.security.dep.node.rap - org.argeo.security.dep.node.rcp - - - - - org.apache.felix - maven-bundle-plugin - - - - - - rpmbuild - - - - maven-antrun-plugin - - - install - - run - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/security/modules/org.argeo.security.webapp/.project b/security/modules/org.argeo.security.webapp/.project deleted file mode 100644 index f28005ed5..000000000 --- a/security/modules/org.argeo.security.webapp/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.security.webapp - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/security/modules/org.argeo.security.webapp/WEB-INF/applicationContext.xml b/security/modules/org.argeo.security.webapp/WEB-INF/applicationContext.xml deleted file mode 100644 index 899afa312..000000000 --- a/security/modules/org.argeo.security.webapp/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/security/modules/org.argeo.security.webapp/WEB-INF/osgi.xml b/security/modules/org.argeo.security.webapp/WEB-INF/osgi.xml deleted file mode 100644 index 39c74c8f0..000000000 --- a/security/modules/org.argeo.security.webapp/WEB-INF/osgi.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/security/modules/org.argeo.security.webapp/WEB-INF/security-servlet.xml b/security/modules/org.argeo.security.webapp/WEB-INF/security-servlet.xml deleted file mode 100644 index bab0a82e4..000000000 --- a/security/modules/org.argeo.security.webapp/WEB-INF/security-servlet.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/security/modules/org.argeo.security.webapp/WEB-INF/security.xml b/security/modules/org.argeo.security.webapp/WEB-INF/security.xml deleted file mode 100644 index 66e62cfad..000000000 --- a/security/modules/org.argeo.security.webapp/WEB-INF/security.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/security/modules/org.argeo.security.webapp/WEB-INF/web.xml b/security/modules/org.argeo.security.webapp/WEB-INF/web.xml deleted file mode 100644 index 233128718..000000000 --- a/security/modules/org.argeo.security.webapp/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - Argeo Security Web Application - - - - security - org.springframework.web.servlet.DispatcherServlet - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - 1 - - - security - *.security - - - security - *.ria - - - - - contextConfigLocation - /WEB-INF/applicationContext.xml - - - - Spring Context - org.springframework.web.context.ContextLoaderListener - - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - /* - - - - argeo.security.systemKey - argeo - - diff --git a/security/modules/org.argeo.security.webapp/pom.xml b/security/modules/org.argeo.security.webapp/pom.xml deleted file mode 100644 index 1f5cc2f57..000000000 --- a/security/modules/org.argeo.security.webapp/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.security.webapp - Commons Security Webapp - - - - org.apache.felix - maven-bundle-plugin - - - org.argeo.security.webapp - - *, - javax.servlet, - javax.servlet.http, - javax.servlet.resources, - org.argeo.security, - org.argeo.security.mvc, - org.argeo.server.mvc, - org.springframework.ldap.core.support, - org.springframework.osgi.web.context.support, - org.springframework.security, - org.springframework.security.config, - org.springframework.security.ui, - org.springframework.security.ui.rememberme, - org.springframework.security.ui.webapp, - org.springframework.security.userdetails, - org.springframework.web.context, - org.springframework.web.context.support, - org.springframework.web.filter, - org.springframework.web.servlet - - - - - - - \ No newline at end of file diff --git a/security/modules/pom.xml b/security/modules/pom.xml deleted file mode 100644 index 129e5b700..000000000 --- a/security/modules/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - security - .. - - org.argeo.commons - argeo-commons - pom - Commons Security Modules - - org.argeo.security.dao.cli - org.argeo.security.dao.os - org.argeo.security.dao.jackrabbit - org.argeo.security.dao.ldap - org.argeo.security.auth.ldap - org.argeo.security.webapp - - - - - . - - ** - - - .* - .*/** - pom.xml - build.properties - - - - - \ No newline at end of file diff --git a/security/plugins/pom.xml b/security/plugins/pom.xml deleted file mode 100644 index ad5bc115f..000000000 --- a/security/plugins/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - security - .. - - org.argeo.commons - argeo-commons - Commons Security Eclipse Plugins - pom - - org.argeo.security.equinox - org.argeo.security.ui - org.argeo.security.ui.admin - org.argeo.security.ui.rcp - org.argeo.security.ui.rap - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - - - - org.apache.maven.plugins - maven-source-plugin - - - - plugin.xml - META-INF/MANIFEST.MF - - - - - - \ No newline at end of file diff --git a/security/pom.xml b/security/pom.xml deleted file mode 100644 index 67a93c21f..000000000 --- a/security/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - security - Commons Security - pom - - runtime - modules - plugins - dep - - \ No newline at end of file diff --git a/security/runtime/org.argeo.security.activemq/.classpath b/security/runtime/org.argeo.security.activemq/.classpath deleted file mode 100644 index c0bbc0a2f..000000000 --- a/security/runtime/org.argeo.security.activemq/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/security/runtime/org.argeo.security.activemq/.project b/security/runtime/org.argeo.security.activemq/.project deleted file mode 100644 index cdc841c57..000000000 --- a/security/runtime/org.argeo.security.activemq/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.security.activemq - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.jdt.core.prefs b/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 312bbe193..000000000 --- a/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Feb 16 10:40:27 CET 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.pde.core.prefs b/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 85f20081b..000000000 --- a/security/runtime/org.argeo.security.activemq/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Wed Feb 16 10:40:27 CET 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/security/runtime/org.argeo.security.activemq/build.properties b/security/runtime/org.argeo.security.activemq/build.properties deleted file mode 100644 index 2c65f866b..000000000 --- a/security/runtime/org.argeo.security.activemq/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/main/java/,\ - src/main/resources/ -output.. = target/classes/ -bin.includes = META-INF/,\ - . diff --git a/security/runtime/org.argeo.security.activemq/pom.xml b/security/runtime/org.argeo.security.activemq/pom.xml deleted file mode 100644 index bcbec028b..000000000 --- a/security/runtime/org.argeo.security.activemq/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.security.activemq - Commons Security ActiveMQ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - - org.argeo.security.activemq.* - - - - - - - - - org.argeo.commons - org.argeo.util - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.security.core - 2.1.12-SNAPSHOT - - - - - org.argeo.tp - org.springframework.transaction - - - org.argeo.tp - org.springframework.security.core - - - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - - - org.argeo.tp - org.apache.activemq - - - org.argeo.tp - javax.jms - - - org.argeo.tp - org.springframework.jms - - - - - org.argeo.tp - junit - test - - - \ No newline at end of file diff --git a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSecurityBrokerPlugin.java b/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSecurityBrokerPlugin.java deleted file mode 100644 index 5ecab6766..000000000 --- a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSecurityBrokerPlugin.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.activemq; - -import org.apache.activemq.broker.BrokerPluginSupport; -import org.apache.activemq.broker.ConnectionContext; -import org.apache.activemq.command.ConnectionInfo; -import org.argeo.ArgeoException; -import org.argeo.security.core.InternalAuthentication; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationManager; -import org.springframework.security.context.SecurityContext; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; - -@SuppressWarnings("unchecked") -/** Integrates Spring Security with ActiveMQ security.*/ -public class ActiveMqSecurityBrokerPlugin extends BrokerPluginSupport { - // private final static Log log = LogFactory - // .getLog(ActiveMqSecurityBrokerPlugin.class); - - private AuthenticationManager authenticationManager; - private String systemUsername = InternalAuthentication.DEFAULT_SYSTEM_USERNAME; - private String systemRole = InternalAuthentication.DEFAULT_SYSTEM_ROLE; - - @Override - public void addConnection(ConnectionContext context, ConnectionInfo info) - throws Exception { - String username = info.getUserName(); - if (username == null) - throw new ArgeoException("No user name provided"); - String password = info.getPassword(); - if (password == null) { - password = context.getConnection().getRemoteAddress().substring(1); - password = password.substring(0, password.lastIndexOf(':')); - } - - SecurityContext securityContext = SecurityContextHolder.getContext(); - - final Authentication authRequest; - if (username.equals(systemUsername)) - authRequest = new InternalAuthentication(password, username, - systemRole); - else - authRequest = new UsernamePasswordAuthenticationToken(username, - password); - - final Authentication auth = authenticationManager - .authenticate(authRequest); - securityContext.setAuthentication(auth); - context.setSecurityContext(new ActiveMqSpringSecurityContext( - securityContext)); - - super.addConnection(context, info); - } - - public void setAuthenticationManager( - AuthenticationManager authenticationManager) { - this.authenticationManager = authenticationManager; - } - - public void setSystemUsername(String systemUsername) { - this.systemUsername = systemUsername; - } - - public void setSystemRole(String systemRole) { - this.systemRole = systemRole; - } - -} diff --git a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSpringSecurityContext.java b/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSpringSecurityContext.java deleted file mode 100644 index f9ba03891..000000000 --- a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/ActiveMqSpringSecurityContext.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.activemq; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContext; - -/** An ActiveMQ security context compatible with Spring Security. */ -public class ActiveMqSpringSecurityContext extends - org.apache.activemq.security.SecurityContext { - - private final SecurityContext springSecurityContext; - - public ActiveMqSpringSecurityContext(SecurityContext springSecurityContext) { - super(springSecurityContext.getAuthentication().getName()); - this.springSecurityContext = springSecurityContext; - } - - @Override - public Set getPrincipals() { - return new HashSet( - Arrays.asList(springSecurityContext.getAuthentication() - .getAuthorities())); - } - - public SecurityContext getSpringSecurityContext() { - return springSecurityContext; - } - -} diff --git a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/SecuredActiveMqConnectionFactory.java b/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/SecuredActiveMqConnectionFactory.java deleted file mode 100644 index 4597dd59d..000000000 --- a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/SecuredActiveMqConnectionFactory.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.activemq; - -import java.io.InputStream; -import java.security.KeyStore; -import java.security.SecureRandom; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSException; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.plaf.metal.MetalLookAndFeel; - -import org.apache.activemq.ActiveMQSslConnectionFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.core.io.Resource; -import org.springframework.jms.connection.CachingConnectionFactory; -import org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter; - -/** An ActiveMQ connection factory managing secure connections. */ -public class SecuredActiveMqConnectionFactory implements ConnectionFactory, - InitializingBean, DisposableBean { - - public final static String AUTHMODE_UI = "ui"; - public final static String AUTHMODE_OS = "os"; - public final static String AUTHMODE_DEFAULT = AUTHMODE_OS; - // private final static String LOGIN_CONFIG_PROPERTY = - // "java.security.auth.login.config"; - - private final static Log log = LogFactory - .getLog(SecuredActiveMqConnectionFactory.class); - - private String keyStorePassword; - private Resource keyStore; - private String keyStoreType = "JKS";// "PKCS12" - private String brokerURL; - - private String authenticationMode; - - private CachingConnectionFactory cachingConnectionFactory; - - public Connection createConnection() throws JMSException { - return cachingConnectionFactory.createConnection(); - } - - public Connection createConnection(String userName, String password) - throws JMSException { - throw new UnsupportedOperationException(); - } - - public void afterPropertiesSet() throws Exception { - ActiveMQSslConnectionFactory activeMQSslConnectionFactory = new ActiveMQSslConnectionFactory(); - prepareActiveMqSslConnectionFactory(activeMQSslConnectionFactory); - activeMQSslConnectionFactory.setBrokerURL(brokerURL); - UserCredentialsConnectionFactoryAdapter uccfa = new UserCredentialsConnectionFactoryAdapter(); - uccfa.setTargetConnectionFactory(activeMQSslConnectionFactory); - cachingConnectionFactory = new CachingConnectionFactory(); - cachingConnectionFactory.setTargetConnectionFactory(uccfa); - cachingConnectionFactory.setCacheConsumers(false); - - initConnectionFactoryCredentials(uccfa); - cachingConnectionFactory.initConnection(); - log.info("Connected to " + brokerURL); - uccfa.setUsername(null); - uccfa.setPassword(null); - - } - - protected void initConnectionFactoryCredentials( - final UserCredentialsConnectionFactoryAdapter uccfa) { - if (authenticationMode == null) - authenticationMode = AUTHMODE_DEFAULT; - - if (AUTHMODE_OS.equals(authenticationMode)) { - // if (false) { - // // Cache previous value of login conf location - // String oldLoginConfLocation = System - // .getProperty(LOGIN_CONFIG_PROPERTY); - // // Find OS family - // String osName = System.getProperty("os.name"); - // final String auth; - // if (osName.startsWith("Windows")) - // auth = "Windows"; - // else if (osName.startsWith("SunOS") - // || osName.startsWith("Solaris")) - // auth = "Solaris"; - // else - // auth = "Unix"; - // - // Subject subject; - // // see http://old.nabble.com/osgi-and-jaas-td23485885.html - // ClassLoader ccl = Thread.currentThread() - // .getContextClassLoader(); - // try { - // Thread.currentThread().setContextClassLoader( - // getClass().getClassLoader()); - // URL url = getClass().getResource( - // "/org/argeo/security/activemq/osLogin.conf"); - // - // System.setProperty(LOGIN_CONFIG_PROPERTY, url.toString()); - // LoginContext lc = new LoginContext(auth); - // lc.login(); - // subject = lc.getSubject(); - // } catch (LoginException le) { - // throw new ArgeoException("OS authentication failed", le); - // } finally { - // if (oldLoginConfLocation != null) - // System.setProperty(LOGIN_CONFIG_PROPERTY, - // oldLoginConfLocation); - // Thread.currentThread().setContextClassLoader(ccl); - // } - // // Extract user name - // String osUsername = null; - // for (Principal principal : subject.getPrincipals()) { - // String className = principal.getClass().getName(); - // if ("Unix".equals(auth) - // && "com.sun.security.auth.UnixPrincipal" - // .equals(className)) - // osUsername = principal.getName(); - // else if ("Windows".equals(auth) - // && "com.sun.security.auth.NTUserPrincipal" - // .equals(className)) - // osUsername = principal.getName(); - // else if ("Solaris".equals(auth) - // && "com.sun.security.auth.SolarisPrincipal" - // .equals(className)) - // osUsername = principal.getName(); - // } - // - // if (osUsername == null) - // throw new ArgeoException("Could not find OS user name"); - // } - - uccfa.setUsername(System.getProperty("user.name")); - uccfa.setPassword(null); - - } else if (AUTHMODE_UI.equals(authenticationMode)) { - try { - UIManager.setLookAndFeel(new MetalLookAndFeel()); - } catch (UnsupportedLookAndFeelException e) { - throw new ArgeoException("Cannot load look and feel", e); - } - UIManager.put("ClassLoader", getClass().getClassLoader()); - UserPasswordDialog dialog = new UserPasswordDialog() { - private static final long serialVersionUID = -891646559691412088L; - - protected void useCredentials(String username, char[] password) { - uccfa.setUsername(username); - uccfa.setPassword(new String(password)); - } - }; - dialog.setVisible(true); - } else { - throw new ArgeoException("Authentication mode '" - + authenticationMode + "' is not supported"); - } - - } - - protected void prepareActiveMqSslConnectionFactory( - ActiveMQSslConnectionFactory connectionFactory) { - try { - KeyStore keyStoreKs = KeyStore.getInstance(keyStoreType); - - InputStream keyInput = keyStore.getInputStream(); - keyStoreKs.load(keyInput, - keyStorePassword != null ? keyStorePassword.toCharArray() - : null); - keyInput.close(); - - TrustManagerFactory tmf = TrustManagerFactory - .getInstance(TrustManagerFactory.getDefaultAlgorithm()); - tmf.init(keyStoreKs); - - KeyManagerFactory keyManagerFactory = KeyManagerFactory - .getInstance(KeyManagerFactory.getDefaultAlgorithm()); - keyManagerFactory.init(keyStoreKs, keyStorePassword.toCharArray()); - - connectionFactory.setKeyAndTrustManagers( - keyManagerFactory.getKeyManagers(), tmf.getTrustManagers(), - new SecureRandom()); - } catch (Exception e) { - throw new ArgeoException( - "Cannot initialize JMS connection factory", e); - } - - } - - public void destroy() throws Exception { - if (cachingConnectionFactory != null) - cachingConnectionFactory.destroy(); - } - - public void setKeyStorePassword(String keyStorePassword) { - this.keyStorePassword = keyStorePassword; - } - - public void setKeyStore(Resource keyStore) { - this.keyStore = keyStore; - } - - public void setKeyStoreType(String keyStoreType) { - this.keyStoreType = keyStoreType; - } - - public void setBrokerURL(String brokerUrl) { - this.brokerURL = brokerUrl; - } - - public void setAuthenticationMode(String authenticationMode) { - this.authenticationMode = authenticationMode; - } - -} diff --git a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/UserPasswordDialog.java b/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/UserPasswordDialog.java deleted file mode 100644 index 747ccb127..000000000 --- a/security/runtime/org.argeo.security.activemq/src/main/java/org/argeo/security/activemq/UserPasswordDialog.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.activemq; - -import java.awt.Container; -import java.awt.GridLayout; -import java.awt.Panel; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Arrays; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; - -/** - * Small Swing-based UI to pass user/name and password. TODO better integrate - * with JAAS callbacks. - */ -public class UserPasswordDialog extends JDialog implements ActionListener { - private static final long serialVersionUID = -9052993072210981198L; - private static String OK = "ok"; - - private JTextField username = new JTextField("", 10); - private JPasswordField password = new JPasswordField("", 10); - - private JButton okButton; - private JButton cancelButton; - - public UserPasswordDialog() { - setTitle("Credentials"); - setModal(true); - setLocationRelativeTo(null); - setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - - JPanel p1 = new JPanel(new GridLayout(2, 2, 3, 3)); - p1.add(new JLabel("User")); - p1.add(username); - p1.add(new JLabel("Password")); - password.setActionCommand(OK); - password.addActionListener(this); - p1.add(password); - add("Center", p1); - - Panel p2 = new Panel(); - okButton = addButton(p2, "OK"); - okButton.setActionCommand(OK); - cancelButton = addButton(p2, "Cancel"); - add("South", p2); - setSize(240, 120); - - pack(); - } - - /** To be overridden */ - protected void useCredentials(String username, char[] password) { - // does nothing - } - - private JButton addButton(Container c, String name) { - JButton button = new JButton(name); - button.addActionListener(this); - c.add(button); - return button; - } - - public final void actionPerformed(ActionEvent evt) { - Object source = evt.getSource(); - if (source == okButton || evt.getActionCommand().equals(OK)) { - char[] p = password.getPassword(); - useCredentials(username.getText(), p); - Arrays.fill(p, '0'); - cleanUp(); - } else if (source == cancelButton) - cleanUp(); - } - - private void cleanUp() { - password.setText(""); - dispose(); - } - - public static void main(String[] args) { - UserPasswordDialog dialog = new UserPasswordDialog() { - private static final long serialVersionUID = -891646559691412088L; - - protected void useCredentials(String username, char[] password) { - System.out.println(username + "/" + new String(password)); - } - }; - dialog.setVisible(true); - System.out.println("After show"); - } -} diff --git a/security/runtime/org.argeo.security.activemq/src/main/resources/org/argeo/security/activemq/osLogin.conf b/security/runtime/org.argeo.security.activemq/src/main/resources/org/argeo/security/activemq/osLogin.conf deleted file mode 100644 index 17df63ca9..000000000 --- a/security/runtime/org.argeo.security.activemq/src/main/resources/org/argeo/security/activemq/osLogin.conf +++ /dev/null @@ -1,12 +0,0 @@ -Unix { - com.sun.security.auth.module.UnixLoginModule required; -}; - -Solaris { - com.sun.security.auth.module.SolarisLoginModule required; -}; - -Windows { - com.sun.security.auth.module.NTLoginModule required; -}; - diff --git a/security/runtime/pom.xml b/security/runtime/pom.xml deleted file mode 100644 index c3fa23e44..000000000 --- a/security/runtime/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - security - .. - - org.argeo.commons - argeo-commons - Commons Security Runtime - pom - - org.argeo.security.core - org.argeo.security.ldap - org.argeo.security.activemq - org.argeo.security.jackrabbit - org.argeo.security.mvc - - \ No newline at end of file diff --git a/server/dep/org.argeo.server.dep.activemq/pom.xml b/server/dep/org.argeo.server.dep.activemq/pom.xml deleted file mode 100644 index e9272c4fe..000000000 --- a/server/dep/org.argeo.server.dep.activemq/pom.xml +++ /dev/null @@ -1,93 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - dep - .. - - org.argeo.server.dep.activemq - pom - Commons Active MQ Dependencies - - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12-SNAPSHOT - pom - - - - - org.argeo.tp - javax.jms - - - org.argeo.tp - org.apache.activemq - - - org.argeo.tp - org.apache.commons.pool - - - - - org.argeo.tp - org.apache.commons.net - - - org.argeo.tp - javax.management.j2ee - - - org.argeo.tp - javax.ejb - - - org.argeo.tp - javax.xml.rpc - - - - - - - - - - - - org.argeo.tp - javax.servlet - test - - - org.argeo.tp - org.apache.xmlcommons - test - - - org.argeo.tp - org.apache.xalan - test - - - org.argeo.tp - org.springframework.beans - test - - - org.argeo.tp - org.springframework.context - test - - - - - - - - - \ No newline at end of file diff --git a/server/dep/org.argeo.server.dep.hibernate/pom.xml b/server/dep/org.argeo.server.dep.hibernate/pom.xml deleted file mode 100644 index 0f2e047a8..000000000 --- a/server/dep/org.argeo.server.dep.hibernate/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - dep - .. - - org.argeo.server.dep.hibernate - pom - Commons Hibernate Dependencies - - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12-SNAPSHOT - pom - - - - - org.argeo.tp - org.hibernate - - - - - org.argeo.tp - edu.emory.mathcs.backport - - - - \ No newline at end of file diff --git a/server/dep/org.argeo.server.dep.tomcat/pom.xml b/server/dep/org.argeo.server.dep.tomcat/pom.xml deleted file mode 100644 index 6f0ae7e84..000000000 --- a/server/dep/org.argeo.server.dep.tomcat/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - dep - .. - - org.argeo.server.dep.tomcat - pom - Commons Tomcat Dependencies - - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12-SNAPSHOT - pom - - - - - org.argeo.commons - org.argeo.server.catalina - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.server.catalina.start - 2.1.12-SNAPSHOT - - - - - org.argeo.tp - javax.servlet - - - org.argeo.tp - javax.servlet.jsp - - - org.argeo.tp - javax.persistence - - - org.argeo.tp - javax.management.j2ee - - - org.argeo.tp - javax.ejb - - - org.argeo.tp - javax.xml.rpc - - - org.argeo.tp - javax.servlet.jsp.jstl - - - org.argeo.tp - javax.el - - - - - org.argeo.tp - org.apache.taglibs.standard - - - - - org.argeo.tp - org.apache.coyote - - - org.argeo.tp - org.apache.catalina - - - org.argeo.tp - org.apache.jasper - - - org.argeo.tp - org.apache.el - - - - - org.argeo.tp - org.apache.xmlcommons - test - - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12-SNAPSHOT - test - - - - \ No newline at end of file diff --git a/server/dep/pom.xml b/server/dep/pom.xml deleted file mode 100644 index 008fc2f47..000000000 --- a/server/dep/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - server - .. - - org.argeo.commons - dep - Commons Server Dependencies - pom - - org.argeo.server.dep.tomcat - org.argeo.server.dep.ads - org.argeo.server.dep.hibernate - org.argeo.server.dep.jackrabbit.server - org.argeo.server.dep.activemq - - - - check-osgi - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - check-osgi - test - - equinox - - - true - - - - - - - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12-SNAPSHOT - test - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.ext.bsf/pom.xml b/server/modules/org.argeo.ext.bsf/pom.xml deleted file mode 100644 index d5907912e..000000000 --- a/server/modules/org.argeo.ext.bsf/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.ext.bsf - Commons Server BSF Extension - - - - org.apache.felix - maven-bundle-plugin - - - org.apache.bsf - - *, - bsh.util;resolution:=optional, - org.codehaus.groovy.bsf;resolution:=optional - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/.project b/server/modules/org.argeo.ext.jackrabbit.sybase/.project deleted file mode 100644 index 6511be8e5..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.ext.jackrabbit.sybase - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/.settings/org.eclipse.pde.core.prefs b/server/modules/org.argeo.ext.jackrabbit.sybase/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 32c9e3fff..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Tue Jun 15 19:05:36 CEST 2010 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/build.properties b/server/modules/org.argeo.ext.jackrabbit.sybase/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/fs/db/sybase.ddl b/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/fs/db/sybase.ddl deleted file mode 100644 index fb8a0e8ca..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/fs/db/sybase.ddl +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar(2048) not null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA image null, FSENTRY_LASTMOD decimal(19,0) not null, FSENTRY_LENGTH decimal(19,0) not null) -#create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH, FSENTRY_NAME) diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/journal/sybase.ddl b/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/journal/sybase.ddl deleted file mode 100644 index d0f62428c..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/journal/sybase.ddl +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -create table ${schemaObjectPrefix}JOURNAL (REVISION_ID decimal(19,0) NOT NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA IMAGE) -create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID) -create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID decimal(19,0) NOT NULL) -create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID) - -# Inserting the one and only revision counter record now helps avoiding race conditions -insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0) diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/bundle/sybase.ddl b/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/bundle/sybase.ddl deleted file mode 100644 index 47c6b71cf..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/bundle/sybase.ddl +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -create table ${schemaObjectPrefix}BUNDLE (NODE_ID binary(16) not null, BUNDLE_DATA image not null) -create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID) -create table ${schemaObjectPrefix}REFS (NODE_ID binary(16) not null, REFS_DATA image not null) -create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) -create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(64) not null, BINVAL_DATA image not null) -create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) -#create table ${schemaObjectPrefix}NAMES (ID INTEGER IDENTITY(1,1) PRIMARY KEY, NAME varchar(255) COLLATE Latin1_General_CS_AS not null) -create table ${schemaObjectPrefix}NAMES (ID INTEGER IDENTITY PRIMARY KEY, NAME varchar(255)) diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/db/sybase.ddl b/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/db/sybase.ddl deleted file mode 100644 index 2bde3231e..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/org/apache/jackrabbit/core/persistence/db/sybase.ddl +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA image not null) -create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID) -create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1024) not null, PROP_DATA image not null) -create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID) -create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA image not null) -create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID) -create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1024) not null, BINVAL_DATA image not null) -create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID) diff --git a/server/modules/org.argeo.ext.jackrabbit.sybase/pom.xml b/server/modules/org.argeo.ext.jackrabbit.sybase/pom.xml deleted file mode 100644 index 14cff8f4f..000000000 --- a/server/modules/org.argeo.ext.jackrabbit.sybase/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.ext.jackrabbit.sybase - Commons Server Jackrabbit Sybase Extension - Provides experimental support to Sybase in Jackrabbit - - - - org.apache.felix - maven-bundle-plugin - - - org.apache.jackrabbit - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.node.repofactory.jackrabbit/.project b/server/modules/org.argeo.node.repofactory.jackrabbit/.project deleted file mode 100644 index cff24eb82..000000000 --- a/server/modules/org.argeo.node.repofactory.jackrabbit/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.node.repofactory.jackrabbit - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory-osgi.xml b/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory-osgi.xml deleted file mode 100644 index b7c82c130..000000000 --- a/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory-osgi.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory.xml b/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory.xml deleted file mode 100644 index a00c9b00d..000000000 --- a/server/modules/org.argeo.node.repofactory.jackrabbit/META-INF/spring/repofactory.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.node.repofactory.jackrabbit/pom.xml b/server/modules/org.argeo.node.repofactory.jackrabbit/pom.xml deleted file mode 100644 index 42e02edac..000000000 --- a/server/modules/org.argeo.node.repofactory.jackrabbit/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - - org.argeo.commons.server - 1.1.5-SNAPSHOT - modules - .. - - org.argeo.node.repofactory.jackrabbit - Commons Server Node Repository Factory Jackrabbit - Default JCR repository factory based on Jackrabbit. It provides access to aliased and remote repositories. - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - META-INF/spring/*.xml;create-asynchronously:=false - - *, - javax.jcr, - org.argeo.jackrabbit, - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.server.activemq.broker/.project b/server/modules/org.argeo.server.activemq.broker/.project deleted file mode 100644 index 0dd1ba1dc..000000000 --- a/server/modules/org.argeo.server.activemq.broker/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.server.activemq.broker - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/server/modules/org.argeo.server.activemq.broker/.settings/org.eclipse.pde.core.prefs b/server/modules/org.argeo.server.activemq.broker/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index c84159ad0..000000000 --- a/server/modules/org.argeo.server.activemq.broker/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Wed Apr 13 20:39:49 CEST 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/server/modules/org.argeo.server.activemq.broker/META-INF/spring/activemq-broker.xml b/server/modules/org.argeo.server.activemq.broker/META-INF/spring/activemq-broker.xml deleted file mode 100644 index eae474ba4..000000000 --- a/server/modules/org.argeo.server.activemq.broker/META-INF/spring/activemq-broker.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - osgibundle:activemq.properties - - - - - - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.server.activemq.broker/activemq.properties b/server/modules/org.argeo.server.activemq.broker/activemq.properties deleted file mode 100644 index 56fc24c5b..000000000 --- a/server/modules/org.argeo.server.activemq.broker/activemq.properties +++ /dev/null @@ -1 +0,0 @@ -argeo.server.jms.url=tcp://localhost:61616 \ No newline at end of file diff --git a/server/modules/org.argeo.server.activemq.broker/build.properties b/server/modules/org.argeo.server.activemq.broker/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/server/modules/org.argeo.server.activemq.broker/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/server/modules/org.argeo.server.activemq.broker/pom.xml b/server/modules/org.argeo.server.activemq.broker/pom.xml deleted file mode 100644 index f62ae2505..000000000 --- a/server/modules/org.argeo.server.activemq.broker/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.server.activemq.broker - Commons Server Default Active MQ Broker - - - - org.apache.felix - maven-bundle-plugin - - - - *, - ietf.params.xml.ns.xmpp_sasl;resolution:=optional, - ietf.params.xml.ns.xmpp_stanzas;resolution:=optional, - ietf.params.xml.ns.xmpp_streams;resolution:=optional, - ietf.params.xml.ns.xmpp_tls;resolution:=optional, - jabber.client;resolution:=optional, - jabber.iq._private;resolution:=optional, - jabber.iq.auth;resolution:=optional, - jabber.iq.roster;resolution:=optional, - org.apache.activemq.broker, - org.apache.activemq.command;resolution:=optional, - org.apache.activemq.store.amq, - org.apache.activemq.transport.http;resolution:=optional, - org.apache.activemq.util, - org.apache.activemq.xbean, - org.jabber.etherx.streams;resolution:=optional, - org.jabber.protocol.disco_info;resolution:=optional, - org.jabber.protocol.disco_items;resolution:=optional, - org.jabber.protocol.muc;resolution:=optional, - org.jabber.protocol.muc_user;resolution:=optional, - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.server.catalina/conf/catalina.policy b/server/modules/org.argeo.server.catalina/conf/catalina.policy deleted file mode 100644 index 5a6426ee4..000000000 --- a/server/modules/org.argeo.server.catalina/conf/catalina.policy +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// ============================================================================ -// catalina.corepolicy - Security Policy Permissions for Tomcat 6 -// -// This file contains a default set of security policies to be enforced (by the -// JVM) when Catalina is executed with the "-security" option. In addition -// to the permissions granted here, the following additional permissions are -// granted to the codebase specific to each web application: -// -// * Read access to the document root directory -// -// $Id: catalina.policy 648343 2008-04-15 17:21:29Z markt $ -// ============================================================================ - - -// ========== SYSTEM CODE PERMISSIONS ========================================= - - -// These permissions apply to javac -grant codeBase "file:${java.home}/lib/-" { - permission java.security.AllPermission; -}; - -// These permissions apply to all shared system extensions -grant codeBase "file:${java.home}/jre/lib/ext/-" { - permission java.security.AllPermission; -}; - -// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre -grant codeBase "file:${java.home}/../lib/-" { - permission java.security.AllPermission; -}; - -// These permissions apply to all shared system extensions when -// ${java.home} points at $JAVA_HOME/jre -grant codeBase "file:${java.home}/lib/ext/-" { - permission java.security.AllPermission; -}; - - -// ========== CATALINA CODE PERMISSIONS ======================================= - - -// These permissions apply to the daemon code -grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { - permission java.security.AllPermission; -}; - -// These permissions apply to the logging API -grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { - permission java.util.PropertyPermission "java.util.logging.config.class", "read"; - permission java.util.PropertyPermission "java.util.logging.config.file", "read"; - permission java.io.FilePermission "${java.home}${file.separator}lib${file.separator}logging.properties", "read"; - permission java.lang.RuntimePermission "shutdownHooks"; - permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read"; - permission java.util.PropertyPermission "catalina.base", "read"; - permission java.util.logging.LoggingPermission "control"; - permission java.io.FilePermission "${catalina.base}${file.separator}logs", "read, write"; - permission java.io.FilePermission "${catalina.base}${file.separator}logs${file.separator}*", "read, write"; - permission java.lang.RuntimePermission "getClassLoader"; - // To enable per context logging configuration, permit read access to the appropriate file. - // Be sure that the logging configuration is secure before enabling such access - // eg for the examples web application: - // permission java.io.FilePermission "${catalina.base}${file.separator}webapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties", "read"; -}; - -// These permissions apply to the server startup code -grant codeBase "file:${catalina.home}/bin/bootstrap.jar" { - permission java.security.AllPermission; -}; - -// These permissions apply to the servlet API classes -// and those that are shared across all class loaders -// located in the "lib" directory -grant codeBase "file:${catalina.home}/lib/-" { - permission java.security.AllPermission; -}; - - -// ========== WEB APPLICATION PERMISSIONS ===================================== - - -// These permissions are granted by default to all web applications -// In addition, a web application will be given a read FilePermission -// and JndiPermission for all files and directories in its document root. -grant { - // Required for JNDI lookup of named JDBC DataSource's and - // javamail named MimePart DataSource used to send mail - permission java.util.PropertyPermission "java.home", "read"; - permission java.util.PropertyPermission "java.naming.*", "read"; - permission java.util.PropertyPermission "javax.sql.*", "read"; - - // OS Specific properties to allow read access - permission java.util.PropertyPermission "os.name", "read"; - permission java.util.PropertyPermission "os.version", "read"; - permission java.util.PropertyPermission "os.arch", "read"; - permission java.util.PropertyPermission "file.separator", "read"; - permission java.util.PropertyPermission "path.separator", "read"; - permission java.util.PropertyPermission "line.separator", "read"; - - // JVM properties to allow read access - permission java.util.PropertyPermission "java.version", "read"; - permission java.util.PropertyPermission "java.vendor", "read"; - permission java.util.PropertyPermission "java.vendor.url", "read"; - permission java.util.PropertyPermission "java.class.version", "read"; - permission java.util.PropertyPermission "java.specification.version", "read"; - permission java.util.PropertyPermission "java.specification.vendor", "read"; - permission java.util.PropertyPermission "java.specification.name", "read"; - - permission java.util.PropertyPermission "java.vm.specification.version", "read"; - permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; - permission java.util.PropertyPermission "java.vm.specification.name", "read"; - permission java.util.PropertyPermission "java.vm.version", "read"; - permission java.util.PropertyPermission "java.vm.vendor", "read"; - permission java.util.PropertyPermission "java.vm.name", "read"; - - // Required for OpenJMX - permission java.lang.RuntimePermission "getAttribute"; - - // Allow read of JAXP compliant XML parser debug - permission java.util.PropertyPermission "jaxp.debug", "read"; - - // Precompiled JSPs need access to this package. - permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; - permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*"; - - // Precompiled JSPs need access to this system property. - permission java.util.PropertyPermission "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read"; - -}; - - -// You can assign additional permissions to particular web applications by -// adding additional "grant" entries here, based on the code base for that -// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files. -// -// Different permissions can be granted to JSP pages, classes loaded from -// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/ -// directory, or even to individual jar files in the /WEB-INF/lib/ directory. -// -// For instance, assume that the standard "examples" application -// included a JDBC driver that needed to establish a network connection to the -// corresponding database and used the scrape taglib to get the weather from -// the NOAA web server. You might create a "grant" entries like this: -// -// The permissions granted to the context root directory apply to JSP pages. -// grant codeBase "file:${catalina.home}/webapps/examples/-" { -// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; -// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; -// }; -// -// The permissions granted to the context WEB-INF/classes directory -// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" { -// }; -// -// The permission granted to your JDBC driver -// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" { -// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; -// }; -// The permission granted to the scrape taglib -// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" { -// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; -// }; - diff --git a/server/modules/org.argeo.server.catalina/conf/catalina.properties b/server/modules/org.argeo.server.catalina/conf/catalina.properties deleted file mode 100644 index 00d758a23..000000000 --- a/server/modules/org.argeo.server.catalina/conf/catalina.properties +++ /dev/null @@ -1,81 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# List of comma-separated packages that start with or equal this string -# will cause a security exception to be thrown when -# passed to checkPackageAccess unless the -# corresponding RuntimePermission ("accessClassInPackage."+package) has -# been granted. -package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. -# -# List of comma-separated packages that start with or equal this string -# will cause a security exception to be thrown when -# passed to checkPackageDefinition unless the -# corresponding RuntimePermission ("defineClassInPackage."+package) has -# been granted. -# -# by default, no packages are restricted for definition, and none of -# the class loaders supplied with the JDK call checkPackageDefinition. -# -package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. - -# -# -# List of comma-separated paths defining the contents of the "common" -# classloader. Prefixes should be used to define what is the repository type. -# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. -# If left as blank,the JVM system loader will be used as Catalina's "common" -# loader. -# Examples: -# "foo": Add this folder as a class repository -# "foo/*.jar": Add all the JARs of the specified folder as class -# repositories -# "foo/bar.jar": Add bar.jar as a class repository -common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar - -# -# List of comma-separated paths defining the contents of the "server" -# classloader. Prefixes should be used to define what is the repository type. -# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. -# If left as blank, the "common" loader will be used as Catalina's "server" -# loader. -# Examples: -# "foo": Add this folder as a class repository -# "foo/*.jar": Add all the JARs of the specified folder as class -# repositories -# "foo/bar.jar": Add bar.jar as a class repository -server.loader= - -# -# List of comma-separated paths defining the contents of the "shared" -# classloader. Prefixes should be used to define what is the repository type. -# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, -# the "common" loader will be used as Catalina's "shared" loader. -# Examples: -# "foo": Add this folder as a class repository -# "foo/*.jar": Add all the JARs of the specified folder as class -# repositories -# "foo/bar.jar": Add bar.jar as a class repository -# Please note that for single jars, e.g. bar.jar, you need the URL form -# starting with file:. -shared.loader= - -# -# String cache configuration. -tomcat.util.buf.StringCache.byte.enabled=true -#tomcat.util.buf.StringCache.char.enabled=true -#tomcat.util.buf.StringCache.trainThreshold=500000 -#tomcat.util.buf.StringCache.cacheSize=5000 diff --git a/server/modules/org.argeo.server.catalina/conf/context.xml b/server/modules/org.argeo.server.catalina/conf/context.xml deleted file mode 100644 index 8eb2d2b7f..000000000 --- a/server/modules/org.argeo.server.catalina/conf/context.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - WEB-INF/web.xml - - - - - - - - diff --git a/server/modules/org.argeo.server.catalina/conf/web.xml b/server/modules/org.argeo.server.catalina/conf/web.xml deleted file mode 100644 index 88e9f4918..000000000 --- a/server/modules/org.argeo.server.catalina/conf/web.xml +++ /dev/null @@ -1,1186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - org.apache.catalina.servlets.DefaultServlet - - debug - 0 - - - listings - false - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jsp - org.apache.jasper.servlet.JspServlet - - fork - false - - - xpoweredBy - false - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - / - - - - - - - - jsp - *.jsp - - - - jsp - *.jspx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 - - - - - - - - - - - - abs - audio/x-mpeg - - - ai - application/postscript - - - aif - audio/x-aiff - - - aifc - audio/x-aiff - - - aiff - audio/x-aiff - - - aim - application/x-aim - - - art - image/x-jg - - - asf - video/x-ms-asf - - - asx - video/x-ms-asf - - - au - audio/basic - - - avi - video/x-msvideo - - - avx - video/x-rad-screenplay - - - bcpio - application/x-bcpio - - - bin - application/octet-stream - - - bmp - image/bmp - - - body - text/html - - - cdf - application/x-cdf - - - cer - application/x-x509-ca-cert - - - class - application/java - - - cpio - application/x-cpio - - - csh - application/x-csh - - - css - text/css - - - dib - image/bmp - - - doc - application/msword - - - dtd - application/xml-dtd - - - dv - video/x-dv - - - dvi - application/x-dvi - - - eps - application/postscript - - - etx - text/x-setext - - - exe - application/octet-stream - - - gif - image/gif - - - gtar - application/x-gtar - - - gz - application/x-gzip - - - hdf - application/x-hdf - - - hqx - application/mac-binhex40 - - - htc - text/x-component - - - htm - text/html - - - html - text/html - - - hqx - application/mac-binhex40 - - - ief - image/ief - - - jad - text/vnd.sun.j2me.app-descriptor - - - jar - application/java-archive - - - java - text/plain - - - jnlp - application/x-java-jnlp-file - - - jpe - image/jpeg - - - jpeg - image/jpeg - - - jpg - image/jpeg - - - js - text/javascript - - - jsf - text/plain - - - jspf - text/plain - - - kar - audio/x-midi - - - latex - application/x-latex - - - m3u - audio/x-mpegurl - - - mac - image/x-macpaint - - - man - application/x-troff-man - - - mathml - application/mathml+xml - - - me - application/x-troff-me - - - mid - audio/x-midi - - - midi - audio/x-midi - - - mif - application/x-mif - - - mov - video/quicktime - - - movie - video/x-sgi-movie - - - mp1 - audio/x-mpeg - - - mp2 - audio/x-mpeg - - - mp3 - audio/x-mpeg - - - mp4 - video/mp4 - - - mpa - audio/x-mpeg - - - mpe - video/mpeg - - - mpeg - video/mpeg - - - mpega - audio/x-mpeg - - - mpg - video/mpeg - - - mpv2 - video/mpeg2 - - - ms - application/x-wais-source - - - nc - application/x-netcdf - - - oda - application/oda - - - - odb - application/vnd.oasis.opendocument.database - - - - odc - application/vnd.oasis.opendocument.chart - - - - odf - application/vnd.oasis.opendocument.formula - - - - odg - application/vnd.oasis.opendocument.graphics - - - - odi - application/vnd.oasis.opendocument.image - - - - odm - application/vnd.oasis.opendocument.text-master - - - - odp - application/vnd.oasis.opendocument.presentation - - - - ods - application/vnd.oasis.opendocument.spreadsheet - - - - odt - application/vnd.oasis.opendocument.text - - - ogg - application/ogg - - - - otg - application/vnd.oasis.opendocument.graphics-template - - - - oth - application/vnd.oasis.opendocument.text-web - - - - otp - application/vnd.oasis.opendocument.presentation-template - - - - ots - application/vnd.oasis.opendocument.spreadsheet-template - - - - ott - application/vnd.oasis.opendocument.text-template - - - pbm - image/x-portable-bitmap - - - pct - image/pict - - - pdf - application/pdf - - - pgm - image/x-portable-graymap - - - pic - image/pict - - - pict - image/pict - - - pls - audio/x-scpls - - - png - image/png - - - pnm - image/x-portable-anymap - - - pnt - image/x-macpaint - - - ppm - image/x-portable-pixmap - - - ppt - application/powerpoint - - - ps - application/postscript - - - psd - image/x-photoshop - - - qt - video/quicktime - - - qti - image/x-quicktime - - - qtif - image/x-quicktime - - - ras - image/x-cmu-raster - - - rdf - application/rdf+xml - - - rgb - image/x-rgb - - - rm - application/vnd.rn-realmedia - - - roff - application/x-troff - - - rtf - application/rtf - - - rtx - text/richtext - - - sh - application/x-sh - - - shar - application/x-shar - - - - smf - audio/x-midi - - - sit - application/x-stuffit - - - snd - audio/basic - - - src - application/x-wais-source - - - sv4cpio - application/x-sv4cpio - - - sv4crc - application/x-sv4crc - - - swf - application/x-shockwave-flash - - - t - application/x-troff - - - tar - application/x-tar - - - tcl - application/x-tcl - - - tex - application/x-tex - - - texi - application/x-texinfo - - - texinfo - application/x-texinfo - - - tif - image/tiff - - - tiff - image/tiff - - - tr - application/x-troff - - - tsv - text/tab-separated-values - - - txt - text/plain - - - ulw - audio/basic - - - ustar - application/x-ustar - - - vxml - application/voicexml+xml - - - xbm - image/x-xbitmap - - - xht - application/xhtml+xml - - - xhtml - application/xhtml+xml - - - xml - application/xml - - - xpm - image/x-xpixmap - - - xsl - application/xml - - - xslt - application/xslt+xml - - - xul - application/vnd.mozilla.xul+xml - - - xwd - image/x-xwindowdump - - - wav - audio/x-wav - - - svg - image/svg+xml - - - svgz - image/svg+xml - - - vsd - application/x-visio - - - - wbmp - image/vnd.wap.wbmp - - - - wml - text/vnd.wap.wml - - - - wmlc - application/vnd.wap.wmlc - - - - wmls - text/vnd.wap.wmlscript - - - - wmlscriptc - application/vnd.wap.wmlscriptc - - - wmv - video/x-ms-wmv - - - wrl - x-world/x-vrml - - - wspolicy - application/wspolicy+xml - - - Z - application/x-compress - - - z - application/x-compress - - - zip - application/zip - - - xls - application/vnd.ms-excel - - - doc - application/vnd.ms-word - - - ppt - application/vnd.ms-powerpoint - - - - - - - - - - - - - - - - index.html - index.htm - index.jsp - - - diff --git a/server/modules/org.argeo.server.catalina/pom.xml b/server/modules/org.argeo.server.catalina/pom.xml deleted file mode 100644 index 59fd5fefd..000000000 --- a/server/modules/org.argeo.server.catalina/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.server.catalina - Commons Server Default Catalina Service (Tomcat) - - - - org.apache.felix - maven-bundle-plugin - - - org.apache.catalina - - - *, - org.apache.commons.logging.impl;resolution:=optional, - org.argeo.security.core;resolution:=optional, - org.argeo.security.jcr;resolution:=optional, - org.springframework.beans.factory.support;resolution:=optional, - org.springframework.context.annotation;resolution:=optional, - org.springframework.orm.jpa.support;resolution:=optional, - org.springframework.security;resolution:=optional, - org.springframework.security.context;resolution:=optional, - org.springframework.security.providers;resolution:=optional, - org.springframework.security.providers.rememberme;resolution:=optional, - org.springframework.security.ui;resolution:=optional, - org.springframework.security.ui.savedrequest;resolution:=optional, - org.springframework.security.userdetails;resolution:=optional, - org.springframework.security.providers.preauth;resolution:=optional, - org.springframework.web.context.request;resolution:=optional - - - - - - - \ No newline at end of file diff --git a/server/modules/org.argeo.server.jdbc/.project b/server/modules/org.argeo.server.jdbc/.project deleted file mode 100644 index 283257ba8..000000000 --- a/server/modules/org.argeo.server.jdbc/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.server.jdbc - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/server/modules/org.argeo.server.jdbc/.settings/org.eclipse.pde.core.prefs b/server/modules/org.argeo.server.jdbc/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index e9fc089d1..000000000 --- a/server/modules/org.argeo.server.jdbc/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Tue Jun 15 17:44:26 CEST 2010 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/server/modules/org.argeo.server.jdbc/build.properties b/server/modules/org.argeo.server.jdbc/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/server/modules/org.argeo.server.jdbc/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/server/modules/org.argeo.server.jdbc/pom.xml b/server/modules/org.argeo.server.jdbc/pom.xml deleted file mode 100644 index a5e5bf1ae..000000000 --- a/server/modules/org.argeo.server.jdbc/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.server.jdbc - Commons Server Spring JDBC Drivers for OSGi - Makes commons JDBC drivers visible to Spring JDBC in an OSGi runtime - - - - org.apache.felix - maven-bundle-plugin - - - org.springframework.jdbc - - *, - com.microsoft.sqlserver.jdbc;resolution:=optional, - com.mysql.jdbc;resolution:=optional, - net.sourceforge.jtds.jdbc;resolution:=optional, - oracle.jdbc;resolution:=optional, - org.apache.derby.jdbc;resolution:=optional, - org.h2;resolution:=optional, - org.hsqldb;resolution:=optional, - org.postgresql;resolution:=optional - - - - - - - \ No newline at end of file diff --git a/server/modules/pom.xml b/server/modules/pom.xml deleted file mode 100644 index 18652f2ed..000000000 --- a/server/modules/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - server - .. - - org.argeo.commons - argeo-commons - pom - Commons Server Modules - - org.argeo.ext.jackrabbit.sybase - org.argeo.ext.jdbm - org.argeo.ext.bsf - org.argeo.jackrabbit.webapp - org.argeo.node.repo.jackrabbit - org.argeo.server.activemq.broker - org.argeo.server.ads.server - org.argeo.server.catalina - org.argeo.server.jdbc - org.argeo.server.rap.webapp - - - - - - . - - ** - - - .* - .*/** - pom.xml - build.properties - - - - - \ No newline at end of file diff --git a/server/plugins/pom.xml b/server/plugins/pom.xml deleted file mode 100644 index bc96b87e7..000000000 --- a/server/plugins/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - server - .. - - org.argeo.commons - argeo-commons - Commons Server Eclipse Plugins - pom - - org.argeo.jcr.ui.explorer - - - - - org.apache.maven.plugins - maven-source-plugin - - - - plugin.xml - META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - - - - - diff --git a/server/pom.xml b/server/pom.xml deleted file mode 100644 index d4e76c89b..000000000 --- a/server/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - server - Commons Server - pom - - modules - runtime - plugins - dep - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.catalina.start/.classpath b/server/runtime/org.argeo.server.catalina.start/.classpath deleted file mode 100644 index b56882d64..000000000 --- a/server/runtime/org.argeo.server.catalina.start/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/server/runtime/org.argeo.server.catalina.start/.project b/server/runtime/org.argeo.server.catalina.start/.project deleted file mode 100644 index 25f3507c0..000000000 --- a/server/runtime/org.argeo.server.catalina.start/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - org.argeo.server.catalina.start - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - - diff --git a/server/runtime/org.argeo.server.catalina.start/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.catalina.start/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6d0bce7d1..000000000 --- a/server/runtime/org.argeo.server.catalina.start/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -#Fri Apr 23 08:40:00 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.catalina.start/build.properties b/server/runtime/org.argeo.server.catalina.start/build.properties deleted file mode 100644 index 2c65f866b..000000000 --- a/server/runtime/org.argeo.server.catalina.start/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/main/java/,\ - src/main/resources/ -output.. = target/classes/ -bin.includes = META-INF/,\ - . diff --git a/server/runtime/org.argeo.server.catalina.start/pom.xml b/server/runtime/org.argeo.server.catalina.start/pom.xml deleted file mode 100644 index ce9d40597..000000000 --- a/server/runtime/org.argeo.server.catalina.start/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.server.catalina.start - Commons Catalina starter - Catalina starter hacked from Spring DM sandbox - - - - org.apache.felix - maven-bundle-plugin - - - org.argeo.catalina.start.CatalinaActivator - - javax.management;version="0.0.0", - * - - - - - - - - - org.argeo.tp - org.eclipse.osgi - provided - - - org.argeo.tp - org.apache.catalina - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - org.argeo.tp - org.apache.commons.io - - - diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/argeo/catalina/start/CatalinaActivator.java b/server/runtime/org.argeo.server.catalina.start/src/main/java/org/argeo/catalina/start/CatalinaActivator.java deleted file mode 100644 index b990c9906..000000000 --- a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/argeo/catalina/start/CatalinaActivator.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.argeo.catalina.start; - -import java.io.File; -import java.io.InputStream; -import java.net.URL; -import java.util.Properties; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.framework.BundleContext; -import org.springframework.osgi.web.tomcat.internal.Activator; - -/** Starts Catalina (hacked from Spring OSGi 1.0) */ -public class CatalinaActivator extends Activator { - private final static Log log = LogFactory.getLog(CatalinaActivator.class); - - private final static String ARGEO_OSGI_DATA_DIR = "argeo.osgi.data.dir"; - /** System properties used to override Tomcat XML config URL */ - public final static String ARGEO_SERVER_TOMCAT_CONFIG = "argeo.server.tomcat.config"; - - public void start(BundleContext context) throws Exception { - if (!System.getProperties().containsKey(ARGEO_OSGI_DATA_DIR)) { - String osgiInstanceArea = System.getProperty("osgi.instance.area"); - String osgiInstanceAreaDefault = System - .getProperty("osgi.instance.area.default"); - String tempDir = System.getProperty("java.io.tmpdir"); - - File dataDir = null; - if (osgiInstanceArea != null) { - // within OSGi with -data specified - osgiInstanceArea = removeFilePrefix(osgiInstanceArea); - dataDir = new File(osgiInstanceArea); - } else if (osgiInstanceAreaDefault != null) { - // within OSGi without -data specified - osgiInstanceAreaDefault = removeFilePrefix(osgiInstanceAreaDefault); - dataDir = new File(osgiInstanceAreaDefault); - } else {// outside OSGi - dataDir = new File(tempDir + File.separator + "osgiData"); - } - - System.setProperty(ARGEO_OSGI_DATA_DIR, dataDir.getAbsolutePath()); - } - - // Load config properties and put them in system properties so that they - // can be used in tomcat conf - Properties confProps = new Properties(); - URL propsUrl = context.getBundle().getResource("tomcat.properties"); - if (propsUrl != null) { - InputStream in = null; - try { - in = propsUrl.openStream(); - confProps.load(in); - } catch (Exception e) { - throw new RuntimeException("Cannot read catalina properties.", - e); - } finally { - IOUtils.closeQuietly(in); - } - - for (Object key : confProps.keySet()) { - // System properties have priority - if (!System.getProperties().containsKey(key)) { - System.setProperty(key.toString(), - confProps.getProperty(key.toString())); - } - } - } - - // calling Catalina.setCatalinaHome(String) or - // Catalina.setCatalinaBase(String) does the same - if (System.getProperty("catalina.home") == null) - System.setProperty("catalina.home", - System.getProperty(ARGEO_OSGI_DATA_DIR) + "/tomcat"); - if (System.getProperty("catalina.base") == null) - System.setProperty("catalina.base", - System.getProperty(ARGEO_OSGI_DATA_DIR) + "/tomcat"); - - // Make sure directories are created - File catalinaDir = new File(System.getProperty("catalina.home")); - if (!catalinaDir.exists()) { - catalinaDir.mkdirs(); - if (log.isDebugEnabled()) - log.debug("Created Tomcat directory " + catalinaDir); - } - - // Call Spring starter - super.start(context); - } - - @Override - public void stop(BundleContext context) throws Exception { - super.stop(context); - } - - protected String removeFilePrefix(String url) { - if (url.startsWith("file:")) - return url.substring("file:".length()); - else if (url.startsWith("reference:file:")) - return url.substring("reference:file:".length()); - else - return url; - } - -} diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java b/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java deleted file mode 100644 index 17ed5e996..000000000 --- a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/Activator.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2006-2008 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.osgi.web.tomcat.internal; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLStreamHandler; -import java.util.Properties; - -import javax.management.MBeanRegistration; - -import org.apache.catalina.Lifecycle; -import org.apache.catalina.Server; -import org.apache.catalina.Service; -import org.apache.catalina.connector.Connector; -import org.apache.catalina.core.StandardService; -import org.apache.catalina.util.ServerInfo; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.naming.resources.DirContextURLStreamHandler; -import org.argeo.catalina.start.CatalinaActivator; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.ServiceRegistration; -import org.osgi.service.url.AbstractURLStreamHandlerService; -import org.osgi.service.url.URLConstants; -import org.osgi.service.url.URLStreamHandlerService; - -/** - * Simple activator for starting Apache Tomcat Catalina container inside OSGi - * using Tomcat's XML configuration files. - * - *

- * This activator looks initially for a conf/server.xml file - * falling back to conf/default-server.xml. This allows the default - * configuration to be tweaked through fragments for example. - * - * @author Costin Leau - */ -public class Activator implements BundleActivator { - - /** logger */ - private static final Log log = LogFactory.getLog(Activator.class); - - /** default XML configuration */ - private static final String DEFAULT_XML_CONF_LOCATION = "conf/default-server.xml"; - - /** user-configurable XML configuration */ - private static final String XML_CONF_LOCATION = "conf/server.xml"; - - private BundleContext bundleContext; - - private StandardService server; - - private ServiceRegistration registration, urlRegistration; - - private Thread startupThread; - - public void start(BundleContext context) throws Exception { - this.bundleContext = context; - // do the initialization on a different thread - // so the activator finishes fast - startupThread = new Thread(new Runnable() { - - public void run() { - log.info("Starting " + ServerInfo.getServerInfo() + " ..."); - - // default startup procedure - ClassLoader cl = Activator.class.getClassLoader(); - Thread current = Thread.currentThread(); - ClassLoader old = current.getContextClassLoader(); - - try { - current.setContextClassLoader(cl); - - server = createCatalinaServer(bundleContext.getBundle()); - - server.start(); - - Connector[] connectors = server.findConnectors(); - for (int i = 0; i < connectors.length; i++) { - Connector conn = connectors[i]; - log.info("Succesfully started " - + ServerInfo.getServerInfo() + " @ " - + conn.getDomain() + ":" + conn.getPort()); - } - - // register URL service - urlRegistration = registerTomcatJNDIUrlService(); - // publish server as an OSGi service - registration = publishServerAsAService(server); - log.info("Published " + ServerInfo.getServerInfo() - + " as an OSGi service"); - } catch (Exception ex) { - String msg = "Cannot start " + ServerInfo.getServerInfo(); - log.error(msg, ex); - throw new RuntimeException(msg, ex); - } finally { - current.setContextClassLoader(old); - } - } - }, "Tomcat Catalina Start Thread"); - - startupThread.start(); - } - - public void stop(BundleContext context) throws Exception { - // unpublish service first - registration.unregister(); - urlRegistration.unregister(); - - log.info("Unpublished " + ServerInfo.getServerInfo() + " OSGi service"); - - // default startup procedure - ClassLoader cl = Activator.class.getClassLoader(); - Thread current = Thread.currentThread(); - ClassLoader old = current.getContextClassLoader(); - - try { - current.setContextClassLoader(cl); - // reset CCL - // current.setContextClassLoader(null); - log.info("Stopping " + ServerInfo.getServerInfo() + " ..."); - server.stop(); - log.info("Succesfully stopped " + ServerInfo.getServerInfo()); - } catch (Exception ex) { - log.error("Cannot stop " + ServerInfo.getServerInfo(), ex); - throw ex; - } finally { - current.setContextClassLoader(old); - } - } - - private StandardService createCatalinaServer(Bundle bundle) - throws Exception { - URL xmlConfiguration = null; - - if (System.getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG) != null) { - String customConfig = System - .getProperty(CatalinaActivator.ARGEO_SERVER_TOMCAT_CONFIG); - try { - xmlConfiguration = new URL(customConfig); - } catch (MalformedURLException e) { - // within this bundle - // typically 'default-server-ssl.xml' - xmlConfiguration = bundle.getResource(customConfig); - } - } else { - // fragment - xmlConfiguration = bundle.getResource(XML_CONF_LOCATION); - } - - if (xmlConfiguration != null) { - log.info("Using custom XML configuration " + xmlConfiguration); - } else { - xmlConfiguration = bundle.getResource(DEFAULT_XML_CONF_LOCATION); - if (xmlConfiguration == null) - log.error("No XML configuration found; bailing out..."); - else - log.info("Using default XML configuration " + xmlConfiguration); - } - - return createServerFromXML(xmlConfiguration); - } - - private StandardService createServerFromXML(URL xmlConfiguration) - throws IOException { - OsgiCatalina catalina = new OsgiCatalina(); - catalina.setAwait(false); - catalina.setUseShutdownHook(false); - catalina.setName("Catalina"); - catalina.setParentClassLoader(Thread.currentThread() - .getContextClassLoader()); - - // copy the URL file to a local temporary file (since Catalina doesn't - // use URL unfortunately) - File configTempFile = File.createTempFile("dm.catalina", ".cfg.xml"); - configTempFile.deleteOnExit(); - - // copy URL to temporary file - copyURLToFile(xmlConfiguration.openStream(), new FileOutputStream( - configTempFile)); - log.debug("Copied configuration " + xmlConfiguration - + " to temporary file " + configTempFile); - - catalina.setConfigFile(configTempFile.getAbsolutePath()); - - catalina.load(); - - Server server = catalina.getServer(); - - return (StandardService) server.findServices()[0]; - } - - private void copyURLToFile(InputStream inStream, FileOutputStream outStream) { - - int bytesRead; - byte[] buf = new byte[4096]; - try { - while ((bytesRead = inStream.read(buf)) >= 0) { - outStream.write(buf, 0, bytesRead); - } - } catch (IOException ex) { - throw (RuntimeException) new IllegalStateException( - "Cannot copy URL to file").initCause(ex); - } finally { - try { - inStream.close(); - } catch (IOException ignore) { - } - try { - outStream.close(); - } catch (IOException ignore) { - } - } - } - - private ServiceRegistration publishServerAsAService(StandardService server) { - Properties props = new Properties(); - // put some extra properties to easily identify the service - props.put(Constants.SERVICE_VENDOR, "Spring Dynamic Modules"); - props.put(Constants.SERVICE_DESCRIPTION, ServerInfo.getServerInfo()); - props.put(Constants.BUNDLE_VERSION, ServerInfo.getServerNumber()); - props.put(Constants.BUNDLE_NAME, bundleContext.getBundle() - .getSymbolicName()); - - // spring-dm specific property - props.put("org.springframework.osgi.bean.name", "tomcat-server"); - - // publish just the interfaces and the major classes - // (server/handlerWrapper) - String[] classes = new String[] { StandardService.class.getName(), - Service.class.getName(), MBeanRegistration.class.getName(), - Lifecycle.class.getName() }; - - return bundleContext.registerService(classes, server, props); - } - - private ServiceRegistration registerTomcatJNDIUrlService() { - Properties properties = new Properties(); - properties.put(URLConstants.URL_HANDLER_PROTOCOL, "jndi"); - final URLStreamHandler handler = new DirContextURLStreamHandler(); - - return bundleContext.registerService( - URLStreamHandlerService.class.getName(), - new AbstractURLStreamHandlerService() { - - private final static String EMPTY_STRING = ""; - - public URLConnection openConnection(URL u) - throws IOException { - return new URL(u, EMPTY_STRING, handler) - .openConnection(); - } - }, properties); - } -} \ No newline at end of file diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/OsgiCatalina.java b/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/OsgiCatalina.java deleted file mode 100644 index f7903ff6a..000000000 --- a/server/runtime/org.argeo.server.catalina.start/src/main/java/org/springframework/osgi/web/tomcat/internal/OsgiCatalina.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2006-2008 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.osgi.web.tomcat.internal; - -import org.apache.catalina.Server; -import org.apache.catalina.startup.Catalina; - -/** - * OSGi extension of Catalina class used for easy access to the underlying - * configuration. - * - * @author Costin Leau - * - */ -public class OsgiCatalina extends Catalina { - - public Server getServer() { - return server; - } -} diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server-ssl.xml b/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server-ssl.xml deleted file mode 100644 index 0417b7c9c..000000000 --- a/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server-ssl.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server.xml b/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server.xml deleted file mode 100644 index a558e134e..000000000 --- a/server/runtime/org.argeo.server.catalina.start/src/main/resources/conf/default-server.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.catalina.start/tomcat.properties b/server/runtime/org.argeo.server.catalina.start/tomcat.properties deleted file mode 100644 index 5e6a5f17b..000000000 --- a/server/runtime/org.argeo.server.catalina.start/tomcat.properties +++ /dev/null @@ -1,14 +0,0 @@ -argeo.server.port.http=7070 -argeo.server.port.https=7073 -argeo.server.port.ajp=7079 - -# Used only when SSL is activated (uncommented in server.xml) -argeo.server.keystoreFile=../../../../ssl/server.ks -argeo.server.keystorePass=changeit -argeo.server.truststoreFile=../../../../ssl/server.ts -argeo.server.truststorePass=changeit -argeo.server.https.clientAuth=want - -argeo.server.http.proxyName= -argeo.server.http.proxyPort= -argeo.server.http.secure=false \ No newline at end of file diff --git a/server/runtime/org.argeo.server.hibernate/.classpath b/server/runtime/org.argeo.server.hibernate/.classpath deleted file mode 100644 index ff41fbb4d..000000000 --- a/server/runtime/org.argeo.server.hibernate/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/server/runtime/org.argeo.server.hibernate/.project b/server/runtime/org.argeo.server.hibernate/.project deleted file mode 100644 index 8252672d5..000000000 --- a/server/runtime/org.argeo.server.hibernate/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.hibernate - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/server/runtime/org.argeo.server.hibernate/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.hibernate/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 405317eec..000000000 --- a/server/runtime/org.argeo.server.hibernate/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Tue Oct 13 14:51:57 CEST 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.hibernate/.settings/org.maven.ide.eclipse.prefs b/server/runtime/org.argeo.server.hibernate/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c523f7b10..000000000 --- a/server/runtime/org.argeo.server.hibernate/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Oct 13 14:51:50 CEST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/server/runtime/org.argeo.server.hibernate/build.properties b/server/runtime/org.argeo.server.hibernate/build.properties deleted file mode 100644 index 68ef43c38..000000000 --- a/server/runtime/org.argeo.server.hibernate/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -additional.bundles = org.springframework.core -source.. = src/main/java/ diff --git a/server/runtime/org.argeo.server.hibernate/pom.xml b/server/runtime/org.argeo.server.hibernate/pom.xml deleted file mode 100644 index adbd42779..000000000 --- a/server/runtime/org.argeo.server.hibernate/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.server.hibernate - Commons Server Hibernate - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - - org.argeo.* - - - - - - - - - org.argeo.commons - org.argeo.server.core - 2.1.12-SNAPSHOT - - - - - org.argeo.commons - org.argeo.server.dep.hibernate - 2.1.12-SNAPSHOT - pom - - - - org.argeo.tp - net.sf.ehcache - - - - - org.argeo.tp - org.springframework.orm - - - - org.argeo.tp - org.springframework.context.support - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/HibernateLightDaoSync.java b/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/HibernateLightDaoSync.java deleted file mode 100644 index 365565fcd..000000000 --- a/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/HibernateLightDaoSync.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.hibernate; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.server.dao.LightDaoSupport; -import org.hibernate.Session; -import org.hibernate.SessionFactory; - -public class HibernateLightDaoSync { - private final static Log log = LogFactory - .getLog(HibernateLightDaoSync.class); - - private String externalSuffix = LightDaoInterceptor.DEFAULT_EXTERNAL_SUFFIX; - - private SessionFactory sessionFactory; - - private LightDaoSupport lightDaoSupport; - - private List> classes = new ArrayList>(); - - public void sync() { - List> lst; - if (classes.size() > 0) - lst = classes; - else - lst = lightDaoSupport.getSupportedClasses(); - - Session session = sessionFactory.getCurrentSession(); - session.beginTransaction(); - try { - for (Class clss : lst) { - String entityName = clss.getSimpleName() + externalSuffix; - int count = 0; - for (Object obj : lightDaoSupport.list(clss, null)) { - session.save(entityName, obj); - count++; - } - if (log.isDebugEnabled()) - log.debug("Synchronized " + count + "\tentities '" - + entityName + "'"); - } - session.getTransaction().commit(); - } catch (Exception e) { - session.getTransaction().rollback(); - } - } - - public void setClasses(List> classes) { - this.classes = classes; - } - - public void setExternalSuffix(String externalSuffix) { - this.externalSuffix = externalSuffix; - } - - public void setSessionFactory(SessionFactory sessionFactory) { - this.sessionFactory = sessionFactory; - } - - public void setLightDaoSupport(LightDaoSupport lightDaoSupport) { - this.lightDaoSupport = lightDaoSupport; - } -} diff --git a/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/LightDaoInterceptor.java b/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/LightDaoInterceptor.java deleted file mode 100644 index 868ae397e..000000000 --- a/server/runtime/org.argeo.server.hibernate/src/main/java/org/argeo/server/hibernate/LightDaoInterceptor.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.hibernate; - -import java.beans.PropertyDescriptor; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.server.dao.LightDaoSupport; -import org.hibernate.EmptyInterceptor; -import org.hibernate.type.Type; -import org.springframework.beans.BeanWrapper; -import org.springframework.beans.BeanWrapperImpl; - -public class LightDaoInterceptor extends EmptyInterceptor { - private final static Log log = LogFactory.getLog(LightDaoInterceptor.class); - - private static final long serialVersionUID = 1L; - - public final static String DEFAULT_EXTERNAL_SUFFIX = "_external"; - - private String externalSuffix = DEFAULT_EXTERNAL_SUFFIX; - - private LightDaoSupport lightDaoSupport; - - private List> classes = new ArrayList>(); - - private Map, String> businessIdFields = new HashMap, String>(); - - /** internal */ - private final Map, Map> bidMappings = new HashMap, Map>(); - - @Override - public Object getEntity(String entityName, Serializable id) { - Class clss = findSupportingClass(entityName); - Object res = null; - if (clss != null) { - if (businessIdFields.containsKey(clss)) { - String field = businessIdFields.get(clss); - Object value = bidMappings.get(clss).get(id); - res = lightDaoSupport.getByField(clss, field, value); - if (log.isTraceEnabled()) - log.debug("Got entity " + clss + " (" + field + "=" + value - + ")"); - } else { - res = lightDaoSupport.getByKey(clss, id); - if (log.isTraceEnabled()) - log.debug("Got entity " + clss + " (id=" + id + ")"); - } - } else { - res = super.getEntity(entityName, id); - } - return res; - } - - @Override - public String getEntityName(Object object) { - if (supports(object)) { - return toExternalName(object.getClass()); - } else { - return super.getEntityName(object); - } - } - - @Override - public boolean onSave(Object entity, Serializable id, Object[] state, - String[] propertyNames, Type[] types) { - if (supports(entity)) { - Class clss = entity.getClass(); - if (businessIdFields.containsKey(clss)) { - if (!bidMappings.containsKey(clss)) - bidMappings.put(clss, new HashMap()); - BeanWrapper bw = new BeanWrapperImpl(entity); - Object bid = bw.getPropertyValue(businessIdFields.get(clss)); - bidMappings.get(clss).put(id, bid); - if (log.isTraceEnabled()) - log.debug("Mapped tid " + id + " with bid " + bid + " for " - + clss); - } - } - return super.onSave(entity, id, state, propertyNames, types); - } - - @Override - public boolean onLoad(Object entity, Serializable id, Object[] state, - String[] propertyNames, Type[] types) { - Class clss = entity.getClass(); - Object source = null; - if (lightDaoSupport.getSupportedClasses().contains(clss)) { - if (businessIdFields.containsKey(clss)) { - String field = businessIdFields.get(clss); - Object value = bidMappings.get(clss).get(id); - source = lightDaoSupport.getByField(clss, field, value); - if (log.isTraceEnabled()) - log.debug("Loading entity " + clss + " (" + field + "=" - + value + ")"); - } else { - source = lightDaoSupport.getByKey(clss, id); - if (log.isTraceEnabled()) - log.debug("Loading entity " + clss + " (id=" + id + ")"); - } - } - - if (source != null) { - BeanWrapper bwTarget = new BeanWrapperImpl(entity); - BeanWrapper bwSource = new BeanWrapperImpl(source); - for (PropertyDescriptor pd : bwTarget.getPropertyDescriptors()) { - String propName = pd.getName(); - if (bwSource.isReadableProperty(propName) - && bwTarget.isWritableProperty(propName)) { - bwTarget.setPropertyValue(propName, bwSource - .getPropertyValue(propName)); - if (log.isTraceEnabled()) - log.debug("Loaded property " + propName + " for class " - + clss + " (id=" + id + ")"); - } - } - - return true; - } else { - // res = super.getEntity(entityName, id); - return super.onLoad(entity, id, state, propertyNames, types); - } - } - - protected Boolean supports(Object object) { - if (classes.contains(object.getClass())) - return lightDaoSupport.getSupportedClasses().contains( - object.getClass()); - else - return false; - } - - /** @return null if not found */ - protected Class findSupportingClass(String entityName) { - for (Class clss : lightDaoSupport.getSupportedClasses()) { - if (toExternalName(clss).equals(entityName)) { - if (classes.contains(clss)) - return clss; - } - } - return null; - } - - protected final String toExternalName(Class clss) { - return clss.getSimpleName() + externalSuffix; - } - - public void setExternalSuffix(String externalSuffix) { - this.externalSuffix = externalSuffix; - } - - public void setLightDaoSupport(LightDaoSupport lightDaoSupport) { - this.lightDaoSupport = lightDaoSupport; - } - - public void setClasses(List> classes) { - this.classes = classes; - } - - public void setBusinessIdFields(Map, String> businessIdFields) { - this.businessIdFields = businessIdFields; - } - -} diff --git a/server/runtime/org.argeo.server.json/.classpath b/server/runtime/org.argeo.server.json/.classpath deleted file mode 100644 index 607f05846..000000000 --- a/server/runtime/org.argeo.server.json/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/server/runtime/org.argeo.server.json/.project b/server/runtime/org.argeo.server.json/.project deleted file mode 100644 index e32fd4a26..000000000 --- a/server/runtime/org.argeo.server.json/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.json - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/server/runtime/org.argeo.server.json/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.json/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d5df3e8ef..000000000 --- a/server/runtime/org.argeo.server.json/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,67 +0,0 @@ -#Sun Feb 21 11:16:01 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.json/.settings/org.maven.ide.eclipse.prefs b/server/runtime/org.argeo.server.json/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index cb4dc85ab..000000000 --- a/server/runtime/org.argeo.server.json/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Sep 16 09:47:45 CEST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/server/runtime/org.argeo.server.json/build.properties b/server/runtime/org.argeo.server.json/build.properties deleted file mode 100644 index 65cb73bb9..000000000 --- a/server/runtime/org.argeo.server.json/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -source.. = src/main/java/,\ - src/test/java/ diff --git a/server/runtime/org.argeo.server.json/pom.xml b/server/runtime/org.argeo.server.json/pom.xml deleted file mode 100644 index abd44614c..000000000 --- a/server/runtime/org.argeo.server.json/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.server.json - Commons Server JSON - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - - org.argeo.* - - - - - - - - - - org.argeo.commons - org.argeo.server.core - 2.1.12-SNAPSHOT - - - - - org.argeo.tp - org.codehaus.jackson.mapper - - - - - org.argeo.tp - org.springframework.web.servlet - - - org.argeo.tp - org.springframework.osgi.core - - - org.argeo.tp - org.eclipse.osgi - - - - - org.argeo.tp - javax.servlet - - - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - - - org.argeo.tp - junit - test - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/GenericJsonDeserializer.java b/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/GenericJsonDeserializer.java deleted file mode 100644 index 6f039c49d..000000000 --- a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/GenericJsonDeserializer.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.json; - -import java.io.IOException; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.codehaus.jackson.JsonFactory; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.ObjectCodec; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.ObjectMapper; - -public class GenericJsonDeserializer extends JsonDeserializer { - private final static Log log = LogFactory - .getLog(GenericJsonDeserializer.class); - - private JsonFactory jsonFactory = new JsonFactory(); - private ObjectCodec objectCodec = new ObjectMapper(); - private JsonObjectFactory defaultObjectFactory = new JsonObjectFactoryImpl(); - - private String typeField = "type"; - - private List objectFactories = new ArrayList(); - - @SuppressWarnings("unchecked") - @Override - public T deserialize(JsonParser parser, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - // first read as Json DOM in order to extract the type - // TODO: optimize with streaming API - JsonNode root = parser.readValueAsTree(); - String type = root.get(typeField).getTextValue(); - - // Write it back as a string - StringWriter writer = new StringWriter(); - JsonGenerator generator = jsonFactory.createJsonGenerator(writer); - generator.setCodec(objectCodec); - generator.writeTree(root); - String str = writer.toString(); - - if (log.isTraceEnabled()) - log.debug("Deserialize object of type=" + type + ", str=" + str); - - JsonObjectFactory objectFactory = null; - jofs: for (JsonObjectFactory jof : objectFactories) { - if (jof.supports(type)) { - objectFactory = jof; - break jofs; - } - } - - if (objectFactory == null) - objectFactory = defaultObjectFactory; - - if (objectFactory == null || !objectFactory.supports(type)) - throw new ArgeoException( - "Cannot find JSON object factory for type " + type); - - return (T) objectFactory.readValue(type, str); - } - - public void setTypeField(String typeField) { - this.typeField = typeField; - } - - public void setObjectFactories(List objectFactories) { - this.objectFactories = objectFactories; - } - - public List getObjectFactories() { - return objectFactories; - } - -} diff --git a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactory.java b/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactory.java deleted file mode 100644 index 0fa67c6fe..000000000 --- a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.json; - - -public interface JsonObjectFactory { - public Boolean supports(String type); - - public T readValue(String type, String str); -} diff --git a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactoryImpl.java b/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactoryImpl.java deleted file mode 100644 index 4ed46c51c..000000000 --- a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonObjectFactoryImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.json; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.codehaus.jackson.map.ObjectMapper; -import org.osgi.framework.BundleContext; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.osgi.context.BundleContextAware; -import org.springframework.osgi.util.BundleDelegatingClassLoader; - -public class JsonObjectFactoryImpl implements JsonObjectFactory, - BundleContextAware, InitializingBean { - private final static Log log = LogFactory - .getLog(JsonObjectFactoryImpl.class); - - private BundleContext bundleContext; - private ClassLoader classLoader = getClass().getClassLoader(); - - private ObjectMapper objectMapper = new ObjectMapper(); - private Map> supportedTypes = new HashMap>(); - - public Boolean supports(String type) { - if (supportedTypes.containsKey(type)) - return true; - - return loadClass(type) != null ? true : false; - } - - @SuppressWarnings("unchecked") - public T readValue(String type, String str) { - final Class clss; - if (supportedTypes.containsKey(type)) - clss = supportedTypes.get(type); - else { - clss = loadClass(type); - if (clss == null) - throw new ArgeoException("Cannot find type " + type); - } - - try { - return (T) objectMapper.readValue(str, clss); - } catch (Exception e) { - throw new ArgeoException("Cannot deserialize " + str - + " (type=" + type + ")", e); - } - } - - public void setSupportedTypes(Map> supportedTypes) { - this.supportedTypes = supportedTypes; - } - - protected Class loadClass(String type) { - try { - return classLoader.loadClass(type); - } catch (ClassNotFoundException e) { - if (log.isDebugEnabled()) - log.debug("BundleDelegatingClassLoader.loadClass failed: " + e); - } - - return null; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - public void afterPropertiesSet() throws Exception { - classLoader = BundleDelegatingClassLoader - .createBundleClassLoaderFor(bundleContext.getBundle()); - } -} diff --git a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerMapper.java b/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerMapper.java deleted file mode 100644 index a7c860c63..000000000 --- a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerMapper.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.json; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.argeo.server.Deserializer; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.DeserializationProblemHandler; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.deser.CustomDeserializerFactory; -import org.codehaus.jackson.map.deser.StdDeserializerProvider; -import org.springframework.beans.factory.InitializingBean; - -public class JsonServerMapper extends JsonServerSerializer implements - Deserializer, InitializingBean { - private final static Log log = LogFactory.getLog(JsonServerMapper.class); - - private Class targetClass; - - private Map, JsonDeserializer> deserializers = new HashMap, JsonDeserializer>(); - - @SuppressWarnings("unchecked") - public void afterPropertiesSet() throws Exception { - CustomDeserializerFactory dsf = new CustomDeserializerFactory(); - for (Class clss : deserializers.keySet()) { - dsf.addSpecificMapping(clss, deserializers.get(clss)); - if (log.isDebugEnabled()) - log.debug("Add JSON mapping for " + clss); - } - StdDeserializerProvider sdp = new StdDeserializerProvider(dsf); - getObjectMapper().setDeserializerProvider(sdp); - // ignore unkown properties - getObjectMapper().getDeserializationConfig().addHandler( - new DeserializationProblemHandler() { - public boolean handleUnknownProperty( - DeserializationContext ctxt, - JsonDeserializer deserializer, Object bean, - String propertyName) throws IOException, - JsonProcessingException { - if (log.isTraceEnabled()) - log.debug("Ignore property " + propertyName - + " in bean " + bean); - ctxt.getParser().skipChildren(); - return true; - } - }); - } - - public Object deserialize(Reader reader) { - try { - if (log.isTraceEnabled()) { - String str = IOUtils.toString(reader); - log.debug(str); - reader = new StringReader(str); - } - - return getObjectMapper().readValue(reader, targetClass); - } catch (Exception e) { - throw new ArgeoException("Cannot deserialize " + reader, e); - } - - } - - public T deserialize(Reader reader, Class clss) { - try { - if (log.isTraceEnabled()) { - String str = IOUtils.toString(reader); - log.debug(str); - reader = new StringReader(str); - } - - return getObjectMapper().readValue(reader, clss); - } catch (Exception e) { - throw new ArgeoException("Cannot deserialize " + reader, e); - } - - } - - public Object deserialize(String content) { - StringReader reader = new StringReader(content); - try { - return deserialize(reader); - } finally { - IOUtils.closeQuietly(reader); - } - } - - public void setTargetClass(Class targetClass) { - this.targetClass = targetClass; - } - - public void setDeserializers( - Map, JsonDeserializer> deserializers) { - this.deserializers = deserializers; - } - - public Class getTargetClass() { - return targetClass; - } - - public Map, JsonDeserializer> getDeserializers() { - return deserializers; - } - -} diff --git a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerSerializer.java b/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerSerializer.java deleted file mode 100644 index 696cdf8b6..000000000 --- a/server/runtime/org.argeo.server.json/src/main/java/org/argeo/server/json/JsonServerSerializer.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.json; - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.argeo.server.Serializer; -import org.argeo.server.ServerSerializer; -import org.codehaus.jackson.JsonFactory; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.SerializerFactory; -import org.codehaus.jackson.map.SerializerProvider; -import org.codehaus.jackson.map.ser.StdSerializerProvider; - -public class JsonServerSerializer implements ServerSerializer, Serializer { - private final static Log log = LogFactory - .getLog(JsonServerSerializer.class); - - private JsonFactory jsonFactory = new JsonFactory(); - private ObjectMapper objectMapper = new ObjectMapper(); - private SerializerProvider serializerProvider = new CustomSerializerProvider(); - - private Boolean prettyPrint = false; - - private Boolean asHtml = false; - - private String contentTypeCharset = "UTF-8"; - - // private Map,String> ignoredFields = new HashMap, - // String>(); - - public JsonServerSerializer() { - objectMapper.setSerializerProvider(serializerProvider); - } - - @SuppressWarnings("restriction") - public void serialize(Object obj, HttpServletRequest request, - HttpServletResponse response) { - if (asHtml) - response.setContentType("text/html;charset=" + contentTypeCharset); - else - response.setContentType("application/json;charset=" - + contentTypeCharset); - - try { - if (asHtml) - response.getWriter().append("

");
-
-			serialize(obj, response.getWriter());
-
-			if (asHtml)
-				response.getWriter().append("
"); - - } catch (IOException e) { - throw new ArgeoException("Cannot open response stream.", e); - } - } - - public void serialize(Object obj, Writer writer) { - serializeAndLog(obj); - - JsonGenerator jsonGenerator = null; - try { - jsonGenerator = jsonFactory.createJsonGenerator(writer); - - if (prettyPrint) - jsonGenerator.useDefaultPrettyPrinter(); - - objectMapper.writeValue(jsonGenerator, obj); - jsonGenerator.flush(); - } catch (Exception e) { - throw new ArgeoException("Cannot serialize " + obj, e); - } finally { - if (jsonGenerator != null) - try { - jsonGenerator.close(); - } catch (IOException e) { - if (log.isTraceEnabled()) - log.error("Cannot close JSON generator", e); - } - } - } - - @Deprecated - public void serialize(Writer writer, Object obj) { - serialize(obj, writer); - } - - protected void serializeAndLog(Object obj) { - if (!log.isTraceEnabled()) - return; - - JsonGenerator jsonGenerator = null; - try { - StringWriter stringWriter = new StringWriter(); - jsonGenerator = jsonFactory.createJsonGenerator(stringWriter); - jsonGenerator.useDefaultPrettyPrinter(); - objectMapper.writeValue(jsonGenerator, obj); - jsonGenerator.close(); - log.debug(stringWriter.toString()); - } catch (Exception e) { - throw new ArgeoException("Cannot log JSON", e); - } finally { - if (jsonGenerator != null) - try { - jsonGenerator.close(); - } catch (IOException e) { - if (log.isTraceEnabled()) - log.error("Cannot close JSON generator", e); - } - - } - } - - public void setPrettyPrint(Boolean prettyPrint) { - this.prettyPrint = prettyPrint; - } - - protected ObjectMapper getObjectMapper() { - return objectMapper; - } - - public void setContentTypeCharset(String contentTypeCharset) { - this.contentTypeCharset = contentTypeCharset; - } - - static class CustomSerializerProvider extends StdSerializerProvider { - - public CustomSerializerProvider() { - super(); - } - - public CustomSerializerProvider(SerializationConfig config, - StdSerializerProvider src, SerializerFactory f) { - super(config, src, f); - } - - protected StdSerializerProvider createInstance( - SerializationConfig config, SerializerFactory jsf) { - return new CustomSerializerProvider(config, this, jsf); - } - - @Override - public JsonSerializer getUnknownTypeSerializer( - Class unknownType) { - JsonSerializer res = new JsonSerializer() { - public void serialize(Object value, JsonGenerator jgen, - SerializerProvider provider) - throws JsonMappingException { - if (log.isDebugEnabled()) - log.warn("Unknown serializer for " - + value.getClass().getName()); - try { - jgen.writeNull(); - } catch (Exception e) { - throw new ArgeoException("Cannot write null", e); - } - } - - }; - - return res; - } - - } -} diff --git a/server/runtime/org.argeo.server.jxl/.classpath b/server/runtime/org.argeo.server.jxl/.classpath deleted file mode 100644 index ab16ae263..000000000 --- a/server/runtime/org.argeo.server.jxl/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/server/runtime/org.argeo.server.jxl/.project b/server/runtime/org.argeo.server.jxl/.project deleted file mode 100644 index 10df72a11..000000000 --- a/server/runtime/org.argeo.server.jxl/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.jxl - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/server/runtime/org.argeo.server.jxl/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.jxl/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d991f4b6a..000000000 --- a/server/runtime/org.argeo.server.jxl/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,67 +0,0 @@ -#Sun Feb 21 11:16:56 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.jxl/.settings/org.maven.ide.eclipse.prefs b/server/runtime/org.argeo.server.jxl/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index ef3da6253..000000000 --- a/server/runtime/org.argeo.server.jxl/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Oct 01 12:05:59 CEST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/server/runtime/org.argeo.server.jxl/build.properties b/server/runtime/org.argeo.server.jxl/build.properties deleted file mode 100644 index d5d2601d0..000000000 --- a/server/runtime/org.argeo.server.jxl/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -additional.bundles = com.springsource.junit -source.. = src/main/java/,\ - src/test/java/,\ - src/test/resources/ diff --git a/server/runtime/org.argeo.server.jxl/pom.xml b/server/runtime/org.argeo.server.jxl/pom.xml deleted file mode 100644 index b75892a07..000000000 --- a/server/runtime/org.argeo.server.jxl/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.server.jxl - Commons Server JXL - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - - org.argeo.* - - - - - - - - - - org.argeo.commons - org.argeo.server.core - 2.1.12-SNAPSHOT - - - - - org.argeo.tp - jxl - - - - - org.argeo.tp - junit - test - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12-SNAPSHOT - pom - test - - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java b/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java deleted file mode 100644 index 6d599612e..000000000 --- a/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.StringTokenizer; - -import jxl.Cell; -import jxl.CellType; -import jxl.FormulaCell; -import jxl.JXLException; -import jxl.LabelCell; -import jxl.NumberCell; -import jxl.Sheet; -import jxl.Workbook; -import jxl.WorkbookSettings; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.ArgeoException; -import org.argeo.server.dao.AbstractTabularDaoSupport; -import org.argeo.server.dao.LightDaoSupport; -import org.springframework.beans.BeanWrapper; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.context.ApplicationContextAware; -import org.springframework.util.StringUtils; - -public class JxlDaoSupport extends AbstractTabularDaoSupport implements - LightDaoSupport, ApplicationContextAware, InitializingBean { - private final static Log log = LogFactory.getLog(JxlDaoSupport.class); - - private String encoding = "cp1252"; - private Locale locale = null; - - protected void load(InputStream in, List references) { - try { - WorkbookSettings workbookSettings = new WorkbookSettings(); - workbookSettings.setEncoding(encoding); - if (locale != null) - workbookSettings.setLocale(locale); - Workbook workbook = Workbook.getWorkbook(in, workbookSettings); - for (Sheet sheet : workbook.getSheets()) { - loadSheet(sheet, references); - } - } catch (Exception e) { - throw new ArgeoException("Cannot load workbook", e); - } - } - - protected void loadSheet(Sheet sheet, List references) - throws JXLException { - String sheetName = sheet.getName(); - if (log.isTraceEnabled()) - log.debug("Instantiate sheet " + sheetName); - - String tableName; - int hashIndex = sheetName.lastIndexOf('#'); - if (hashIndex >= 0) { - tableName = sheetName.substring(0, hashIndex); - } else { - tableName = sheetName; - } - - Class clss = findClassToInstantiate(tableName); - - if (hashIndex >= 0) { - // see - // http://stackoverflow.com/questions/451452/valid-characters-for-excel-sheet-names - BeanWrapper bw = newBeanWrapper(clss); - StringTokenizer espSt = new StringTokenizer(sheetName - .substring(hashIndex + 1), "&="); - String keyProperty = null; - while (espSt.hasMoreTokens()) { - String fieldName = espSt.nextToken(); - if (keyProperty == null) - keyProperty = fieldName; - if (!espSt.hasMoreTokens()) - throw new ArgeoException("Badly formatted sheetname " - + sheetName); - String fieldValue = espSt.nextToken(); - bw.setPropertyValue(fieldName, fieldValue); - loadAsObject(bw, sheet, references); - saveOrUpdate(bw.getPropertyValue(keyProperty), bw - .getWrappedInstance(), clss); - } - - } else { - - Cell[] firstRow = sheet.getRow(0); - String keyProperty = firstRow[0].getContents(); - - if (keyProperty.charAt(keyProperty.length() - 1) == '>') { - loadAsColumns(clss, keyProperty.substring(0, keyProperty - .length() - 1), sheet, firstRow, references); - } else { - loadAsRows(clss, keyProperty, sheet, firstRow, references); - } - } - } - - protected void loadAsRows(Class clss, String keyProperty, Sheet sheet, - Cell[] firstRow, List references) throws JXLException { - for (int row = 1; row < sheet.getRows(); row++) { - if (log.isTraceEnabled()) - log.trace(" row " + row); - - Cell[] currentRow = sheet.getRow(row); - BeanWrapper bw = newBeanWrapper(clss); - cells: for (int col = 0; col < firstRow.length; col++) { - String pName = firstRow[col].getContents(); - - if (col < currentRow.length) { - Cell cell = currentRow[col]; - if (overrideCell(cell, bw, pName, keyProperty, row, - references)) - continue cells; - loadCell(cell, bw, pName, keyProperty, row, references); - } - }// cells - - saveOrUpdate(bw.getPropertyValue(keyProperty), bw - .getWrappedInstance(), clss); - // tempRefs.get(sheet.getName()).add(bw.getWrappedInstance()); - registerInTabularView(sheet.getName(), bw.getWrappedInstance()); - } - } - - protected void loadAsColumns(Class clss, String keyProperty, - Sheet sheet, Cell[] firstRow, List references) - throws JXLException { - Cell[] firstColumn = sheet.getColumn(0); - - for (int col = 1; col < firstRow.length; col++) { - if (log.isTraceEnabled()) - log.trace(" column " + col); - BeanWrapper bw = newBeanWrapper(clss); - Cell[] column = sheet.getColumn(col); - for (int row = 0; row < column.length; row++) { - Cell cell = column[row]; - - String propertyName; - if (row == 0) - propertyName = keyProperty; - else - propertyName = firstColumn[row].getContents(); - - Class rowType = bw.getPropertyType(propertyName); - if (log.isTraceEnabled()) - log.trace(" " + propertyName + " rowType=" - + rowType.getName()); - if (Map.class.isAssignableFrom(rowType)) { - if (log.isTraceEnabled()) - log.trace(" start building map " + propertyName); - row++; - Map map = new HashMap(); - String firstColContents = firstColumn[row].getContents(); - mapRows: for (; row < column.length; row++) { - cell = column[row]; - Object key = firstColContents; - if (log.isTraceEnabled()) - log.trace(" row=" + row + ", firstColContents=" - + firstColContents + ", key=" + key - + ", type=" + cell.getType()); - Object cellValue = getCellValue(cell); - map.put(key, cellValue); - - // check next row too see if one should break - if (row < firstColumn.length - 1) - firstColContents = firstColumn[row + 1] - .getContents(); - if (bw.isWritableProperty(firstColContents) - || firstColContents.trim().equals("") - || row == firstColumn.length - 1) { - bw.setPropertyValue(propertyName, map); - if (log.isTraceEnabled()) - log.trace(" set map " + propertyName - + " of size " + map.size()); - break mapRows;// map is over - } - } - } else { - loadCell(cell, bw, propertyName, keyProperty, row, - references); - } - - } - saveOrUpdate(bw.getPropertyValue(keyProperty), bw - .getWrappedInstance(), clss); - // tempRefs.get(sheet.getName()).add(bw.getWrappedInstance()); - registerInTabularView(sheet.getName(), bw.getWrappedInstance()); - }// columns - } - - protected void loadAsObject(BeanWrapper bw, Sheet sheet, - List references) { - Cell[] firstColumn = sheet.getColumn(0); - for (int row = 0; row < firstColumn.length; row++) { - if (log.isTraceEnabled()) - log.trace(" row " + row); - Cell[] currentRow = sheet.getRow(row); - String propertyName = firstColumn[row].getContents(); - Class rowType = bw.getPropertyType(propertyName); - if (Map.class.isAssignableFrom(rowType)) { - Map map = new HashMap(); - if (currentRow.length == 1 - || currentRow[1].getContents().trim().equals("")) { - // simple map - } else { - // map of maps - List subKeys = new ArrayList(); - for (int col = 1; col < currentRow.length; col++) { - subKeys.add(getCellValue(currentRow[col])); - } - if (log.isTraceEnabled()) - log.trace(" subKeys=" + subKeys); - row++; - String firstColContents = firstColumn[row].getContents(); - mapRows: for (; row < firstColumn.length; row++) { - currentRow = sheet.getRow(row); - - Object key = firstColContents; - Map subMap = new HashMap(); - - for (int col = 1; col < currentRow.length - && col < subKeys.size() + 1; col++) { - Object subKey = subKeys.get(col - 1); - Cell cell = currentRow[col]; - if (log.isTraceEnabled()) - log.trace(" row=" + row - + ", firstColContents=" - + firstColContents + ", subKey=" - + subKey + ", type=" + cell.getType()); - Object cellValue = getCellValue(cell); - subMap.put(subKey, cellValue); - } - map.put(key, subMap); - - // check next row too see if one should break - if (row < firstColumn.length - 1) - firstColContents = firstColumn[row + 1] - .getContents(); - if (bw.isWritableProperty(firstColContents) - || firstColContents.trim().equals("") - || row == firstColumn.length - 1) { - log.trace(map); - bw.setPropertyValue(propertyName, map); - if (log.isTraceEnabled()) - log.trace(" set map " + propertyName - + " of size " + map.size()); - break mapRows;// map is over - } - } - - } - } else if (List.class.isAssignableFrom(rowType)) { - throw new UnsupportedOperationException(); - } else { - bw.setPropertyValue(propertyName, getCellValue(currentRow[1])); - } - } - } - - protected void loadCell(Cell cell, BeanWrapper bw, String propertyName, - String keyProperty, Integer row, List references) - throws JXLException { - - if (cell instanceof FormulaCell) { - String formula = ((FormulaCell) cell).getFormula(); - int index = formula.indexOf('!'); - if (index < 0) - throw new ArgeoException("Cannot interpret formula " - + formula); - ; - String targetSheet = formula.substring(0, index); - // assume no double letters!! - String targetRowStr = formula.substring(index + 2); - if (targetRowStr.charAt(0) == '$') - targetRowStr = targetRowStr.substring(1); - Integer targetRow = Integer.parseInt(targetRowStr); - references.add(new TabularInternalReference( - bw.getWrappedInstance(), propertyName, targetSheet, - targetRow)); - - if (log.isTraceEnabled()) - log.debug(" formula: " + formula + " | content: " - + cell.getContents() + " | targetSheet=" + targetSheet - + ", targetRow=" + targetRow); - } else { - Object cellValue = getCellValue(cell); - - if (propertyName.equals(keyProperty) - && !StringUtils.hasText(cellValue.toString())) { - // auto allocate key column if empty - cellValue = Integer.toString(row); - } - - if (propertyName.charAt(0) == '#') {// externalRef - references.add(new Reference(bw.getWrappedInstance(), - propertyName.substring(1), cellValue.toString())); - } else { - bw.setPropertyValue(propertyName, cellValue); - } - - if (log.isTraceEnabled()) - log.debug(" " + propertyName + "=" + cellValue); - } - - } - - protected Object getCellValue(Cell cell) { - Object contents; - if (cell.getType() == CellType.LABEL) { - LabelCell lc = (LabelCell) cell; - contents = lc.getString(); - } else if (cell.getType() == CellType.NUMBER) { - NumberCell nc = (NumberCell) cell; - contents = nc.getValue(); - } else { - contents = cell.getContents(); - } - return contents; - } - - /** Returns true if property was set (thus bypassing standard process). */ - protected Boolean overrideCell(Cell cell, BeanWrapper bw, - String propertyName, String keyProperty, Integer row, - List references) { - return false; - } - - public void setEncoding(String encoding) { - this.encoding = encoding; - } - - public void setLocale(Locale locale) { - this.locale = locale; - } - -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/CollectionsObject.java b/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/CollectionsObject.java deleted file mode 100644 index 2c6308f3d..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/CollectionsObject.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CollectionsObject { - private String id; - private String label; - private SimpleObject simpleObject; - private List stringList = new ArrayList(); - private Map floatMap = new HashMap(); - private Map objectMap = new HashMap(); - private Map> mapOfMaps = new HashMap>(); - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public SimpleObject getSimpleObject() { - return simpleObject; - } - - public void setSimpleObject(SimpleObject simpleObject) { - this.simpleObject = simpleObject; - } - - public List getStringList() { - return stringList; - } - - public void setStringList(List stringList) { - this.stringList = stringList; - } - - public Map getFloatMap() { - return floatMap; - } - - public void setFloatMap(Map floatMap) { - this.floatMap = floatMap; - } - - public Map getObjectMap() { - return objectMap; - } - - public void setObjectMap(Map objectMap) { - this.objectMap = objectMap; - } - - public Map> getMapOfMaps() { - return mapOfMaps; - } - - public void setMapOfMaps(Map> mapOfMaps) { - this.mapOfMaps = mapOfMaps; - } -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/JxlDaoSupportTest.java b/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/JxlDaoSupportTest.java deleted file mode 100644 index 75e6b1c70..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/JxlDaoSupportTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -import java.util.List; - -import junit.framework.TestCase; - -import org.springframework.core.io.ClassPathResource; - -@SuppressWarnings("restriction") -public class JxlDaoSupportTest extends TestCase { - public void testBasic() throws Exception { - JxlDaoSupport jsd = new JxlDaoSupport(); - jsd.getExternalRefs().put("test", new OtherObject()); - - jsd.getResources().add(new ClassPathResource("/dao/simple.xls")); - jsd.init(); - - SimpleObject soAaa = jsd.getByKey(SimpleObject.class, "aaa"); - assertNotNull(soAaa); - assertEquals("aaa", soAaa.getString()); - assertEquals(1, soAaa.getInteger().intValue()); - assertNotNull(soAaa.getOtherObject()); - assertEquals("USD", soAaa.getOtherObject().getKey()); - assertEquals("US Dollar", soAaa.getOtherObject().getValue()); - - SimpleObject soBbb = jsd.getByKey(SimpleObject.class, "bbb"); - assertNotNull(soBbb.getOtherObject()); - assertEquals("bbb", ((SimpleObject) soBbb.getOtherObject().getValue()) - .getString()); - - List simpleObjects = jsd.list(SimpleObject.class, null); - assertEquals(4, simpleObjects.size()); - - List collectionsObjects = jsd.list( - CollectionsObject.class, null); - assertEquals(4, collectionsObjects.size()); - } -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/OtherObject.java b/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/OtherObject.java deleted file mode 100644 index ec41c5597..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/OtherObject.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -public class OtherObject { - private String key; - private Object value; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public Object getValue() { - return value; - } - - public void setValue(Object value) { - this.value = value; - } -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObject.java b/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObject.java deleted file mode 100644 index eee4ec509..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObject.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -public class SimpleObject { - private String string; - private Integer integer; - private OtherObject otherObject; - private OtherObject anotherObject; - - public String getString() { - return string; - } - - public void setString(String sting) { - this.string = sting; - } - - public Integer getInteger() { - return integer; - } - - public void setInteger(Integer integer) { - this.integer = integer; - } - - public OtherObject getOtherObject() { - return otherObject; - } - - public void setOtherObject(OtherObject otherObject) { - this.otherObject = otherObject; - } - - public OtherObject getAnotherObject() { - return anotherObject; - } - - public void setAnotherObject(OtherObject anotherObject) { - this.anotherObject = anotherObject; - } - - @Override - public boolean equals(Object obj) { - return string.equals(((SimpleObject) obj).string); - } - - @Override - public int hashCode() { - return string.hashCode(); - } - -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObjectEditor.java b/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObjectEditor.java deleted file mode 100644 index c7cb00a7c..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/java/org/argeo/server/jxl/dao/SimpleObjectEditor.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.jxl.dao; - -import java.beans.PropertyEditorSupport; - -public class SimpleObjectEditor extends PropertyEditorSupport { - - @Override - public String getAsText() { - return ((SimpleObject) getValue()).getString(); - } - - @Override - public void setAsText(String text) throws IllegalArgumentException { - SimpleObject obj = new SimpleObject(); - obj.setString(text); - setValue(obj); - } - -} diff --git a/server/runtime/org.argeo.server.jxl/src/test/resources/dao/simple.xls b/server/runtime/org.argeo.server.jxl/src/test/resources/dao/simple.xls deleted file mode 100644 index 6cb4c2ee4..000000000 Binary files a/server/runtime/org.argeo.server.jxl/src/test/resources/dao/simple.xls and /dev/null differ diff --git a/server/runtime/org.argeo.server.jxl/src/test/resources/log4j.properties b/server/runtime/org.argeo.server.jxl/src/test/resources/log4j.properties deleted file mode 100644 index 6a9667c2e..000000000 --- a/server/runtime/org.argeo.server.jxl/src/test/resources/log4j.properties +++ /dev/null @@ -1,13 +0,0 @@ -log4j.rootLogger=WARN, console - -## Levels -log4j.logger.org.argeo=DEBUG -log4j.logger.org.argeo.server.jxl=TRACE - -## Appenders -# console is set to be a ConsoleAppender. -log4j.appender.console=org.apache.log4j.ConsoleAppender - -# console uses PatternLayout. -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n diff --git a/server/runtime/org.argeo.server.modeshape/.classpath b/server/runtime/org.argeo.server.modeshape/.classpath deleted file mode 100644 index 8cf7f48a0..000000000 --- a/server/runtime/org.argeo.server.modeshape/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/server/runtime/org.argeo.server.modeshape/.project b/server/runtime/org.argeo.server.modeshape/.project deleted file mode 100644 index 3018b7199..000000000 --- a/server/runtime/org.argeo.server.modeshape/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.modeshape - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5a7d6c7fb..000000000 --- a/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Feb 09 07:24:45 CET 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.pde.core.prefs b/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index b6bd622d8..000000000 --- a/server/runtime/org.argeo.server.modeshape/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Wed Feb 09 07:24:45 CET 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/server/runtime/org.argeo.server.modeshape/build.properties b/server/runtime/org.argeo.server.modeshape/build.properties deleted file mode 100644 index 5fc538bc8..000000000 --- a/server/runtime/org.argeo.server.modeshape/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = META-INF/,\ - . diff --git a/server/runtime/org.argeo.server.modeshape/pom.xml b/server/runtime/org.argeo.server.modeshape/pom.xml deleted file mode 100644 index d66de882b..000000000 --- a/server/runtime/org.argeo.server.modeshape/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.server.modeshape - Commons Server Modeshape - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - - org.argeo.modeshape.*, - - - - - - - - - org.argeo.commons - org.argeo.server.jcr - 2.1.12-SNAPSHOT - - - - org.argeo.tp - org.modeshape - - - - org.argeo.tp - javax.jcr - - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12-SNAPSHOT - pom - - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12-SNAPSHOT - test - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.modeshape/src/main/java/org/argeo/modeshape/FileSystemRepository.java b/server/runtime/org.argeo.server.modeshape/src/main/java/org/argeo/modeshape/FileSystemRepository.java deleted file mode 100644 index ab008c5b9..000000000 --- a/server/runtime/org.argeo.server.modeshape/src/main/java/org/argeo/modeshape/FileSystemRepository.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.modeshape; - -import java.util.UUID; - -import javax.jcr.Repository; -import javax.jcr.RepositoryException; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; - -import org.argeo.jcr.JcrUtils; -import org.modeshape.connector.filesystem.FileSystemSource; -import org.modeshape.jcr.JcrConfiguration; -import org.modeshape.jcr.JcrEngine; - -public class FileSystemRepository { - public void init() { - try { - // Required in order to load mime type definitions - Thread.currentThread().setContextClassLoader(JcrConfiguration.class.getClassLoader()); - JcrConfiguration config = new JcrConfiguration(); - config.repositorySource("fsSource") - .usingClass(FileSystemSource.class) - .setDescription("The repository for our content") - .setProperty("workspaceRootPath", "/home/mbaudier/tmp") - .setProperty("defaultWorkspaceName", "prod") - .setProperty("predefinedWorkspaceNames", - new String[] { "staging", "dev" }) - .setProperty( - "rootNodeUuid", - UUID.fromString("fd129c12-81a8-42ed-aa4b-820dba49e6f0")) - .setProperty("updatesAllowed", "true") - .setProperty("creatingWorkspaceAllowed", "false"); - config.repository("fsRepo").setSource("fsSource"); - - JcrEngine jcrEngine = config.build(); - jcrEngine.start(); - Repository repository = jcrEngine.getRepository("fsRepo"); - Session session = repository.login(new SimpleCredentials("demo", - "demo".toCharArray())); - JcrUtils.debug(session.getRootNode()); - } catch (RepositoryException e) { - e.printStackTrace(); - } - } -} diff --git a/server/runtime/org.argeo.server.webextender/.classpath b/server/runtime/org.argeo.server.webextender/.classpath deleted file mode 100644 index 8cf7f48a0..000000000 --- a/server/runtime/org.argeo.server.webextender/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/server/runtime/org.argeo.server.webextender/.project b/server/runtime/org.argeo.server.webextender/.project deleted file mode 100644 index 39a8ee851..000000000 --- a/server/runtime/org.argeo.server.webextender/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.webextender - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.jdt.core.prefs b/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 606000e33..000000000 --- a/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Fri Jul 09 14:46:32 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.pde.core.prefs b/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index c0af3cae0..000000000 --- a/server/runtime/org.argeo.server.webextender/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Jul 09 14:46:32 CEST 2010 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/extender.properties b/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/extender.properties deleted file mode 100644 index 4dde80251..000000000 --- a/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/extender.properties +++ /dev/null @@ -1 +0,0 @@ -undeploy.wars.at.shutdown=true diff --git a/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/webextender.xml b/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/webextender.xml deleted file mode 100644 index 2e4512809..000000000 --- a/server/runtime/org.argeo.server.webextender/META-INF/spring/extender/webextender.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.webextender/build.properties b/server/runtime/org.argeo.server.webextender/build.properties deleted file mode 100644 index 5fc538bc8..000000000 --- a/server/runtime/org.argeo.server.webextender/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = META-INF/,\ - . diff --git a/server/runtime/org.argeo.server.webextender/pom.xml b/server/runtime/org.argeo.server.webextender/pom.xml deleted file mode 100644 index aadf95af0..000000000 --- a/server/runtime/org.argeo.server.webextender/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12-SNAPSHOT - .. - - org.argeo.server.webextender - Commons Server Web Extender (Spring DM) - Configure / hack Spring DM web extender - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - org.springframework.osgi.web.extender - org.argeo.server.webextender.* - org.springframework.beans.factory,* - - - - - - - - - org.argeo.tp - org.springframework.osgi.web - - - org.argeo.tp - org.springframework.osgi.web.extender - - - org.argeo.tp - org.apache.catalina - - - org.argeo.tp - org.springframework.beans - - - org.argeo.tp - org.eclipse.osgi - - - org.argeo.tp - javax.servlet - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - \ No newline at end of file diff --git a/server/runtime/org.argeo.server.webextender/src/main/java/org/argeo/server/webextender/TomcatDeployer.java b/server/runtime/org.argeo.server.webextender/src/main/java/org/argeo/server/webextender/TomcatDeployer.java deleted file mode 100644 index 192ceadba..000000000 --- a/server/runtime/org.argeo.server.webextender/src/main/java/org/argeo/server/webextender/TomcatDeployer.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.webextender; - -import org.apache.catalina.Container; -import org.apache.catalina.Context; -import org.apache.catalina.Service; -import org.springframework.osgi.web.deployer.WarDeployment; -import org.springframework.osgi.web.deployer.tomcat.TomcatWarDeployer; -import org.springframework.util.ObjectUtils; - -/** - * Wraps the Spring DM Tomcat deployer in order to avoid issue with call to - * getServerInfo() when undeployed. We need to hack a lot here because Spring - * OSGi Web is really not extendable. - */ -public class TomcatDeployer extends TomcatWarDeployer { - private String serverInfo; - private Service service; - private String contextPath = "/ui"; - - @Override - public void setService(Object service) { - this.service = (Service) service; - super.setService(service); - // TODO: listen to OSGi service so that we get notified in the - // (unlikely) case the underlying service is updated - serverInfo = ((Service) service).getInfo(); - log.info("Enhanced Argeo Tomcat webapp deployer being used"); - } - - @Override - protected String getServerInfo() { - return serverInfo; - } - - @Override - protected void startDeployment(WarDeployment deployment) throws Exception { - // Context context = ((TomcatWarDeployment) - // deployment).getCatalinaContext(); - // context.setCookies(false); - super.startDeployment(deployment); - - // Required for multiple RAP sessions to work with Tomcat - // see - // http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application_in_multiple_browser_tabs.2Fwindows.3F - Context context = getContext(contextPath); - if (context != null) - context.setCookies(false); - } - - /** @return null if not found */ - private Context getContext(String path) { - for (Container container : getHost().findChildren()) { - if (log.isTraceEnabled()) - log.trace(container.getClass() + ": " + container.getName()); - if (container instanceof Context) { - Context context = (Context) container; - if (path.equals(context.getPath())) - return context; - } - } - return null; - } - - private Container getHost() { - // get engine - Container container = service.getContainer(); - - if (container == null) - throw new IllegalStateException( - "The Tomcat server doesn't have any Engines defined"); - // now get host - Container[] children = container.findChildren(); - if (ObjectUtils.isEmpty(children)) - throw new IllegalStateException( - "The Tomcat server doesn't have any Hosts defined"); - - // pick the first one and associate the context with it - return children[0]; - } - - public void setContextPath(String contextPath) { - this.contextPath = contextPath; - } - -} diff --git a/server/runtime/pom.xml b/server/runtime/pom.xml deleted file mode 100644 index 4c9e9dde2..000000000 --- a/server/runtime/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - server - .. - - org.argeo.commons - argeo-commons - Commons Server Runtime - pom - - org.argeo.server.core - org.argeo.server.json - org.argeo.server.catalina.start - org.argeo.server.webextender - org.argeo.server.jxl - org.argeo.server.hibernate - org.argeo.server.ads - org.argeo.server.jcr - org.argeo.server.jcr.mvc - org.argeo.server.jackrabbit - org.argeo.server.modeshape - - \ No newline at end of file