[Project] Website cleanup

This commit is contained in:
Robert von Burg 2016-09-16 11:29:01 +02:00
parent 2fe9f74be8
commit 691722f835
14 changed files with 246 additions and 323 deletions

View File

@ -77,7 +77,7 @@
number of <i>Parameters</i> on it. Accessing these objects is always done by their IDs. Strolch root number of <i>Parameters</i> on it. Accessing these objects is always done by their IDs. Strolch root
elements are always stored in the respective <i>ElementMaps</i> in their Strolch realm. Thus accessing a elements are always stored in the respective <i>ElementMaps</i> in their Strolch realm. Thus accessing a
certain parameter from a <i>Resource</i> would look like this:</p> certain parameter from a <i>Resource</i> would look like this:</p>
<pre class="pre"> <pre class="pre">
try (StrolchTransaction tx = openTx(realmName)) { try (StrolchTransaction tx = openTx(realmName)) {
Resource resource = tx.getResourceBy("TestType", "MyTestResource"); Resource resource = tx.getResourceBy("TestType", "MyTestResource");
DateParameter dateP = resource.getParameter("@bag01", "@param6"); DateParameter dateP = resource.getParameter("@bag01", "@param6");
@ -86,7 +86,7 @@ try (StrolchTransaction tx = openTx(realmName)) {
}</pre> }</pre>
XML Presentation of Strolch's top level elements of <i>Resources</i>: XML Presentation of Strolch's top level elements of <i>Resources</i>:
<pre class="pre-scrollable"> <pre class="pre-scrollable">
&lt;!-- Resource instance --&gt; &lt;!-- Resource instance --&gt;
&lt;Resource Id="MyTestResource" Name="Test Name" Type="TestType"&gt; &lt;Resource Id="MyTestResource" Name="Test Name" Type="TestType"&gt;
&lt;ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag"&gt; &lt;ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag"&gt;
@ -217,7 +217,7 @@ try (StrolchTransaction tx = openTx(realmName)) {
<p>Strolch Realms are also responsible for opening Transactions, as these are bound to the persistence layer <p>Strolch Realms are also responsible for opening Transactions, as these are bound to the persistence layer
configured for this realm. At runtime, a realm is then accessed from the ComponentContainer:</p> configured for this realm. At runtime, a realm is then accessed from the ComponentContainer:</p>
<pre class="pre-scrollable"> <pre class="pre-scrollable">
ComponentContainer container = getAgent().getContainer(); ComponentContainer container = getAgent().getContainer();
StrolchRealm realm = container.getRealm(StrolchConstants.DEFAULT_REALM); StrolchRealm realm = container.getRealm(StrolchConstants.DEFAULT_REALM);
try(StrolchTransaction tx = realm.openTx()) { try(StrolchTransaction tx = realm.openTx()) {
@ -244,7 +244,7 @@ try(StrolchTransaction tx = realm.openTx()) {
lock the relevant Strolch elements before execution.</p> lock the relevant Strolch elements before execution.</p>
<p>A typical Service and Command implementation would look as follows:</p> <p>A typical Service and Command implementation would look as follows:</p>
<pre class="pre-scrollable"> <pre class="pre-scrollable">
public class SetParameterService extends AbstractService&lt;SetParameterArg, ServiceResult&gt; { public class SetParameterService extends AbstractService&lt;SetParameterArg, ServiceResult&gt; {
public static final long serialVersionUID = 1L; public static final long serialVersionUID = 1L;
@ -304,7 +304,7 @@ public class SetParameterService extends AbstractService&lt;SetParameterArg, Ser
} }
</pre> </pre>
<pre class="pre-scrollable"> <pre class="pre-scrollable">
public class SetParameterCommand extends Command { public class SetParameterCommand extends Command {
// input fields // input fields
@ -440,16 +440,6 @@ public class SetParameterCommand extends Command {
<h3>Meta projects</h3> <h3>Meta projects</h3>
<ul> <ul>
<li><a href="https://github.com/eitchnet/strolch/tree/master/li.strolch.dev">li.strolch.dev</a>
<p>To quickly get started developing Strolch, this projects provides scripts to checkout all the
relevant projects and implements a Maven module so that building this projects builds all Strolch
projects.</p>
</li>
<li><a href="https://github.com/eitchnet/strolch/tree/master/li.strolch.parent">li.strolch.parent</a>
<p>A Maven parent project for the Strolch projects to synchronize the maven project structure</p>
</li>
<li><a href="https://github.com/eitchnet/strolch/tree/master/li.strolch.bom">li.strolch.bom</a> <li><a href="https://github.com/eitchnet/strolch/tree/master/li.strolch.bom">li.strolch.bom</a>
<p>This bill of material is a Maven project which, when imported in one's own Strolch project, pulls in <p>This bill of material is a Maven project which, when imported in one's own Strolch project, pulls in
@ -480,6 +470,14 @@ public class SetParameterCommand extends Command {
<p>A tutorial application which showcases how to setup Strolch as a standalone Java Webapp which can be <p>A tutorial application which showcases how to setup Strolch as a standalone Java Webapp which can be
deployed to a servlet container e.g. Apache Tomcat 8.</p> deployed to a servlet container e.g. Apache Tomcat 8.</p>
</li> </li>
<li><a href="https://github.com/eitchnet/strolch/tree/develop/strolch_minimal">strolch_minimal</a>
<p>A minimal project to get started with strolch.</p>
</li>
<li><a href="https://github.com/eitchnet/strolch/tree/develop/strolch_minimal_rest">strolch_minimal_rest</a>
<p>A minimal project to get started using REST with Strolch.</p>
</li>
</ul> </ul>
<h2>Development</h2> <h2>Development</h2>

View File

@ -184,24 +184,22 @@
<code>Resource</code> objects representing machines, human resources, etc., and <code>Resource</code> objects representing machines, human resources, etc., and
<code>Activity</code>/<code>Action</code> hierarchies defining a workflow.</p> <code>Activity</code>/<code>Action</code> hierarchies defining a workflow.</p>
<p>With the latest couple of commits to Strolch we have now added Activities and a basic <p>With the latest couple of commits to Strolch we have now added Activities and a basic planning of
planning of Actions onto Resources. Activities have an Actions onto Resources. Activities have an ordered list of <code>IActivityElement</code> which
ordered list of <code>IActivityElement</code> which allows creating an arbitrary deep tree structure allows creating an arbitrary deep tree structure of Activity and Action elements.</p>
of Activity and Action elements.</p>
<p>Action objects have a list of <code>IValueChange</code> objects which define the start, <p>Action objects have a list of <code>IValueChange</code> objects which define the start, end and
end and further value changes over time on a referenced Resource. Thus planning an further value changes over time on a referenced Resource. Thus planning an Activity is done by
Activity is done by iterating the Activity hierarchy and for every Action iterating the Activity hierarchy and for every Action selecting a relevant Resource and then then
selecting a relevant Resource and then then applying the changes of the applying the changes of the Action on to the referenced <code>TimeState</code> on the Resource.</p>
Action on to the referenced <code>TimeState</code> on the Resource.</p>
<p>This implementation is currently very simple as it ignores all constraints which a <p>This implementation is currently very simple as it ignores all constraints which a Resource might
Resource might have. In further development we shall implement a <code>Violation</code> have. In further development we shall implement a <code>Violation</code> model so that UIs can be
model so that UIs can be built to visualize the over-use of Resources.</p> built to visualize the over-use of Resources.</p>
<p>In even further steps we would then start implementing algorithms to not just apply the changes onto <p>In even further steps we would then start implementing algorithms to not just apply the changes onto
a Resource, but to actually search the Resource for time slots when the a Resource, but to actually search the Resource for time slots when the value changes would not
value changes would not violate any constraints applied to the resource.</p> violate any constraints applied to the resource.</p>
<p>We are very much looking forward to these new features. Stay tuned for your updates - even though <p>We are very much looking forward to these new features. Stay tuned for your updates - even though
they do take their time to arrive =).</p> they do take their time to arrive =).</p>

View File

@ -1,107 +1,114 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="CPhbjooaiTdROm7Vs4E7kuHZvBfkeLUtonGgcVUbTL8" /> <meta name="google-site-verification" content="CPhbjooaiTdROm7Vs4E7kuHZvBfkeLUtonGgcVUbTL8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<link rel="shortcut icon" href="ico/favicon.ico"> <link rel="shortcut icon" href="ico/favicon.ico">
<title>Strolch: Development</title> <title>Strolch: Development</title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="css/custom.css" rel="stylesheet"> <link href="css/custom.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --><!--[if lt IE 9]>
<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]-->
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> </head>
<![endif]--> <body>
</head> <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<body> <div class="container">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="navbar-header">
<div class="container"> <a class="navbar-brand" href="index.html">Strolch</a>
<div class="navbar-header">
<a class="navbar-brand" href="index.html">Strolch</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Overview</a></li>
<li><a href="api.html">API</a></li>
<li><a href="documentation.html">Documentation</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li class="active"><a href="development.html">Development</a></li>
<li><a href="blog.html">Blog</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div> </div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Overview</a></li>
<li><a href="api.html">API</a></li>
<li><a href="documentation.html">Documentation</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li class="active"><a href="development.html">Development</a></li>
<li><a href="blog.html">Blog</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container"> <div class="container">
<div class="page-header"> <div class="page-header">
<h1 class="page-title">Development</h1> <h1 class="page-title">Development</h1>
<p class="lead page-description">This page describes how to setup the development environment.</p> <p class="lead page-description">This page describes how to setup the development environment.</p>
</div> </div>
<div class="content"> <div class="content">
<h2>Prerequisites</h2> <h2>Prerequisites</h2>
To start developing Strolch you need an installed: To start developing Strolch you need an installed:
<ul> <ul>
<li>Java JDK 8</li> <li>Java JDK 8</li>
<li>Apache Maven 3</li> <li>Apache Maven 3</li>
</ul> </ul>
<h2>Getting Started</h2> <h2>Getting Started</h2>
<p>Setting up Strolch is just a few lines:</p> <p>Setting up Strolch is just a few lines:</p>
<pre class="pre"> <pre class="pre">
git clone https://github.com/eitchnet/strolch.git git clone https://github.com/eitchnet/strolch.git
cd strolch cd strolch
mvn clean install -DskipTests</pre> mvn clean install -DskipTests</pre>
<p><b>Note:</b> If you want to run the tests, then either install a PostgreSQL DB and configure the users as is required by the project, or remove the project from the li.strolch.dev module build, otherwise the build will fail =))</p> <p><b>Note:</b> To run the tests you will need to configure the PostgreSQL Databases. See the README in the
module.</p>
<p>After running the Maven build, you will have a full build of all Strolch projects. Now you can start modifying the projects, and add your own features, or, far more interesting, start developing your projects using the Strolch agent.</p> <p>After running the Maven build, you will have a full build of all Strolch projects. Now you can start
modifying the projects, and add your own features, or, far more interesting, start developing your projects
using the Strolch agent.</p>
<h2>Strolch Project Configuration</h2> <h2>Strolch Project Configuration</h2>
<p>To use Strolch in your own projects, look at the two tutorial apps on how they are configured. You can also simply copy the projects, modify the Maven POMs and remove what ever you do not need.</p> <p>To use Strolch in your own projects, look at the two tutorial apps on how they are configured. You can also
simply copy the projects, modify the Maven POMs and remove what ever you do not need.</p>
<p>The following sections describe the Strolch configuration files and folder structure.</p> <p>The following sections describe the Strolch configuration files and folder structure.</p>
<p>You can download minimal project structures here:</p> <p>You can also use the minimal project structures:</p>
<ul>
<li><a href="https://github.com/eitchnet/strolch/tree/develop/strolch_minimal">strolch_minimal</a></li>
<li><a href="https://github.com/eitchnet/strolch/tree/develop/strolch_minimal_rest">strolch_minimal_rest</a>
</li>
</ul>
<h3>Project Structure</h3>
<p>Strolch requires two main directories under the Strolch root:</p>
<ul>
<li>../config/ &rarr; contains the Strolch runtime configuration
<ul> <ul>
<li><a href="files/strolch_app.tar.gz">strolch_app.tar.gz</a></li> <li>StrolchConfiguration.xml &rarr; Main Strolch configuration file. There you configure the
<li><a href="files/strolch_webapp.tar.gz">strolch_webapp.tar.gz</a></li> different realms, environments etc.
</ul>
<h3>Project Structure</h3>
<p>Strolch requires two main directories under the Strolch root:</p>
<ul>
<li>../config/ &rarr; contains the Strolch runtime configuration
<ul>
<li>StrolchConfiguration.xml &rarr; Main Strolch configuration file. There you configure the different realms, environments etc. </li>
<li>PrivilegeConfig.xml &rarr; Configuration of the Privilege library</li>
<li>PrivilegeModel.xml &rarr; Configuration file with the differen users, roles and privileges</li>
</ul>
</li> </li>
<li>../data/ &rarr; contains the Strolch model and any other data which is modified at runtime. <li>PrivilegeConfig.xml &rarr; Configuration of the Privilege library</li>
<ul> <li>PrivilegeModel.xml &rarr; Configuration file with the differen users, roles and privileges</li>
<li>StrolchModel.xml &rarr; main model file which is read when Strolch is in <i>TRANSIENT</i> mode.</li> </ul>
</ul> </li>
<li>../data/ &rarr; contains the Strolch model and any other data which is modified at runtime.
<ul>
<li>StrolchModel.xml &rarr; main model file which is read when Strolch is in <i>TRANSIENT</i> mode.
</li> </li>
</ul> </ul>
</li>
</ul>
<h3>Maven POM</h3> <h3>Maven POM</h3>
<p>Strolch is built using Maven, so here we show the minimum Maven POM.</p> <p>Strolch is built using Maven, so here we show the minimum Maven POM.</p>
<h4>Simple Java App POM</h4> <h4>Simple Java App POM</h4>
<p>This POM creates a compressed file which contains a runnable Strolch instance. Just unpack and run the <i>startup.sh</i> script.</p> <p>This POM creates a compressed file which contains a runnable Strolch instance. Just unpack and run the <i>startup.sh</i>
<pre class="pre-scrollable"> script.</p>
<pre class="pre-scrollable">
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &lt;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/xsd/maven-4.0.0.xsd"&gt; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
@ -116,7 +123,7 @@ mvn clean install -DskipTests</pre>
&lt;groupId&gt;org.example&lt;/groupId&gt; &lt;groupId&gt;org.example&lt;/groupId&gt;
&lt;artifactId&gt;org.example.strolch.app&lt;/artifactId&gt; &lt;artifactId&gt;org.example.strolch.app&lt;/artifactId&gt;
&lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt; &lt;version&gt;1.2.3&lt;/version&gt;
&lt;name&gt;org.example.strolch.app&lt;/name&gt; &lt;name&gt;org.example.strolch.app&lt;/name&gt;
&lt;scm&gt; &lt;scm&gt;
@ -257,15 +264,15 @@ mvn clean install -DskipTests</pre>
&lt;/build&gt; &lt;/build&gt;
&lt;/project&gt;</pre> &lt;/project&gt;</pre>
<h4>Webapp POM</h4> <h4>Webapp POM</h4>
<p>This creates a simple WAR which starts Strolch after deployed to a servlet container.</p> <p>This creates a simple WAR which starts Strolch after deployed to a servlet container.</p>
<pre class="pre-scrollable"> <pre class="pre-scrollable">
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &lt;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"&gt; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
&lt;properties&gt; &lt;properties&gt;
&lt;strolch.version&gt;1.0.0-SNAPSHOT&lt;/strolch.version&gt; &lt;strolch.version&gt;1.2.3&lt;/strolch.version&gt;
&lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
&lt;warFinalName&gt;strolch_webapp&lt;/warFinalName&gt; &lt;warFinalName&gt;strolch_webapp&lt;/warFinalName&gt;
&lt;m2eclipse.wtp.contextRoot&gt;${warFinalName}&lt;/m2eclipse.wtp.contextRoot&gt; &lt;m2eclipse.wtp.contextRoot&gt;${warFinalName}&lt;/m2eclipse.wtp.contextRoot&gt;
@ -430,48 +437,59 @@ mvn clean install -DskipTests</pre>
&lt;/profiles&gt; &lt;/profiles&gt;
&lt;/project&gt;</pre> &lt;/project&gt;</pre>
<p>Happy coding =))</p> <p>Happy coding =))</p>
<!-- content here --> <!-- content here -->
<h3>Tools used</h3> <h3>Tools used</h3>
The following tools are used to develop Strolch and Strolch-based projects: The following tools are used to develop Strolch and Strolch-based projects:
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="https://www.eclipse.org/downloads/"><img style="height: 50px" class="img-thumbnail" src="https://www.eclipse.org/downloads/packages/sites/all/themes/solstice/_themes/solstice_packages/logo.png" alt="Eclipse Luna JEE version" /></a></li> <li><a href="https://www.eclipse.org/downloads/"><img style="height: 50px" class="img-thumbnail"
<li><a href="https://maven.apache.org/"><img width="250" style="height: 50px; margin-top: 10px" class="img-thumbnail" src="http://maven.apache.org/images/maventxt_logo_200.gif" alt="Apache Maven 3.0" /></a></li> src="https://www.eclipse.org/downloads/packages/sites/all/themes/solstice/_themes/solstice_packages/logo.png"
<li><a href="http://git-scm.com/"><img style="height: 50px; margin-top: 10px" class="img-thumbnail" src="http://git-scm.com/images/logo@2x.png" alt="git scm" /></a></li> alt="Eclipse Luna JEE version"/></a></li>
</ul> <li><a href="https://maven.apache.org/"><img width="250" style="height: 50px; margin-top: 10px"
class="img-thumbnail"
src="http://maven.apache.org/images/maventxt_logo_200.gif"
alt="Apache Maven 3.0"/></a></li>
<li><a href="http://git-scm.com/"><img style="height: 50px; margin-top: 10px" class="img-thumbnail"
src="http://git-scm.com/images/logo@2x.png" alt="git scm"/></a></li>
</ul>
</div><!-- /.content --> </div><!-- /.content -->
<div id="footer"> <div id="footer">
<div class="container"> <div class="container">
<p class="text-muted">&copy; Strolch / <a href="mailto:eitch@eitchnet.ch">Robert von Burg</a> / Hosting by <a href="http://www.eitchnet.ch">eitchnet.ch</a></p> <p class="text-muted">&copy; Strolch / <a href="mailto:eitch@eitchnet.ch">Robert von Burg</a> / Hosting by
</div> <a href="http://www.eitchnet.ch">eitchnet.ch</a></p>
</div> </div>
</div>
</div><!-- /.container --> </div><!-- /.container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script> <script src="js/bootstrap.min.js"></script>
<!-- Piwik --> <!-- Piwik -->
<script type="text/javascript"> <script type="text/javascript">
var _paq = _paq || []; var _paq = _paq || [];
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function () {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.eitchnet.ch/"; var u = (("https:" == document.location.protocol) ? "https" : "http") + "://piwik.eitchnet.ch/";
_paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', 2]); _paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.type = 'text/javascript';
})(); g.defer = true;
</script> g.async = true;
<noscript><p><img src="http://piwik.eitchnet.ch/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript> g.src = u + 'piwik.js';
<!-- End Piwik Code --> s.parentNode.insertBefore(g, s);
})();
</script>
<noscript><p><img src="http://piwik.eitchnet.ch/piwik.php?idsite=2" style="border:0;" alt=""/></p></noscript>
<!-- End Piwik Code -->
</body> </body>
</html> </html>

