Return-Path: X-Original-To: apmail-zest-commits-archive@minotaur.apache.org Delivered-To: apmail-zest-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6ACE0186B4 for ; Mon, 21 Sep 2015 15:16:50 +0000 (UTC) Received: (qmail 6389 invoked by uid 500); 21 Sep 2015 15:16:50 -0000 Delivered-To: apmail-zest-commits-archive@zest.apache.org Received: (qmail 6369 invoked by uid 500); 21 Sep 2015 15:16:50 -0000 Mailing-List: contact commits-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list commits@zest.apache.org Received: (qmail 6360 invoked by uid 99); 21 Sep 2015 15:16:50 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2015 15:16:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B901DC08AC for ; Mon, 21 Sep 2015 15:16:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.301 X-Spam-Level: *** X-Spam-Status: No, score=3.301 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RDNS_NONE=2.5, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Tf9HBDZ_yD5B for ; Mon, 21 Sep 2015 15:16:31 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (unknown [209.188.14.139]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 3E6B8207EA for ; Mon, 21 Sep 2015 15:16:31 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DF9E7E1222 for ; Mon, 21 Sep 2015 15:16:30 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D1BCE3A0250 for ; Mon, 21 Sep 2015 15:16:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1704315 [5/17] - in /zest/site: content/ content/java/2.1/ content/java/2.1/js/ content/java/latest/ content/java/latest/js/ src/ Date: Mon, 21 Sep 2015 15:16:12 -0000 To: commits@zest.apache.org From: paulmerlin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150921151630.D1BCE3A0250@svn01-us-west.apache.org> Modified: zest/site/content/java/2.1/howto-create-entity.html URL: http://svn.apache.org/viewvc/zest/site/content/java/2.1/howto-create-entity.html?rev=1704315&r1=1704314&r2=1704315&view=diff ============================================================================== --- zest/site/content/java/2.1/howto-create-entity.html (original) +++ zest/site/content/java/2.1/howto-create-entity.html Mon Sep 21 15:15:15 2015 @@ -66,9 +66,9 @@ })(); -

Create an Entity

One of the most common tasks in Zest™ is the management of the life cycle of Entities. Since Zest™ is capable of +

Create an Entity

One of the most common tasks in Zest™ is the management of the life cycle of Entities. Since Zest™ is capable of delivering much higher performance than traditional Object-Relational Mapping technologies, we also expect that people -use Entities more frequently in Zest™ applications, so it is a very important topic to cover.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core Bootstrap artifact:

Table 12. Artifact

Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.bootstrap

2.1


Moreover, you’ll need an EntityStore for persistence and an Indexing engine for querying. Choose among the available +use Entities more frequently in Zest™ applications, so it is a very important topic to cover.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core Bootstrap artifact:

Table 12. Artifact

Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.bootstrap

2.1


Moreover, you’ll need an EntityStore for persistence and an Indexing engine for querying. Choose among the available implementations listed in the Extensions section.

At runtime you will need the Core Runtime artifact too. See the Depend on Zest™ in your build tutorial for details.

Basics First

All Entity operations MUST be done within a UnitOfWork. UnitOfWorks can be nested and if underlying UnitOfWorks are not completed (method complete()), then none of the operations will be persisted permanently.

Entity composites are subtypes of the EntityComposite interface.

Domain code typically don’t need to know of the EntityComposite types directly, and is instead using the domain specific interface. The Visibility rules will be applied to associate the right EntityComposite when a domain type is requested. @@ -128,7 +128,7 @@ We must also assemble an EntityStore for ManufacturerEntity.class ); module.values( AccidentValue.class ); - [...snip...] + [...snip...] } } Modified: zest/site/content/java/2.1/howto-create-sideeffect.html URL: http://svn.apache.org/viewvc/zest/site/content/java/2.1/howto-create-sideeffect.html?rev=1704315&r1=1704314&r2=1704315&view=diff ============================================================================== --- zest/site/content/java/2.1/howto-create-sideeffect.html (original) +++ zest/site/content/java/2.1/howto-create-sideeffect.html Mon Sep 21 15:15:15 2015 @@ -66,7 +66,7 @@ })(); -

Create a SideEffect

SideEffects are defined in SideEffect.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core Bootstrap artifact:

Table 11. Artifact

Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.bootstrap

2.1


At runtime you will need the Core Runtime artifact too. See the Depend on Zest™ in your build tutorial for details.

Typed SideEffect

A typed SideEffect is a Java class that implements the MixinType it can be used on:

public abstract class MailNotifySideEffect extends SideEffectOf<Confirmable>
+  

Create a SideEffect

SideEffects are defined in SideEffect.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core Bootstrap artifact:

Table 11. Artifact

< tbody>
Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.bootstrap

2.1


At runtime you will need the Core Runtime artifact too. See the Depend on Zest™ in your build tutorial for details.

Typed SideEffect

A typed SideEffect is a Java class that implements the MixinType it can be used on:

public abstract class MailNotifySideEffect extends SideEffectOf<Confirmable>
     implements Confirmable
 {
     @Service
@@ -131,7 +131,7 @@ arbitrary MixinType.

@Concerns( MyGenericSideEffect.class )
 public interface AnyMixinType
 {
-[...snip...]
+  [...snip...]
 
 }
 

Methods of the SideEffect Fragment will be called before the Mixin invocation.

AppliesTo

For generic SideEffects that should only trigger on methods with specific annotations or fulfilling some expression, add @@ -140,7 +140,7 @@ implementation(s).

The SideEffect invocation. In other words the AppliesTo arguments are OR’ed.

Here is how the declaration goes ;

@AppliesTo( { MyAnnotation.class, MyAppliesToFilter.class } )
 public class MyGenericSideEffect extends GenericSideEffect
 {
-[...snip...]
+  [...snip...]
 
 }
 

And how to use the annotation ;

@Concerns( MyGenericSideEffect.class )
@@ -153,7 +153,7 @@ public interface AnyMixinType
     void doSomethingElse();
 
 }
