You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2015/06/10 06:21:39 UTC

[2/6] zest-qi4j git commit: * Removed Google AppEngine EntityStore and associated test. * Removed Neo4j, both Entity Store and Library, due to lacking response from Neo Technologis regarding the GPLv3 'pollution'.

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/samples/forum/src/main/java/org/qi4j/samples/forum/assembler/ForumAssembler.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/qi4j/samples/forum/assembler/ForumAssembler.java b/samples/forum/src/main/java/org/qi4j/samples/forum/assembler/ForumAssembler.java
index 807886d..6d97344 100644
--- a/samples/forum/src/main/java/org/qi4j/samples/forum/assembler/ForumAssembler.java
+++ b/samples/forum/src/main/java/org/qi4j/samples/forum/assembler/ForumAssembler.java
@@ -13,9 +13,8 @@ import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ClassScanner;
 import org.qi4j.bootstrap.LayerAssembly;
 import org.qi4j.bootstrap.ModuleAssembly;
+import org.qi4j.entitystore.file.assembly.FileEntityStoreAssembler;
 import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.entitystore.neo4j.NeoConfiguration;
-import org.qi4j.entitystore.neo4j.NeoEntityStoreService;
 import org.qi4j.functional.Function;
 import org.qi4j.library.fileconfig.FileConfigurationService;
 import org.qi4j.library.rest.common.ValueAssembler;
@@ -55,10 +54,10 @@ public class ForumAssembler
 
         assembly.setName( "Forum" );
 