View File

@ -53,8 +53,7 @@
<p>A Strolch agent can be easily extended with arbitrary components. An agent is basically a container for <p>A Strolch agent can be easily extended with arbitrary components. An agent is basically a container for
classes extending <code>StrolchComponent</code>. Theses classes mostly implement an interface which classes extending <code>StrolchComponent</code>. Theses classes mostly implement an interface which
describes the describes the operations that are supported by the component.</p>
operations that are supported by the component.</p>
<p>The following represents a list of the most used components:</p> <p>The following represents a list of the most used components:</p>
<ul> <ul>
@ -80,8 +79,8 @@
these threads and also allows the component to be started again. The destroy step destroys the instance and these threads and also allows the component to be started again. The destroy step destroys the instance and
makes it unusable anymore, i.e. shutdown of the agent.</p> makes it unusable anymore, i.e. shutdown of the agent.</p>
<p>Each component has its own configuration parameters. A component is registered in the <p>Each component has its own configuration parameters. A component is registered in the <code>StrolchConfiguration.xml</code>
<code>StrolchConfiguration.xml</code> file with a</p> file with a</p>
<ul> <ul>
<li>name</li> <li>name</li>
<li>api class name</li> <li>api class name</li>

View File

@ -84,7 +84,7 @@
<p><b>Note</b> how the PlanningPolicy has a value of <code>key:SimplePlanning</code> and the ExecutionPolicy <p><b>Note</b> how the PlanningPolicy has a value of <code>key:SimplePlanning</code> and the ExecutionPolicy
defines a reference to an actual class.</p> defines a reference to an actual class.</p>
<br /> <br/>
<p>To use the PolicyHandler, it must be configured in the StrolchConfiguration.xml as follows:</p> <p>To use the PolicyHandler, it must be configured in the StrolchConfiguration.xml as follows:</p>
<pre> <pre>
&lt;Component> &lt;Component>
@ -97,7 +97,7 @@
&lt;/Properties&gt; &lt;/Properties&gt;
&lt;/Component&gt;</pre> &lt;/Component&gt;</pre>
<br /> <br/>
<p>And this policy handler implementation requires a file where the lookups for the policies is defined, <p>And this policy handler implementation requires a file where the lookups for the policies is defined,
e.g.:</p> e.g.:</p>
<pre> <pre>
@ -113,7 +113,7 @@
&lt;/StrolchPolicies&gt;</pre> &lt;/StrolchPolicies&gt;</pre>
<br /> <br/>
<p>Now at runtime we can access the policies:</p> <p>Now at runtime we can access the policies:</p>
<pre> <pre>
PolicyHandler policyHandler = getComponent(PolicyHandler.class); PolicyHandler policyHandler = getComponent(PolicyHandler.class);

