strolch-website/docs/tutorial/configuration/index.html

719 lines
94 KiB
HTML

<!doctype html><html lang=en class="js csstransforms3d"><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=generator content="Hugo 0.80.0"><meta name=description content="Strolch is a parameterized framework for use on servers and IoT"><meta name=author content="Robert von Burg"><link rel=icon href=/favicon.ico type=image/ico><title>Configuration - Strolch</title><link href=/css/nucleus.css?1678977092 rel=stylesheet><link href=/css/fontawesome-all.min.css?1678977092 rel=stylesheet><link href=/css/hybrid.css?1678977092 rel=stylesheet><link href=/css/featherlight.min.css?1678977092 rel=stylesheet><link href=/css/perfect-scrollbar.min.css?1678977092 rel=stylesheet><link href=/css/auto-complete.css?1678977092 rel=stylesheet><link href=/css/atom-one-dark-reasonable.css?1678977092 rel=stylesheet><link href=/css/theme.css?1678977092 rel=stylesheet><link href=/css/hugo-theme.css?1678977092 rel=stylesheet><link href=/css/theme-green.css?1678977092 rel=stylesheet><script src=/js/jquery-3.3.1.min.js?1678977092></script><style>:root #header+#content>#left>#rlblock_left{display:none!important}</style></head><body data-url=/tutorial/configuration/><nav id=sidebar><div id=header-wrapper><div id=header><a id=logo href=/><img src=/logo.png></a></div><div class=searchbox><label for=search-by><i class="fas fa-search"></i></label><input data-search-input id=search-by type=search placeholder=Search...>
<span data-search-clear><i class="fas fa-times"></i></span></div><script type=text/javascript src=/js/lunr.min.js?1678977092></script><script type=text/javascript src=/js/auto-complete.js?1678977092></script><script type=text/javascript>var baseurl="https:\/\/strolch.li\/";</script><script type=text/javascript src=/js/search.js?1678977092></script></div><section id=homelinks><ul><li><a class=padding href=/><i class="fas fa-home"></i>Home</a></li></ul></section><div class=highlightable><ul class=topics><li data-nav-id=/api/ title=API class=dd-item><a href=/api/>API</a></li><li data-nav-id=/documentation/ title=Documentation class=dd-item><a href=/documentation/>Documentation</a><ul><li data-nav-id=/documentation/architecture/ title=Architecture class=dd-item><a href=/documentation/architecture/>Architecture</a></li><li data-nav-id=/documentation/model/ title=Model class=dd-item><a href=/documentation/model/>Model</a></li><li data-nav-id=/documentation/do-and-donts/ title="Do and Don't" class=dd-item><a href=/documentation/do-and-donts/>Do and Don't</a></li><li data-nav-id=/documentation/runtime-configuration/ title="Runtime Configuration" class=dd-item><a href=/documentation/runtime-configuration/>Runtime Configuration</a></li><li data-nav-id=/documentation/realms/ title=Realms class=dd-item><a href=/documentation/realms/>Realms</a></li><li data-nav-id=/documentation/components/ title=Components class=dd-item><a href=/documentation/components/>Components</a></li><li data-nav-id=/documentation/services-and-commands/ title="Services and Commands" class=dd-item><a href=/documentation/services-and-commands/>Services and Commands</a></li><li data-nav-id=/documentation/searches/ title=Searches class=dd-item><a href=/documentation/searches/>Searches</a></li><li data-nav-id=/documentation/queries/ title=Queries class=dd-item><a href=/documentation/queries/>Queries</a></li><li data-nav-id=/documentation/transactions/ title=Transactions class=dd-item><a href=/documentation/transactions/>Transactions</a></li><li data-nav-id=/documentation/policies/ title=Policies class=dd-item><a href=/documentation/policies/>Policies</a></li><li data-nav-id=/documentation/observers/ title=Observers class=dd-item><a href=/documentation/observers/>Observers</a></li><li data-nav-id=/documentation/versioning/ title=Versioning class=dd-item><a href=/documentation/versioning/>Versioning</a></li><li data-nav-id=/documentation/reports/ title=Reports class=dd-item><a href=/documentation/reports/>Reports</a></li><li data-nav-id=/documentation/priviles/ title=Privileges class=dd-item><a href=/documentation/priviles/>Privileges</a></li></ul></li><li data-nav-id=/plc/ title=PLC class=dd-item><a href=/plc/>PLC</a><ul><li data-nav-id=/plc/architecture/ title=Architecture class=dd-item><a href=/plc/architecture/>Architecture</a></li><li data-nav-id=/plc/example-set-up/ title="Example Set-Up" class=dd-item><a href=/plc/example-set-up/>Example Set-Up</a></li></ul></li><li data-nav-id=/tutorial/ title=Tutorial class="dd-item
parent"><a href=/tutorial/>Tutorial</a><ul><li data-nav-id=/tutorial/configuration/ title=Configuration class="dd-item active"><a href=/tutorial/configuration/>Configuration</a></li><li data-nav-id=/tutorial/model/ title=Model class=dd-item><a href=/tutorial/model/>Model</a></li><li data-nav-id=/tutorial/crud-book/ title="CRUD Book" class=dd-item><a href=/tutorial/crud-book/>CRUD Book</a></li></ul></li><li data-nav-id=/download/ title=Download class=dd-item><a href=/download/>Download</a></li><li data-nav-id=/development/ title=Development class=dd-item><a href=/development/>Development</a><ul><li data-nav-id=/development/prerequisites/ title=Prerequisites class=dd-item><a href=/development/prerequisites/>Prerequisites</a></li><li data-nav-id=/development/building/ title="Building Strolch" class=dd-item><a href=/development/building/>Building Strolch</a></li><li data-nav-id=/development/maven-archetypes/ title="Maven Archetypes" class=dd-item><a href=/development/maven-archetypes/>Maven Archetypes</a></li><li data-nav-id=/development/web-app/ title="Web App" class=dd-item><a href=/development/web-app/>Web App</a></li><li data-nav-id=/development/main-class-app/ title="Main Class App" class=dd-item><a href=/development/main-class-app/>Main Class App</a></li><li data-nav-id=/development/converting-existing/ title="Converting Existing App" class=dd-item><a href=/development/converting-existing/>Converting Existing App</a></li></ul></li><li data-nav-id=/blog/ title=Blog class=dd-item><a href=/blog/>Blog</a><ul><li data-nav-id=/blog/post-00018/ title="Strolch PLC 1.2.3 released" class=dd-item><a href=/blog/post-00018/>Strolch PLC 1.2.3 released</a></li><li data-nav-id=/blog/post-00017/ title="Strolch 1.8.5 and PLC 1.2.2 are out" class=dd-item><a href=/blog/post-00017/>Strolch 1.8.5 and PLC 1.2.2 are out</a></li><li data-nav-id=/blog/post-00016/ title="Strolch PLC now also on Maven Central" class=dd-item><a href=/blog/post-00016/>Strolch PLC now also on Maven Central</a></li><li data-nav-id=/blog/post-00015/ title="Release of Strolch 1.6.100" class=dd-item><a href=/blog/post-00015/>Release of Strolch 1.6.100</a></li><li data-nav-id=/blog/post-00014/ title="Strolch Reports" class=dd-item><a href=/blog/post-00014/>Strolch Reports</a></li><li data-nav-id=/blog/post-00013/ title="Strolch Searches" class=dd-item><a href=/blog/post-00013/>Strolch Searches</a></li><li data-nav-id=/blog/post-00012/ title="Wow, the many changes!" class=dd-item><a href=/blog/post-00012/>Wow, the many changes!</a></li><li data-nav-id=/blog/post-00011/ title="Strolch now on Maven Central" class=dd-item><a href=/blog/post-00011/>Strolch now on Maven Central</a></li><li data-nav-id=/blog/post-00010/ title="Versioning of objects" class=dd-item><a href=/blog/post-00010/>Versioning of objects</a></li><li data-nav-id=/blog/post-00009/ title="Release 1.2.0" class=dd-item><a href=/blog/post-00009/>Release 1.2.0</a></li><li data-nav-id=/blog/post-00008/ title="Strolch Update" class=dd-item><a href=/blog/post-00008/>Strolch Update</a></li><li data-nav-id=/blog/post-00007/ title="Activities: Beginning of the planning engine" class=dd-item><a href=/blog/post-00007/>Activities: Beginning of the planning engine</a></li><li data-nav-id=/blog/post-00006/ title="Strolch Documentation" class=dd-item><a href=/blog/post-00006/>Strolch Documentation</a></li><li data-nav-id=/blog/post-00005/ title="Strolch Release 1.0.0" class=dd-item><a href=/blog/post-00005/>Strolch Release 1.0.0</a></li><li data-nav-id=/blog/post-00004/ title="DurationParameter and other minor changes: Release 1.0.0-RC4" class=dd-item><a href=/blog/post-00004/>DurationParameter and other minor changes: Release 1.0.0-RC4</a></li><li data-nav-id=/blog/post-00003/ title="DB Initialization: Release 1.0.0-RC3" class=dd-item><a href=/blog/post-00003/>DB Initialization: Release 1.0.0-RC3</a></li><li data-nav-id=/blog/post-00002/ title="Release 1.0.0-RC2" class=dd-item><a href=/blog/post-00002/>Release 1.0.0-RC2</a></li><li data-nav-id=/blog/post-00001/ title="Release 1.0.0-RC1" class=dd-item><a href=/blog/post-00001/>Release 1.0.0-RC1</a></li></ul></li></ul><section id=shortcuts><h3>More</h3><ul><li><a class=padding href=https://strolch.li/tags><i class="fas fa-tags"></i>Tags</a></li><li><a class=padding href=https://github.com/strolch-li><i class="fab fa-github"></i>GitHub project</a></li><li><a rel=me class=padding href=https://mstdn.gsi.li/@eitch target=_blank><i class="fab fa-mastodon"></i>Mastodon</a></li></ul></section><section id=footer><p>Built with <a href=https://github.com/matcornic/hugo-theme-learn target=_blank><i class="fas fa-heart"></i></a>from <a href=https://getgrav.org target=_blank>Grav</a> and <a href=https://gohugo.io/ target=_blank>Hugo</a></p></section></div></nav><section id=body><div id=overlay></div><div class="padding highlightable"><div><div id=top-bar><div id=top-github-link><a class=github-link title="Edit this page" href=https://github.com/strolch-li/strolch-website/tree/develop/content/tutorial/configuration.md target=blank><i class="fas fa-code-branch"></i><span id=top-github-link-text>Edit this page</span></a></div><div id=breadcrumbs itemscope itemtype=http://data-vocabulary.org/Breadcrumb><span id=sidebar-toggle-span><a href=# id=sidebar-toggle data-sidebar-toggle><i class="fas fa-bars"></i></a></span><span id=toc-menu><i class="fas fa-list-alt"></i></span><span class=links><a href=/>Strolch Overview</a> > <a href=/tutorial/>Tutorial</a> > Configuration</span></div><div class=progress><div class=wrapper><nav id=TableOfContents><ul><li><a href=#configuration>Configuration</a></li></ul></nav></div></div></div></div><div id=head-tags></div><div id=body-inner><h1>Configuration</h1><h2 id=configuration>Configuration</h2><p>Let&rsquo;s start by creating a new Apache Maven project. We&rsquo;ll need a POM with the
proper dependencies. We expect you to be familiar with Apache Maven, so we&rsquo;ll
just show you a working POM file:</p><p><strong>pom.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34;?&gt;</span>
<span style=color:#f92672>&lt;project</span> <span style=color:#a6e22e>xmlns=</span><span style=color:#e6db74>&#34;http://maven.apache.org/POM/4.0.0&#34;</span> <span style=color:#a6e22e>xmlns:xsi=</span><span style=color:#e6db74>&#34;http://www.w3.org/2001/XMLSchema-instance&#34;</span>
<span style=color:#a6e22e>xsi:schemaLocation=</span><span style=color:#e6db74>&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;modelVersion&gt;</span>4.0.0<span style=color:#f92672>&lt;/modelVersion&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>strolch-bookshop<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>0.1.0-SNAPSHOT<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;packaging&gt;</span>war<span style=color:#f92672>&lt;/packaging&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>strolch-bookshop<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;description&gt;</span>Bookshop built on Strolch<span style=color:#f92672>&lt;/description&gt;</span>
<span style=color:#f92672>&lt;inceptionYear&gt;</span>2017<span style=color:#f92672>&lt;/inceptionYear&gt;</span>
<span style=color:#f92672>&lt;properties&gt;</span>
<span style=color:#f92672>&lt;project.build.sourceEncoding&gt;</span>UTF-8<span style=color:#f92672>&lt;/project.build.sourceEncoding&gt;</span>
<span style=color:#f92672>&lt;maven.build.timestamp.format&gt;</span>yyyy-MM-dd HH:mm:ss<span style=color:#f92672>&lt;/maven.build.timestamp.format&gt;</span>
<span style=color:#f92672>&lt;buildTimestamp&gt;</span>${maven.build.timestamp}<span style=color:#f92672>&lt;/buildTimestamp&gt;</span>
<span style=color:#f92672>&lt;jdk.version&gt;</span>1.8<span style=color:#f92672>&lt;/jdk.version&gt;</span>
<span style=color:#f92672>&lt;jersey.version&gt;</span>2.25.1<span style=color:#f92672>&lt;/jersey.version&gt;</span>
<span style=color:#f92672>&lt;slf4j.version&gt;</span>1.7.25<span style=color:#f92672>&lt;/slf4j.version&gt;</span>
<span style=color:#f92672>&lt;logback.version&gt;</span>1.2.3<span style=color:#f92672>&lt;/logback.version&gt;</span>
<span style=color:#f92672>&lt;petitparser.version&gt;</span>2.1.0<span style=color:#f92672>&lt;/petitparser.version&gt;</span>
<span style=color:#f92672>&lt;hikaricp.version&gt;</span>4.0.3<span style=color:#f92672>&lt;/hikaricp.version&gt;</span>
<span style=color:#f92672>&lt;postgresql.version&gt;</span>42.1.4<span style=color:#f92672>&lt;/postgresql.version&gt;</span>
<span style=color:#f92672>&lt;gson.version&gt;</span>2.8.2<span style=color:#f92672>&lt;/gson.version&gt;</span>
<span style=color:#f92672>&lt;annotation.version&gt;</span>1.3.1<span style=color:#f92672>&lt;/annotation.version&gt;</span>
<span style=color:#f92672>&lt;javaxmail.version&gt;</span>1.6.0<span style=color:#f92672>&lt;/javaxmail.version&gt;</span>
<span style=color:#f92672>&lt;serverlet.version&gt;</span>3.1.0<span style=color:#f92672>&lt;/serverlet.version&gt;</span>
<span style=color:#f92672>&lt;jaxrs.api.version&gt;</span>2.1<span style=color:#f92672>&lt;/jaxrs.api.version&gt;</span>
<span style=color:#f92672>&lt;junit.version&gt;</span>4.12<span style=color:#f92672>&lt;/junit.version&gt;</span>
<span style=color:#f92672>&lt;hamcrest.version&gt;</span>1.3<span style=color:#f92672>&lt;/hamcrest.version&gt;</span>
<span style=color:#f92672>&lt;mockito.version&gt;</span>2.0.8-beta<span style=color:#f92672>&lt;/mockito.version&gt;</span>
<span style=color:#f92672>&lt;maven-compiler-plugin.version&gt;</span>3.7.0<span style=color:#f92672>&lt;/maven-compiler-plugin.version&gt;</span>
<span style=color:#f92672>&lt;maven-source-plugin.version&gt;</span>3.0.1<span style=color:#f92672>&lt;/maven-source-plugin.version&gt;</span>
<span style=color:#f92672>&lt;maven-jar-plugin.version&gt;</span>3.0.2<span style=color:#f92672>&lt;/maven-jar-plugin.version&gt;</span>
<span style=color:#f92672>&lt;maven-war-plugin.version&gt;</span>3.1.0<span style=color:#f92672>&lt;/maven-war-plugin.version&gt;</span>
<span style=color:#f92672>&lt;strolch.version&gt;</span>1.8.5<span style=color:#f92672>&lt;/strolch.version&gt;</span>
<span style=color:#f92672>&lt;warFinalName&gt;</span>bookshop<span style=color:#f92672>&lt;/warFinalName&gt;</span>
<span style=color:#f92672>&lt;m2eclipse.wtp.contextRoot&gt;</span>${warFinalName}<span style=color:#f92672>&lt;/m2eclipse.wtp.contextRoot&gt;</span>
<span style=color:#f92672>&lt;/properties&gt;</span>
<span style=color:#f92672>&lt;dependencies&gt;</span>
<span style=color:#75715e>&lt;!-- base --&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.slf4j<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>slf4j-api<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${slf4j.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>ch.qos.logback<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>logback-classic<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${logback.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>runtime<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#75715e>&lt;!-- strolch --&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.utils<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.privilege<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.model<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.agent<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.rest<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.service<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>li.strolch<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>li.strolch.testbase<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${strolch.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>test<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#75715e>&lt;!-- utils --&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>com.google.code.gson<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>gson<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${gson.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#75715e>&lt;!-- web --&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>javax.servlet<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>javax.servlet-api<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${serverlet.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>provided<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>javax.ws.rs<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>javax.ws.rs-api<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${jaxrs.api.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.glassfish.jersey.core<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>jersey-common<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${jersey.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.glassfish.jersey.core<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>jersey-server<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${jersey.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.glassfish.jersey.containers<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>jersey-container-servlet<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${jersey.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#75715e>&lt;!-- testing --&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>junit<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>junit<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${junit.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>test<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.hamcrest<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>hamcrest-core<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${hamcrest.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>test<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;dependency&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.hamcrest<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>hamcrest-library<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${hamcrest.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;scope&gt;</span>test<span style=color:#f92672>&lt;/scope&gt;</span>
<span style=color:#f92672>&lt;/dependency&gt;</span>
<span style=color:#f92672>&lt;/dependencies&gt;</span>
<span style=color:#f92672>&lt;build&gt;</span>
<span style=color:#f92672>&lt;resources&gt;</span>
<span style=color:#75715e>&lt;!-- filter properties files, and copy the rest --&gt;</span>
<span style=color:#f92672>&lt;resource&gt;</span>
<span style=color:#f92672>&lt;directory&gt;</span>src/main/resources<span style=color:#f92672>&lt;/directory&gt;</span>
<span style=color:#f92672>&lt;filtering&gt;</span>true<span style=color:#f92672>&lt;/filtering&gt;</span>
<span style=color:#f92672>&lt;includes&gt;</span>
<span style=color:#f92672>&lt;include&gt;</span>**/*.properties<span style=color:#f92672>&lt;/include&gt;</span>
<span style=color:#f92672>&lt;/includes&gt;</span>
<span style=color:#f92672>&lt;/resource&gt;</span>
<span style=color:#f92672>&lt;resource&gt;</span>
<span style=color:#f92672>&lt;directory&gt;</span>src/main/resources<span style=color:#f92672>&lt;/directory&gt;</span>
<span style=color:#f92672>&lt;filtering&gt;</span>false<span style=color:#f92672>&lt;/filtering&gt;</span>
<span style=color:#f92672>&lt;excludes&gt;</span>
<span style=color:#f92672>&lt;exclude&gt;</span>**/*.properties<span style=color:#f92672>&lt;/exclude&gt;</span>
<span style=color:#f92672>&lt;/excludes&gt;</span>
<span style=color:#f92672>&lt;/resource&gt;</span>
<span style=color:#f92672>&lt;/resources&gt;</span>
<span style=color:#f92672>&lt;plugins&gt;</span>
<span style=color:#f92672>&lt;plugin&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.apache.maven.plugins<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>maven-compiler-plugin<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${maven-compiler-plugin.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;configuration&gt;</span>
<span style=color:#f92672>&lt;source&gt;</span>${jdk.version}<span style=color:#f92672>&lt;/source&gt;</span>
<span style=color:#f92672>&lt;target&gt;</span>${jdk.version}<span style=color:#f92672>&lt;/target&gt;</span>
<span style=color:#f92672>&lt;/configuration&gt;</span>
<span style=color:#f92672>&lt;/plugin&gt;</span>
<span style=color:#f92672>&lt;plugin&gt;</span>
<span style=color:#f92672>&lt;groupId&gt;</span>org.apache.maven.plugins<span style=color:#f92672>&lt;/groupId&gt;</span>
<span style=color:#f92672>&lt;artifactId&gt;</span>maven-war-plugin<span style=color:#f92672>&lt;/artifactId&gt;</span>
<span style=color:#f92672>&lt;version&gt;</span>${maven-war-plugin.version}<span style=color:#f92672>&lt;/version&gt;</span>
<span style=color:#f92672>&lt;configuration&gt;</span>
<span style=color:#f92672>&lt;failOnMissingWebXml&gt;</span>false<span style=color:#f92672>&lt;/failOnMissingWebXml&gt;</span>
<span style=color:#f92672>&lt;warName&gt;</span>${warFinalName}<span style=color:#f92672>&lt;/warName&gt;</span>
<span style=color:#f92672>&lt;/configuration&gt;</span>
<span style=color:#f92672>&lt;/plugin&gt;</span>
<span style=color:#f92672>&lt;/plugins&gt;</span>
<span style=color:#f92672>&lt;/build&gt;</span>
<span style=color:#f92672>&lt;profiles&gt;</span>
<span style=color:#75715e>&lt;!-- active when building on eitch&#39;s machines --&gt;</span>
<span style=color:#f92672>&lt;profile&gt;</span>
<span style=color:#f92672>&lt;id&gt;</span>m2e.eitchpc<span style=color:#f92672>&lt;/id&gt;</span>
<span style=color:#f92672>&lt;activation&gt;</span>
<span style=color:#f92672>&lt;property&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>user.name<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;value&gt;</span>eitch<span style=color:#f92672>&lt;/value&gt;</span>
<span style=color:#f92672>&lt;/property&gt;</span>
<span style=color:#f92672>&lt;os&gt;</span>
<span style=color:#f92672>&lt;family&gt;</span>unix<span style=color:#f92672>&lt;/family&gt;</span>
<span style=color:#f92672>&lt;/os&gt;</span>
<span style=color:#f92672>&lt;/activation&gt;</span>
<span style=color:#f92672>&lt;properties&gt;</span>
<span style=color:#f92672>&lt;strolch.env&gt;</span>dev.eitchpc<span style=color:#f92672>&lt;/strolch.env&gt;</span>
<span style=color:#f92672>&lt;/properties&gt;</span>
<span style=color:#f92672>&lt;/profile&gt;</span>
<span style=color:#f92672>&lt;/profiles&gt;</span>
<span style=color:#f92672>&lt;/project&gt;</span>
</code></pre></div><p>Now we need the rest of the directory structure:</p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text>../strolch-bookshop/
- src/main/java/
- li/strolch/bookshop/
- &lt;!-- java classes --&gt;
- src/main/resources/
- ENV.properties
- appVersion.properties
- logback.xml
- src/main/webapp/WEB-INF/
- StrolchBootstrap.xml
- runtime
- config/
- PrivilegeConfig.xml
- PrivilegeRoles.xml
- PrivilegeUsers.xml
- StrolchConfiguration.xml
- StrolchPolicies.xml
- data/
- StrolchModel.xsd
- defaultModel.xml
- templates.xml
- temp/
</code></pre></div><p>A few notes to the resource files:</p><ul><li>The <code>ENV.properties</code> file is filtered by maven and the environment to load is
written in it using the environment variable strolch.env.</li><li>The <code>appVersion.properties</code> file is also filtered by maven and allows to reflect
on the version of this app at runtime.</li><li>The <code>logback.xml</code> file configures logging using SLF4j and Logback.</li></ul><p>The <code>StrolchBootstrap.xml</code> file is used to configure Strolch&rsquo;s environment and
root directory. For a webapp it can be annoying to store Strolch&rsquo;s configuration
inside the webapp, which is why we can define an absolute path where the
configuration is kept. In the following example we keep it in the root of the
sources:</p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
<span style=color:#f92672>&lt;StrolchBootstrap&gt;</span>
<span style=color:#f92672>&lt;env</span> <span style=color:#a6e22e>id=</span><span style=color:#e6db74>&#34;dev.eitchpc&#34;</span> <span style=color:#a6e22e>default=</span><span style=color:#e6db74>&#34;true&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;root&gt;</span>/home/eitch/src/git/strolch-bookshop/runtime<span style=color:#f92672>&lt;/root&gt;</span>
<span style=color:#f92672>&lt;environment&gt;</span>dev<span style=color:#f92672>&lt;/environment&gt;</span>
<span style=color:#f92672>&lt;/env&gt;</span>
<span style=color:#f92672>&lt;/StrolchBootstrap&gt;</span>
</code></pre></div><p>Here we define two environments, but the both redefine the environment to dev.
This is because we want this app to start on two different machines with
different user home directories. See the profiles in the POM as to how these
environments are activated using a environment property strolch.env.</p><p>In this next step we&rsquo;ll create Strolch&rsquo;s configuration at the location we
defined in the StrolchBootstrap.xml file. Strolch&rsquo;s configuration contains of
three directories: config, data and temp. config contains static files which
usually aren&rsquo;t changed, data contains model files in XML format and temp is used
at runtime for any temporary files, e.g. storing active sessions.</p><p>The configuration as well as the model has been described on Strolch&rsquo;s
documentation web page, we&rsquo;ll just provide you with the files for the bookshop:</p><p><strong>PrivilegeConfig.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
<span style=color:#f92672>&lt;Privilege&gt;</span>
<span style=color:#f92672>&lt;Container&gt;</span>
<span style=color:#f92672>&lt;Parameters&gt;</span>
<span style=color:#75715e>&lt;!-- parameters for the container itself --&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;secretKey&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;45f251ce-d51f-4624-990a-8dcd5b181f0e&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;secretSalt&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;4770a32d-1512-4891-9a63-362504932500&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;persistSessions&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;true&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;autoPersistOnUserChangesData&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;false&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;privilegeConflictResolution&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;MERGE&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Parameters&gt;</span>
<span style=color:#f92672>&lt;EncryptionHandler</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.handler.DefaultEncryptionHandler&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Parameters&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;hashAlgorithm&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;PBKDF2WithHmacSHA512&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;hashIterations&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;10000&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;hashKeyLength&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;256&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Parameters&gt;</span>
<span style=color:#f92672>&lt;/EncryptionHandler&gt;</span>
<span style=color:#f92672>&lt;PersistenceHandler</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.handler.XmlPersistenceHandler&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Parameters&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;usersXmlFile&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;PrivilegeUsers.xml&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Parameter</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;rolesXmlFile&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;PrivilegeRoles.xml&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Parameters&gt;</span>
<span style=color:#f92672>&lt;/PersistenceHandler&gt;</span>
<span style=color:#f92672>&lt;UserChallengeHandler</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.handler.MailUserChallengeHandler&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;/UserChallengeHandler&gt;</span>
<span style=color:#f92672>&lt;/Container&gt;</span>
<span style=color:#f92672>&lt;Policies&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.policy.DefaultPrivilege&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RoleAccessPrivilege&#34;</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.policy.RoleAccessPrivilege&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.policy.UserAccessPrivilege&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UserSessionAccessPrivilege&#34;</span> <span style=color:#a6e22e>class=</span><span style=color:#e6db74>&#34;li.strolch.privilege.policy.UsernameFromCertificatePrivilege&#34;</span><span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Policies&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
</code></pre></div><p><strong>PrivilegeRoles.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
<span style=color:#f92672>&lt;Roles&gt;</span>
<span style=color:#f92672>&lt;Role</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;User&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.service.api.Service&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.search.StrolchSearch&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>li.strolch.bookshop.search.BookSearch<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;Role</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UserPrivileges&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeSetUserLocale&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeSetUserPassword&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#75715e>&lt;!--
</span><span style=color:#75715e> Internal
</span><span style=color:#75715e> --&gt;</span>
<span style=color:#f92672>&lt;Role</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;StrolchAdmin&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.service.api.Service&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.search.StrolchSearch&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeAddUser&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeSetUserPassword&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;Role</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;agent&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.privilege.handler.SystemAction&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>li.strolch.runtime.privilege.StrolchSystemAction<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>li.strolch.runtime.privilege.StrolchSystemActionWithResult<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>li.strolch.persistence.postgresql.PostgreSqlSchemaInitializer<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.service.api.Service&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.model.query.StrolchQuery&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;li.strolch.search.StrolchSearch&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;GetActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;AddActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;UpdateActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveResource&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveOrder&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;RemoveActivity&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;ModelPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeAction&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;DefaultPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>Persist<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>PersistSessions<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;Allow&gt;</span>GetCertificates<span style=color:#f92672>&lt;/Allow&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeAddUser&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeModifyUser&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;Privilege</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;PrivilegeGetUser&#34;</span> <span style=color:#a6e22e>policy=</span><span style=color:#e6db74>&#34;UserAccessPrivilege&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;AllAllowed&gt;</span>true<span style=color:#f92672>&lt;/AllAllowed&gt;</span>
<span style=color:#f92672>&lt;/Privilege&gt;</span>
<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;/Roles&gt;</span>
</code></pre></div><p><strong>PrivilegeUsers.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
<span style=color:#f92672>&lt;Users&gt;</span>
<span style=color:#f92672>&lt;User</span> <span style=color:#a6e22e>userId=</span><span style=color:#e6db74>&#34;U10&#34;</span> <span style=color:#a6e22e>username=</span><span style=color:#e6db74>&#34;jill&#34;</span> <span style=color:#a6e22e>password=</span><span style=color:#e6db74>&#34;8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Firstname&gt;</span>Jill<span style=color:#f92672>&lt;/Firstname&gt;</span>
<span style=color:#f92672>&lt;Lastname&gt;</span>Someone<span style=color:#f92672>&lt;/Lastname&gt;</span>
<span style=color:#f92672>&lt;State&gt;</span>ENABLED<span style=color:#f92672>&lt;/State&gt;</span>
<span style=color:#f92672>&lt;Locale&gt;</span>en-GB<span style=color:#f92672>&lt;/Locale&gt;</span>
<span style=color:#f92672>&lt;Roles&gt;</span>
<span style=color:#f92672>&lt;Role&gt;</span>User<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;Role&gt;</span>UserPrivileges<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;/Roles&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;Property</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;email&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;eitch+jill@eitchnet.ch&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/User&gt;</span>
<span style=color:#f92672>&lt;User</span> <span style=color:#a6e22e>userId=</span><span style=color:#e6db74>&#34;U01&#34;</span> <span style=color:#a6e22e>username=</span><span style=color:#e6db74>&#34;admin&#34;</span> <span style=color:#a6e22e>password=</span><span style=color:#e6db74>&#34;8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Firstname&gt;</span>Jill<span style=color:#f92672>&lt;/Firstname&gt;</span>
<span style=color:#f92672>&lt;Lastname&gt;</span>Someone<span style=color:#f92672>&lt;/Lastname&gt;</span>
<span style=color:#f92672>&lt;State&gt;</span>ENABLED<span style=color:#f92672>&lt;/State&gt;</span>
<span style=color:#f92672>&lt;Locale&gt;</span>en-GB<span style=color:#f92672>&lt;/Locale&gt;</span>
<span style=color:#f92672>&lt;Roles&gt;</span>
<span style=color:#f92672>&lt;Role&gt;</span>StrolchAdmin<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;Role&gt;</span>UserPrivileges<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;/Roles&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;Property</span> <span style=color:#a6e22e>name=</span><span style=color:#e6db74>&#34;email&#34;</span> <span style=color:#a6e22e>value=</span><span style=color:#e6db74>&#34;eitch+admin@eitchnet.ch&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/User&gt;</span>
<span style=color:#75715e>&lt;!--
</span><span style=color:#75715e> Internal
</span><span style=color:#75715e> --&gt;</span>
<span style=color:#f92672>&lt;User</span> <span style=color:#a6e22e>userId=</span><span style=color:#e6db74>&#34;S01&#34;</span> <span style=color:#a6e22e>username=</span><span style=color:#e6db74>&#34;agent&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;State&gt;</span>SYSTEM<span style=color:#f92672>&lt;/State&gt;</span>
<span style=color:#f92672>&lt;Roles&gt;</span>
<span style=color:#f92672>&lt;Role&gt;</span>agent<span style=color:#f92672>&lt;/Role&gt;</span>
<span style=color:#f92672>&lt;/Roles&gt;</span>
<span style=color:#f92672>&lt;/User&gt;</span>
<span style=color:#f92672>&lt;/Users&gt;</span>
</code></pre></div><p><strong>StrolchConfiguration.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#75715e>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
<span style=color:#f92672>&lt;StrolchConfiguration&gt;</span>
<span style=color:#f92672>&lt;env</span> <span style=color:#a6e22e>id=</span><span style=color:#e6db74>&#34;global&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Runtime&gt;</span>
<span style=color:#f92672>&lt;applicationName&gt;</span>Bookshop<span style=color:#f92672>&lt;/applicationName&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;locale&gt;</span>en<span style=color:#f92672>&lt;/locale&gt;</span>
<span style=color:#f92672>&lt;verbose&gt;</span>true<span style=color:#f92672>&lt;/verbose&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Runtime&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>PrivilegeHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.runtime.privilege.PrivilegeHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.runtime.privilege.DefaultStrolchPrivilegeHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;privilegeConfigFile&gt;</span>PrivilegeConfig.xml<span style=color:#f92672>&lt;/privilegeConfigFile&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>RealmHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.agent.api.RealmHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.agent.impl.DefaultRealmHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>PrivilegeHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;realms&gt;</span>defaultRealm<span style=color:#f92672>&lt;/realms&gt;</span>
<span style=color:#f92672>&lt;dataStoreMode&gt;</span>TRANSIENT<span style=color:#f92672>&lt;/dataStoreMode&gt;</span>
<span style=color:#f92672>&lt;dataStoreFile&gt;</span>defaultModel.xml<span style=color:#f92672>&lt;/dataStoreFile&gt;</span>
<span style=color:#f92672>&lt;enableObserverUpdates&gt;</span>true<span style=color:#f92672>&lt;/enableObserverUpdates&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>ServiceHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.service.api.ServiceHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.service.api.DefaultServiceHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>RealmHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>PrivilegeHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;verbose&gt;</span>true<span style=color:#f92672>&lt;/verbose&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>PolicyHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.policy.PolicyHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.policy.DefaultPolicyHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;readPolicyFile&gt;</span>true<span style=color:#f92672>&lt;/readPolicyFile&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>ExecutionHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.execution.ExecutionHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.execution.EventBasedExecutionHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>RealmHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>PrivilegeHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>RestfulHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.rest.RestfulStrolchComponent<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.rest.RestfulStrolchComponent<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>SessionHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;secureCookie&gt;</span>false<span style=color:#f92672>&lt;/secureCookie&gt;</span>
<span style=color:#f92672>&lt;restLogging&gt;</span>false<span style=color:#f92672>&lt;/restLogging&gt;</span>
<span style=color:#f92672>&lt;restLoggingEntity&gt;</span>false<span style=color:#f92672>&lt;/restLoggingEntity&gt;</span>
<span style=color:#f92672>&lt;restTracing&gt;</span>ALL<span style=color:#f92672>&lt;/restTracing&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>SessionHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.rest.StrolchSessionHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.rest.DefaultStrolchSessionHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;depends&gt;</span>PrivilegeHandler<span style=color:#f92672>&lt;/depends&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;session.ttl.minutes&gt;</span>30<span style=color:#f92672>&lt;/session.ttl.minutes&gt;</span>
<span style=color:#f92672>&lt;session.reload&gt;</span>true<span style=color:#f92672>&lt;/session.reload&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;Component&gt;</span>
<span style=color:#f92672>&lt;name&gt;</span>MailHandler<span style=color:#f92672>&lt;/name&gt;</span>
<span style=color:#f92672>&lt;api&gt;</span>li.strolch.handler.mail.MailHandler<span style=color:#f92672>&lt;/api&gt;</span>
<span style=color:#f92672>&lt;impl&gt;</span>li.strolch.handler.mail.SmtpMailHandler<span style=color:#f92672>&lt;/impl&gt;</span>
<span style=color:#f92672>&lt;Properties&gt;</span>
<span style=color:#f92672>&lt;fromAddr&gt;</span>relayer@eitchnet.ch<span style=color:#f92672>&lt;/fromAddr&gt;</span>
<span style=color:#f92672>&lt;fromName&gt;</span>Susi<span style=color:#f92672>&lt;/fromName&gt;</span>
<span style=color:#f92672>&lt;overrideRecipients&gt;</span><span style=color:#75715e>&lt;![CDATA[IPSC Test &lt;eitch@eitchnet.ch&gt;]]&gt;</span><span style=color:#f92672>&lt;/overrideRecipients&gt;</span>
<span style=color:#f92672>&lt;recipientWhitelist&gt;</span>eitch@eitchnet.ch<span style=color:#f92672>&lt;/recipientWhitelist&gt;</span>
<span style=color:#f92672>&lt;username&gt;</span>test<span style=color:#f92672>&lt;/username&gt;</span>
<span style=color:#f92672>&lt;password&gt;</span>test<span style=color:#f92672>&lt;/password&gt;</span>
<span style=color:#f92672>&lt;auth&gt;</span>true<span style=color:#f92672>&lt;/auth&gt;</span>
<span style=color:#f92672>&lt;startTls&gt;</span>true<span style=color:#f92672>&lt;/startTls&gt;</span>
<span style=color:#f92672>&lt;host&gt;</span>smtp.gmail.com<span style=color:#f92672>&lt;/host&gt;</span>
<span style=color:#f92672>&lt;port&gt;</span>587<span style=color:#f92672>&lt;/port&gt;</span>
<span style=color:#f92672>&lt;/Properties&gt;</span>
<span style=color:#f92672>&lt;/Component&gt;</span>
<span style=color:#f92672>&lt;/env&gt;</span>
<span style=color:#f92672>&lt;env</span> <span style=color:#a6e22e>id=</span><span style=color:#e6db74>&#34;dev&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#75715e>&lt;!-- overrides go here --&gt;</span>
<span style=color:#f92672>&lt;/env&gt;</span>
<span style=color:#f92672>&lt;/StrolchConfiguration&gt;</span>
</code></pre></div><p><strong>StrolchPolicies.xml</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=color:#f92672>&lt;StrolchPolicies&gt;</span>
<span style=color:#f92672>&lt;PolicyType</span> <span style=color:#a6e22e>Type=</span><span style=color:#e6db74>&#34;ExecutionPolicy&#34;</span> <span style=color:#a6e22e>Api=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ExecutionPolicy&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>Key=</span><span style=color:#e6db74>&#34;DurationExecution&#34;</span> <span style=color:#a6e22e>Class=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.DurationExecution&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>Key=</span><span style=color:#e6db74>&#34;ReservationExection&#34;</span> <span style=color:#a6e22e>Class=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ReservationExecution&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/PolicyType&gt;</span>
<span style=color:#f92672>&lt;PolicyType</span> <span style=color:#a6e22e>Type=</span><span style=color:#e6db74>&#34;ConfirmationPolicy&#34;</span> <span style=color:#a6e22e>Api=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ConfirmationPolicy&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>Key=</span><span style=color:#e6db74>&#34;DefaultConfirmation&#34;</span> <span style=color:#a6e22e>Class=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ConfirmationPolicy&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/PolicyType&gt;</span>
<span style=color:#f92672>&lt;PolicyType</span> <span style=color:#a6e22e>Type=</span><span style=color:#e6db74>&#34;ActivityArchivalPolicy&#34;</span> <span style=color:#a6e22e>Api=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ActivityArchivalPolicy&#34;</span><span style=color:#f92672>&gt;</span>
<span style=color:#f92672>&lt;Policy</span> <span style=color:#a6e22e>Key=</span><span style=color:#e6db74>&#34;DefaultActivityArchival&#34;</span> <span style=color:#a6e22e>Class=</span><span style=color:#e6db74>&#34;li.strolch.execution.policy.ActivityArchivalPolicy&#34;</span> <span style=color:#f92672>/&gt;</span>
<span style=color:#f92672>&lt;/PolicyType&gt;</span>
<span style=color:#f92672>&lt;/StrolchPolicies&gt;</span>
</code></pre></div><p>A few notes on the configuration:</p><ul><li><p>Note how there are three users. Jill is a user with currently no privileges as
it&rsquo;s role definition is empty. Admin can do everything, and the agent user is
a system user which can also do everything.</p></li><li><p>There is one realm defined in the <code>RealmHandler</code> component which references
the
<code>defaultModel.xml</code> file in the <code>data</code> directory. This file then includes the
currently still empty <code>templates.xml</code> file.</p></li><li><p>We have defined a <code>global</code> environment, but are using the <code>dev</code> environment.
The dev environment includes the definitions in the global environment.</p></li><li><p>In <code>PrivilegeConfig.xml</code> we have enabled persistence of sessions, so you will
be needing the unlimited JCE libraries for your JVM.</p><p>When you restart the server, you don&rsquo;t need to log back in, if your session is
still alive.</p></li><li><p>In <code>PrivilegeRoles.xml</code> there seems to be a lot of boilerplate. One thing about
a highly configurable system is that sometimes the configuration is bigger. In
this case we have opted to have the configuration shown and not use default
values which you don&rsquo;t see, so that privilege access is clearly seen.</p></li></ul><p>Your project is now ready to be imported into your favourite IDE. We have used
both IntelliJ and Eclipse so this is up to you.</p><p>Now that we have a configuration, it is time to have Strolch started when the
WAR is deployed and started. In your IDE create a new class as follows:</p><p><strong>StartupListener.java</strong></p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=color:#f92672>package</span> li.strolch.bookshop.web<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> javax.servlet.ServletContextEvent<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> javax.servlet.ServletContextListener<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> javax.servlet.annotation.WebListener<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> java.io.InputStream<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> li.strolch.agent.api.StrolchAgent<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> li.strolch.agent.api.StrolchBootstrapper<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> li.strolch.utils.helper.StringHelper<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> org.slf4j.Logger<span style=color:#f92672>;</span>
<span style=color:#f92672>import</span> org.slf4j.LoggerFactory<span style=color:#f92672>;</span>
<span style=color:#a6e22e>@WebListener</span>
<span style=color:#66d9ef>public</span> <span style=color:#66d9ef>class</span> <span style=color:#a6e22e>StartupListener</span> <span style=color:#66d9ef>implements</span> ServletContextListener <span style=color:#f92672>{</span>
<span style=color:#66d9ef>private</span> <span style=color:#66d9ef>static</span> <span style=color:#66d9ef>final</span> Logger logger <span style=color:#f92672>=</span> LoggerFactory<span style=color:#f92672>.</span><span style=color:#a6e22e>getLogger</span><span style=color:#f92672>(</span>StartupListener<span style=color:#f92672>.</span><span style=color:#a6e22e>class</span><span style=color:#f92672>);</span>
<span style=color:#66d9ef>private</span> <span style=color:#66d9ef>static</span> <span style=color:#66d9ef>final</span> String APP_NAME <span style=color:#f92672>=</span> <span style=color:#e6db74>&#34;Bookshop&#34;</span><span style=color:#f92672>;</span>
<span style=color:#66d9ef>private</span> StrolchAgent agent<span style=color:#f92672>;</span>
<span style=color:#a6e22e>@Override</span>
<span style=color:#66d9ef>public</span> <span style=color:#66d9ef>void</span> <span style=color:#a6e22e>contextInitialized</span><span style=color:#f92672>(</span>ServletContextEvent sce<span style=color:#f92672>)</span> <span style=color:#f92672>{</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>info</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Starting &#34;</span> <span style=color:#f92672>+</span> APP_NAME <span style=color:#f92672>+</span> <span style=color:#e6db74>&#34;...&#34;</span><span style=color:#f92672>);</span>
<span style=color:#66d9ef>long</span> start <span style=color:#f92672>=</span> System<span style=color:#f92672>.</span><span style=color:#a6e22e>currentTimeMillis</span><span style=color:#f92672>();</span>
<span style=color:#66d9ef>try</span> <span style=color:#f92672>{</span>
String boostrapFileName <span style=color:#f92672>=</span> <span style=color:#e6db74>&#34;/WEB-INF/&#34;</span> <span style=color:#f92672>+</span> StrolchBootstrapper<span style=color:#f92672>.</span><span style=color:#a6e22e>FILE_BOOTSTRAP</span><span style=color:#f92672>;</span>
InputStream bootstrapFile <span style=color:#f92672>=</span> sce<span style=color:#f92672>.</span><span style=color:#a6e22e>getServletContext</span><span style=color:#f92672>().</span><span style=color:#a6e22e>getResourceAsStream</span><span style=color:#f92672>(</span>boostrapFileName<span style=color:#f92672>);</span>
StrolchBootstrapper bootstrapper <span style=color:#f92672>=</span> <span style=color:#66d9ef>new</span> StrolchBootstrapper<span style=color:#f92672>(</span>StartupListener<span style=color:#f92672>.</span><span style=color:#a6e22e>class</span><span style=color:#f92672>);</span>
<span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span> <span style=color:#f92672>=</span> bootstrapper<span style=color:#f92672>.</span><span style=color:#a6e22e>setupByBoostrapFile</span><span style=color:#f92672>(</span>StartupListener<span style=color:#f92672>.</span><span style=color:#a6e22e>class</span><span style=color:#f92672>,</span> bootstrapFile<span style=color:#f92672>);</span>
<span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span><span style=color:#f92672>.</span><span style=color:#a6e22e>initialize</span><span style=color:#f92672>();</span>
<span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span><span style=color:#f92672>.</span><span style=color:#a6e22e>start</span><span style=color:#f92672>();</span>
<span style=color:#f92672>}</span> <span style=color:#66d9ef>catch</span> <span style=color:#f92672>(</span>Throwable e<span style=color:#f92672>)</span> <span style=color:#f92672>{</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>error</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Failed to start &#34;</span> <span style=color:#f92672>+</span> APP_NAME <span style=color:#f92672>+</span> <span style=color:#e6db74>&#34; due to: &#34;</span> <span style=color:#f92672>+</span> e<span style=color:#f92672>.</span><span style=color:#a6e22e>getMessage</span><span style=color:#f92672>(),</span> e<span style=color:#f92672>);</span>
<span style=color:#66d9ef>throw</span> e<span style=color:#f92672>;</span>
<span style=color:#f92672>}</span>
<span style=color:#66d9ef>long</span> took <span style=color:#f92672>=</span> System<span style=color:#f92672>.</span><span style=color:#a6e22e>currentTimeMillis</span><span style=color:#f92672>()</span> <span style=color:#f92672>-</span> start<span style=color:#f92672>;</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>info</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Started &#34;</span> <span style=color:#f92672>+</span> APP_NAME <span style=color:#f92672>+</span> <span style=color:#e6db74>&#34; in &#34;</span> <span style=color:#f92672>+</span> <span style=color:#f92672>(</span>StringHelper<span style=color:#f92672>.</span><span style=color:#a6e22e>formatMillisecondsDuration</span><span style=color:#f92672>(</span>took<span style=color:#f92672>)));</span>
<span style=color:#f92672>}</span>
<span style=color:#a6e22e>@Override</span>
<span style=color:#66d9ef>public</span> <span style=color:#66d9ef>void</span> <span style=color:#a6e22e>contextDestroyed</span><span style=color:#f92672>(</span>ServletContextEvent sce<span style=color:#f92672>)</span> <span style=color:#f92672>{</span>
<span style=color:#66d9ef>if</span> <span style=color:#f92672>(</span><span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span> <span style=color:#f92672>!=</span> <span style=color:#66d9ef>null</span><span style=color:#f92672>)</span> <span style=color:#f92672>{</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>info</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Destroying &#34;</span> <span style=color:#f92672>+</span> APP_NAME <span style=color:#f92672>+</span> <span style=color:#e6db74>&#34;...&#34;</span><span style=color:#f92672>);</span>
<span style=color:#66d9ef>try</span> <span style=color:#f92672>{</span>
<span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span><span style=color:#f92672>.</span><span style=color:#a6e22e>stop</span><span style=color:#f92672>();</span>
<span style=color:#66d9ef>this</span><span style=color:#f92672>.</span><span style=color:#a6e22e>agent</span><span style=color:#f92672>.</span><span style=color:#a6e22e>destroy</span><span style=color:#f92672>();</span>
<span style=color:#f92672>}</span> <span style=color:#66d9ef>catch</span> <span style=color:#f92672>(</span>Throwable e<span style=color:#f92672>)</span> <span style=color:#f92672>{</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>error</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Failed to stop &#34;</span> <span style=color:#f92672>+</span> APP_NAME <span style=color:#f92672>+</span> <span style=color:#e6db74>&#34; due to: &#34;</span> <span style=color:#f92672>+</span> e<span style=color:#f92672>.</span><span style=color:#a6e22e>getMessage</span><span style=color:#f92672>(),</span> e<span style=color:#f92672>);</span>
<span style=color:#66d9ef>throw</span> e<span style=color:#f92672>;</span>
<span style=color:#f92672>}</span>
<span style=color:#f92672>}</span>
logger<span style=color:#f92672>.</span><span style=color:#a6e22e>info</span><span style=color:#f92672>(</span><span style=color:#e6db74>&#34;Destroyed &#34;</span> <span style=color:#f92672>+</span> APP_NAME<span style=color:#f92672>);</span>
<span style=color:#f92672>}</span>
<span style=color:#f92672>}</span>
</code></pre></div><p>Now configure your IDE to start the web project, and then once it has started,
you should see the following in the logs:</p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text>Bookshop:dev All 8 Strolch Components started. Took 44ms. Strolch is now ready to be used. Have fun =))
</code></pre></div><p>This log tells us the name of the app as defined in the StrolchConfiguration.xml
file as well as which environment was loaded. Further we can see that 8
components were configured and started.</p><p>This concludes the initial setup of a new Strolch project. We can now go ahead
and start building the business logic.</p><footer class=footline></footer></div></div><div id=navigation><a class="nav nav-prev" href=/tutorial/ title=Tutorial><i class="fa fa-chevron-left"></i></a><a class="nav nav-next" href=/tutorial/model/ title=Model style=margin-right:0><i class="fa fa-chevron-right"></i></a></div></section><div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px><div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div></div><script src=/js/clipboard.min.js?1678977092></script><script src=/js/perfect-scrollbar.min.js?1678977092></script><script src=/js/perfect-scrollbar.jquery.min.js?1678977092></script><script src=/js/jquery.sticky.js?1678977092></script><script src=/js/featherlight.min.js?1678977092></script><script src=/js/highlight.pack.js?1678977092></script><script>hljs.initHighlightingOnLoad();</script><script src=/js/modernizr.custom-3.6.0.js?1678977092></script><script src=/js/learn.js?1678977092></script><script src=/js/hugo-learn.js?1678977092></script><script src=/mermaid/mermaid.js?1678977092></script><script>mermaid.initialize({startOnLoad:true});</script><script type=text/javascript>var _paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]);_paq.push(["setCookieDomain","*.strolch.li"]);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);(function(){var u="https://piwik.eitchnet.ch/";_paq.push(['setTrackerUrl',u+'matomo.php']);_paq.push(['setSiteId','2']);var d=document,g=d.createElement('script'),s=d.getElementsByTagName('script')[0];g.type='text/javascript';g.async=true;g.src=u+'matomo.js';s.parentNode.insertBefore(g,s);})();</script></body></html>