+        ModuleAssembly configModule;
         LayerAssembly configuration = assembly.layer( "Configuration" );
         {
-            ModuleAssembly configModule = configuration.module( "Configuration" );
-            configModule.entities( NeoConfiguration.class ).visibleIn( Visibility.application );
+            configModule = configuration.module( "Configuration" );
             configModule.services( MemoryEntityStoreService.class );
             configModule.services( UuidIdentityGeneratorService.class );
             new OrgJsonValueSerializationAssembler().assemble( configModule );
@@ -68,7 +67,7 @@ public class ForumAssembler
         {
             ModuleAssembly entityStore = infrastructure.module( "EntityStore" );
             entityStore.services( FileConfigurationService.class );
-            entityStore.services( NeoEntityStoreService.class ).visibleIn( Visibility.application );
+            new FileEntityStoreAssembler().withConfig( configModule, Visibility.application ).assemble( entityStore );
             entityStore.services( UuidIdentityGeneratorService.class ).visibleIn( Visibility.application );
             new OrgJsonValueSerializationAssembler().
                 visibleIn( Visibility.application ).

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 43b4f2b..184d157 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -25,7 +25,6 @@ include "core:functional",
         'libraries:locking',
         'libraries:logging',
         'libraries:metrics',
-        'libraries:neo4j',
         'libraries:osgi',
         'libraries:rdf',
         'libraries:rest',
@@ -52,13 +51,11 @@ include "core:functional",
         'extensions:cache-memcache',
         'extensions:entitystore-memory',
         'extensions:entitystore-file',
-        'extensions:entitystore-gae',
         'extensions:entitystore-hazelcast',
         'extensions:entitystore-jclouds',
         'extensions:entitystore-jdbm',
         'extensions:entitystore-leveldb',
         'extensions:entitystore-mongodb',
-        'extensions:entitystore-neo4j',
         'extensions:entitystore-preferences',
         'extensions:entitystore-redis',
         'extensions:entitystore-riak',
@@ -97,7 +94,6 @@ include "core:functional",
         'tutorials:introduction:thirtyminutes',
 //        'tutorials:introduction:twohours',
         'tutorials:services',
-        'tests:complex:gae',
         'tests:regression',
         'tests:performance'
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/build.gradle
----------------------------------------------------------------------
diff --git a/tests/complex/gae/build.gradle b/tests/complex/gae/build.gradle
deleted file mode 100644
index 338ef37..0000000
--- a/tests/complex/gae/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-description = "Tests for Qi4j Google AppEngine Extension."
-
-jar { manifest { name = "Qi4j Tests - Google App Engine EntityStore" }}
-
-dependencies {
-  compile(project(":org.qi4j.core:org.qi4j.core.api"))
-  compile(project(":org.qi4j.core:org.qi4j.core.bootstrap"))
-  compile(project(":org.qi4j.extensions:org.qi4j.extension.entitystore-gae"))
-  compile(libraries.servlet_api)
-  compile(libraries.slf4j_api)
-  compile(libraries.junit)
-  testRuntime(libraries.asm)
-  testRuntime(libraries.asm_commons)
-  testRuntime(libraries.slf4j_simple)
-  compile(project(":org.qi4j.core:org.qi4j.core.testsupport"))
-  testRuntime(project(":org.qi4j.core:org.qi4j.core.spi"))
-  testRuntime(project(":org.qi4j.core:org.qi4j.core.runtime"))
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/src/main/java/org/qi4j/test/gae/GaeTestServlet.java
----------------------------------------------------------------------
diff --git a/tests/complex/gae/src/main/java/org/qi4j/test/gae/GaeTestServlet.java b/tests/complex/gae/src/main/java/org/qi4j/test/gae/GaeTestServlet.java
deleted file mode 100644
index d341b45..0000000
--- a/tests/complex/gae/src/main/java/org/qi4j/test/gae/GaeTestServlet.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * 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.qi4j.test.gae;
-
-import org.junit.Test;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-public final class GaeTestServlet
-    extends HttpServlet
-{
-    private UnitTests unitTests;
-
-    @Override
-    public void init()
-        throws ServletException
-    {
-        System.out.println( "Starting GAE EntityStore UnitTests" );
-        try
-        {
-            unitTests = new UnitTests();
-            unitTests.setUp();
-            unitTests.init();
-        }
-        catch( Exception e )
-        {
-            throw new ServletException( "Initialization Failed.", e );
-        }
-    }
-
-    @Override
-    public void destroy()
-    {
-        try
-        {
-            unitTests.tearDown();
-        }
-        catch( Exception e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void doGet( HttpServletRequest req, HttpServletResponse resp )
-        throws ServletException, IOException
-    {
-        StringBuffer buffer = new StringBuffer();
-        Method[] methods = UnitTests.class.getMethods();
-        for( Method m : methods )
-        {
-            Test annot = m.getAnnotation( Test.class );
-            if( annot != null && Modifier.isPublic( m.getModifiers() ) )
-            {
-                try
-                {
-                    long t0 = System.currentTimeMillis();
-                    m.invoke( unitTests );
-                    long time = System.currentTimeMillis() - t0;
-                    add( buffer, m.getName() + " success. " + time + "ms.", true, null );
-                }
-                catch( InvocationTargetException e )
-                {
-                    add( buffer, m.getName() + " threw an Exception.", false, e.getTargetException() );
-                }
-                catch( IllegalAccessException e )
-                {
-                    e.printStackTrace(); // Can not happen?
-                }
-            }
-        }
-        PrintWriter pw = resp.getWriter();
-        pw.print( "<html><body><h1>Qi4j Entity Store Unit Tests</h1>" );
-        pw.print( buffer );
-        pw.print( "</body></html>" );
-    }
-
-    private void add( StringBuffer out, String message, boolean success, Throwable exception )
-    {
-        if( success )
-        {
-            out.append( "<p style=\"color:green;\">" );
-            out.append( message );
-            out.append( "</p>" );
-        }
-        else
-        {
-            StringWriter trace = new StringWriter();
-            PrintWriter pw = new PrintWriter( trace );
-            exception.printStackTrace( pw );
-            pw.flush();
-            pw.close();
-            out.append( "<p style=\"color:red;\">" );
-            out.append( message );
-            out.append( "</p><pre><code>" );
-            out.append( trace );
-            out.append( "</code></pre>" );
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/src/main/java/org/qi4j/test/gae/UnitTests.java
----------------------------------------------------------------------
diff --git a/tests/complex/gae/src/main/java/org/qi4j/test/gae/UnitTests.java b/tests/complex/gae/src/main/java/org/qi4j/test/gae/UnitTests.java
deleted file mode 100644
index 6a211b4..0000000
--- a/tests/complex/gae/src/main/java/org/qi4j/test/gae/UnitTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * 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.qi4j.test.gae;
-
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.test.entity.AbstractEntityStoreTest;
-import org.qi4j.entitystore.gae.GaeEntityStoreService;
-import org.qi4j.entitystore.gae.GaeIdGeneratorService;
-
-public class UnitTests extends AbstractEntityStoreTest
-{
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        super.assemble( module );
-        System.out.println( "Registering GAE services." );
-        module.services( GaeEntityStoreService.class, GaeIdGeneratorService.class );
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/src/main/java/org/qi4j/test/gae2/GaeTestServlet.java
----------------------------------------------------------------------
diff --git a/tests/complex/gae/src/main/java/org/qi4j/test/gae2/GaeTestServlet.java b/tests/complex/gae/src/main/java/org/qi4j/test/gae2/GaeTestServlet.java
deleted file mode 100644
index 8b371e9..0000000
--- a/tests/complex/gae/src/main/java/org/qi4j/test/gae2/GaeTestServlet.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * 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.qi4j.test.gae2;
-
-import org.junit.Test;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-public final class GaeTestServlet
-    extends HttpServlet
-{
-    private UnitTests unitTests;
-
-    @Override
-    public void init()
-        throws ServletException
-    {
-        System.out.println( "Starting GAE EntityStore UnitTests" );
-        try
-        {
-            unitTests = new UnitTests();
-            unitTests.setUp();
-            unitTests.init();
-        }
-        catch( Exception e )
-        {
-            throw new ServletException( "Initialization Failed.", e );
-        }
-    }
-
-    @Override
-    public void destroy()
-    {
-        try
-        {
-            unitTests.tearDown();
-        }
-        catch( Exception e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void doGet( HttpServletRequest req, HttpServletResponse resp )
-        throws ServletException, IOException
-    {
-        StringBuffer buffer = new StringBuffer();
-        Method[] methods = UnitTests.class.getMethods();
-        for( Method m : methods )
-        {
-            Test annot = m.getAnnotation( Test.class );
-            if( annot != null && Modifier.isPublic( m.getModifiers() ) )
-            {
-                try
-                {
-                    long t0 = System.currentTimeMillis();
-                    m.invoke( unitTests );
-                    long time = System.currentTimeMillis() - t0;
-                    add( buffer, m.getName() + " success. " + time + "ms.", true, null );
-                }
-                catch( InvocationTargetException e )
-                {
-                    add( buffer, m.getName() + " threw an Exception.", false, e.getTargetException() );
-                }
-                catch( IllegalAccessException e )
-                {
-                    e.printStackTrace(); // Can not happen?
-                }
-            }
-        }
-        PrintWriter pw = resp.getWriter();
-        pw.print( "<html><body><h1>Qi4j Entity Store Unit Tests</h1>" );
-        pw.print( buffer );
-        pw.print( "</body></html>" );
-    }
-
-    private void add( StringBuffer out, String message, boolean success, Throwable exception )
-    {
-        if( success )
-        {
-            out.append( "<p style=\"color:green;\">" );
-            out.append( message );
-            out.append( "</p>" );
-        }
-        else
-        {
-            StringWriter trace = new StringWriter();
-            PrintWriter pw = new PrintWriter( trace );
-            exception.printStackTrace( pw );
-            pw.flush();
-            pw.close();
-            out.append( "<p style=\"color:red;\">" );
-            out.append( message );
-            out.append( "</p><pre><code>" );
-            out.append( trace );
-            out.append( "</code></pre>" );
-        }
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/src/main/java/org/qi4j/test/gae2/UnitTests.java
----------------------------------------------------------------------
diff --git a/tests/complex/gae/src/main/java/org/qi4j/test/gae2/UnitTests.java b/tests/complex/gae/src/main/java/org/qi4j/test/gae2/UnitTests.java
deleted file mode 100644
index a03eb46..0000000
--- a/tests/complex/gae/src/main/java/org/qi4j/test/gae2/UnitTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * 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.qi4j.test.gae2;
-
-import org.qi4j.api.common.Visibility;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.gae2.GaeEntityStoreConfiguration;
-import org.qi4j.entitystore.gae2.GaeEntityStoreService;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.test.entity.AbstractEntityStoreTest;
-
-public class UnitTests extends AbstractEntityStoreTest
-{
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        super.assemble( module );
-        System.out.println( "Registering GAE services." );
-        module.services( GaeEntityStoreService.class );
-
-        ModuleAssembly configModule = module.layer().module( "config" );
-        configModule.entities( GaeEntityStoreConfiguration.class ).visibleIn( Visibility.layer );
-        configModule.services( MemoryEntityStoreService.class );
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/src/main/resources/org/qi4j/entitystore/gae2/GaeEntityStoreService.properties
----------------------------------------------------------------------
diff --git a/tests/complex/gae/src/main/resources/org/qi4j/entitystore/gae2/GaeEntityStoreService.properties b/tests/complex/gae/src/main/resources/org/qi4j/entitystore/gae2/GaeEntityStoreService.properties
deleted file mode 100644
index 3279af4..0000000
--- a/tests/complex/gae/src/main/resources/org/qi4j/entitystore/gae2/GaeEntityStoreService.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-readPolicy=eventual
-deadline=0.5
-entityKind=qi4j-json

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/web/WEB-INF/appengine-web.xml
----------------------------------------------------------------------
diff --git a/tests/complex/gae/web/WEB-INF/appengine-web.xml b/tests/complex/gae/web/WEB-INF/appengine-web.xml
deleted file mode 100644
index 7b93161..0000000
--- a/tests/complex/gae/web/WEB-INF/appengine-web.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
-  <application>qi4j-entitystore-testsuite</application>
-  <version>1</version>
-</appengine-web-app>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/web/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tests/complex/gae/web/WEB-INF/web.xml b/tests/complex/gae/web/WEB-INF/web.xml
deleted file mode 100644
index 1670497..0000000
--- a/tests/complex/gae/web/WEB-INF/web.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-		  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-           version="2.5">
-
-  <servlet>
-    <display-name>Qi4j Entity Store Unit Tests</display-name>
-    <servlet-name>GaeTestServlet1</servlet-name>
-    <servlet-class>org.qi4j.test.gae.GaeTestServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>GaeTestServlet1</servlet-name>
-    <url-pattern>/unit1/</url-pattern>
-  </servlet-mapping>
-
-
-  <servlet>
-    <display-name>Qi4j Entity Store Unit Tests - JSON version</display-name>
-    <servlet-name>GaeTestServlet2</servlet-name>
-    <servlet-class>org.qi4j.test.gae2.GaeTestServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>GaeTestServlet2</servlet-name>
-    <url-pattern>/unit2/</url-pattern>
-  </servlet-mapping>
-</web-app>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/70f25289/tests/complex/gae/web/index.jsp
----------------------------------------------------------------------
diff --git a/tests/complex/gae/web/index.jsp b/tests/complex/gae/web/index.jsp
deleted file mode 100644
index 4ca32e6..0000000
--- a/tests/complex/gae/web/index.jsp
+++ /dev/null
@@ -1,12 +0,0 @@
-<%--
-  Created by IntelliJ IDEA.
-  User: niclas
-  Date: Feb 18, 2010
-  Time: 8:34:38 PM
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<html>
-  <head><title>Simple jsp page</title></head>
-  <body>Place your content here</body>
-</html>
\ No newline at end of file