View File

@ -53,22 +53,19 @@
<p>As is custom for every framework, querying the model must be possible. Strolch queries are implemented using <p>As is custom for every framework, querying the model must be possible. Strolch queries are implemented using
the <code>StrolchQuery</code> interface and one of its concrete implementations: <code>ResourceQuery</code>, the <code>StrolchQuery</code> interface and one of its concrete implementations: <code>ResourceQuery</code>,
<code>OrderQuery</code>, <code>OrderQuery</code>, <code>ActivityQuery</code>.</p>
<code>ActivityQuery</code>.</p>
<p>A Strolch element always has two identifiers: <code>Type</code> and <code>Id</code>. The type is important as <p>A Strolch element always has two identifiers: <code>Type</code> and <code>Id</code>. The type is important as
it classifies an element. it classifies an element. So if a car and a house would be modelled in Strolch, then those would both be a
So if a car and a house would be modelled in Strolch, then those would both be a <code>Resource</code>, but <code>Resource</code>, but one of type <code>Car</code> and the other of type <code>House</code>. Both would
one of type have different parameters.</p>
<code>Car</code> and the other of type <code>House</code>. Both would have different parameters.</p>
<p>Thus one of the inputs for every query is it's type, which is defined as the navigation. It is said that we <p>Thus one of the inputs for every query is it's type, which is defined as the navigation. It is said that we
navigate to the Cars, or Houses. Thus when instantiating a ResourceQuery, pass the navigation to the type of navigate to the Cars, or Houses. Thus when instantiating a ResourceQuery, pass the navigation to the type of
Resource as well. Same applies for Orders and Activities.</p> Resource as well. Same applies for Orders and Activities.</p>
<p>Further input for a StrolchQuery are the selections. These selections get translated into RDBMS <p>Further input for a StrolchQuery are the selections. These selections get translated into RDBMS
<code>WHERE</code> <code>WHERE</code> clauses. Selections support boolean operations thus allowing for complex querying.</p>
clauses. Selections support boolean operations thus allowing for complex querying.</p>
<p>StrolchQueries also support Ordering and object transformation. Following classes provide the most used <p>StrolchQueries also support Ordering and object transformation. Following classes provide the most used
scenarios:</p> scenarios:</p>