-[...snip...]
+  [...snip...]
 
 

Here only the doSomething() method will see the SideEffect applied whereas the doSomethingElse() method won’t.

Finally here is how to implement an AppliesToFilter:

public class MyAppliesToFilter implements AppliesToFilter
 {
@@ -163,7 +163,7 @@ public interface AnyMixinType
         return appliesTo;
     }
 
-    [...snip...]
+      [...snip...]
 
     private boolean evaluate( Method method )
     {

Modified: zest/site/content/java/2.1/howto-depend-on-zest.html
URL: http://svn.apache.org/viewvc/zest/site/content/java/2.1/howto-depend-on-zest.html?rev=1704315&r1=1704314&r2=1704315&view=diff
==============================================================================
--- zest/site/content/java/2.1/howto-depend-on-zest.html (original)
+++ zest/site/content/java/2.1/howto-depend-on-zest.html Mon Sep 21 15:15:15 2015
@@ -1,5 +1,5 @@
 
-Depend on Zest™ in your build
+Depend on Zest™ in your build
 
 
 
@@ -66,7 +66,7 @@
   })();
  
 
-  

Depend on Zest™ in your build

Note

Some of the Libraries and Extensions depend on artifacts that are not deployed in central, you’ll need to +

Depend on Zest™ in your build

Note

Some of the Libraries and Extensions depend on artifacts that are not deployed in central, you’ll need to add other repositories to your build scripts accordingly.

Release artifacts, including sources and javadoc, are deployed to Maven Central:

http://repo1.maven.org/maven2/ (US)

http://uk.maven.org/maven2/ (Europe)

Snapshot artifacts, including sources and javadoc, are built against the develop branch and deployed weekly to the Apache SNAPSHOTS repository:

http://repository.apache.org/snapshots/

Manually

If you don’t rely on your build scripts dependency resolution mechanism you should download the SDK distribution.

Using Maven

You simply declare dependencies on Zest™ artifacts:

<dependencies>
     <dependency>

Modified: zest/site/content/java/2.1/howto-invocation-annotation.html
URL: http://svn.apache.org/viewvc/zest/site/content/java/2.1/howto-invocation-annotation.html?rev=1704315&r1=1704314&r2=1704315&view=diff
==============================================================================
--- zest/site/content/java/2.1/howto-invocation-annotation.html (original)
+++ zest/site/content/java/2.1/howto-invocation-annotation.html Mon Sep 21 15:15:15 2015
@@ -66,7 +66,7 @@
   })();
  
 
-  

Use @Invocation

The @Invocation annotation is relatively unknown but can be rather powerful to use, especially when creating +

Use @Invocation

The @Invocation annotation is relatively unknown but can be rather powerful to use, especially when creating libraries that needs to be flexible of what the user needs to do.

@Invocation is a different InjectionScope, which is a concept to tell Zest runtime where to look for the instances to be injected. Other, more well-known, InjectionScope annotations are @This, @Structure and @Service.

The @Invocation injection scope can provide the following types, all related to the on-going method invocation, Modified: zest/site/content/java/2.1/howto-leverage-properties.html URL: http://svn.apache.org/viewvc/zest/site/content/java/2.1/howto-leverage-properties.html?rev=1704315&r1=1704314&r2=1704315&view=diff ============================================================================== --- zest/site/content/java/2.1/howto-leverage-properties.html (original) +++ zest/site/content/java/2.1/howto-leverage-properties.html Mon Sep 21 15:15:15 2015 @@ -66,9 +66,9 @@ })(); -

Leverage Properties

Zest™ does not follow the JavaBeans standard for property support. Instead, a much more explicit concept is in place. The +

Leverage Properties

Zest™ does not follow the JavaBeans standard for property support. Instead, a much more explicit concept is in place. The advantages are enormous, and the only real downside is that people are already destroyed, thinking in so called POJO -terms.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core API artifact:

Table 8. Artifact

Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.api

2.1


At runtime you will need the Core Runtime artifact too. See the Depend on Zest™ in your build tutorial for details.

So i n Zest, instead of writing;

public interface Book
+terms.

If you want to reproduce what’s explained in this tutorial, remember to depend on the Core API artifact:

Table 8. Artifact

Group IDArtifact IDVersion

org.qi4j.core

org.qi4j.core.api

2.1


At runtime you will need the Core Runtime artifact too. See the Depend on Zest™ in your build tutorial for details.

So i n Zest, instead of writing;

public interface Book
 {
     String getTitle();
     String getAuthor();
@@ -99,7 +99,7 @@ Property still have a set() method, whic
 Metadata about each Property can be declared as MetaInfo.
 
@Structure
 Module module;
-[...snip...]
+  [...snip...]
 
     TransientBuilder<Book> builder = module.newTransientBuilder( Book.class );
     Book prototype = builder.prototype();
@@ -121,7 +121,7 @@ actual domain model. Such Swing client w
 }
 

Our generic Swing UI will be mainly reflective in nature, but when it gets hold of a Property, it can simply do;

    @Structure
     private Qi4j api;
-    [...snip...]
+      [...snip...]
 
     private void addProperty( JPanel panel, Property<?> property )
     {
@@ -129,7 +129,7 @@ actual domain model. Such Swing client w
         Icon icon = info.icon( SIZE_32_32 );
         panel.add(  new JLabel(info.displayName( this.locale ), icon, JLabel.CENTER) );
     }
-    [...snip...]
+      [...snip...]
 
 }