polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [07/18] zest-sandbox git commit: Move Qi4j related projects in a `qi4j/` subfolder
Date Tue, 21 Apr 2015 11:50:19 GMT
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiSetup.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiSetup.java b/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiSetup.java
new file mode 100644
index 0000000..7b5564e
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiSetup.java
@@ -0,0 +1,32 @@
+/*
+ * 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.entitystore.jndi;
+
+import javax.naming.directory.InitialDirContext;
+
+class JndiSetup
+{
+    InitialDirContext context;
+    String instanceVersionAttribute;
+    String lastModifiedDateAttribute;
+    Boolean isReadOnly;
+    String identityAttribute;
+    String baseDn;
+    String qualifiedTypeAttribute;
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiUow.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiUow.java b/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiUow.java
new file mode 100644
index 0000000..3685f27
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/main/java/org/qi4j/entitystore/jndi/JndiUow.java
@@ -0,0 +1,239 @@
+/*
+ * 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.entitystore.jndi;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.ldap.LdapName;
+import org.qi4j.api.association.AssociationDescriptor;
+import org.qi4j.api.common.QualifiedName;
+import org.qi4j.api.entity.EntityDescriptor;
+import org.qi4j.api.entity.EntityReference;
+import org.qi4j.api.property.PropertyDescriptor;
+import org.qi4j.api.structure.Module;
+import org.qi4j.api.usecase.Usecase;
+import org.qi4j.spi.entity.EntityState;
+import org.qi4j.spi.entity.EntityStatus;
+import org.qi4j.spi.entitystore.EntityNotFoundException;
+import org.qi4j.spi.entitystore.EntityStoreException;
+import org.qi4j.spi.entitystore.EntityStoreUnitOfWork;
+import org.qi4j.spi.entitystore.ReadOnlyEntityStoreException;
+import org.qi4j.spi.entitystore.StateCommitter;
+
+public class JndiUow implements EntityStoreUnitOfWork
+{
+    private static final ArrayList<String> RESTRICTED_PROPERTIES = new ArrayList<String>();
+
+    static
+    {
+        RESTRICTED_PROPERTIES.add( "identity" );
+    }
+
+    private long currentTime;
+    private Usecase usecase;
+    private Module module;
+    private String uowIdentity;
+    private JndiSetup setup;
+
+    public JndiUow( JndiSetup setup, Usecase usecase, Module module, long currentTime )
+    {
+        this.setup = setup;
+        uowIdentity = UUID.randomUUID().toString();
+        this.usecase = usecase;
+        this.module = module;
+        this.currentTime = currentTime;
+    }
+
+    public String identity()
+    {
+        return uowIdentity;
+    }
+
+    public long currentTime()
+    {
+        return currentTime;
+    }
+
+    public EntityState newEntityState( EntityReference anIdentity, EntityDescriptor entityDescriptor )
+        throws EntityStoreException
+    {
+        throw new ReadOnlyEntityStoreException( "JndiEntityStore is read-only." );
+    }
+
+    public EntityState entityStateOf( EntityReference identity )
+        throws EntityStoreException, EntityNotFoundException
+    {
+        try
+        {
+            String id = identity.identity();
+            Attributes attrs = lookup( id );
+
+            String version = Long.toString( getVersion( attrs ) );
+            long lastModified = getLastModified( attrs );
+            EntityStatus status = EntityStatus.LOADED;
+            EntityDescriptor descriptor = module.entityDescriptor( getType( attrs ) );
+            Map<QualifiedName, Object> properties = getProperties( attrs, descriptor );
+            Map<QualifiedName, EntityReference> associations = getAssociations( attrs, descriptor );
+            Map<QualifiedName, List<EntityReference>> manyAssocations = getManyAssociations( attrs, descriptor );
+            return new JndiEntityState( this,
+                                        version,
+                                        lastModified,
+                                        identity,
+                                        status,
+                                        descriptor,
+                                        properties,
+                                        associations,
+                                        manyAssocations );
+        }
+        catch( NamingException e )
+        {
+            throw new EntityStoreException( e );
+        }
+    }
+
+    public StateCommitter applyChanges()
+        throws EntityStoreException
+    {
+        return new StateCommitter()
+        {
+            public void commit()
+            {
+            }
+
+            public void cancel()
+            {
+            }
+        };
+    }
+
+    public void discard()
+    {
+    }
+
+    private Attributes lookup( String id )
+        throws NamingException
+    {
+        // TODO: Caching
+        LdapName dn = new LdapName( setup.identityAttribute + "=" + id + "," + setup.baseDn );
+        return setup.context.getAttributes( dn );
+    }
+
+
+    private String getType( Attributes attrs )
+        throws NamingException
+    {
+        Attribute typeAttr = attrs.get( setup.qualifiedTypeAttribute );
+        if( typeAttr == null )
+        {
+            return null;
+        }
+        return (String) typeAttr.get();
+    }
+
+    private long getLastModified( Attributes attrs )
+        throws NamingException
+    {
+        Attribute lastModifiedAttr = attrs.get( setup.lastModifiedDateAttribute );
+        if( lastModifiedAttr == null )
+        {
+            return -1;
+        }
+        String lastModifiedValue = (String) lastModifiedAttr.get();
+        return Long.parseLong( lastModifiedValue );
+    }
+
+    private long getVersion( Attributes attrs )
+        throws NamingException
+    {
+        Attribute versionAttr = attrs.get( setup.instanceVersionAttribute );
+        if( versionAttr == null )
+        {
+            return -1;
+        }
+        String versionValue = (String) versionAttr.get();
+        return Long.parseLong( versionValue );
+    }
+
+
+    private Map<QualifiedName, Object> getProperties( Attributes attrs, EntityDescriptor entityType )
+        throws NamingException
+    {
+        Map<QualifiedName, Object> result = new HashMap<QualifiedName, Object>();
+        for( PropertyDescriptor property : entityType.state().properties() )
+        {
+            QualifiedName qualifiedName = property.qualifiedName();
+            String propertyName = qualifiedName.name();
+            if( !RESTRICTED_PROPERTIES.contains( propertyName ) )
+            {
+                Attribute attribute = attrs.get( propertyName );
+                if( attribute != null )
+                {
+                    result.put( qualifiedName, attribute.get() );
+                }
+            }
+        }
+        return result;
+    }
+
+    private Map<QualifiedName, EntityReference> getAssociations( Attributes attrs, EntityDescriptor entityType )
+        throws NamingException
+    {
+        Map<QualifiedName, EntityReference> result = new HashMap<QualifiedName, EntityReference>();
+        for( AssociationDescriptor associationType : entityType.state().associations() )
+        {
+            QualifiedName qualifiedName = associationType.qualifiedName();
+            String associationName = qualifiedName.name();
+            Attribute attribute = attrs.get( associationName );
+            String identity = (String) attribute.get();
+            EntityReference entityReference = EntityReference.parseEntityReference( identity );
+            result.put( qualifiedName, entityReference );
+        }
+        return result;
+    }
+
+    private Map<QualifiedName, List<EntityReference>> getManyAssociations( Attributes attrs, EntityDescriptor entityType )
+        throws NamingException
+    {
+        Map<QualifiedName, List<EntityReference>> result = new HashMap<QualifiedName, List<EntityReference>>();
+        for( AssociationDescriptor associationType : entityType.state().manyAssociations() )
+        {
+            QualifiedName qualifiedName = associationType.qualifiedName();
+            String associationName = qualifiedName.name();
+            Attribute attribute = attrs.get( associationName );
+            String identity = (String) attribute.get();
+            EntityReference entityRef = new EntityReference( identity );
+            List<EntityReference> entry = result.get( qualifiedName );
+            if( entry == null )
+            {
+                entry = new ArrayList<EntityReference>();
+                result.put( qualifiedName, entry );
+            }
+            entry.add( entityRef );
+        }
+        return result;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/Group.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/Group.java b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/Group.java
new file mode 100644
index 0000000..39f0977
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/Group.java
@@ -0,0 +1,26 @@
+/*
+ * 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.entitystore.jndi;
+
+import org.qi4j.api.property.Property;
+
+public interface Group
+{
+    Property<String> uid();
+
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/GroupEntity.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/GroupEntity.java b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/GroupEntity.java
new file mode 100644
index 0000000..f000532
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/GroupEntity.java
@@ -0,0 +1,24 @@
+/*
+ * 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.entitystore.jndi;
+
+import org.qi4j.api.entity.EntityComposite;
+
+public interface GroupEntity extends Group, EntityComposite
+{
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/JndiReadEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/JndiReadEntityStoreTest.java b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/JndiReadEntityStoreTest.java
new file mode 100644
index 0000000..1e57060
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/JndiReadEntityStoreTest.java
@@ -0,0 +1,82 @@
+/*
+ * 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.entitystore.jndi;
+
+import org.junit.Test;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.qi4j.api.common.Visibility;
+import org.qi4j.api.unitofwork.UnitOfWork;
+import org.qi4j.bootstrap.AssemblyException;
+import org.qi4j.bootstrap.ModuleAssembly;
+import org.qi4j.spi.uuid.UuidIdentityGeneratorService;
+import org.qi4j.test.AbstractQi4jTest;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import org.qi4j.api.value.ValueSerialization;
+import org.qi4j.test.EntityTestAssembler;
+import org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService;
+
+public class JndiReadEntityStoreTest extends AbstractQi4jTest
+{
+    public void assemble( ModuleAssembly module ) throws AssemblyException
+    {
+        module.services( JndiEntityStoreService.class, UuidIdentityGeneratorService.class );
+        module.services( OrgJsonValueSerializationService.class ).taggedWith( ValueSerialization.Formats.JSON );
+        ModuleAssembly config = module.layer().module( "config" );
+        config.entities( JndiConfiguration.class ).visibleIn( Visibility.layer );
+        new EntityTestAssembler().assemble( config );
+
+        module.entities( UserEntity.class, GroupEntity.class );
+    }
+
+    @Test
+    @Ignore( "Requires connection to LDAP server on OPS4J that is now unavailable" )
+    public void findSaslSupportTypes()
+        throws Exception
+    {
+        // Create initial context
+        DirContext ctx = new InitialDirContext();
+
+        // Read supportedSASLMechanisms from root DSE
+        Attributes attrs = ctx.getAttributes(
+            "ldap://srv07.ops4j.org:389", new String[]{ "supportedSASLMechanisms" } );
+
+        System.out.println( attrs );
+    }
+
+    @Test
+    @Ignore
+    public void testReadNiclasFromLdap()
+        throws Exception
+    {
+        UnitOfWork uow = module.newUnitOfWork();
+        try
+        {
+            User user = uow.get( User.class, "niclas.hedhman" );
+            System.out.println( user.givenName().get() + " " + user.sn().get() );
+            Assert.assertEquals( "Niclas", user.givenName().get() );
+        }
+        finally
+        {
+            uow.discard();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/User.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/User.java b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/User.java
new file mode 100644
index 0000000..a656c56
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/User.java
@@ -0,0 +1,27 @@
+/*
+ * 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.entitystore.jndi;
+
+import org.qi4j.api.property.Property;
+
+public interface User
+{
+    Property<String> sn();
+
+    Property<String> givenName();
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/UserEntity.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/UserEntity.java b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/UserEntity.java
new file mode 100644
index 0000000..84ef3e5
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/java/org/qi4j/entitystore/jndi/UserEntity.java
@@ -0,0 +1,24 @@
+/*
+ * 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.entitystore.jndi;
+
+import org.qi4j.api.entity.EntityComposite;
+
+public interface UserEntity extends User, EntityComposite
+{
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-jndi/src/test/resources/org/qi4j/entitystore/jndi/JndiEntityStoreService.properties
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-jndi/src/test/resources/org/qi4j/entitystore/jndi/JndiEntityStoreService.properties b/qi4j/extensions/entitystore-jndi/src/test/resources/org/qi4j/entitystore/jndi/JndiEntityStoreService.properties
new file mode 100644
index 0000000..3d41382
--- /dev/null
+++ b/qi4j/extensions/entitystore-jndi/src/test/resources/org/qi4j/entitystore/jndi/JndiEntityStoreService.properties
@@ -0,0 +1,59 @@
+#  Copyright 2008 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.
+
+readOnly=true
+
+# versionAttribute=instanceVersion
+
+# qualifiedTypeAttribute
+
+# turboMode=false
+
+baseDN=ou=qi4jdev
+
+# propertyAttribute=
+
+identityAttribute=cn
+
+# authorative=false
+
+# batchSize=
+
+# controlFactories=
+
+# dnsUrl=
+
+# initialContextFactory=
+
+# language=
+
+# objectFactories=
+
+providerUrl=ldap://srv07.ops4j.org:389/dc=codedragons,dc=com
+
+# referral=
+
+# securityAuthentication=
+
+securityCredentials=HappyGoLucky
+
+securityPrincipal=cn=_tester,ou=qi4jdev,dc=codedragons,dc=com
+
+# securityProtocol=
+
+# stateFactories=
+
+# urlPkgPrefixes=

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/dev-status.xml
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/dev-status.xml b/qi4j/extensions/entitystore-rmi/dev-status.xml
new file mode 100644
index 0000000..0c93156
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/dev-status.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
+  <status>
+    <codebase>early</codebase>
+    <!--none,early,beta,stable,mature-->
+    <documentation>none</documentation>
+    <!-- none, brief, good, complete -->
+    <unittests>some</unittests>
+    <!-- none, some, good, complete -->
+  </status>
+  <licenses>
+    <license>ALv2</license>
+  </licenses>
+</module>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/osgi.bundle
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/osgi.bundle b/qi4j/extensions/entitystore-rmi/osgi.bundle
new file mode 100644
index 0000000..66452e5
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/osgi.bundle
@@ -0,0 +1,26 @@
+Bundle-Activator:
+
+Private-Package:
+
+Ignore-Package: com_cenqua_clover
+
+Import-Package: org.qi4j.api.composite, \
+                org.qi4j.api.common, \
+                org.qi4j.api.configuration, \
+                org.qi4j.api.entity, \
+                org.qi4j.api.injection.scope, \
+                org.qi4j.api.io, \
+                org.qi4j.api.mixin, \
+                org.qi4j.api.property, \
+                org.qi4j.api.service, \
+                org.qi4j.entitystore.map, \
+                org.qi4j.library.locking, \
+                org.qi4j.spi, \
+                org.qi4j.spi.composite, \
+                org.qi4j.spi.entity, \
+                org.qi4j.spi.entity.helpers, \
+                org.qi4j.spi.entitystore, \
+                org.qi4j.spi.service, \
+                org.qi4j.api.structure
+
+Export-Package: org.qi4j.entitystore.rmi

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/pom.xml
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/pom.xml b/qi4j/extensions/entitystore-rmi/pom.xml
new file mode 100644
index 0000000..1a5640b
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/pom.xml
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+   <parent>
+      <groupId>org.qi4j.sandbox</groupId>
+      <artifactId>qi4j-sandbox-extensions</artifactId>
+      <version>0-SNAPSHOT</version>
+   </parent>
+  <groupId>org.qi4j.extension</groupId>
+  <artifactId>qi4j-entitystore-rmi</artifactId>
+  <name>Qi4j Extension - EntityStore - RMI</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.bootstrap</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.library</groupId>
+      <artifactId>org.qi4j.library.locking</artifactId>
+    </dependency>
+
+    <!-- For tests -->
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.testsupport</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.runtime</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreMixin.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreMixin.java
new file mode 100644
index 0000000..a44105b
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreMixin.java
@@ -0,0 +1,77 @@
+/*  Copyright 2008 Rickard Öberg.
+ *
+ * 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.entitystore.rmi;
+
+import org.qi4j.api.entity.EntityReference;
+import org.qi4j.io.Input;
+import org.qi4j.io.Output;
+import org.qi4j.spi.entitystore.EntityStoreException;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import org.qi4j.api.service.ServiceActivation;
+import org.qi4j.spi.entitystore.helpers.MapEntityStore;
+
+/**
+ * RMI client implementation of Entity
+ */
+public class ClientRmiEntityStoreMixin
+    implements ServiceActivation, MapEntityStore
+{
+    private RemoteEntityStore remote;
+
+    // Activatable implementation
+    public void activateService()
+        throws Exception
+    {
+        Registry registry = LocateRegistry.getRegistry( "localhost" );
+        remote = (RemoteEntityStore) registry.lookup( ServerRmiEntityStoreService.class.getSimpleName() );
+    }
+
+    public void passivateService()
+        throws Exception
+    {
+        remote = null;
+    }
+
+    public Reader get( EntityReference entityReference )
+        throws EntityStoreException
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Input<Reader, IOException> entityStates()
+    {
+        return new Input<Reader, IOException>()
+        {
+            public <ReceiverThrowableType extends Throwable> void transferTo( Output<? super Reader, ReceiverThrowableType> output )
+                throws IOException, ReceiverThrowableType
+            {
+                // TODO Implement this
+                throw new UnsupportedOperationException( "Not supported yet." );
+            }
+        };
+    }
+
+    public void applyChanges( MapChanges changes )
+        throws IOException
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreService.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreService.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreService.java
new file mode 100644
index 0000000..f46424c
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ClientRmiEntityStoreService.java
@@ -0,0 +1,32 @@
+/*  Copyright 2008 Rickard Öberg.
+ *
+ * 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.entitystore.rmi;
+
+import org.qi4j.api.mixin.Mixins;
+import org.qi4j.api.service.ServiceActivation;
+import org.qi4j.library.locking.LockingAbstractComposite;
+import org.qi4j.spi.entitystore.EntityStore;
+
+/**
+ * EntityStore service for remote access of another EntityStore.
+ */
+
+@Mixins( { ClientRmiEntityStoreMixin.class } )
+public interface ClientRmiEntityStoreService
+    extends EntityStore, ServiceActivation, LockingAbstractComposite
+{
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryConfiguration.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryConfiguration.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryConfiguration.java
new file mode 100644
index 0000000..a2eaa8b
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryConfiguration.java
@@ -0,0 +1,13 @@
+package org.qi4j.entitystore.rmi;
+
+import org.qi4j.api.configuration.ConfigurationComposite;
+import org.qi4j.api.property.Property;
+
+/**
+ * JAVADOC
+ */
+public interface RegistryConfiguration
+    extends ConfigurationComposite
+{
+    Property<Integer> port();
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryMixin.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryMixin.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryMixin.java
new file mode 100644
index 0000000..198e11f
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryMixin.java
@@ -0,0 +1,53 @@
+package org.qi4j.entitystore.rmi;
+
+import org.qi4j.api.common.AppliesTo;
+import org.qi4j.api.configuration.Configuration;
+import org.qi4j.api.injection.scope.This;
+import org.qi4j.api.service.ServiceActivation;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
+
+/**
+ * Create and delegate to a RMI registry.
+ */
+@AppliesTo( { Registry.class, ServiceActivation.class } )
+public class RegistryMixin
+    implements InvocationHandler, ServiceActivation
+{
+    Registry registry;
+
+    @This Configuration<RegistryConfiguration> config;
+
+    public void activateService() throws Exception
+    {
+        try
+        {
+            Integer port = config.get().port().get();
+            registry = LocateRegistry.createRegistry( port );
+        }
+        catch( RemoteException e )
+        {
+            registry = LocateRegistry.getRegistry();
+        }
+    }
+
+    public void passivateService() throws Exception
+    {
+        for( String boundService : registry.list() )
+        {
+            registry.unbind( boundService );
+        }
+        UnicastRemoteObject.unexportObject( registry, true );
+    }
+
+    public Object invoke( Object o, Method method, Object[] objects ) throws Throwable
+    {
+        return method.invoke( registry, objects );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryService.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryService.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryService.java
new file mode 100644
index 0000000..7adbc7d
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RegistryService.java
@@ -0,0 +1,15 @@
+package org.qi4j.entitystore.rmi;
+
+import org.qi4j.api.mixin.Mixins;
+import org.qi4j.api.service.ServiceActivation;
+
+import java.rmi.registry.Registry;
+
+/**
+ * RMI Registry service
+ */
+@Mixins( RegistryMixin.class )
+public interface RegistryService
+    extends ServiceActivation, Registry
+{
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RemoteEntityStore.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RemoteEntityStore.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RemoteEntityStore.java
new file mode 100644
index 0000000..0e91190
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/RemoteEntityStore.java
@@ -0,0 +1,20 @@
+package org.qi4j.entitystore.rmi;
+
+import java.io.IOException;
+import java.rmi.Remote;
+import org.qi4j.spi.entity.EntityState;
+import org.qi4j.spi.entity.QualifiedIdentity;
+import org.qi4j.spi.entitystore.ConcurrentEntityStateModificationException;
+
+/**
+ * Interface for remote EntityStore
+ */
+public interface RemoteEntityStore
+    extends Remote
+{
+    EntityState getEntityState( QualifiedIdentity identity )
+        throws IOException;
+
+    void prepare( Iterable<EntityState> newStates, Iterable<EntityState> loadedStates, Iterable<QualifiedIdentity> removedStates )
+        throws IOException, ConcurrentEntityStateModificationException;
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRemoteEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRemoteEntityStoreMixin.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRemoteEntityStoreMixin.java
new file mode 100644
index 0000000..93c2e59
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRemoteEntityStoreMixin.java
@@ -0,0 +1,216 @@
+/*  Copyright 2008 Rickard Öberg.
+ *
+ * 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.entitystore.rmi;
+
+import java.io.IOException;
+import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.concurrent.locks.ReadWriteLock;
+import org.qi4j.api.injection.scope.Service;
+import org.qi4j.api.injection.scope.Structure;
+import org.qi4j.api.injection.scope.This;
+import org.qi4j.api.injection.scope.Uses;
+import org.qi4j.api.service.ServiceActivation;
+import org.qi4j.api.service.ServiceDescriptor;
+import org.qi4j.api.service.ServiceReference;
+import org.qi4j.api.structure.Module;
+import org.qi4j.library.locking.WriteLock;
+import org.qi4j.spi.Qi4jSPI;
+import org.qi4j.spi.entity.EntityState;
+import org.qi4j.spi.entity.QualifiedIdentity;
+import org.qi4j.spi.entitystore.EntityStore;
+import org.qi4j.spi.entitystore.EntityStoreException;
+
+/**
+ * RMI server implementation of EntityStore
+ */
+public class ServerRemoteEntityStoreMixin
+    implements RemoteEntityStore, ServiceActivation
+{
+    @Uses
+    private ServiceDescriptor descriptor;
+
+    @This
+    private RemoteEntityStore remote;
+
+    @This
+    private ReadWriteLock lock;
+
+    @Structure
+    private Module module;
+
+    @Structure
+    private Qi4jSPI spi;
+
+    @Service
+    private EntityStore entityStore;
+
+    @Service
+    private ServiceReference<Registry> registry;
+
+    // Activatable implementation
+    public void activateService()
+        throws Exception
+    {
+        RemoteEntityStore stub = (RemoteEntityStore) UnicastRemoteObject.exportObject( remote, 0 );
+        registry.get().bind( descriptor.identity(), stub );
+    }
+
+    public void passivateService()
+        throws Exception
+    {
+        if( registry.isActive() )
+        {
+            registry.get().unbind( descriptor.identity() );
+        }
+        UnicastRemoteObject.unexportObject( remote, true );
+    }
+
+    // EntityStore implementation
+    @WriteLock
+    public EntityState getEntityState( QualifiedIdentity identity )
+        throws IOException
+    {
+//        EntityState state = getEntityState( entityStore, identity );
+//
+//        Map<QualifiedName, Object> properties = copyProperties( state );
+//        Map<QualifiedName, QualifiedIdentity> associations = copyAssociations( state );
+//        Map<QualifiedName, Collection<QualifiedIdentity>> manyAssociations = copyManyAssociations( state );
+//
+//        return new DefaultEntityState( state.version(),
+//                                       state.lastModified(),
+//                                       identity,
+//                                       state.status(),
+//                                       getEntityType( identity ),
+//                                       properties,
+//                                       associations,
+//                                       manyAssociations );
+        return null;
+    }
+
+//    private Map<QualifiedName, Collection<QualifiedIdentity>> copyManyAssociations( EntityState state )
+//    {
+//        Map<QualifiedName, Collection<QualifiedIdentity>> manyAssociations = new HashMap<QualifiedName, Collection<QualifiedIdentity>>();
+//        for( QualifiedName associationName : state.manyAssociationNames() )
+//        {
+//            Collection<QualifiedIdentity> idCollection = state.getManyAssociation( associationName );
+//            if( idCollection instanceof Set )
+//            {
+//                Set<QualifiedIdentity> collectionCopy = new HashSet<QualifiedIdentity>( idCollection );
+//                manyAssociations.put( associationName, collectionCopy );
+//            }
+//            else if( idCollection instanceof List )
+//            {
+//                List<QualifiedIdentity> collectionCopy = new ArrayList<QualifiedIdentity>( idCollection );
+//                manyAssociations.put( associationName, collectionCopy );
+//            }
+//        }
+//        return manyAssociations;
+//    }
+
+//    private Map<QualifiedName, QualifiedIdentity> copyAssociations( EntityState state )
+//    {
+//        Map<QualifiedName, QualifiedIdentity> associations = new HashMap<QualifiedName, QualifiedIdentity>();
+//        for( QualifiedName associationName : state.associationNames() )
+//        {
+//            QualifiedIdentity id = state.getAssociation( associationName );
+//            associations.put( associationName, id );
+//        }
+//        return associations;
+//    }
+//
+//    private Map<QualifiedName, Object> copyProperties( EntityState state )
+//    {
+//        Map<QualifiedName, Object> properties = new HashMap<QualifiedName, Object>();
+//        for( QualifiedName propertyName : state.propertyNames() )
+//        {
+//            Object value = state.getProperty( propertyName );
+//            properties.put( propertyName, value );
+//        }
+//        return properties;
+//    }
+
+//    private EntityType getEntityType( QualifiedIdentity identity )
+//    {
+//        final String typeName = identity.type();
+//        try
+//        {
+//            return spi.getEntityDescriptor( module.classLoader().loadClass( typeName ), module ).entityType();
+//        }
+//        catch( ClassNotFoundException e )
+//        {
+//            throw new EntityStoreException( "Error accessing CompositeType for type " + typeName, e );
+//        }
+//    }
+
+    public void prepare( Iterable<EntityState> newStates,
+                         Iterable<EntityState> loadedStates,
+                         Iterable<QualifiedIdentity> removedStates
+    )
+    {
+//        lock.writeLock().lock();
+//        try
+//        {
+//            final StateCommitter committer = entityStore.prepare( newStates, loadedStates, removedStates );
+//            try
+//            {
+//                committer.commit();
+//            }
+//            catch( EntityStoreException e )
+//            {
+//                committer.cancel();
+//                throw e;
+//            }
+//
+//        }
+//
+//        finally
+//        {
+//            lock.writeLock().unlock();
+//        }
+    }
+
+    public EntityState getEntityState( EntityStore entityStore, QualifiedIdentity qid )
+        throws EntityStoreException
+    {
+        EntityState entityState = null;
+//        do
+//        {
+//            try
+//            {
+//                entityState = entityStore.getEntityState( qid );
+//            }
+//            catch( UnknownEntityTypeException e )
+//            {
+//                // Check if it is this type that the store doesn't understand
+//                EntityType entityType = getEntityType( qid );
+//                if( e.getMessage().equals( entityType.type() ) )
+//                {
+//                    entityStore.registerEntityType( entityType );
+//                    // Try again
+//                }
+//                else
+//                {
+//                    throw e; // ???
+//                }
+//            }
+//        }
+//        while( entityState == null );
+
+        return entityState;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRmiEntityStoreService.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRmiEntityStoreService.java b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRmiEntityStoreService.java
new file mode 100644
index 0000000..f3850e6
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/java/org/qi4j/entitystore/rmi/ServerRmiEntityStoreService.java
@@ -0,0 +1,31 @@
+/*  Copyright 2008 Rickard Öberg.
+ *
+ * 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.entitystore.rmi;
+
+import org.qi4j.api.mixin.Mixins;
+import org.qi4j.api.service.ServiceActivation;
+import org.qi4j.library.locking.LockingAbstractComposite;
+
+/**
+ * EntityStore service for remote access of another EntityStore.
+ */
+
+@Mixins( { ServerRemoteEntityStoreMixin.class } )
+public interface ServerRmiEntityStoreService
+    extends ServiceActivation, LockingAbstractComposite
+{
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-rmi/src/main/resources/org/qi4j/entitystore/rmi/RegistryService.properties
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-rmi/src/main/resources/org/qi4j/entitystore/rmi/RegistryService.properties b/qi4j/extensions/entitystore-rmi/src/main/resources/org/qi4j/entitystore/rmi/RegistryService.properties
new file mode 100644
index 0000000..57e7110
--- /dev/null
+++ b/qi4j/extensions/entitystore-rmi/src/main/resources/org/qi4j/entitystore/rmi/RegistryService.properties
@@ -0,0 +1 @@
+port=1099

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/.gitignore
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/.gitignore b/qi4j/extensions/entitystore-s3/.gitignore
new file mode 100644
index 0000000..2f7896d
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/.gitignore
@@ -0,0 +1 @@
+target/

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/LICENSE
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/LICENSE b/qi4j/extensions/entitystore-s3/LICENSE
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/LICENSE
@@ -0,0 +1,177 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/NOTICE
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/NOTICE b/qi4j/extensions/entitystore-s3/NOTICE
new file mode 100644
index 0000000..d6d182a
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/NOTICE
@@ -0,0 +1,22 @@
+Qi4j Amazon S3 Persistence Extension
+Copyright 2007-2008, The Qi4j Development Team of individuals.
+
+See http://www.qi4j.org/contributors.html for list of of individuals.
+Also see each file for additional information of Copyright claims.
+
+Qi4j is a community aggregated works under Copyright law.
+All parts of the original works at Qi4j is licensed under the
+Apache License ver 2.0 http://www.apache.org/licenses
+
+Below follows a list of binary dependencies and their licenses;
+----------------------------------------------------------------
+
+This module uses Apache Commons Logging, software developed at The Apache
+Software Foundation (http://www.apache.org/).
+See licenses/commons-logging.license
+
+This module uses JetS3t, software developed at https://jets3t.dev.java.net/
+See licenses/jets3t.license
+
+
+END OF NOTICE
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/dev-status.xml
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/dev-status.xml b/qi4j/extensions/entitystore-s3/dev-status.xml
new file mode 100644
index 0000000..0c93156
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/dev-status.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
+  <status>
+    <codebase>early</codebase>
+    <!--none,early,beta,stable,mature-->
+    <documentation>none</documentation>
+    <!-- none, brief, good, complete -->
+    <unittests>some</unittests>
+    <!-- none, some, good, complete -->
+  </status>
+  <licenses>
+    <license>ALv2</license>
+  </licenses>
+</module>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/licenses/commons-logging.license
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/licenses/commons-logging.license b/qi4j/extensions/entitystore-s3/licenses/commons-logging.license
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/licenses/commons-logging.license
@@ -0,0 +1,177 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/licenses/jets3t.license
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/licenses/jets3t.license b/qi4j/extensions/entitystore-s3/licenses/jets3t.license
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/licenses/jets3t.license
@@ -0,0 +1,177 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/osgi.bundle
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/osgi.bundle b/qi4j/extensions/entitystore-s3/osgi.bundle
new file mode 100644
index 0000000..2156ebb
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/osgi.bundle
@@ -0,0 +1,28 @@
+Bundle-Activator:
+
+Private-Package:
+
+Ignore-Package: com_cenqua_clover
+
+Import-Package: org.jets3t.service, \
+                org.jets3t.service.impl.rest.httpclient, \
+                org.jets3t.service.model, \
+                org.qi4j.api.mixin, \
+                org.jets3t.service.security, \
+                org.qi4j.api.composite, \
+                org.qi4j.api.configuration, \
+                org.qi4j.api.entity, \
+                org.qi4j.api.injection.scope, \
+                org.qi4j.api.io, \
+                org.qi4j.entitystore.map, \
+                org.qi4j.library.locking, \
+                org.qi4j.api.property, \
+                org.qi4j.api.service, \
+                org.qi4j.spi.composite, \
+                org.qi4j.spi.entity, \
+                org.qi4j.spi.entity.helpers, \
+                org.qi4j.spi.entitystore, \
+                org.qi4j.spi.serialization, \
+                org.qi4j.api.structure
+
+Export-Package: org.qi4j.entitystore.s3

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/pom.xml
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/pom.xml b/qi4j/extensions/entitystore-s3/pom.xml
new file mode 100644
index 0000000..e5506ed
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/pom.xml
@@ -0,0 +1,45 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+   <parent>
+      <groupId>org.qi4j.sandbox</groupId>
+      <artifactId>qi4j-sandbox-extensions</artifactId>
+      <version>0-SNAPSHOT</version>
+   </parent>
+  <groupId>org.qi4j.extension</groupId>
+  <artifactId>qi4j-entitystore-s3</artifactId>
+  <name>Qi4j Extension - EntityStore - Amazon S3</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.qi4j.library</groupId>
+      <artifactId>org.qi4j.library.locking</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>net.java.dev.jets3t</groupId>
+      <artifactId>jets3t</artifactId>
+      <version>0.6.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1</version>
+    </dependency>
+
+    <!-- For Tests -->
+    <dependency>
+      <groupId>org.qi4j.core</groupId>
+      <artifactId>org.qi4j.core.testsupport</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3Configuration.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3Configuration.java b/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3Configuration.java
new file mode 100644
index 0000000..1d23d15
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3Configuration.java
@@ -0,0 +1,15 @@
+package org.qi4j.entitystore.s3;
+
+import org.qi4j.api.configuration.ConfigurationComposite;
+import org.qi4j.api.property.Property;
+
+/**
+ * Configuration for the Amazon S3 EntityStore
+ */
+public interface S3Configuration
+    extends ConfigurationComposite
+{
+    Property<String> accessKey();
+
+    Property<String> secretKey();
+}

http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/d4dd9c17/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3EntityStoreService.java
----------------------------------------------------------------------
diff --git a/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3EntityStoreService.java b/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3EntityStoreService.java
new file mode 100644
index 0000000..37f925a
--- /dev/null
+++ b/qi4j/extensions/entitystore-s3/src/main/java/org/qi4j/entitystore/s3/S3EntityStoreService.java
@@ -0,0 +1,33 @@
+/*  Copyright 2008 Rickard Öberg.
+ *
+ * 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.entitystore.s3;
+
+import org.qi4j.api.mixin.Mixins;
+import org.qi4j.api.service.ServiceActivation;
+import org.qi4j.library.locking.LockingAbstractComposite;
+import org.qi4j.spi.entitystore.EntityStore;
+
+/**
+ * EntityStore service backed by Amazon S3 store.
+ */
+
+@Mixins( { S3SerializationStoreMixin.class } )
+public interface S3EntityStoreService
+    extends EntityStore, ServiceActivation, LockingAbstractComposite
+
+{
+}
\ No newline at end of file


Mime
View raw message