View File

@ -51,42 +51,35 @@
<div class="content"> <div class="content">
<p>Realms implement multi-tenant capabilities. A Strolch agent can have an arbitrary number of realms <p>Realms implement multi-tenant capabilities. A Strolch agent can have an arbitrary number of realms configured
configured and each realm has its own persistence configuration, allowing to separate mandates and each realm has its own persistence configuration, allowing to separate mandates completely.</p>
completely.</p>
A realm can run in one of the following modes: A realm can run in one of the following modes:
<ul> <ul>
<li>EMPTY <br/> <li>EMPTY <br/> This is a transient data store mode, where no model changes are persisted - they are only
This is a transient data store mode, where no model changes are persisted - they are only kept in kept in memory. When the Strolch agent is started, this realm is empty as no data is loaded.
memory. When the Strolch agent is started, this realm is empty as no data is loaded.
</li> </li>
<li>TRANSIENT <br/> <li>TRANSIENT <br/> This is the same as EMPTY, but with the difference that when the Strolch agent is
This is the same as EMPTY, but with the difference that when the Strolch agent is started, a model file started, a model file is parsed and the in-memory realm is populated with the elements parsed from the
is parsed and the in-memory realm is populated with the elements parsed from the model file. model file.
</li> </li>
<li>CACHED <br/> <li>CACHED <br/> In this mode, all data is stored in-memory, and any changes made are written back to the
In this mode, all data is stored in-memory, and any changes made are written back to the persistence persistence layer. This allows for fast in-memory qeuries, but makes sure no data is lost when the agent
layer. This allows for fast in-memory qeuries, but makes sure no data is lost when the agent is is restarted.
restarted.
</li> </li>
<li>TRANSACTIONAL <br/> <li>TRANSACTIONAL <br/> In this mode no data is kept in-memory and every query, and element retrieval is
In this mode no data is kept in-memory and every query, and element retrieval is passed to the passed to the persistence layer to be retrieved from the underlying database. This is similar to typical
persistence layer to be retrieved from the underlying database. This is similar to typical Java Java applications where JPA is used.
applications where JPA is used.
</li> </li>
</ul> </ul>
<p>Realms are mostly hidden from a developer as a <code>StrolchTransaction</code> exposes all important <p>Realms are mostly hidden from a developer as a <code>StrolchTransaction</code> exposes all important
operations needed to operations needed to access Strolch objects. A developer will however need to configure the realms for their
access Strolch objects. A developer will however need to configure the realms for their specific project. If specific project. If the project only requires one realm, then the <code>defaultRealm</code> can be used,
the project only requires one realm, then the <code>defaultRealm</code> can be used, where the developer where the developer only is required to configure the mode and any relevant model file.</p>
only is
required to configure the mode and any relevant model file.</p>
<p>If the mode is CACHED or TRANSACTIONAL, then the <code>PersistenceHandler</code> component is required to be <p>If the mode is CACHED or TRANSACTIONAL, then the <code>PersistenceHandler</code> component is required to be
configured, configured, so that the DAOs know how to access the underlying database.</p>
so that the DAOs know how to access the underlying database.</p>
<p>The configuration in the <code>StrolchConfiguration.xml</code> file is as follows:</p> <p>The configuration in the <code>StrolchConfiguration.xml</code> file is as follows:</p>
@ -112,10 +105,8 @@
</pre> </pre>
<p>A multi-realm configuration would be as follows. Note how the <code>defaultRealm</code> is still enabled, and <p>A multi-realm configuration would be as follows. Note how the <code>defaultRealm</code> is still enabled, and
has its has its configuration as before. Further the PostgreSQL <code>PersistenceHandler</code> is configured to
configuration as before. Further the PostgreSQL <code>PersistenceHandler</code> is configured to show how show how the realms are connected to the persistence handler:</p>
the realms are
connected to the persistence handler:</p>
<pre> <pre>
&lt;StrolchConfiguration&gt; &lt;StrolchConfiguration&gt;
@ -161,8 +152,8 @@
&lt;/StrolchConfiguration&gt; &lt;/StrolchConfiguration&gt;
</pre> </pre>
<p>Accessing a realm is done in multiple ways. Important is to note, that a user should use the <p>Accessing a realm is done in multiple ways. Important is to note, that a user should use the <code>StrolchTransaction</code>
<code>StrolchTransaction</code> object, instead of accessing the Realm directly.</p> object, instead of accessing the Realm directly.</p>
<p>Opening a transaction is done from a <code>Service</code> by calling one of the <code>openTx()</code>-methods. <p>Opening a transaction is done from a <code>Service</code> by calling one of the <code>openTx()</code>-methods.
Nevertheless, the realm can be accessed as follows:</p> Nevertheless, the realm can be accessed as follows:</p>

