http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/sample-sql-support.html ---------------------------------------------------------------------- diff --git a/content/java/develop/sample-sql-support.html b/content/java/develop/sample-sql-support.html index c819be1..47f9d0a 100644 --- a/content/java/develop/sample-sql-support.html +++ b/content/java/develop/sample-sql-support.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>SQL Support Sample</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="samples.html" title="Samples" /><link rel="prev" href="sample-car-rental.html" title="Car Rental Sample" /><link rel="next" href="sample-swing.html" title="Swing Bindings Sample" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>SQL Support Sample</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="samples.html" title="Samples" /><link rel="prev" href="sample-car-rental.html" title="Car Rental Sample" /><link rel="next" href="sample-swing.html" title="Swing Bindings Sample" /> <!-- favicon --> @@ -66,7 +66,7 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="samples.html#_overview_2">Overview</a></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><span xmlns="" href="sample-sql-support.html">SQL Support Sample</span></span></dt><dt><span class="section"><a href="sample-swing.html">Swing Bindings Sample</a></span></dt></dl></div></div><div class="section" title="SQL Support Sample"><div class="titlepage"><div><div><h3 class="title"><a id="sample-sql-support"></a>SQL Support Sample</h3></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">No te</h3><p>This sample use PostgreSQL and drop all of its data once run in order to be runnable multiple times.</p></div><p>Sample of how to fully use Polygene⢠SQL support : <a class="xref" href="library-sql.html" title="SQL">SQL Library</a>, <a class="xref" href="extension-es-sqlkv.html" title="SQL Key/Value EntityStore"> SQL Key/Value EntityStore</a> and <a class="xref" href="extension-indexing-sql.html" title="SQL Index/Query">SQL Index/Query</a>.</p><p><a class="ulink" href="https://github.com/apache/polygene-java/tree/develop/samples/sql-support" target="_top">Browse Source</a></p><p>Here are the steps needed to setup the database using the <code class="literal">psql</code> utility command:</p><pre class="programlisting brush: bash">user@host $ psql postgres + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="samples.html#_overview_2">Overview</a></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><span xmlns="" href="sample-sql-support.html">SQL Support Sample</span></span></dt><dt><span class="section"><a href="sample-swing.html">Swing Bindings Sample</a></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sample-sql-support"></a>SQL Support Sample</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-rig ht: 0.5in;"><h3 class="title">Note</h3><p>This sample use PostgreSQL and drop all of its data once run in order to be runnable multiple times.</p></div><p>Sample of how to fully use Polygene⢠SQL support : <a class="xref" href="library-sql.html" title="SQL">SQL Library</a>, <a class="xref" href="extension-es-sqlkv.html" title="SQL Key/Value EntityStore"> SQL Key/Value EntityStore</a> and <a class="xref" href="extension-indexing-sql.html" title="SQL Index/Query">SQL Index/Query</a>.</p><p><a class="ulink" href="https://github.com/apache/polygene-java/tree/develop/samples/sql-support" target="_top">Browse Source</a></p><p>Here are the steps needed to setup the database using the <code class="literal">psql</code> utility command:</p><pre class="programlisting brush: bash">user@host $ psql postgres postgres=# CREATE USER jdbc_test_login WITH PASSWORD 'password'; CREATE ROLE postgres=# CREATE DATABASE jdbc_test_db;
http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/sample-swing.html ---------------------------------------------------------------------- diff --git a/content/java/develop/sample-swing.html b/content/java/develop/sample-swing.html index 8a03fd8..b4c03a4 100644 --- a/content/java/develop/sample-swing.html +++ b/content/java/develop/sample-swing.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Swing Bindings Sample</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="samples.html" title="Samples" /><link rel="prev" href="sample-sql-support.html" title="SQL Support Sample" /><link rel="next" href="core.html" title="Core" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Swing Bindings Sample</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="samples.html" title="Samples" /><link rel="prev" href="sample-sql-support.html" title="SQL Support Sample" /><link rel="next" href="core.html" title="Core" /> <!-- favicon --> @@ -66,7 +66,7 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="samples.html#_overview_2">Overview</a></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><a href="sample-sql-support.html">SQL Support Sample</a></span></dt><dt><span class="section"><span xmlns="" href="sample-swing.html">Swing Bindings Sample</span></span></dt></dl></div></div><div class="section" title="Swing Bindings Sample"><div class="titlepage"><div><div><h3 class="title"><a id="sample-swing"></a>Swing Bindings Sample</h3></div></div></div><p>Sample of how to write custom binders.</p><p><a class="ulink" href="https://github.com/apache/pol ygene-java/tree/develop/samples/swing" target="_top">Browse Source</a></p></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="samples.html#_overview_2">Overview</a></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><a href="sample-sql-support.html">SQL Support Sample</a></span></dt><dt><span class="section"><span xmlns="" href="sample-swing.html">Swing Bindings Sample</span></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sample-swing"></a>Swing Bindings Sample</h3></div></div></div><p>Sample of how to write custom binders.</p><p><a class=" ulink" href="https://github.com/apache/polygene-java/tree/develop/samples/swing" target="_top">Browse Source</a></p></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. <br /><small> Apache Polygene, Polygene, Apache, the Apache feather logo, and the Apache Polygene project logo are trademarks of The Apache Software Foundation.<br /> http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/samples.html ---------------------------------------------------------------------- diff --git a/content/java/develop/samples.html b/content/java/develop/samples.html index dc63574..77d1320 100644 --- a/content/java/develop/samples.html +++ b/content/java/develop/samples.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Samples</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="index.html" title="" /><link rel="prev" href="javadocs.html" title="Javadoc" /><link rel="next" href="sample-dci.html" title="DCI Sample" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Samples</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="index.html" title="" /><link rel="prev" href="javadocs.html" title="Javadoc" /><link rel="next" href="sample-dci.html" title="DCI Sample" /> <!-- favicon --> @@ -66,7 +66,7 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><span xmlns="" href="samples.html#_overview_2">Overview</span></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><a href="sample-sql-support.html">SQL Support Sample</a></span></dt><dt><span class="section"><a href="sample-swing.html">Swing Bindings Sample</a></span></dt></dl></div></div><div class="section" title="Samples"><div class="titlepage"><div><div><h2 class="title"><a id="samples"></a>Samples</h2></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h3 class="title"><a id="_overview_2"></a>Overview</h3></div>< /div></div><p>The Polygene⢠SDK comes with several sample applications. This is a very good place + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><span xmlns="" href="samples.html">Samples</span></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><span xmlns="" href="samples.html#_overview_2">Overview</span></span></dt><dt><span class="section"><a href="sample-dci.html">DCI Sample</a></span></dt><dt><span class="section"><a href="sample-forum.html">Forum Sample</a></span></dt><dt><span class="section"><a href="sample-car-rental.html">Car Rental Sample</a></span></dt><dt><span class="section"><a href="sample-sql-support.html">SQL Support Sample</a></span></dt><dt><span class="section"><a href="sample-swing.html">Swing Bindings Sample</a></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="samples"></a>Samples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id ="_overview_2"></a>Overview</h3></div></div></div><p>The Polygene⢠SDK comes with several sample applications. This is a very good place to look for code examples and recipes.</p><p>The samples are available in the <code class="literal">samples/</code> directory of the Polygene⢠SDK.</p></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. <br /><small> http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/scripting.html ---------------------------------------------------------------------- diff --git a/content/java/develop/scripting.html b/content/java/develop/scripting.html index 938228f..2ab4454 100644 --- a/content/java/develop/scripting.html +++ b/content/java/develop/scripting.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Scripting</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="libraries.html" title="Libraries" /><link rel="prev" href="libraries.html" title="Libraries" /><link rel="next" href="library-alarm.html" title="Alarms" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Scripting</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="libraries.html" title="Libraries" /><link rel="prev" href="libraries.html" title="Libraries" /><link rel="next" href="library-alarm.html" title="Alarms" /> <!-- favicon --> @@ -66,11 +66,11 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><span xmlns="" href="libraries.html">Libraries</span></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="libraries.html#_overview_5">Overview</a></span></dt><dt><span class="section"><span xmlns="" href="scripting.html">Scripting</span></span></dt><dt><span class="section"><a href="library-alarm.html">Alarms</a></span></dt><dt><span class="section"><a href="library-circuitbreaker.html">Circuit Breaker</a></span></dt><dt><span class="section"><a href="library-constraints.html">Constraints</a></span></dt><dt><span class="section"><a href="library-fileconfig.html">FileConfig</a></span></dt><dt><span class="section"><a href="library-http.html">HTTP</a></span></dt><dt><span class="section"><a href="library-invocation-cache.html">Invocation Cache</a></span></dt><dt><span class="section"><a href="library-jmx.html">JMX</a></span></dt><dt><span class="section"><a href="library-locking.html"> Locking</a></span></dt><dt><span class="section"><a href="library-logging.html">Logging</a></span></dt><dt><span class="section"><a href="library-osgi.html">OSGi</a></span></dt><dt><span class="section"><a href="library-rdf.html">RDF</a></span></dt><dt><span class="section"><a href="library-rest-client.html">ReST Client</a></span></dt><dt><span class="section"><a href="library-rest-client-primer.html">ReST - HATEOAS Primer</a></span></dt><dt><span class="section"><a href="library-rest-common.html">ReST Common</a></span></dt><dt><span class="section"><a href="library-rest-server.html">ReST Server</a></span></dt><dt><span class="section"><a href="library-restlet.html">Restlet Support</a></span></dt><dt><span class="section"><a href="library-servlet.html">Servlet</a></span></dt><dt><span class="section"><a href="library-shiro.html">Shiro Security</a></span></dt><dt><span class="section"><a href="library-shiro-web.html">Shiro Web Security</a></span></dt><dt><span class="section"><a href ="library-spring.html">Spring Integration</a></span></dt><dt><span class="section"><a href="library-sql.html">SQL</a></span></dt><dt><span class="section"><a href="library-uid.html">UID</a></span></dt><dt><span class="section"><a href="library-uowfile.html">UoWFile</a></span></dt></dl></div></div><div class="section" title="Scripting"><div class="titlepage"><div><div><h3 class="title"><a id="scripting"></a>Scripting</h3></div></div></div><p class="remark"><em><span class="comment"></span></em></p><p class="devstatus-code-stable">code</p><p class="devstatus-docs-good">docs</p><p class="devstatus-tests-good">tests</p><p>The Scripting Library allows Mixin methods to be implemented in any JSR-223 scripting language, loaded dynamically on -first use and allowing reloading of the script in runtime.</p><div class="table"><a id="idm229754936752"></a><p class="title"><strong>Table 19. Artifact</strong></p><div class="table-contents"><table summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.apache.polygene.libraries</p></td><td align="left" valign="top"><p>org.apache.polygene.library.scripting</p></td><td align="left" valign="top"><p>3.1.0-SNAPSHOT</p></td></tr></tbody></table></div></div><br class="table-break" /><p>The Scripting Library is a Generic mixin class that implements + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><span xmlns="" href="libraries.html">Libraries</span></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="libraries.html#_overview_5">Overview</a></span></dt><dt><span class="section"><span xmlns="" href="scripting.html">Scripting</span></span></dt><dt><span class="section"><a href="library-alarm.html">Alarms</a></span></dt><dt><span class="section"><a href="library-circuitbreaker.html">Circuit Breaker</a></span></dt><dt><span class="section"><a href="library-constraints.html">Constraints</a></span></dt><dt><span class="section"><a href="library-fileconfig.html">FileConfig</a></span></dt><dt><span class="section"><a href="library-http.html">HTTP</a></span></dt><dt><span class="section"><a href="library-invocation-cache.html">Invocation Cache</a></span></dt><dt><span class="section"><a href="library-jmx.html">JMX< /a></span></dt><dt><span class="section"><a href="library-locking.html">Locking</a></span></dt><dt><span class="section"><a href="library-logging.html">Logging</a></span></dt><dt><span class="section"><a href="library-osgi.html">OSGi</a></span></dt><dt><span class="section"><a href="library-rdf.html">RDF</a></span></dt><dt><span class="section"><a href="library-rest-client.html">ReST Client</a></span></dt><dt><span class="section"><a href="library-rest-client-primer.html">ReST - HATEOAS Primer</a></span></dt><dt><span class="section"><a href="library-rest-common.html">ReST Common</a></span></dt><dt><span class="section"><a href="library-rest-server.html">ReST Server</a></span></dt><dt><span class="section"><a href="library-servlet.html">Servlet</a></span></dt><dt><span class="section"><a href="library-shiro.html">Shiro Security</a></span></dt><dt><span class="section"><a href="library-shiro-web.html">Shiro Web Security</a></span></dt><dt><span class="section"><a href="library-spring .html">Spring Integration</a></span></dt><dt><span class="section"><a href="library-sql.html">SQL</a></span></dt><dt><span class="section"><a href="library-uid.html">UID</a></span></dt><dt><span class="section"><a href="library-uowfile.html">UoWFile</a></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="scripting"></a>Scripting</h3></div></div></div><p class="remark"><em><span class="comment"></span></em></p><p class="devstatus-code-stable">code</p><p class="devstatus-docs-good">docs</p><p class="devstatus-tests-good">tests</p><p>The Scripting Library allows Mixin methods to be implemented in any JSR-223 scripting language, loaded dynamically on +first use and allowing reloading of the script in runtime.</p><div class="table"><a id="idm4132"></a><p class="title"><strong>Table 19. Artifact</strong></p><div class="table-contents"><table class="table" summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.apache.polygene.libraries</p></td><td align="left" valign="top"><p>org.apache.polygene.library.scripting</p></td><td align="left" valign="top"><p>0</p></td></tr></tbody></table></div></div><br class="table-break" /><p>The Scripting Library is a Generic mixin class that implements Composite interfaces by delegating to script functions using Java Scripting API. All Java Scripting API (JSR-223) implementations that support</p><pre class="programlisting brush: java"> ((javax.script.Invocable) scriptEngine).invokeFunction( functionName, arguments );</pre><p>should be supported. On Java.Net there is a <a class="ulink" href="https://java.net/projects/scripting/sources/svn/show/trunk/engines" target="_top">list of Java Scripting API languages</a>.</p><p>It is important to understand that the ScriptEngines must be present on the classpath, or they will not be available, -with the exception of JavaScript which uses the built-in Nashorn engine.</p><p>We welcome additional information and samples of languages that has been tried and tested.</p><div class="table"><a id="idm229754921232"></a><p class="title"><strong>Table 20. Language Support</strong></p><div class="table-contents"><table summary="Language Support" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /><col class="col_4" /><col class="col_5" /></colgroup><thead><tr><th align="left" valign="top">Language </th><th align="left" valign="top"> Supported </th><th align="left" valign="top"> Tested </th><th align="left" valign="top"> License </th><th align="left" valign="top"> Implementation</th></tr></thead><tbody><tr><td align="left" valign="top"><p>JavaScript</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>?</p></td><td align="left" valign="top"><p>Nashorn, built-in Java 8 and lat er</p></td></tr><tr><td align="left" valign="top"><p>Groovy</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>Apache Groovy</p></td></tr><tr><td align="left" valign="top"><p>Ruby</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>(EPL|GPL|LGPL) + Ruby</p></td><td align="left" valign="top"><p>JRuby</p></td></tr><tr><td align="left" valign="top"><p>Python</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p><a class="ulink" href="https://opensource.org/licenses/Python-2.0" target="_top">Python</a></p></td><td align="left" valign="top"><p>Jython, must use jython-standalone</p></td></tr><tr><td align="left" valign="top"><p>Kotlin</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign=" top"><p>No</p></td><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>Jetbrains</p></td></tr><tr><td align="left" valign="top"><p>Lua</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>MIT</p></td><td align="left" valign="top"><p>luaj.org,</p></td></tr><tr><td align="left" valign="top"><p>Clojure</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>CPL</p></td><td align="left" valign="top"><p><a class="ulink" href="https://github.com/pmf/clojure-jsr223" target="_top">https://github.com/pmf/clojure-jsr223</a></p></td></tr></tbody></table></div></div><br class="table-break" /><p>The following languages may or may not be supported, and was found at <a class="ulink" href="https://java.net/projects/scripting/sources/svn/show/trunk/engines" target="_top">Java.Net Scripting project</a></p><div class="table" ><a id="idm229754872336"></a><p class="title"><strong>Table 21. Potential >Languages</strong></p><div class="table-contents"><table summary="Potential >Languages" border="1"><colgroup><col class="col_1" /><col class="col_2" >/><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top"> >Language </th><th align="left" valign="top"> Location </th><th align="left" >valign="top"> License</th></tr></thead><tbody><tr><td align="left" >valign="top"><p>beanshell</p></td><td align="left" >valign="top"><p></p></td><td align="left" >valign="top"><p></p></td></tr><tr><td align="left" >valign="top"><p>ejs</p></td><td align="left" valign="top"><p></p></td><td >align="left" valign="top"><p></p></td></tr><tr><td align="left" >valign="top"><p>freemarker</p></td><td align="left" valign="top"><p><a >class="ulink" href="https://freemarker.apache.org" >target="_top">https://freemarker.apache.org</a></p></td><td align="left" >valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>jacl </p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jaskell</p></td><td align="left" valign="top"><p><a class="ulink" href="https://github.com/MarchLiu/jaskell" target="_top">https://github.com/MarchLiu/jaskell</a></p></td><td align="left" valign="top"><p>MIT</p></td></tr><tr><td align="left" valign="top"><p>jawk</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jelly</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>jep</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jexl</p></td><td align="left" valign="top"><p><a class="ulink" href="https://commons.apache.org/jexl/" target="_top">https://commons.apache.org/jexl/</a></p></td><td align="left" va lign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>jst</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>judo</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>juel</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>ognl</p></td><td align="left" valign="top"><p><a class="ulink" href="https://commons.apache.org/ognl/" target="_top">https://commons.apache.org/ognl/</a></p></td><td align="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>pnuts</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>scheme</p></td><td align="left" valign="top"><p><a class="ulink" href="http://sisc-scheme.org/" target="_top">http://s isc-scheme.org/</a></p></td><td align="left" valign="top"><p>(MPLv1.1</p></td></tr><tr><td align="left" valign="top"><p>GPLv2)</p></td><td align="left" valign="top"><p>velocity</p></td><td align="left" valign="top"><p><a class="ulink" href="https://velocity.apache.org" target="_top">https://velocity.apache.org</a></p></td></tr><tr><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>xpath</p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p>xslt</p></td><td align="left" valign="top"><p></p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="idm229754806480"></a><p class="title"><strong>Table 22. Not Compatible Languages</strong></p><div class="table-contents"><table summary="Not Compatible Languages" border="1"><colgroup><col class="col_1" /><col class="col_2" /></colgroup><thead><tr><th align="left" valign="top"> Language </th><th alig n="left" valign="top"> Comment</th></tr></thead><tbody><tr><td align="left" valign="top"><p>Java</p></td><td align="left" valign="top"><p>Implementation exists at <a class="ulink" href="https://github.com/nickman/javax-scripting/" target="_top">https://github.com/nickman/javax-scripting/</a> which is forked from <a class="ulink" href="https://java.net/projects/scripting" target="_top">https://java.net/projects/scripting</a>. It doesnât support Invocable, and additional work on ScriptMixin is required to support this. Alternatively, fork the ScriptEngine implementation and support Invocable in it.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="section" title="Javascript"><div class="titlepage"><div><div><h4 class="title"><a id="javascript"></a>Javascript</h4></div></div></div><p>In Javascript, we map directly to JS functions with the same name.</p><p>For the following Polygene composite type,</p><pre class="programlisting brush: java">package org.apa che.polygene.library.scripting; +with the exception of JavaScript which uses the built-in Nashorn engine.</p><p>We welcome additional information and samples of languages that has been tried and tested.</p><div class="table"><a id="idm4157"></a><p class="title"><strong>Table 20. Language Support</strong></p><div class="table-contents"><table class="table" summary="Language Support" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /><col class="col_4" /><col class="col_5" /></colgroup><thead><tr><th align="left" valign="top">Language </th><th align="left" valign="top"> Supported </th><th align="left" valign="top"> Tested </th><th align="left" valign="top"> License </th><th align="left" valign="top"> Implementation</th></tr></thead><tbody><tr><td align="left" valign="top"><p>JavaScript</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>?</p></td><td align="left" valign="top"><p>Nashorn, built-in Java 8 a nd later</p></td></tr><tr><td align="left" valign="top"><p>Groovy</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>Apache Groovy</p></td></tr><tr><td align="left" valign="top"><p>Ruby</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>(EPL|GPL|LGPL) + Ruby</p></td><td align="left" valign="top"><p>JRuby</p></td></tr><tr><td align="left" valign="top"><p>Python</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p><a class="ulink" href="https://opensource.org/licenses/Python-2.0" target="_top">Python</a></p></td><td align="left" valign="top"><p>Jython, must use jython-standalone</p></td></tr><tr><td align="left" valign="top"><p>Kotlin</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" va lign="top"><p>No</p></td><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>Jetbrains</p></td></tr><tr><td align="left" valign="top"><p>Lua</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>MIT</p></td><td align="left" valign="top"><p>luaj.org,</p></td></tr><tr><td align="left" valign="top"><p>Clojure</p></td><td align="left" valign="top"><p>Yes</p></td><td align="left" valign="top"><p>No</p></td><td align="left" valign="top"><p>CPL</p></td><td align="left" valign="top"><p><a class="ulink" href="https://github.com/pmf/clojure-jsr223" target="_top">https://github.com/pmf/clojure-jsr223</a></p></td></tr></tbody></table></div></div><br class="table-break" /><p>The following languages may or may not be supported, and was found at <a class="ulink" href="https://java.net/projects/scripting/sources/svn/show/trunk/engines" target="_top">Java.Net Scripting project</a></p><div class=" table"><a id="idm4254"></a><p class="title"><strong>Table 21. Potential Languages</strong></p><div class="table-contents"><table class="table" summary="Potential Languages" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top"> Language </th><th align="left" valign="top"> Location </th><th align="left" valign="top"> License</th></tr></thead><tbody><tr><td align="left" valign="top"><p>beanshell</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>ejs</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>freemarker</p></td><td align="left" valign="top"><p><a class="ulink" href="https://freemarker.apache.org" target="_top">https://freemarker.apache.org</a></p></td><td align="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign=" top"><p>jacl</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jaskell</p></td><td align="left" valign="top"><p><a class="ulink" href="https://github.com/MarchLiu/jaskell" target="_top">https://github.com/MarchLiu/jaskell</a></p></td><td align="left" valign="top"><p>MIT</p></td></tr><tr><td align="left" valign="top"><p>jawk</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jelly</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>jep</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>jexl</p></td><td align="left" valign="top"><p><a class="ulink" href="https://commons.apache.org/jexl/" target="_top">https://commons.apache.org/jexl/</a></p></td><td ali gn="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>jst</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>judo</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>juel</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>ognl</p></td><td align="left" valign="top"><p><a class="ulink" href="https://commons.apache.org/ognl/" target="_top">https://commons.apache.org/ognl/</a></p></td><td align="left" valign="top"><p>Apache</p></td></tr><tr><td align="left" valign="top"><p>pnuts</p></td><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p>scheme</p></td><td align="left" valign="top"><p><a class="ulink" href="http://sisc-scheme.org/" target="_t op">http://sisc-scheme.org/</a></p></td><td align="left" valign="top"><p>(MPLv1.1</p></td></tr><tr><td align="left" valign="top"><p>GPLv2)</p></td><td align="left" valign="top"><p>velocity</p></td><td align="left" valign="top"><p><a class="ulink" href="https://velocity.apache.org" target="_top">https://velocity.apache.org</a></p></td></tr><tr><td align="left" valign="top"><p>Apache</p></td><td align="left" valign="top"><p>xpath</p></td><td align="left" valign="top"><p></p></td></tr><tr><td align="left" valign="top"><p></p></td><td align="left" valign="top"><p>xslt</p></td><td align="left" valign="top"><p></p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="idm4398"></a><p class="title"><strong>Table 22. Not Compatible Languages</strong></p><div class="table-contents"><table class="table" summary="Not Compatible Languages" border="1"><colgroup><col class="col_1" /><col class="col_2" /></colgroup><thead><tr><th align="left" valign="top"> Lang uage </th><th align="left" valign="top"> Comment</th></tr></thead><tbody><tr><td align="left" valign="top"><p>Java</p></td><td align="left" valign="top"><p>Implementation exists at <a class="ulink" href="https://github.com/nickman/javax-scripting/" target="_top">https://github.com/nickman/javax-scripting/</a> which is forked from <a class="ulink" href="https://java.net/projects/scripting" target="_top">https://java.net/projects/scripting</a>. It doesnât support Invocable, and additional work on ScriptMixin is required to support this. Alternatively, fork the ScriptEngine implementation and support Invocable in it.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="javascript"></a>Javascript</h4></div></div></div><p>In Javascript, we map directly to JS functions with the same name.</p><p>For the following Polygene composite type,</p><pre class="programlisting brush: java">package org.apac he.polygene.library.scripting; [...snip...] @@ -83,7 +83,7 @@ public interface HelloSpeaker that looks like this;</p><pre class="programlisting brush: javascript">function sayHello() { return "Hello, JavaScript"; } -</pre></div><div class="section" title="Groovy"><div class="titlepage"><div><div><h4 class="title"><a id="groovy"></a>Groovy</h4></div></div></div><p>The Groovy Scripting Library is a Generic mixin that implements interfaces by delegating to Groovy code from classpath resources.</p><p>But before looking at how to use the Scripting library weâll see that <span class="strong"><strong>you donât need Scripting library at all if you +</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="groovy"></a>Groovy</h4></div></div></div><p>The Groovy Scripting Library is a Generic mixin that implements interfaces by delegating to Groovy code from classpath resources.</p><p>But before looking at how to use the Scripting library weâll see that <span class="strong"><strong>you donât need Scripting library at all if you simply need to use Groovy classes as Fragments</strong></span>. Groovy is a fully Java compatible language and can be used directly, similarly to Scala.</p><p>Then weâll see how to use Groovy class scripts and method scripts.</p><p>All examples below are based on this type:</p><pre class="programlisting brush: java">package org.apache.polygene.library.scripting; [...snip...] @@ -94,7 +94,7 @@ public interface HelloSpeaker { String sayHello(); } -</pre></div><div class="section" title="Using compiled Groovy classes"><div class="titlepage"><div><div><h4 class="title"><a id="_using_compiled_groovy_classes"></a>Using compiled Groovy classes</h4></div></div></div><p>To directly use compiled Groovy classes as Fragments you donât need this library at all.</p><p>Having this Groovy class compiled ;</p><p title="HelloSpeakerMixin.groovy"><strong>HelloSpeakerMixin.groovy. </strong> +</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_using_compiled_groovy_classes"></a>Using compiled Groovy classes</h4></div></div></div><p>To directly use compiled Groovy classes as Fragments you donât need this library at all.</p><p>Having this Groovy class compiled ;</p><p><strong>HelloSpeakerMixin.groovy. </strong> </p><pre class="programlisting brush: groovy">class HelloSpeakerMixin implements HelloSpeaker { @@ -103,18 +103,18 @@ public interface HelloSpeaker "Hello there, Groovy" } } -</pre><p title="HelloSpeakerMixin.groovy"> +</pre><p> </p><p>assemble it directly:</p><pre class="programlisting brush: java">SingletonAssembler assembler = new SingletonAssembler( assembly -> assembly.transients( HelloSpeaker.class ) .withMixins( HelloSpeakerMixin.class ) ); HelloSpeaker speaker = assembler.module().newTransient( HelloSpeaker.class ); assertThat( speaker.sayHello(), equalTo("Hello there, Groovy") ); -</pre></div><div class="section" title="Using Groovy function scripts"><div class="titlepage"><div><div><h4 class="title"><a id="_using_groovy_function_scripts"></a>Using Groovy function scripts</h4></div></div></div><p>Declare a Groovy function in a resource file located in the same package as the implemented type with the name <code class="literal"><type>.groovy</code>:</p><p title="HelloSpeaker.groovy"><strong>HelloSpeaker.groovy. </strong> +</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_using_groovy_function_scripts"></a>Using Groovy function scripts</h4></div></div></div><p>Declare a Groovy function in a resource file located in the same package as the implemented type with the name <code class="literal"><type>.groovy</code>:</p><p><strong>HelloSpeaker.groovy. </strong> </p><pre class="programlisting brush: groovy">def sayHello() { "Hello, Groovy" } -</pre><p title="HelloSpeaker.groovy"> +</pre><p> </p><p>Then assemble it with the normal <code class="literal">ScriptMixin</code>:</p><pre class="programlisting brush: java">SingletonAssembler assembler = new SingletonAssembler( assembly -> assembly.values( HelloSpeaker.class ) .setMetaInfo( Scripting.GROOVY ) http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/state-modeling.html ---------------------------------------------------------------------- diff --git a/content/java/develop/state-modeling.html b/content/java/develop/state-modeling.html index e3b071e..b1a3eae 100644 --- a/content/java/develop/state-modeling.html +++ b/content/java/develop/state-modeling.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Polygene⢠and state modeling</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="intro.html" title="Introduction" /><link rel="prev" href="what-s-an-object-anyway.html" title="Whatâs an Object anyway?" /><link rel="next" href="related.html" title="Related publications & projects" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Polygene⢠and state modeling</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="intro.html" title="Introduction" /><link rel="prev" href="what-s-an-object-anyway.html" title="Whatâs an Object anyway?" /><link rel="next" href="related.html" title="Related publications & projects" /> <!-- favicon --> @@ -66,7 +66,7 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><span xmlns="" href="intro.html">Introduction</span></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="intro.html#highlights">Highlights</a></span></dt><dt><span class="section"><a href="introduction-background.html">Background</a></span></dt><dt><span class="section"><a href="what-is-cop.html">What is COP?</a></span></dt><dt><span class="section"><a href="what-s-an-object-anyway.html">Whatâs an Object anyway?</a></span></dt><dt><span class="section"><span xmlns="" href="state-modeling.html">Polygene⢠and state modeling</span></span></dt><dt><span class="section"><a href="related.html">Related publications & projects</a></span></dt></dl></div></div><div class="section" title="Polygene⢠and state modeling"><div class="titlepage"><div><div><h3 class="title"><a id="state-modeling"></a>Polygene⢠and state modeling</h3></div></div></div><p>(From Rickard Obergâs blog, <a c lass="ulink" href="http://www.jroller.com/rickard/entry/qi4j_and_state_modeling" target="_top">http://www.jroller.com/rickard/entry/qi4j_and_state_modeling</a>, 2009-02-19)</p><p>In the Polygene⢠project we strive to being able to express our domain as directly as possible, with as little translation + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><span xmlns="" href="intro.html">Introduction</span></span></dt><dt><span class="section"><a href="tutorials.html">Tutorials</a></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="intro.html#highlights">Highlights</a></span></dt><dt><span class="section"><a href="introduction-background.html">Background</a></span></dt><dt><span class="section"><a href="what-is-cop.html">What is COP?</a></span></dt><dt><span class="section"><a href="what-s-an-object-anyway.html">Whatâs an Object anyway?</a></span></dt><dt><span class="section"><span xmlns="" href="state-modeling.html">Polygene⢠and state modeling</span></span></dt><dt><span class="section"><a href="related.html">Related publications & projects</a></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="state-modeling"></a>Polygene⢠and state modeling</h3></div></div></div><p>( From Rickard Obergâs blog, <a class="ulink" href="http://www.jroller.com/rickard/entry/qi4j_and_state_modeling" target="_top">http://www.jroller.com/rickard/entry/qi4j_and_state_modeling</a>, 2009-02-19)</p><p>In the Polygene⢠project we strive to being able to express our domain as directly as possible, with as little translation as possible between how we think about a domain and how it is actually coded. This then affects our entire view of how application frameworks should be constructed, and what we consider good and bad ways of implementing certain features.</p><p>One part which is a good example of this is persistent state modeling. In other approaches and frameworks one would @@ -80,7 +80,7 @@ In Polygeneâ¢, where Composites and not Objects, are the basic construct, we ha concepts more explicitly. We have EntityComposites and ValueComposites, each with different ways of creating them and managing them. Both EntityComposites and ValueComposites can then have Properties, as first-class objects, but Properties in -ValueComposites are always immutable.</p><div class="section" title="Entities"><div class="titlepage"><div><div><h4 class="title"><a id="_entities"></a>Entities</h4></div></div></div><p>Hereâs an example of how you could define an EntityComposite:</p><pre class="programlisting brush: java">interface PersonEntity extends HasIdentity +ValueComposites are always immutable.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_entities"></a>Entities</h4></div></div></div><p>Hereâs an example of how you could define an EntityComposite:</p><pre class="programlisting brush: java">interface PersonEntity extends HasIdentity { Property<String> givenName(); Property<String> surName(); @@ -93,7 +93,7 @@ Entities, so thatâs all taken care of. So if you speak about Entities in your domain discussions, each having Properties, then you can put that down in code pretty much as-is. This is, to me, a huge advantage over other ways of doing it, including POJO modeling (which lose clarity), UML -modeling (which has roundtrip problems), DSL modeling (which lose tools support), and whatnot.</p></div><div class="section" title="Roles"><div class="titlepage"><div><div><h4 class="title"><a id="_roles"></a>Roles</h4></div></div></div><p>If you want to get picky about it, the above example is probably not how you would model Person. Having a name is +modeling (which has roundtrip problems), DSL modeling (which lose tools support), and whatnot.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_roles"></a>Roles</h4></div></div></div><p>If you want to get picky about it, the above example is probably not how you would model Person. Having a name is just one role that a Person has to play, and since Composite Oriented Programming is all about using roles and context instead of classes you would probably do something like this instead:</p><pre class="programlisting brush: java">interface Nameable { @@ -120,7 +120,7 @@ invocations. If you explicitly want to allow properties to be null, so that for example "Madonna" would be an acceptable name, then you can mark it as @Optional. We prefer @Optional to @Nullable since it better expresses the intent from a domain perspective. -Avoiding technical terms as much as possible is a another goal (which is damn hard to reach!).</p></div><div class="section" title="Values"><div class="titlepage"><div><div><h4 class="title"><a id="_values"></a>Values</h4></div></div></div><p>If you want to get really picky about it, not even the above would be a real example. +Avoiding technical terms as much as possible is a another goal (which is damn hard to reach!).</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_values"></a>Values</h4></div></div></div><p>If you want to get really picky about it, not even the above would be a real example. You may want to encapsulate the two properties into one value instead, so that you can more easily perform validation checks when they are updated. What you want are ValueComposites:</p><pre class="programlisting brush: java">interface NameValue { @@ -138,7 +138,7 @@ But since NameValue will be assembled as a ValueComposite, which itself is marke for all ValueComposites, and thereâs no way to "opt out" of it.</p><p>By introducing one more level in the state model you have created an easy way to access the name as a whole and hand it around the system, instead of as two separate properties. Since it is immutable you are also ensured that noone can change it without going through the Entity, and you can -also share instances of the name without having to worry about thread-safety.</p></div><div class="section" title="Privatizing state"><div class="titlepage"><div><div><h4 class="title"><a id="_privatizing_state"></a>Privatizing state</h4></div></div></div><p>The above is already a great step ahead in terms of how you can model your state more easily than having to use POJOs +also share instances of the name without having to worry about thread-safety.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_privatizing_state"></a>Privatizing state</h4></div></div></div><p>The above is already a great step ahead in terms of how you can model your state more easily than having to use POJOs to sort of "fake" the features Iâm describing above, and thereâs also a ton of cool features and consequences of the whole thing Iâm skipping here, for brevity. One of the problems with POJO models that usually come up is that your getters and setters get exposed to clients, http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/ten-minutes-intro.html ---------------------------------------------------------------------- diff --git a/content/java/develop/ten-minutes-intro.html b/content/java/develop/ten-minutes-intro.html index a085d21..41edf9e 100644 --- a/content/java/develop/ten-minutes-intro.html +++ b/content/java/develop/ten-minutes-intro.html @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Polygene⢠in 10 minutes</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="two-minutes-intro.html" title="Polygene⢠in 2 minutes" /><link rel="next" href="thirty-minutes-intro.html" title="Polygene⢠in 30 minutes" /> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Polygene⢠in 10 minutes</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="two-minutes-intro.html" title="Polygene⢠in 2 minutes" /><link rel="next" href="thirty-minutes-intro.html" title="Polygene⢠in 30 minutes" /> <!-- favicon --> @@ -66,9 +66,9 @@ })(); </script> - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.ht ml">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Polygene⢠in 2 minutes</a></span></dt><dt><span class="section"><span xmlns="" href="ten-minutes-intro.html">Polygene⢠in 10 minutes</span></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Polygene⢠in 30 minutes</a></span></dt><dt><span class="section"><a href="howto-depend-on-polygene.html">Depend on Polygeneâ¢</a></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-services.html">Services Composites Tutorial</a></span></dt><dt><span clas s="section"><a href="howto-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><a href="howto-leverage-properties.html">Leverage Properties</a></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><a href="howto-invocation-annotation.html">Use @Invocation</a></span></dt><dt><span class="section"><a href="build-system.html">Polygene⢠Build System</a></span></dt><dt><span class="section"><a href="community-docs.html">Polygene⢠Documentation</a></span></dt><dt><span class="sectio n"><a href="releasing-apache.html">Releasing Polygeneâ¢</a></span></dt></dl></div></div><div class="section" title="Polygene⢠in 10 minutes"><div class="titlepage"><div><div><h3 class="title"><a id="ten-minutes-intro"></a>Polygene⢠in 10 minutes</h3></div></div></div><div class="tip" title="Tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Theses tutorials are based on actual code found in the <code class="literal">tutorials/</code> directory of the + </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" style="width:80%;height:80%; padding-top:20px;" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="index.html#home">Polygeneâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</ a></span></dt><dt><span class="section"><a href="glossary.html">Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl class="toc"><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Polygene⢠in 2 minutes</a></span></dt><dt><span class="section"><span xmlns="" href="ten-minutes-intro.html">Polygene⢠in 10 minutes</span></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Polygene⢠in 30 minutes</a></span></dt><dt><span class="section"><a href="howto-depend-on-polygene.html">Depend on Polygeneâ¢</a></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-s ervices.html">Services Composites Tutorial</a></span></dt><dt><span class="section"><a href="howto-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><a href="howto-leverage-properties.html">Leverage Properties</a></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><a href="howto-invocation-annotation.html">Use @Invocation</a></span></dt><dt><span class="section"><a href="build-system.html">Polygene⢠Build System</a></span></dt><dt><span class="section"><a href="community-doc s.html">Polygene⢠Documentation</a></span></dt><dt><span class="section"><a href="releasing-apache.html">Releasing Polygeneâ¢</a></span></dt></dl></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="ten-minutes-intro"></a>Polygene⢠in 10 minutes</h3></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Theses tutorials are based on actual code found in the <code class="literal">tutorials/</code> directory of the <a class="ulink" href="https://polygene.apache.org/download.html" target="_top">Polygene⢠SDK sources</a>. You should start your favorite editor and find the code related to -this tutorial, run it and play with it.</p></div><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"> +this tutorial, run it and play with it.</p></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> Polygene⢠does not introduce any new programming language, no additional compilers needed and all your existing tools work just like before. It is pure Java. </li><li class="listitem"> @@ -82,7 +82,7 @@ Fragments are Mixins, Concerns, Constraints and SideEffects. </li><li class="listitem"> Only Mixins carry Composite state. The others are shared between Composite instances. </li></ul></div><p>If you want to reproduce whatâs explained in this tutorial, remember to depend on the Core Runtime artifact that depends -on Core API, Core SPI, and Core Bootstrap:</p><div class="table"><a id="idm229757008544"></a><p class="title"><strong>Table 2. Artifact</strong></p><div class="table-contents"><table summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.apache.polygene.core</p></td><td align="left" valign="top"><p>org.apache.polygene.core.runtime</p></td><td align="left" valign="top"><p>3.1.0-SNAPSHOT</p></td></tr></tbody></table></div></div><br class="table-break" /><p>Moreover, youâll need an EntityStore for persistence and an Indexing engine for querying. Choose among the available +on Core API, Core SPI, and Core Bootstrap:</p><div class="table"><a id="idm681"></a><p class="title"><strong>Table 2. Artifact</strong></p><div class="table-contents"><table class="table" summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.apache.polygene.core</p></td><td align="left" valign="top"><p>org.apache.polygene.core.runtime</p></td><td align="left" valign="top"><p>0</p></td></tr></tbody></table></div></div><br class="table-break" /><p>Moreover, youâll need an EntityStore for persistence and an Indexing engine for querying. Choose among the available implementations listed in the <a class="xref" href="extensions.html" title="Extensions">Extensions</a> section.</p><p>See the <a class="xref" href="howto-depend-on-polygene.html" title="Depend on Polygeneâ¢">Depend on Polygeneâ¢</a> tutorial for details.</p><p>Composition is done with Java interfaces and Annotations. Example;</p><pre class="programlisting brush: java">@Concerns( { PurchaseLimitConcern.class, InventoryConcern.class } ) public interface OrderEntity extends Order, Confirmable, @@ -163,7 +163,7 @@ public interface OrderEntity } </pre><p>The MailService is dependency injected, as we have seen before.</p><p>@This is telling Polygene⢠that the SideEffect needs a reference to the Composite instance that it belongs to.</p><p>By asking for both the HasCustomer and the HasLineItems types, we get type-safety and donât need to bother with casts. In fact, Polygene⢠will ensure that you canât even cast the <code class="literal">hasCustomer</code> instance to the HasLineItems type.</p><p>By not referencing the aggregated interface OrderEntity, we reduce the coupling of this SideEffect and it can be used -in any other Composite where the HasCustomer and HasLineItems combination is used, for instance in an InvoiceEntity.</p><p>So, build the report, send it via the MailService.</p><div class="section" title="Conclusion"><div class="titlepage"><div><div><h4 class="title"><a id="_conclusion"></a>Conclusion</h4></div></div></div><p>In this short introduction, we have covered the essence of Polygeneâ¢. We have looked at what is a Composite, seen some of the +in any other Composite where the HasCustomer and HasLineItems combination is used, for instance in an InvoiceEntity.</p><p>So, build the report, send it via the MailService.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="_conclusion"></a>Conclusion</h4></div></div></div><p>In this short introduction, we have covered the essence of Polygeneâ¢. We have looked at what is a Composite, seen some of the Fragments in action, and how simple it is to turn a Composite into a persisted Composite, known as an EntityComposite.</p><p>Next step, <a class="xref" href="thirty-minutes-intro.html" title="Polygene⢠in 30 minutes">Polygene⢠in 30 minutes</a>.</p></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. <br /><small>