View File

@ -53,19 +53,16 @@
<p><code>Services</code> are written to implement a specific use-case. <code>Commands</code> are written to <p><code>Services</code> are written to implement a specific use-case. <code>Commands</code> are written to
implemente re-usable parts of a use-case. The use-case can be abstract e.g. <code>AddResourceService</code> implemente re-usable parts of a use-case. The use-case can be abstract e.g. <code>AddResourceService</code>
or very specific e.g. or very specific e.g. <code>CreatePatientService</code>.</p>
<code>CreatePatientService</code>.</p>
<p>Should the use-case be re-usable in different scenarios, then commands should implement the logic, and the <p>Should the use-case be re-usable in different scenarios, then commands should implement the logic, and the
services should then execute the commands. E.g. The <code>CreatePatientService</code> would use a services should then execute the commands. E.g. The <code>CreatePatientService</code> would use a <code>CreatePatientResourceCommand</code>
<code>CreatePatientResourceCommand</code> and then use an <code>AddResourceCommand</code> in a single and then use an <code>AddResourceCommand</code> in a single transaction, so that the task of creating the
transaction, so that the task of actual Patient Resource can be re-used somewhere else.</p>
creating the actual Patient Resource can be re-used somewhere else.</p>
<p>Services extend the abstract class <code>AbstractService</code> and then implement the method <p>Services extend the abstract class <code>AbstractService</code> and then implement the method <code>internalDoService(ServiceArgument)</code>.
<code>internalDoService(ServiceArgument)</code>. AbstractService defines generic template arguments with AbstractService defines generic template arguments with which the concrete service can define a specific
which the input ServiceArgument class and output ServiceResult class.</p>
concrete service can define a specific input ServiceArgument class and output ServiceResult class.</p>
<p>The AbstractService class has multiple helper methods:</p> <p>The AbstractService class has multiple helper methods:</p>
<ul> <ul>
@ -77,8 +74,7 @@
<p>Commands extend the <code>Command</code> class and then implement the method <code>doCommand()</code>. <p>Commands extend the <code>Command</code> class and then implement the method <code>doCommand()</code>.
Commands have helper Commands have helper methods:</p>
methods:</p>
<ul> <ul>
<li><code>tx()</code> - to get the current transaction</li> <li><code>tx()</code> - to get the current transaction</li>
<li><code>getPolicy()</code> - to retrieve a policy instance</li> <li><code>getPolicy()</code> - to retrieve a policy instance</li>

View File

@ -53,8 +53,8 @@
<p>Strolch Transactions play a central role in a Strolch agent. A transaction is opened for a realm, and grants <p>Strolch Transactions play a central role in a Strolch agent. A transaction is opened for a realm, and grants
access to the model of the agent. Transactions are implemented as a Java <code>try-with-resources</code> by access to the model of the agent. Transactions are implemented as a Java <code>try-with-resources</code> by
implementing implementing the <code>AutoCloseable</code> interface. This makes it trivial to understand the scope of a
the <code>AutoCloseable</code> interface. This makes it trivial to understand the scope of a transaction. transaction.
</p> </p>
<p>Transactions handle the following:</p> <p>Transactions handle the following:</p>
@ -69,8 +69,7 @@
<p>When a transaction is opened, it is by default read-only, i.e. does not perform any commands when it is <p>When a transaction is opened, it is by default read-only, i.e. does not perform any commands when it is
closed. Should the TX perform commands, then it is important to call <code>tx.commitOnClose()</code>, but closed. Should the TX perform commands, then it is important to call <code>tx.commitOnClose()</code>, but
only at the end only at the end of the work, so that exception handling can properly work if something goes wrong.</p>
of the work, so that exception handling can properly work if something goes wrong.</p>
<p><code>StrolchTransaction</code> offers a myriad of methods:</p> <p><code>StrolchTransaction</code> offers a myriad of methods:</p>
<ul> <ul>

View File

@ -52,9 +52,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12"><p>The following downloads are releases of Strolch, but remember that it is always <div class="col-xs-12"><p>The following downloads are releases of Strolch, but remember that it is always
possible (and fairly easily) possible (and fairly easily) to re-build the artifacts on your own by following the easy steps on the <a
to re-build the artifacts on your own by following the easy steps on the <a href="development.html">development</a> href="development.html">development</a> page</p></div>
page</p></div>
</div> </div>
<div class="row"> <div class="row">

View File

@ -62,9 +62,9 @@
used to implement applications with multiple users/customers for instance in SaaS environments.</p> used to implement applications with multiple users/customers for instance in SaaS environments.</p>
<p>The parameterized data model consists of three top level objects, Resources, Orders and Activities. These <p>The parameterized data model consists of three top level objects, Resources, Orders and Activities. These
objects can have any number of ParameterBags which in turn can have any number of Parameters on them. objects can have any number of ParameterBags which in turn can have any number of Parameters on them. This
This allows for a very dynamic modelling of data structures including modification at run time. Multiple allows for a very dynamic modelling of data structures including modification at run time. Multiple ready to
ready to use Parameter types are already implemented which handle the primitive types in Java including use Parameter types are already implemented which handle the primitive types in Java including
ListParameters for collections of these primitive types.</p> ListParameters for collections of these primitive types.</p>
<p>One of the main features of the Strolch agent, is that persistence is handled transparently and the user must <p>One of the main features of the Strolch agent, is that persistence is handled transparently and the user must
@ -137,20 +137,32 @@
<p>Strolch strives to use as few external dependencies as possible, so that the Strolch runtime is not bloated <p>Strolch strives to use as few external dependencies as possible, so that the Strolch runtime is not bloated
unnecessarily. The following list of Strolch dependencies is a summary and was created using mvn unnecessarily. The following list of Strolch dependencies is a summary and was created using mvn
dependency:tree on the li.strolch.dev project on the 2014-09-18.</p> dependency:tree on the strolch_minimal project on the 2016-09-16.</p>
<h4>Basic runtime dependencies</h4> <h4>Basic runtime dependencies</h4>
<ul> <ul>
<li>org.postgresql:postgresql:jar:9.3-1100-jdbc41:compile
<p>Implements the PostgreSQL Persistence layer used by li.strolch.persistence.postgresql</p></li>
<li>commons-cli:commons-cli:jar:1.2:compile <li>commons-cli:commons-cli:jar:1.2:compile
<p>Implements the command line parameter parsing when starting from a main class</p></li> <p>Implements the command line parameter parsing when starting from a main class</p></li>
<li>junit:junit:jar:4.11:compile
<p>Testing facilities</p></li> <li>org.postgresql:postgresql:jar:9.4.1208.jre7:compile
<li>org.slf4j:slf4j-api:jar:1.7.2:compile <p>Implements the PostgreSQL Persistence layer used by li.strolch.persistence.postgresql</p></li>
<p>Logging facilities API</p></li> <li>com.zaxxer:HikariCP:jar:2.3.6:compile
<p>Implements connection pooling for JDBC access</p></li>
<li>com.google.code.gson:gson:jar:2.3.1:compile
<p>Used to transform to JSON</p></li>
<li>javax.activation:activation:jar:1.1:compile
<p>Used when sending e-mails</p></li>
<li>javax.mail:mail:jar:1.5.0-b01:compile
<p>Used when sending e-mails</p></li>
<li>log4j:log4j:jar:1.2.17:runtime <li>log4j:log4j:jar:1.2.17:runtime
<p>Logging facilities Implementation</p></li> <p>Used for logging</p></li>
<li>org.slf4j:slf4j-api:jar:1.7.2:compile
<p>Used for logging</p></li>
<li>org.slf4j:slf4j-log4j12:jar:1.7.2:runtime
<p>Used for logging</p></li>
</ul> </ul>
@ -159,7 +171,7 @@
<p>If you want to access Strolch using the RESTful API, then we got you covered - but sadly RESTful service <p>If you want to access Strolch using the RESTful API, then we got you covered - but sadly RESTful service
development requires quite a few extra dependencies:</p> development requires quite a few extra dependencies:</p>
<ul> <ul>
<li>com.google.guava:guava:jar:14.0.1:compile</li> <li>com.github.petitparser.java-petitparser:petitparser-core:jar:2.0.2:compile</li>
<li>javax.annotation:javax.annotation-api:jar:1.2:compile</li> <li>javax.annotation:javax.annotation-api:jar:1.2:compile</li>
<li>javax.servlet:javax.servlet-api:jar:3.0.1:provided</li> <li>javax.servlet:javax.servlet-api:jar:3.0.1:provided</li>
<li>javax.validation:validation-api:jar:1.1.0.Final:compile</li> <li>javax.validation:validation-api:jar:1.1.0.Final:compile</li>
@ -168,20 +180,21 @@
<li>org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.0:compile</li> <li>org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.0:compile</li>
<li>org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.0:compile</li> <li>org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.0:compile</li>
<li>org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.5.0:compile</li> <li>org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.5.0:compile</li>
<li>org.glassfish.hk2.external:asm-all-repackaged:jar:2.2.0-b21:compile</li> <li>org.glassfish.hk2.external:aopalliance-repackaged:jar:2.3.0-b05:compile</li>
<li>org.glassfish.hk2.external:cglib:jar:2.2.0-b21:compile</li> <li>org.glassfish.hk2.external:javax.inject:jar:2.3.0-b05:compile</li>
<li>org.glassfish.hk2.external:javax.inject:jar:2.2.0-b21:compile</li> <li>org.glassfish.hk2:hk2-api:jar:2.3.0-b05:compile</li>
<li>org.glassfish.hk2:hk2-api:jar:2.2.0-b21:compile</li> <li>org.glassfish.hk2:hk2-locator:jar:2.3.0-b05:compile</li>
<li>org.glassfish.hk2:hk2-locator:jar:2.2.0-b21:compile</li> <li>org.glassfish.hk2:hk2-utils:jar:2.3.0-b05:compile</li>
<li>org.glassfish.hk2:hk2-utils:jar:2.2.0-b21:compile</li>
<li>org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile</li> <li>org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile</li>
<li>org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.5.1:compile</li> <li>org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.11:compile</li>
<li>org.glassfish.jersey.containers:jersey-container-servlet:jar:2.5.1:compile</li> <li>org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.11:compile</li>
<li>org.glassfish.jersey.core:jersey-client:jar:2.5.1:compile</li> <li>org.glassfish.jersey.containers:jersey-container-servlet:jar:2.11:compile</li>
<li>org.glassfish.jersey.core:jersey-common:jar:2.5.1:compile</li> <li>org.glassfish.jersey.core:jersey-client:jar:2.11:compile</li>
<li>org.glassfish.jersey.core:jersey-server:jar:2.5.1:compile</li> <li>org.glassfish.jersey.core:jersey-common:jar:2.11:compile</li>
<li>org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.5.1:compile</li> <li>org.glassfish.jersey.core:jersey-server:jar:2.11:compile</li>
<li>org.glassfish.jersey.media:jersey-media-moxy:jar:2.5.1:compile</li> <li>org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.11:compile</li>
<li>org.glassfish.jersey.media:jersey-media-moxy:jar:2.11:compile</li>
<li>org.javassist:javassist:jar:3.18.1-GA:compile</li>
</ul> </ul>
<h4>API</h4> <h4>API</h4>

View File

@ -1,85 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="CPhbjooaiTdROm7Vs4E7kuHZvBfkeLUtonGgcVUbTL8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="ico/favicon.ico">
<title>Strolch: XXXXX</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/custom.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">Strolch</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Overview</a></li>
<li><a href="api.html">API</a></li>
<li><a href="documentation.html">Documentation</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li><a href="development.html">Development</a></li>
<li><a href="blog.html">Blog</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<div class="content">
<h1>Bla bla</h1>
<p class="lead">This page describes ...</p>
<!-- content here -->
</div><!-- /.content -->
<div id="footer">
<div class="container">
<p class="text-muted">&copy; Strolch / <a href="mailto:eitch@eitchnet.ch">Robert von Burg</a> / Hosting by <a href="http://www.eitchnet.ch">eitchnet.ch</a></p>
</div>
</div>
</div><!-- /.container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.eitchnet.ch/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="http://piwik.eitchnet.ch/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
</body>
</html>