parallel ip - initial checkin
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/.project b/.project
new file mode 100644
index 0000000..811566e
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.abstractstatemachine.aggregator</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/epl-v10.html b/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/jenkins.build.config.xml b/jenkins.build.config.xml
new file mode 100644
index 0000000..9c0ca5f
--- /dev/null
+++ b/jenkins.build.config.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Loetz GmbH&Co.KG - initial API and implementation -->
+<!--#======================================================================= -->
+<!--# Module specific parameters for the Jenkins Job -->
+<!--#======================================================================= -->
+<jenkins>
+ <!-- DO NOT EDIT BELOW THIS LINE -->
+ <jenkins.build.dependencies>
+ <jenkins.build.dependency>org.eclipse.osbp.dsl</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ecview.core</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.preferences</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ui.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.utils.ui</jenkins.build.dependency>
+ </jenkins.build.dependencies>
+</jenkins>
diff --git a/notice.html b/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/notice.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/.project b/org.eclipse.osbp.abstractstatemachine.feature/.project
new file mode 100644
index 0000000..2d88704
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.abstractstatemachine.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/LICENSE.txt b/org.eclipse.osbp.abstractstatemachine.feature/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate
+modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of
+its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute
+and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code
+form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the
+combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not
+apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no
+assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity
+based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property
+rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the
+Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to
+grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including
+warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it
+in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and
+the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes
+the Program in a commercial product offering should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions
+brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the
+Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may
+ participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is
+then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone.
+Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to
+those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result,
+the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for
+determining the appropriateness of using and distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such
+Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such
+noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement
+is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish
+new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the
+right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including Contributions) may always be
+distributed subject to the version of the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the
+new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States
+of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause
+of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/META-INF/git.properties b/org.eclipse.osbp.abstractstatemachine.feature/META-INF/git.properties
new file mode 100644
index 0000000..8aae781
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/META-INF/git.properties
@@ -0,0 +1,14 @@
+#Generated by Git-Commit-Id-Plugin
+#Thu Jan 26 12:21:40 CET 2017
+git.remote.origin.url=ssh\://compex@10.1.13.14/osbpgit/org.eclipse.osbp.abstractstatemachine.git
+git.closest.tag.name=Version1-2017-01-23-13-48-06
+git.commit.id.describe-short=Version1-2017-01-23-13-48-06-5-dirty
+git.commit.time=26.01.2017 @ 10\:35\:46 MEZ
+git.commit.message.full=relocated statemachine to abstractstatemachine
+git.commit.message.short=relocated statemachine to abstractstatemachine
+git.commit.id.abbrev=adab955
+git.branch=development
+git.closest.tag.commit.count=5
+git.commit.id.describe=Version1-2017-01-23-13-48-06-5-gadab955-dirty
+git.commit.id=adab9550996ab4b5169ce2651f2e7f672a353c54
+git.tags=
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/build.properties b/org.eclipse.osbp.abstractstatemachine.feature/build.properties
new file mode 100644
index 0000000..0ea4044
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/build.properties
@@ -0,0 +1,10 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ notice.html,\
+ license.html,\
+ LICENSE.txt,\
+ epl-v10.html
+src.includes = license.html,\
+ LICENSE.txt,\
+ notice.html,\
+ epl-v10.html
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/epl-v10.html b/org.eclipse.osbp.abstractstatemachine.feature/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/feature.properties b/org.eclipse.osbp.abstractstatemachine.feature/feature.properties
new file mode 100644
index 0000000..14c819c
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/feature.properties
@@ -0,0 +1,172 @@
+#=======================================================================
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#=======================================================================
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName =OSBP abstract statemachine
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=This feature provides the OSBP abstract statemachine bundle.
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany). \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co.KG - initial API and basis\n\
+
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/feature.xml b/org.eclipse.osbp.abstractstatemachine.feature/feature.xml
new file mode 100644
index 0000000..f6087a8
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/feature.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.osbp.abstractstatemachine.feature"
+ label="%featureName"
+ version="0.9.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.osbp.abstractstatemachine"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+
+
+</feature>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/license.html b/org.eclipse.osbp.abstractstatemachine.feature/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/notice.html b/org.eclipse.osbp.abstractstatemachine.feature/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/notice.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/pom.xml b/org.eclipse.osbp.abstractstatemachine.feature/pom.xml
new file mode 100644
index 0000000..94db1c2
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#=======================================================================
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#=======================================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.abstractstatemachine</groupId>
+ <artifactId>org.eclipse.osbp.abstractstatemachine.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.abstractstatemachine.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <labelSuffix> (source)</labelSuffix>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- workaround while bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250
+ is not fixed -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.osbp.abstractstatemachine</groupId>
+ <artifactId>org.eclipse.osbp.abstractstatemachine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/src/main/javadoc/README.txt b/org.eclipse.osbp.abstractstatemachine.feature/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/src/main/javadoc/README.txt
@@ -0,0 +1 @@
+Resource folder for javadoc resources.
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine.feature/src/overview.html b/org.eclipse.osbp.abstractstatemachine.feature/src/overview.html
new file mode 100644
index 0000000..3d10c59
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine.feature/src/overview.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP abstractstatemachine</title>
+</head>
+<body>
+<p>The <strong>OSBP statemachine</strong> provides bundles for the OSBP abstractstatemachine functionality.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.abstractstatemachine/.project b/org.eclipse.osbp.abstractstatemachine/.project
new file mode 100644
index 0000000..2d2a8d5
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/.project
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.abstractstatemachine</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.babel.editor.rbeNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.abstractstatemachine/LICENSE.txt b/org.eclipse.osbp.abstractstatemachine/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/LICENSE.txt
@@ -0,0 +1,161 @@
+Eclipse Public License -v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION
+OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor.
+A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate
+modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of
+its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute
+and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code
+form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the
+combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not
+apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no
+assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity
+based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property
+rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the
+Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to
+grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including
+warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any
+other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it
+in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and
+the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes
+the Program in a commercial product offering should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions
+brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the
+Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may
+ participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is
+then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone.
+Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to
+those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result,
+the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for
+determining the appropriateness of using and distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such
+Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such
+noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement
+is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish
+new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the
+right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including Contributions) may always be
+distributed subject to the version of the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the
+new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States
+of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause
+of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/META-INF/MANIFEST.MF b/org.eclipse.osbp.abstractstatemachine/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..053b8e3
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.abstractstatemachine
+Bundle-SymbolicName: org.eclipse.osbp.abstractstatemachine
+Bundle-Version: 0.9.0.qualifier
+Bundle-Vendor: Eclipse OSBP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.osbp.dsl.dto.lib;bundle-version="0.9.0",
+ org.eclipse.osbp.dsl.datatype.lib;bundle-version="0.9.0",
+ org.eclipse.osbp.ecview.core.common;bundle-version="0.9.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.slf4j.api;bundle-version="1.7.2",
+ org.eclipse.osbp.fork.jpos;bundle-version="1.14.0",
+ com.vaadin.server;bundle-version="7.5.7",
+ org.eclipse.osbp.dsl.dto.xtext,
+ org.eclipse.osgi.services;bundle-version="3.4.0"
+Import-Package: javax.servlet;version="2.6.0",
+ javax.servlet.http;version="2.6.0",
+ org.eclipse.osbp.preferences;version="0.9.0",
+ org.eclipse.osbp.ui.api.datamart;version="0.9.0",
+ org.eclipse.osbp.ui.api.message;version="0.9.0",
+ org.eclipse.osbp.ui.api.metadata;version="0.9.0",
+ org.eclipse.osbp.ui.api.pos;version="0.9.0",
+ org.eclipse.osbp.ui.api.report;version="0.9.0",
+ org.eclipse.osbp.ui.api.statemachine;version="0.9.0",
+ org.eclipse.osbp.ui.api.themes;version="0.9.0",
+ org.eclipse.osbp.ui.api.user;version="0.9.0",
+ org.eclipse.osbp.utils.vaadin;version="0.9.0",
+ org.joda.time;version="2.7.0"
+Export-Package: org.eclipse.osbp.abstractstatemachine;version="0.9.0"
+Service-Component: OSGI-INF/org.eclipse.osbp.abstractstatemachine.POSServiceBinder.xml
diff --git a/org.eclipse.osbp.abstractstatemachine/OSGI-INF/org.eclipse.osbp.abstractstatemachine.POSServiceBinder.xml b/org.eclipse.osbp.abstractstatemachine/OSGI-INF/org.eclipse.osbp.abstractstatemachine.POSServiceBinder.xml
new file mode 100644
index 0000000..6352f72
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/OSGI-INF/org.eclipse.osbp.abstractstatemachine.POSServiceBinder.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.abstractstatemachine.POSServiceBinder">
+ <reference bind="bindPOSService" cardinality="0..1" interface="org.eclipse.osbp.ui.api.pos.IPOSService" name="POSService" policy="dynamic" unbind="unbindPOSService"/>
+ <implementation class="org.eclipse.osbp.abstractstatemachine.POSServiceBinder"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/README.txt b/org.eclipse.osbp.abstractstatemachine/README.txt
new file mode 100644
index 0000000..5014b0b
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/README.txt
@@ -0,0 +1,16 @@
+Your code for statemachine goes in here.
+
+Add all your sources as you usually do for plugin development.
+
+If you need more bundles to implement the feature, duplicate this folder and ad the new bundle code into the copy
+
+Do not forget to add your new bundle to the
+ - feature pom.xml
+ - feature feature.xml
+ - and the aggregator pom.xml
+as it is done for this bundle.
+
+Have fun!
+
+
+You can delete this file from the final project.
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/about.html b/org.eclipse.osbp.abstractstatemachine/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/about.ini b/org.eclipse.osbp.abstractstatemachine/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/about.ini
@@ -0,0 +1,17 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=
diff --git a/org.eclipse.osbp.abstractstatemachine/about.mappings b/org.eclipse.osbp.abstractstatemachine/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=qualifier
diff --git a/org.eclipse.osbp.abstractstatemachine/about.properties b/org.eclipse.osbp.abstractstatemachine/about.properties
new file mode 100644
index 0000000..2157dce
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/about.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co - initial API and implementation
+#
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=statemachine
+
+################ blurb property ####################################
+featureText=\
+Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Loetz GmbH&Co - implementation\n
+################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.abstractstatemachine/about_files/README.txt b/org.eclipse.osbp.abstractstatemachine/about_files/README.txt
new file mode 100644
index 0000000..cc50489
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/about_files/README.txt
@@ -0,0 +1 @@
+All external licenses referenced in about file go here
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/build.properties b/org.eclipse.osbp.abstractstatemachine/build.properties
new file mode 100644
index 0000000..bfdabe3
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/build.properties
@@ -0,0 +1,21 @@
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ notice.html,\
+ license.html,\
+ LICENSE.txt,\
+ epl-v10.html,\
+ OSGI-INF/org.eclipse.osbp.abstractstatemachine.POSServiceBinder.xml
+src.includes = license.html,\
+ LICENSE.txt,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ notice.html,\
+ epl-v10.html
+source.. = src/
diff --git a/org.eclipse.osbp.abstractstatemachine/epl-v10.html b/org.eclipse.osbp.abstractstatemachine/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/epl-v10.html
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/license.html b/org.eclipse.osbp.abstractstatemachine/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.osbp.abstractstatemachine/notice.html b/org.eclipse.osbp.abstractstatemachine/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/notice.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.abstractstatemachine/pom.xml b/org.eclipse.osbp.abstractstatemachine/pom.xml
new file mode 100644
index 0000000..60336e3
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#=======================================================================
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#=======================================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.abstractstatemachine</groupId>
+ <artifactId>org.eclipse.osbp.abstractstatemachine.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.abstractstatemachine</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ </build>
+
+ </project>
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractDataProvider.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractDataProvider.java
new file mode 100644
index 0000000..ba13206
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractDataProvider.java
@@ -0,0 +1,237 @@
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.MethodDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Stack;
+
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.dsl.dto.lib.impl.DtoServiceAccess;
+import org.eclipse.osbp.dsl.dto.lib.services.IDTOService;
+import org.eclipse.osbp.dsl.dto.lib.services.Query;
+import org.eclipse.osbp.dsl.dto.lib.services.filters.LCompare;
+import org.eclipse.osbp.dsl.semantic.dto.LDto;
+import org.eclipse.osbp.ecview.core.common.beans.ISlot;
+import org.eclipse.osbp.ui.api.statemachine.IDataProvider;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+
+@SuppressWarnings("restriction")
+public abstract class AbstractDataProvider extends
+ AbstractStateMachineParticipant implements IDataProvider,
+ IDataProvider.Provider {
+
+ protected Map<String, IDTOService<? extends IDto>> dtoServices = new HashMap<>();
+ protected boolean ready;
+
+ @Override
+ public void setStatemachine(IStateMachine statemachine) {
+ super.setStatemachine(statemachine);
+ statemachine.registerDataProvider(this);
+ }
+
+ @Override
+ public void initDatasource(String dtoAlias) {
+ ISlot slot = viewContext.getBeanSlot(dtoAlias);
+ if(slot == null) {
+ LOGGER.error("cannot find alias "+dtoAlias+" in UI model. DTO therefore not accessible for DataProviders");
+ return;
+ }
+ if (IDto.class.isAssignableFrom(slot.getValueType())) {
+ @SuppressWarnings("unchecked")
+ Class<IDto> type = (Class<IDto>) slot.getValueType();
+ dtoServices.put(type.getSimpleName(),
+ DtoServiceAccess.getService(type));
+ } else {
+ LOGGER.error(dtoAlias+" is not bound as DTO from UI model and therefore not accessible for DataProviders");
+ }
+ }
+
+ public void initDatasourceFromDto(String dtoName) {
+ for(String slotName:viewContext.getValueBeans().keySet()) {
+ ISlot slot = viewContext.getBeanSlot(slotName);
+ if (IDto.class.isAssignableFrom(slot.getValueType())) {
+ @SuppressWarnings("unchecked")
+ Class<IDto> type = (Class<IDto>) slot.getValueType();
+ if(dtoName.equals(type.getSimpleName())) {
+ dtoServices.put(type.getSimpleName(),
+ DtoServiceAccess.getService(type));
+ return;
+ }
+ }
+ }
+ LOGGER.error(dtoName+" is not bound from UI model and therefore not accessible for DataProviders");
+ }
+
+ @Override
+ public Boolean find(IDataProvider.Provider listener, String dtoName,
+ String fieldName, Object search) {
+ return find(listener, dtoName, new Query(new LCompare.Equal(fieldName, search)));
+ }
+
+ @Override
+ public Boolean find(IDataProvider.Provider listener, String dtoName, Query query) {
+ Collection<? extends IDto> results = findDtoInstances(dtoName, query);
+ if (results == null) {
+ return false;
+ }
+ if (results.size() > 1) {
+ LOGGER.error("find for " + dtoName
+ + " returned multiple values - first value is used");
+ }
+ if (results.isEmpty()) {
+ LOGGER.error("find for " + dtoName + " returned no values");
+ }
+ try {
+ Method method = setter(listener, dtoName, IDto.class);
+ if(method == null) {
+ return null;
+ }
+ if (results.isEmpty()) {
+ method.invoke(listener, (IDto) null);
+ } else {
+ method.invoke(listener, (IDto) results.iterator().next());
+ }
+ return true;
+ } catch (IllegalAccessException
+ | IllegalArgumentException | InvocationTargetException e) {
+ System.out.println(e);
+ return null;
+ }
+ }
+
+ protected Collection<? extends IDto> findDtoInstances(String dtoName, Query query) {
+ if (!dtoServices.containsKey(dtoName)) {
+ LOGGER.error(dtoName + " was not bound from ui model");
+ return null;
+ }
+ IDTOService<? extends IDto> dtoService = dtoServices.get(dtoName);
+ if (dtoService == null) {
+ LOGGER.error(dtoName + " has no service registrated");
+ return null;
+ }
+ Collection<? extends IDto> results;
+ try {
+ results = dtoService.find(query);
+ if (results.size() > 1) {
+ LOGGER.error("find for " + dtoName
+ + " returned multiple values - first value is used");
+ }
+ if (results.isEmpty()) {
+ LOGGER.error("find for " + dtoName + " returned no values");
+ return null;
+ }
+ return results;
+ } catch (Exception e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ }
+
+ @Override
+ public Boolean operation(IDataProvider.Provider listener, String name,
+ Stack<Object> parameter) {
+ try {
+ Class<?> clz = listener.getClass();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(clz);
+ for (MethodDescriptor desc : info.getMethodDescriptors()) {
+ if (desc.getName().equalsIgnoreCase(name)) {
+ Method method = desc.getMethod();
+ return (Boolean) method.invoke(listener, parameter);
+ }
+ }
+ } catch (IntrospectionException e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ } catch (IllegalAccessException
+ | IllegalArgumentException | InvocationTargetException e) {
+ return null;
+ }
+ }
+
+ protected Method dispatchMethod(Provider listener, String methodName) {
+ try {
+ Class<?> clz = listener.getClass();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(clz);
+ for (MethodDescriptor desc : info.getMethodDescriptors()) {
+ if (desc.getName().equalsIgnoreCase(methodName)) {
+ return desc.getMethod();
+ }
+ }
+ } catch (IntrospectionException e) {
+ LOGGER.error("{}", e);
+ }
+ } catch (IllegalArgumentException e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ }
+
+ @Override
+ public void addTo(Provider listener, String dtoName, String listName, IDto dto) {
+ Method method = dispatchMethod(listener, "addTo"+dtoName+listName);
+ if(method != null) {
+ try {
+ method.invoke(listener, dto);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ } else {
+ LOGGER.error("method addTo"+dtoName+listName+" not generated");
+ }
+ }
+
+ @Override
+ public void removeFrom(Provider listener, String dtoName, String listName, IDto dto) {
+ Method method = dispatchMethod(listener, "removeFrom"+dtoName+listName);
+ if(method != null) {
+ try {
+ method.invoke(listener, dto);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ } else {
+ LOGGER.error("method removeFrom"+dtoName+listName+" not generated");
+ }
+ }
+
+ @Override
+ public void update(Provider listener, String dtoName, IDto dto) {
+ Method method = dispatchMethod(listener, "update"+dtoName);
+ if(method != null) {
+ try {
+ method.invoke(listener, dto);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ } else {
+ LOGGER.error("method update"+dtoName+" not generated");
+ }
+ }
+
+ @Override
+ public void delete(Provider listener, String dtoName, IDto dto) {
+ Method method = dispatchMethod(listener, "delete"+dtoName);
+ if(method != null) {
+ try {
+ method.invoke(listener, dto);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ } else {
+ LOGGER.error("delete update"+dtoName+" not generated");
+ }
+ }
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractEventSource.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractEventSource.java
new file mode 100644
index 0000000..6445cd2
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractEventSource.java
@@ -0,0 +1,130 @@
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.osbp.ui.api.statemachine.IEventSource;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+import org.eclipse.osbp.ui.api.themes.IThemeResourceService.ThemeResourceType;
+
+import com.vaadin.server.Resource;
+
+public abstract class AbstractEventSource extends
+ AbstractStateMachineParticipant implements IEventSource,
+ IEventSource.Enabler {
+
+ protected boolean ready;
+
+ @Override
+ public void init() {
+ }
+
+ @Override
+ public void setStatemachine(IStateMachine statemachine) {
+ super.setStatemachine(statemachine);
+ statemachine.registerEnabler(this);
+ }
+
+ @Override
+ public void enable(IEventSource.Enabler listener, String id, Boolean enabled) {
+ Method method = setter(listener, id + "Enabled", Boolean.class);
+ if (method == null) {
+ return;
+ }
+ try {
+ method.invoke(listener, enabled);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ return;
+ }
+ }
+
+ @Override
+ public void append(Enabler listener, String id, String key) {
+ Method get = getter(listener, id);
+ Class<?> retType = getReturnType(listener, id);
+ if (get == null) {
+ return;
+ }
+ try {
+ Object content = get.invoke(listener);
+ if (retType.isAssignableFrom(String.class)) {
+ String got = null;
+ if(content != null) {
+ got = (String)content;
+ if(got.contains(".") && ".".equals(key)) {
+ got = got.substring(0, got.indexOf(key)) + key;
+ } else {
+ got += key;
+ }
+ } else {
+ got = key;
+ }
+ setter(listener, id, String.class).invoke(listener, got);
+ } else if (retType.isAssignableFrom(Double.class)) {
+ } else {
+ return;
+ }
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+
+ @Override
+ public void remove(Enabler listener, String id, int pos) {
+ Method get = getter(listener, id);
+ Method set = setter(listener, id, String.class);
+ if (get == null || set == null) {
+ return;
+ }
+ try {
+ String got = (String) get.invoke(listener);
+ if (got.isEmpty()) {
+ return;
+ }
+ if (pos > got.length() - 1 || pos < 0) {
+ set.invoke(listener, got.substring(0, got.length() - 1));
+ } else {
+ set.invoke(listener,
+ got.substring(0, pos - 1) + got.substring(pos + 1));
+ }
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+
+ @Override
+ public void caption(IEventSource.Enabler listener, String id, String value) {
+ Method method = setter(listener, id+"Caption", String.class);
+ if (method == null) {
+ return;
+ }
+ try {
+ method.invoke(listener, value);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ return;
+ }
+ }
+
+ @Override
+ public void image(IEventSource.Enabler listener, String id, String imageName) {
+ Method method = setter(listener, id + "Image", Object.class);
+ if (method == null || statemachine == null) {
+ return;
+ }
+ try {
+ Resource resource = statemachine.getThemeResourceService().getThemeResource(
+ imageName, ThemeResourceType.ICON);
+ method.invoke(listener, (Object) resource);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ return;
+ }
+ }
+
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractPeripheralService.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractPeripheralService.java
new file mode 100644
index 0000000..1ab989e
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractPeripheralService.java
@@ -0,0 +1,1169 @@
+/*
+ *
+ * Copyright (c) 2011 - 2016 - Loetz GmbH & Co KG, 69115 Heidelberg, Germany
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial contribution:
+ * Loetz GmbH & Co. KG
+ *
+ */
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import jpos.BaseControl;
+import jpos.CashDrawer;
+import jpos.CashDrawerConst;
+import jpos.CashDrawerControl114;
+import jpos.JposException;
+import jpos.LineDisplay;
+import jpos.LineDisplayConst;
+import jpos.LineDisplayControl114;
+import jpos.POSPrinter;
+import jpos.POSPrinterConst;
+import jpos.POSPrinterControl114;
+import jpos.config.JposEntry.Prop;
+import jpos.config.JposEntryRegistry;
+import jpos.config.simple.SimpleEntry;
+import jpos.epson.EpsonLineDisplayConst;
+import jpos.epson.EpsonPOSPrinterConst;
+import jpos.events.ErrorEvent;
+import jpos.events.ErrorListener;
+import jpos.events.OutputCompleteEvent;
+import jpos.events.OutputCompleteListener;
+import jpos.events.StatusUpdateEvent;
+import jpos.events.StatusUpdateListener;
+import jpos.loader.simple.SimpleServiceManager;
+import jpos.util.DefaultProperties;
+import jpos.util.JposProperties;
+import jpos.util.JposPropertiesConst;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.osbp.preferences.ProductConfiguration;
+import org.eclipse.osbp.ui.api.datamart.IDataMart;
+import org.eclipse.osbp.ui.api.message.MessageEvent;
+import org.eclipse.osbp.ui.api.message.MessageEvent.EventType;
+import org.eclipse.osbp.ui.api.pos.IZVTTransactionData;
+import org.eclipse.osbp.ui.api.statemachine.IPeripheral;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * PeripheralService is a bridge between javaPOS and the state machine participant.
+ */
+public abstract class AbstractPeripheralService extends AbstractStateMachineParticipant
+ implements IPeripheral, IPeripheral.Command, StatusUpdateListener,
+ ErrorListener, OutputCompleteListener {
+
+ /** The devices. */
+ protected Map<String, BaseControl> devices = new HashMap<>();
+
+ private boolean slipNotificationsEnabled = false;
+ private boolean devicesInit = false;
+ private int windowsCreated = 0;
+ private String ptIP;
+ private Integer ptPort;
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * foodmartdialogdslplugin.AbstractStateMachineParticipant#setStatemachine
+ * (org.eclipse.osbp.ui.api.abstractstatemachine.IStateMachine)
+ */
+ @Override
+ public void setStatemachine(IStateMachine statemachine) {
+ super.setStatemachine(statemachine);
+ statemachine.registerPeripheral(this);
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().setStatemachine(statemachine);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see foodmartdialogdslplugin.AbstractStateMachineParticipant#init()
+ */
+ @Override
+ public void init() {
+ initDevices();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.statemachine.IPeripheral#initDevices()
+ */
+ @Override
+ public void initDevices() {
+ if(!devicesInit) {
+ // load all names of configured devices, instantiate and cache it
+ String configFile = ProductConfiguration.getJavaPosConfiguration();
+ try {
+ new URL(configFile);
+ System.setProperty(
+ JposPropertiesConst.JPOS_POPULATOR_FILE_URL_PROP_NAME,
+ configFile);
+ } catch (MalformedURLException e) {
+ System.setProperty(
+ JposPropertiesConst.JPOS_POPULATOR_FILE_PROP_NAME,
+ configFile);
+ }
+ System.setProperty(
+ JposPropertiesConst.JPOS_REG_POPULATOR_CLASS_PROP_NAME,
+ "jpos.config.simple.xml.SimpleXmlRegPopulator");
+ System.setProperty(
+ JposPropertiesConst.JPOS_SERVICE_MANAGER_CLASS_PROP_NAME,
+ "jpos.loader.simple.SimpleServiceManager");
+ JposProperties jposProperties = new DefaultProperties();
+ jposProperties.loadJposProperties();
+ SimpleServiceManager serviceManager = new SimpleServiceManager(
+ jposProperties);
+ serviceManager.getEntryRegistry().load();
+ JposEntryRegistry props = serviceManager.getEntryRegistry();
+ Enumeration<?> propsIterator = props.getEntries();
+ while (propsIterator.hasMoreElements()) {
+ SimpleEntry deviceEntry = (SimpleEntry) propsIterator.nextElement();
+ Prop category = deviceEntry.getProp("deviceCategory");
+ String deviceClassName = "jpos." + category.getValueAsString();
+ try {
+ Class<?> deviceClass = Class.forName(deviceClassName);
+ Constructor<?> ctor = deviceClass.getConstructor();
+ BaseControl device = (BaseControl) ctor.newInstance();
+ try {
+ // Open the device.
+ device.open(deviceEntry.getLogicalName());
+ // Get the exclusive control right for the opened device.
+ // Then the device is disabled from other application.
+ device.claim(1000);
+ // Enable the device.
+ device.setDeviceEnabled(true);
+ // add status listener
+ if (device instanceof CashDrawer) {
+ ((CashDrawer) device).addStatusUpdateListener(this);
+ }
+ if (device instanceof POSPrinter) {
+ ((POSPrinter) device).addStatusUpdateListener(this);
+ ((POSPrinter) device).addErrorListener(this);
+ ((POSPrinter) device).addOutputCompleteListener(this);
+ // Even if using any printers, 0.01mm unit makes it
+ // possible to print neatly.
+ ((POSPrinter) device)
+ .setMapMode(POSPrinterConst.PTR_MM_METRIC);
+ // Output by the high quality mode
+ ((POSPrinter) device).setRecLetterQuality(true);
+ // 2mm spaces
+ ((POSPrinter) device).printNormal(POSPrinterConst.PTR_S_RECEIPT, "\u001b|200uF");
+ }
+ } catch (JposException ex) {
+ LOGGER.error("device init error: {}", ex);
+ }
+ devices.put(deviceEntry.getLogicalName(), device);
+ } catch (Exception e) {
+ LOGGER.error("Error creating instance of specified device class:"
+ + deviceClassName);
+ }
+ }
+ if(getPTIP() != null) {
+ if(POSServiceBinder.getPosService() != null) {
+ if(!POSServiceBinder.getPosService().openZVTChannel(getPTIP(), getPTPort())) {
+ LOGGER.error("could not open ZVT socket");
+ }
+ }
+ }
+ devicesInit = true;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.osbp.ui.api.abstractstatemachine.IPeripheral#releaseDevices()
+ */
+ @Override
+ public void releaseDevices() {
+ if(devicesInit) {
+ for (String deviceName : devices.keySet()) {
+ try {
+ if (devices.get(deviceName) instanceof LineDisplay) {
+ try {
+ if(windowsCreated > 0) {
+ ((LineDisplay) devices.get(deviceName)).destroyWindow();
+ }
+ } catch (JposException e) {}
+ ((LineDisplay) devices.get(deviceName)).clearText();
+ }
+ devices.get(deviceName).setDeviceEnabled(false);
+ if (devices.get(deviceName) instanceof CashDrawer) {
+ ((CashDrawer) devices.get(deviceName))
+ .removeStatusUpdateListener(this);
+ }
+ if (devices.get(deviceName) instanceof POSPrinter) {
+ ((POSPrinter) devices.get(deviceName))
+ .removeStatusUpdateListener(this);
+ }
+ devices.get(deviceName).release();
+ devices.get(deviceName).close();
+ } catch (JposException e) {
+ LOGGER.error("Error releasing device:" + deviceName);
+ }
+ }
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().closeZVTChannel();
+ }
+ windowsCreated = 0;
+ devicesInit = false;
+ }
+ }
+
+ // line display code
+ /**
+ * Sets the display line.
+ *
+ * @param displayLine
+ * the new display line
+ */
+ public void setDisplayLine(String displayLine) {
+ String[] parts = displayLine.split("\\|");
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ if (parts.length > 1) {
+ ((LineDisplay) devices.get(device)).displayText(
+ parts[0], new Integer(parts[1].trim()));
+ } else {
+ ((LineDisplay) devices.get(device)).displayText(
+ parts[0], LineDisplayConst.DISP_DT_NORMAL);
+ }
+ } catch (JposException e) {
+ LOGGER.error("error displayLine for device:" + device
+ + " and text:" + displayLine + " {}", e);
+ } catch (Exception ex) {
+ LOGGER.error("general error displayLine for device:"
+ + device + " text:" + displayLine + " {}", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Registers a bitmap.
+ *
+ * @param registerBitmap
+ * encodes a pipe separated tuple bitmapNumber, bitmapFilename
+ */
+ public void setRegisterBitmap(String registerBitmap) {
+ String[] parts = registerBitmap.split("\\|");
+ String path = null;
+ File file = null;
+ try {
+ // get absolute physical path of bundle
+ file = FileLocator.getBundleFile(FrameworkUtil.getBundle(this.getClass()));
+ } catch (IOException e) {
+ LOGGER.error("jpos error setRegisterBitmap:" + registerBitmap + " {}", e);
+ return;
+ }
+ if(file != null) {
+ path = file.getAbsolutePath()+"/"+parts[1];
+ }
+ if(path != null) {
+ for (String device : devices.keySet()) {
+ try {
+ if (devices.get(device) instanceof LineDisplay) {
+ if (((LineDisplayControl114) devices.get(device))
+ .getCapBitmap() == true) {
+ ((LineDisplayControl114) devices.get(device))
+ .setBitmap(new Integer(parts[0]), parts[1],
+ LineDisplayConst.DISP_BM_ASIS,
+ LineDisplayConst.DISP_BM_LEFT,
+ LineDisplayConst.DISP_BM_TOP);
+ }
+ }
+ if (devices.get(device) instanceof POSPrinter) {
+ if (((POSPrinterControl114) devices.get(device))
+ .getCapRecBitmap() == true) {
+ int lineWidth = ((POSPrinterControl114) devices
+ .get(device)).getRecLineWidth();
+ ((POSPrinterControl114) devices.get(device)).setBitmap(
+ new Integer(parts[0]),
+ POSPrinterConst.PTR_S_RECEIPT, path,
+ lineWidth / 2, POSPrinterConst.PTR_BM_CENTER);
+ }
+ }
+ } catch (JposException e) {
+ LOGGER.error("jpos error setRegisterBitmap for device:"
+ + device + " and:" + registerBitmap + " {}", e);
+ } catch (Exception ex) {
+ LOGGER.error("general error registerBitmap for device:"
+ + device + " text:" + registerBitmap + " {}", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the display bitmap.
+ *
+ * @param displayBitmap
+ * the new display bitmap
+ */
+ public void setDisplayBitmap(Integer displayBitmap) {
+ String text = String.format("\\u%03db|%dB", displayBitmap,
+ displayBitmap);
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ int[] pram2 = new int[1];
+ Object pram3 = new Object();
+
+ ((LineDisplayControl114) devices.get(device))
+ .directIO(EpsonLineDisplayConst.DISP_DI_GRAPHIC,
+ pram2, pram3);
+ ((LineDisplayControl114) devices.get(device)).createWindow(
+ 0, 0, 64, 256, 64, 256);
+ ((LineDisplayControl114) devices.get(device)).displayText(
+ text, LineDisplayConst.DISP_DT_NORMAL);
+ } catch (JposException e) {
+ LOGGER.error("jpos error setDisplayBitmap for device:"
+ + device + " and:" + displayBitmap + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the device brightness.
+ *
+ * @param deviceBrightness
+ * the new device brightness
+ */
+ public void setDeviceBrightness(Integer deviceBrightness) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setDeviceBrightness(deviceBrightness);
+ } catch (JposException e) {
+ LOGGER.error("jpos error deviceBrightness for device:"
+ + device + " and:" + deviceBrightness + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the blink rate.
+ *
+ * @param blinkRate
+ * the new blink rate
+ */
+ public void setBlinkRate(Integer blinkRate) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setBlinkRate(blinkRate);
+ } catch (JposException e) {
+ LOGGER.error("jpos error blinkRate for device:" + device
+ + " and:" + blinkRate + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the cursor type.
+ *
+ * @param cursorType
+ * see: LineDisplayConst
+ */
+ public void setCursorType(Integer cursorType) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setCursorType(cursorType);
+ } catch (JposException e) {
+ LOGGER.error("jpos error cursorType for device:" + device
+ + " and:" + cursorType + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the marquee format.
+ *
+ * @param marqueeFormat
+ * the new marquee format
+ */
+ public void setMarqueeFormat(Integer marqueeFormat) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setMarqueeFormat(marqueeFormat);
+ } catch (JposException e) {
+ LOGGER.error("jpos error marqueeFormat for device:"
+ + device + " and:" + marqueeFormat + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the marquee repeat wait.
+ *
+ * @param marqueeRepeatWait
+ * the new marquee repeat wait
+ */
+ public void setMarqueeRepeatWait(Integer marqueeRepeatWait) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setMarqueeRepeatWait(marqueeRepeatWait);
+ } catch (JposException e) {
+ LOGGER.error("jpos error marqueeRepeatWait for device:"
+ + device + " and:" + marqueeRepeatWait + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the marquee type.
+ *
+ * @param marqueeType
+ * the new marquee type
+ */
+ public void setMarqueeType(Integer marqueeType) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setMarqueeType(marqueeType);
+ } catch (JposException e) {
+ LOGGER.error("jpos error marqueeType for device:" + device
+ + " and:" + marqueeType + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the marquee unit wait.
+ *
+ * @param marqueeUnitWait
+ * the new marquee unit wait
+ */
+ public void setMarqueeUnitWait(Integer marqueeUnitWait) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setMarqueeUnitWait(marqueeUnitWait);
+ } catch (JposException e) {
+ LOGGER.error("jpos error marqueeUnitWait for device:"
+ + device + " and:" + marqueeUnitWait + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * wraps: createWindow(int viewportRow, int viewportColumn, int
+ * viewportHeight , int viewportWidth, int windowHeight, int windowWidth);.
+ *
+ * @param createWindow
+ * the new creates the window
+ */
+ public void setCreateWindow(String createWindow) {
+ String[] parts = createWindow.split("\\|");
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device)).createWindow(
+ new Integer(parts[0].trim()),
+ new Integer(parts[1].trim()),
+ new Integer(parts[2].trim()),
+ new Integer(parts[3].trim()),
+ new Integer(parts[4].trim()),
+ new Integer(parts[5].trim()));
+ windowsCreated ++;
+ } catch (JposException e) {
+ LOGGER.error("jpos error createWindow for device:" + device
+ + " and:" + createWindow + " {}", e);
+ } catch (Exception ex) {
+ LOGGER.error("general error createWindow for device:"
+ + device + " text:" + createWindow + " {}", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the destroy window.
+ *
+ * @param destroyWindow
+ * the new destroy window
+ */
+ public void setDestroyWindow(String destroyWindow) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ if(windowsCreated > 0) {
+ ((LineDisplayControl114) devices.get(device)).destroyWindow();
+ windowsCreated --;
+ }
+ } catch (JposException e) {
+ LOGGER.error("jpos error destroyWindow for device:"
+ + device + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the scroll.
+ *
+ * @param scroll
+ * encodes a pipe separated tuple: direction, units
+ */
+ public void setScroll(String scroll) {
+ String[] parts = scroll.split("\\|");
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device)).scrollText(
+ new Integer(parts[0].trim()),
+ new Integer(parts[1].trim()));
+ } catch (JposException e) {
+ LOGGER.error("jpos error scroll for device:" + device
+ + " and:" + scroll + " {}", e);
+ } catch (Exception ex) {
+ LOGGER.error("general error scroll for device:" + device
+ + " text:" + scroll + " {}", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the inter character wait.
+ *
+ * @param interCharacterWait
+ * the new inter character wait
+ */
+ public void setInterCharacterWait(Integer interCharacterWait) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ ((LineDisplayControl114) devices.get(device))
+ .setInterCharacterWait(interCharacterWait);
+ } catch (JposException e) {
+ LOGGER.error("jpos error interCharacterWait for device:"
+ + device + " and:" + interCharacterWait + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the display at.
+ *
+ * @param displayTextAt
+ * encodes a pipe separated quadruple: row, column, text,
+ * attribute
+ */
+ public void setDisplayTextAt(String displayTextAt) {
+ String[] parts = displayTextAt.split("\\|");
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ if (parts.length > 3) {
+ ((LineDisplayControl114) devices.get(device))
+ .displayTextAt(new Integer(parts[0].trim()),
+ new Integer(parts[1].trim()), parts[2],
+ new Integer(parts[3].trim()));
+ } else {
+ ((LineDisplayControl114) devices.get(device))
+ .displayTextAt(new Integer(parts[0].trim()),
+ new Integer(parts[1].trim()), parts[2],
+ LineDisplayConst.DISP_DT_NORMAL);
+ }
+ } catch (JposException e) {
+ LOGGER.error("jpos error displayTextAt for device:"
+ + device + " and:" + displayTextAt + " {}", e);
+ } catch (Exception ex) {
+ LOGGER.error("general error displayTextAt for device:"
+ + device + " text:" + displayTextAt + " {}", ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * clears the display.
+ *
+ * @param clearDisplay is nt used
+ */
+ public void setClearDisplay(String clearDisplay) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof LineDisplay) {
+ try {
+ if(windowsCreated > 0) {
+ ((LineDisplayControl114) devices.get(device)).destroyWindow();
+ windowsCreated --;
+ }
+ ((LineDisplayControl114) devices.get(device)).clearText();
+ } catch (JposException e) {
+ LOGGER.error("jpos error clearDisplay for device:" + device
+ + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * opens the drawer.
+ *
+ * @param openDrawer is ignored
+ */
+ public void setOpenDrawer(Integer openDrawer) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof CashDrawer) {
+ try {
+ ((CashDrawerControl114) devices.get(device)).openDrawer();
+ } catch (JposException e) {
+ LOGGER.error("jpos error openDrawer for device:" + device
+ + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * prints to receipt printer in normal mode.
+ *
+ * @param printNormal text to print
+ */
+ public void setPrintNormal(String printNormal) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof POSPrinter) {
+ try {
+ ((POSPrinterControl114) devices.get(device)).printNormal(
+ POSPrinterConst.PTR_S_RECEIPT, printNormal);
+ } catch (JposException e) {
+ LOGGER.error("jpos error printNormal for device:" + device
+ + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * prints footer, feeds paper and cuts.
+ *
+ * @param footer the text to print as footer
+ */
+ public void setPrintCut(String footer) {
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof POSPrinter) {
+ try {
+ if (!footer.isEmpty()) {
+ ((POSPrinterControl114) devices.get(device))
+ .printNormal(POSPrinterConst.PTR_S_RECEIPT,
+ footer);
+ }
+ // Feed the receipt to the cutter position automatically,
+ // and cut.
+ ((POSPrinterControl114) devices.get(device)).printNormal(
+ POSPrinterConst.PTR_S_RECEIPT,
+ "\u001b|"
+ + (((POSPrinterControl114) devices
+ .get(device))
+ .getRecLinesToPaperCut()) + "lF");
+ if (((POSPrinterControl114) devices.get(device))
+ .getCapRecPapercut() == true)
+ ((POSPrinterControl114) devices.get(device))
+ .cutPaper(100);
+ } catch (JposException e) {
+ LOGGER.error("jpos error printCut for device:" + device
+ + " {}", e);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * print a pre-loaded bitmap.
+ *
+ * @param printBitmap the bitmap-id to print
+ */
+ public void setPrintBitmap(Integer printBitmap) {
+ String text = String.format("\u001b|%dB", printBitmap);
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof POSPrinter) {
+ try {
+ if (((POSPrinterControl114) devices.get(device)).getCapRecBitmap() == true) {
+ int []pram2 = new int[1];
+ pram2[0] = EpsonPOSPrinterConst.PTR_DI_BITMAP_PRINTING_MULTI_TONE;
+ ((POSPrinterControl114) devices.get(device)).directIO(EpsonPOSPrinterConst.PTR_DI_SET_BITMAP_PRINTING_TYPE, pram2, "");
+ ((POSPrinterControl114) devices.get(device)).printNormal(
+ POSPrinterConst.PTR_S_RECEIPT, text);
+ pram2[0] = EpsonPOSPrinterConst.PTR_DI_BITMAP_PRINTING_NORMAL;
+ ((POSPrinterControl114) devices.get(device)).directIO(EpsonPOSPrinterConst.PTR_DI_SET_BITMAP_PRINTING_TYPE, pram2, "");
+ }
+ } catch (JposException e) {
+ LOGGER.error("jpos error setPrintBitmap for device:"
+ + device + " and:" + printBitmap + " {}", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * prints a barcode.
+ *
+ * @param data the barcode with pipe encoded barcode-type from jpos.POSPrinterConst
+ */
+ public void setPrintBarcode(String data) {
+ String[] parts = data.split("\\|");
+ for (String device : devices.keySet()) {
+ if (devices.get(device) instanceof POSPrinter) {
+ try {
+ if (((POSPrinterControl114) devices.get(device)).getCapRecBarCode() == true) {
+ // 5mm spaces
+ ((POSPrinterControl114) devices.get(device)).printNormal(POSPrinterConst.PTR_S_RECEIPT, "\u001b|500uF");
+ ((POSPrinterControl114) devices.get(device)).printBarCode(POSPrinterConst.PTR_S_RECEIPT, parts[0], new Integer(parts[1].trim()),
+ 1000, ((POSPrinterControl114) devices.get(device)).getRecLineWidth(), POSPrinterConst.PTR_BC_CENTER,
+ POSPrinterConst.PTR_BC_TEXT_BELOW);
+ // 2mm spaces
+ ((POSPrinterControl114) devices.get(device)).printNormal(POSPrinterConst.PTR_S_RECEIPT, "\u001b|200uF");
+ }
+ } catch (JposException e) {
+ LOGGER.error("jpos error setPrintBitmap for device:"
+ + device + " and:" + data + " {}", e);
+ }
+ }
+ }
+ }
+
+ public void setSlipNotificationsEnabled(boolean slipNotificationsEnabled) {
+ this.slipNotificationsEnabled = slipNotificationsEnabled;
+ }
+
+ public boolean isSlipNotificationsEnabled() {
+ return slipNotificationsEnabled;
+ }
+
+ @Override
+ public void statusUpdateOccurred(StatusUpdateEvent e) {
+ Object source = e.getSource();
+ if (source instanceof CashDrawer) {
+ switch (e.getStatus()) {
+ case CashDrawerConst.CASH_SUE_DRAWERCLOSED: // Drawer is closed.
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "drawerOpen"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.TRIGGER, "onDrawerClosed"));
+ }
+ break;
+ case CashDrawerConst.CASH_SUE_DRAWEROPEN: // Drawer is opened.
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "drawerOpen"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.TRIGGER, "onDrawerOpened"));
+ }
+ break;
+ }
+ }
+ if (source instanceof POSPrinter) {
+ switch (e.getStatus()) {
+ case POSPrinterConst.PTR_SUE_COVER_OPEN:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "coverOpen"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_COVER_OK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "coverOpen"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "receiptEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_PAPEROK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "receiptEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "receiptNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_NEAREMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "receiptNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_EMPTY:
+ if (statemachine != null && slipNotificationsEnabled) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "slipEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_PAPEROK:
+ if (statemachine != null && slipNotificationsEnabled) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "slipEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "slipNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_NEAREMPTY:
+ if (statemachine != null && slipNotificationsEnabled) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "slipNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "journalEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_PAPEROK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "journalEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "journalNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_NEAREMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "journalNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "receiptCartridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_CARTRIDGE_NEAREMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "receiptCartridgeNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "receiptHeadCleaning"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_REC_CARTDRIGE_OK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "receiptCartridgeEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "receiptHeadCleaning"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "receiptCartridgeNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "slipCartridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_CARTRIDGE_NEAREMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "slipCartridgeNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "slipHeadCleaning"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_SLP_CARTDRIGE_OK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "slipCartridgeEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "slipHeadCleaning"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "slipCartridgeNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGEOPEN, "journalCartridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_CARTRIDGE_NEAREMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "journalCartridgeNearEmpty"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSOPEN, "journalHeadCleaning"));
+ }
+ break;
+ case POSPrinterConst.PTR_SUE_JRN_CARTDRIGE_OK:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.MESSAGECLOSE, "journalCartridgeEmpty"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "journalHeadCleaning"));
+ statemachine.processEvent(statemachine,
+ new MessageEvent(EventType.STATUSCLOSE, "journalCartridgeNearEmpty"));
+ }
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void errorOccurred(ErrorEvent e) {
+ switch (e.getErrorCodeExtended()) {
+ case POSPrinterConst.JPOS_EPTR_COVER_OPEN:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorCoverOpen"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_JRN_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorJournalEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_REC_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorReceiptEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_SLP_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorSlipEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_BADFORMAT:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorBadFormat"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_JRN_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorJournalCartdridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_REC_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorReceiptCartdridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_SLP_CARTRIDGE_EMPTY:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorSlipCartdridgeEmpty"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_JRN_CARTRIDGE_REMOVED:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorJournalCartdridgeRemoved"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_REC_CARTRIDGE_REMOVED:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorReceiptCartdridgeRemoved"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_SLP_CARTRIDGE_REMOVED:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorSlipCartdridgeRemoved"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_JRN_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorJournalHeadCleaning"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_REC_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorReceiptHeadCleaning"));
+ }
+ break;
+ case POSPrinterConst.JPOS_EPTR_SLP_HEAD_CLEANING:
+ if (statemachine != null) {
+ statemachine.processEvent(statemachine, new MessageEvent(EventType.ERROR,
+ "errorSlipHeadCleaning"));
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ public void outputCompleteOccurred(OutputCompleteEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getPTIP() {
+ return ptIP;
+ }
+
+ public void setPTIP(String ptIP) {
+ this.ptIP = ptIP;
+ }
+
+ public Integer getPTPort() {
+ return ptPort;
+ }
+
+ public void setPTPort(Integer ptPort) {
+ this.ptPort = ptPort;
+ }
+
+ public void setPaymentTerminalOpen(String connectionParameters) {
+ String[] parts = connectionParameters.split("\\|");
+ setPTIP(parts[0]);
+ setPTPort(Integer.parseInt(parts[1]));
+
+ if(POSServiceBinder.getPosService() != null) {
+ if(!POSServiceBinder.getPosService().openZVTChannel(getPTIP(), getPTPort())) {
+ LOGGER.error("could not open ZVT socket");
+ }
+ }
+ }
+
+ public void setClosePaymentTerminal(String close) {
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().closeZVTChannel();
+ }
+ }
+
+ public void setPaymentTerminalAcknowledge(String dummey) {
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().zvtAcknowledge();
+ }
+ }
+
+ public void setPaymentTerminalBalanceRequest(String request) {
+ if(POSServiceBinder.getPosService() != null) {
+// zvt.balanceRequest();
+ }
+ }
+
+ public void setPaymentTerminalPrepaidTopUp(Double amount) {
+ if(POSServiceBinder.getPosService() != null) {
+// zvt.prepaidTopUp(amount);
+ }
+ }
+
+ public void setPaymentTerminalReversal(String reversal) {
+ String[] parts = reversal.split("\\|");
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().zvtReversal(parts[0], parts[1]);
+ }
+ }
+
+ public void setPaymentTerminalRegistration(String registration) {
+ String[] parts = registration.split("\\|");
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().zvtRegistration(parts[0], parts[1]);
+ }
+ }
+
+ public void setPaymentTerminalAuthorization(Double amount) {
+ if(POSServiceBinder.getPosService() != null) {
+ POSServiceBinder.getPosService().zvtAuthorization(amount);
+ }
+ }
+
+ public String getPaymentTerminalResponse() {
+ if(POSServiceBinder.getPosService() != null) {
+ return POSServiceBinder.getPosService().getZvtResponse();
+ }
+ return null;
+ }
+
+ public IZVTTransactionData getPaymentTerminalTransaction() {
+ if(POSServiceBinder.getPosService() != null) {
+ return POSServiceBinder.getPosService().getZvtTransactionData();
+ }
+ return null;
+ }
+
+ public void setPrintReport(String reportParameters) {
+ if(statemachine.getReportProvider() != null) {
+ String[] parts = reportParameters.split("\\|");
+ String reportName = parts[0];
+ Map<String, String> filterMap = new HashMap<>();
+ // the filter is optional
+ if(parts.length > 1 ) {
+ String storageKey = parts[1];
+ String filterName = null;
+ String filterValue = null;
+ for(String attribute : statemachine.getStorageAttributes(parts[1])) {
+ if("filterName".equals(attribute)) {
+ filterName = (String)statemachine.getStorage(storageKey, attribute);
+ }
+ if("filterValue".equals(attribute)) {
+ filterValue = (String)statemachine.getStorage(storageKey, attribute);
+ }
+ if(filterName != null && filterValue != null) {
+ // TODO: as soon as report supports cube datamarts, the slicerSingleSelectDecorator must be added
+ filterMap.put(filterName, filterValue);
+ filterName = null;
+ filterValue = null;
+ }
+ }
+ }
+ statemachine.getReportProvider().printReportAsPdf(reportName, statemachine.getUser(), statemachine.getDslMetadataService(), filterMap);
+ }
+ }
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachine.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachine.java
new file mode 100644
index 0000000..545afb6
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachine.java
@@ -0,0 +1,610 @@
+/*
+ *
+ * Copyright (c) 2011 - 2016 - Loetz GmbH & Co KG, 69115 Heidelberg, Germany
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial contribution:
+ * Loetz GmbH & Co. KG
+ *
+ */
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.io.IOException;
+import java.nio.channels.SelectableChannel;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+import javax.annotation.PreDestroy;
+
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.dsl.dto.lib.services.Query;
+import org.eclipse.osbp.ui.api.message.IMessageRequester;
+import org.eclipse.osbp.ui.api.message.MessageEvent;
+import org.eclipse.osbp.ui.api.message.MessageEvent.EventType;
+import org.eclipse.osbp.ui.api.message.MessageRequesterEvent;
+import org.eclipse.osbp.ui.api.metadata.IDSLMetadataService;
+import org.eclipse.osbp.ui.api.report.IReportProvider;
+import org.eclipse.osbp.ui.api.statemachine.IDataProvider;
+import org.eclipse.osbp.ui.api.statemachine.IEventSource;
+import org.eclipse.osbp.ui.api.statemachine.IPeripheral;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+import org.eclipse.osbp.ui.api.themes.IThemeResourceService;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.utils.vaadin.MessageDialog;
+import org.eclipse.osbp.utils.vaadin.YesNoDialog;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+
+import com.vaadin.server.Page;
+import com.vaadin.server.WebBrowser;
+import com.vaadin.ui.UI;
+
+public abstract class AbstractStateMachine implements IStateMachine,
+ IMessageRequester.ClickRecipient {
+ protected Collection<IEventSource.Enabler> enablerList = new CopyOnWriteArraySet<>();
+ protected Collection<IDataProvider.Provider> providerList = new CopyOnWriteArraySet<>();
+ protected Collection<IPeripheral.Command> peripheralList = new CopyOnWriteArraySet<>();
+ protected Map<String, MessageDialog> messageDialogs = new HashMap<>();
+ protected Map<String, YesNoDialog> yesnoDialogs = new HashMap<>();
+ protected WebBrowser webBrowser = Page.getCurrent().getWebBrowser();
+ protected Timer timer;
+ protected IUser user;
+ protected Locale locale;
+ protected IDSLMetadataService dslMetadataService;
+ protected IThemeResourceService themeResourceService;
+ protected IReportProvider reportProvider;
+ protected Stack<Object> parameters = new Stack<>();
+ protected Map<String, Map<String, Object>> storage = new HashMap<>();
+ protected SelectableChannel channel;
+ protected String lastTrigger;
+
+ private void addEventProvider(IEventSource.Enabler listener) {
+ enablerList.add(listener);
+ }
+
+ private void removeEventProvider(IEventSource.Enabler listener) {
+ enablerList.remove(listener);
+ }
+
+ @Override
+ public void registerEnabler(IEventSource.Enabler listener) {
+ addEventProvider(listener);
+ }
+
+ @Override
+ public void unregisterEnabler(IEventSource.Enabler listener) {
+ removeEventProvider(listener);
+ }
+
+ @Override
+ public void setUser(IUser user) {
+ this.user = user;
+ }
+
+ @Override
+ public IUser getUser() {
+ return user;
+ }
+
+ @Override
+ public String getUserName() {
+ return user.getUserName();
+ }
+
+ @Override
+ public String getUserPassword() {
+ return user.getExtraPassword();
+ }
+
+ @Override
+ public String getUserEmail() {
+ return user.getEmail();
+ }
+
+ @Override
+ public String getUserPosition() {
+ return user.getPosition();
+ }
+
+ @Override
+ public String getUserPrintService() {
+ return user.getPrintService();
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public Stack<Object> getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public void setDslMetadataService(IDSLMetadataService dslMetadataService) {
+ this.dslMetadataService = dslMetadataService;
+ }
+
+ @Override
+ public IDSLMetadataService getDslMetadataService() {
+ return dslMetadataService;
+ }
+
+ @Override
+ public IThemeResourceService getThemeResourceService() {
+ return themeResourceService;
+ }
+
+ @Override
+ public void setThemeResourceService(
+ IThemeResourceService themeResourceService) {
+ this.themeResourceService = themeResourceService;
+ }
+
+ @Override
+ public void setReportProvider(IReportProvider reportprovider) {
+ this.reportProvider = reportprovider;
+ }
+
+ @Override
+ public IReportProvider getReportProvider() {
+ return reportProvider;
+ }
+
+ @Override
+ public void enable(String id, Boolean enable) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.enable(listener, id, enable);
+ }
+ }
+
+ @Override
+ public Object get(String id) {
+ Object value = null;
+ for (IEventSource.Enabler listener : enablerList) {
+ value = listener.get(listener, id);
+ if (value != null) {
+ return value;
+ }
+ }
+ for (IDataProvider.Provider listener : providerList) {
+ value = listener.get(listener, id);
+ if (value != null) {
+ return value;
+ }
+ }
+ for (IPeripheral.Command listener : peripheralList) {
+ value = listener.get(listener, id);
+ if (value != null) {
+ return value;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void set(String id, Object content) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.set(listener, id, content);
+ }
+ for (IDataProvider.Provider listener : providerList) {
+ listener.set(listener, id, content);
+ }
+ for (IPeripheral.Command listener : peripheralList) {
+ listener.set(listener, id, content);
+ }
+ }
+
+ @Override
+ public void clear(String id) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.clear(listener, id);
+ }
+ for (IDataProvider.Provider listener : providerList) {
+ listener.clear(listener, id);
+ }
+ for (IPeripheral.Command listener : peripheralList) {
+ listener.clear(listener, id);
+ }
+ }
+
+ @Override
+ public void append(String id, String key) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.append(listener, id, key);
+ }
+ }
+
+ @Override
+ public void remove(String id, int pos) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.remove(listener, id, pos);
+ }
+ }
+
+ @Override
+ public void caption(String id, String value) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.caption(listener, id, value);
+ }
+ }
+
+ @Override
+ public void image(String id, String imageName) {
+ for (IEventSource.Enabler listener : enablerList) {
+ listener.image(listener, id, imageName);
+ }
+ }
+
+ @Override
+ public void addDataProvider(IDataProvider.Provider listener) {
+ providerList.add(listener);
+ }
+
+ @Override
+ public void removeDataProvider(IDataProvider.Provider listener) {
+ providerList.remove(listener);
+ }
+
+ @Override
+ public void registerDataProvider(IDataProvider.Provider listener) {
+ addDataProvider(listener);
+ }
+
+ @Override
+ public void unregisterDataProvider(IDataProvider.Provider listener) {
+ removeDataProvider(listener);
+ }
+
+ public void addPeripheral(IPeripheral.Command listener) {
+ peripheralList.add(listener);
+ }
+
+ public void removePeripheral(IPeripheral.Command listener) {
+ peripheralList.remove(listener);
+ }
+
+ @Override
+ public void registerPeripheral(IPeripheral.Command listener) {
+ addPeripheral(listener);
+ }
+
+ @Override
+ public void unregisterPeripheral(IPeripheral.Command listener) {
+ removePeripheral(listener);
+ }
+
+ @Override
+ public Boolean find(String dtoName, Query query) {
+ Boolean retVal;
+ for (IDataProvider.Provider listener : providerList) {
+ retVal = listener.find(listener, dtoName, query);
+ if (retVal != null) {
+ return retVal;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Boolean find(String dtoName, String fieldName, Object search) {
+ Boolean retVal;
+ for (IDataProvider.Provider listener : providerList) {
+ retVal = listener.find(listener, dtoName, fieldName, search);
+ if (retVal != null) {
+ return retVal;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void addTo(String dtoName, String listName, IDto dto) {
+ for (IDataProvider.Provider listener : providerList) {
+ listener.addTo(listener, dtoName, listName, dto);
+ }
+ }
+
+ @Override
+ public void removeFrom(String dtoName, String listName, IDto dto) {
+ for (IDataProvider.Provider listener : providerList) {
+ listener.removeFrom(listener, dtoName, listName, dto);
+ }
+ }
+
+ @Override
+ public void update(String dtoName) {
+ for (IDataProvider.Provider listener : providerList) {
+ listener.update(listener, dtoName,
+ (IDto) listener.get(listener, dtoName));
+ }
+ }
+
+ @Override
+ public void delete(String dtoName) {
+ for (IDataProvider.Provider listener : providerList) {
+ listener.delete(listener, dtoName,
+ (IDto) listener.get(listener, dtoName));
+ }
+ }
+
+ @Override
+ public Boolean operation(String name, Stack<Object> parameter) {
+ Boolean retVal;
+ for (IDataProvider.Provider listener : providerList) {
+ retVal = listener.operation(listener, name, parameter);
+ if (retVal != null) {
+ return retVal;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public String getIPAddress() {
+ // must define -Djava.net.preferIPv4Stack=true to always get IPv4 in
+ // dual stack environments
+ return webBrowser.getAddress(); // May be null, especially if running in
+ // a Portlet.
+ }
+
+ @Override
+ public DateTime getNow() {
+ return DateTime.now(DateTimeZone.UTC);
+ }
+
+ @Override
+ public String getUserAgentInfo() {
+ return webBrowser.getBrowserApplication();
+ }
+
+ @Override
+ public Boolean isTouchDevice() {
+ return webBrowser.isTouchDevice();
+ }
+
+ @Override
+ public int getSceenWidth() {
+ return webBrowser.getScreenWidth();
+ }
+
+ @Override
+ public int getScreenHeight() {
+ return webBrowser.getScreenHeight();
+ }
+
+ @PreDestroy
+ void destroy() {
+ timer.cancel();
+ timer = null;
+ }
+
+ @Override
+ public Locale getBrowserLocale() {
+ return webBrowser.getLocale();
+ }
+
+ @Override
+ public Boolean isHttps() {
+ return webBrowser.isSecureConnection();
+ }
+
+ @Override
+ public void schedule(IStateMachine statemachine, long milliseconds,
+ MessageEvent event) {
+ if (timer == null) {
+ timer = new Timer();
+ } else {
+ timer.cancel();
+ timer.purge();
+ timer = new Timer();
+ }
+ timer.schedule(new EventSourceTask(statemachine, event), milliseconds);
+ }
+
+ class EventSourceTask extends TimerTask {
+ private IStateMachine statemachine;
+ private MessageEvent event;
+
+ public EventSourceTask(IStateMachine statemachine, MessageEvent event) {
+ this.statemachine = statemachine;
+ this.event = event;
+ }
+
+ public void run() {
+ if (UI.getCurrent().isAttached())
+ statemachine.processEvent(statemachine, event);
+ }
+ }
+
+ /**
+ * @param doubleStr
+ * @return Double independent of locale
+ */
+ @Override
+ public Double parseDouble(String doubleStr) {
+ String doubleStrIn = doubleStr.replaceAll("[^\\d,\\.]++", "");
+ if (doubleStrIn.length() == 0) {
+ return 0.0;
+ }
+ if (doubleStrIn.matches(".+\\.\\d+,\\d+$"))
+ return Double.parseDouble(doubleStrIn.replaceAll("\\.", "")
+ .replaceAll(",", "."));
+ if (doubleStrIn.matches(".+,\\d+\\.\\d+$"))
+ return Double.parseDouble(doubleStrIn.replaceAll(",", ""));
+ return Double.parseDouble(doubleStrIn.replaceAll(",", "."));
+ }
+
+ /**
+ * Format a double.
+ *
+ * @param value
+ * the value
+ * @param length
+ * the total length of the resulting string
+ * @param precision
+ * the precision after decimal separator
+ * @return the string
+ */
+ @Override
+ public String formatDouble(Double value, int length, int precision) {
+ String format = String.format("%% %d.%df", length, precision);
+ return String.format(locale, format, value);
+ }
+
+ @Override
+ public String getTranslation(String token) {
+ return dslMetadataService.translate(locale.toLanguageTag(), token);
+ }
+
+ @Override
+ public void closeMessage(String messageId) {
+ if (messageDialogs.containsKey(messageId)) {
+ MessageDialog messageDialog = messageDialogs.get(messageId);
+ messageDialog.close();
+ UI.getCurrent().removeWindow(messageDialog);
+ messageDialogs.remove(messageId);
+ messageDialog = null;
+ }
+ }
+
+ @Override
+ public void openMessage(String messageId) {
+ openMessage(messageId, false);
+ }
+
+ @Override
+ public void openMessage(String messageId, boolean okButton) {
+ MessageDialog messageDialog = new MessageDialog(messageId,
+ getTranslation(messageId));
+ if (okButton) {
+ messageDialog.addButton(getTranslation("ok"), new MessageEvent(
+ EventType.MESSAGECLOSE, messageId));
+ messageDialog.addButtonListener(this);
+ }
+ messageDialogs.put(messageId, messageDialog);
+ UI.getCurrent().addWindow(messageDialog);
+ }
+
+ @Override
+ public void openQuestion(String messageId, EventType type, String yesEvent,
+ String noEvent, String cancelEvent) {
+ MessageDialog messageDialog = new MessageDialog(messageId,
+ getTranslation(messageId));
+ messageDialog.addButton(getTranslation("yes"), new MessageEvent(type,
+ yesEvent));
+ messageDialog.addButton(getTranslation("no"), new MessageEvent(type,
+ noEvent));
+ messageDialog.addButton(getTranslation("cancel"), new MessageEvent(
+ type, cancelEvent));
+ messageDialog.addButtonListener(this);
+ messageDialogs.put(messageId, messageDialog);
+ UI.getCurrent().addWindow(messageDialog);
+ }
+
+ @Override
+ public void messageButtonPressed(MessageRequesterEvent e) {
+ MessageDialog messageDialog = messageDialogs.get(e.getId());
+ messageDialog.close();
+ UI.getCurrent().removeWindow(messageDialog);
+ messageDialogs.remove(e.getId());
+ messageDialog = null;
+ this.processEvent(this, e.getEventData());
+ }
+
+ @Override
+ public void dispatchMessages(MessageEvent event) {
+ if (event.getType() == MessageEvent.EventType.TRIGGER) {
+ lastTrigger = event.getId();
+ }
+ switch (event.getType()) {
+ case ERROR:
+ openMessage(event.getId(), true);
+ break;
+ case MESSAGEOPEN:
+ openMessage(event.getId());
+ break;
+ case STATUSOPEN:
+ break;
+ case MESSAGECLOSE:
+ closeMessage(event.getId());
+ break;
+ case STATUSCLOSE:
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ public void clearParameters() {
+ parameters.clear();
+ }
+
+ @Override
+ public Object getStorage(String key, String attribute) {
+ if (storage.containsKey(key) && storage.get(key).containsKey(attribute)) {
+ return storage.get(key).get(attribute);
+ }
+ return null;
+ }
+
+ @Override
+ public Set<String> getStorageAttributes(String key) {
+ if (storage.containsKey(key)) {
+ return storage.get(key).keySet();
+ }
+ return null;
+ }
+
+ @Override
+ public void putStorage(String key, String attribute, Object content) {
+ if (!storage.containsKey(key)) {
+ storage.put(key, new HashMap<String, Object>());
+ }
+ storage.get(key).put(attribute, content);
+ }
+
+ @Override
+ public void openChannel(SelectableChannel channel) {
+ this.channel = channel;
+ }
+
+ @Override
+ public SelectableChannel getChannel() {
+ return channel;
+ }
+
+ @Override
+ public void closeChannel() {
+ if (channel != null) {
+ try {
+ channel.close();
+ } catch (IOException e) {
+ // do nothing
+ }
+ }
+ }
+
+ @Override
+ public String getLastTrigger() {
+ return lastTrigger;
+ }
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachineParticipant.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachineParticipant.java
new file mode 100644
index 0000000..d78c031
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/AbstractStateMachineParticipant.java
@@ -0,0 +1,289 @@
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Locale;
+
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.ecview.core.common.context.IViewContext;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachineParticipant;
+import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractStateMachineParticipant implements
+ IStateMachineParticipant {
+
+ /** The LOGGER. */
+ protected static final Logger LOGGER = LoggerFactory
+ .getLogger(AbstractStateMachineParticipant.class);
+ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ protected IStateMachine statemachine;
+ protected IViewContext viewContext;
+ protected Locale locale;
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ pcs.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName,
+ PropertyChangeListener listener) {
+ pcs.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ pcs.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName,
+ PropertyChangeListener listener) {
+ pcs.removePropertyChangeListener(propertyName, listener);
+ }
+
+ @Override
+ public IStateMachine getStatemachine() {
+ return statemachine;
+ }
+
+ @Override
+ public void setStatemachine(IStateMachine statemachine) {
+ this.statemachine = statemachine;
+ }
+
+ @Override
+ public void setViewContext(IViewContext viewContext) {
+ this.viewContext = viewContext;
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
+
+ @Override
+ public Method getter(Object listener, String id) {
+ if (id == null) {
+ return null;
+ }
+ Class<?> clz = listener.getClass();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(clz);
+ for (PropertyDescriptor desc : info.getPropertyDescriptors()) {
+ if (desc.getName().equalsIgnoreCase(id)) {
+ return desc.getReadMethod();
+ }
+ }
+ } catch (IntrospectionException e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ }
+
+ @Override
+ public Method setter(Object listener, String id,
+ Class<?> parameter) {
+ if (id == null) {
+ return null;
+ }
+ Class<?> clz = listener.getClass();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(clz);
+ for (PropertyDescriptor desc : info.getPropertyDescriptors()) {
+ if (desc.getName().equalsIgnoreCase(id)) {
+ if (parameter.isAssignableFrom(desc.getPropertyType())) {
+ return desc.getWriteMethod();
+ }
+ }
+ }
+ } catch (IntrospectionException e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?> getReturnType(Object obj, String id) {
+ if (id == null) {
+ return null;
+ }
+ Class<?> clz = obj.getClass();
+
+ try {
+ BeanInfo info = Introspector.getBeanInfo(clz);
+ for (PropertyDescriptor desc : info.getPropertyDescriptors()) {
+ if (desc.getName().equalsIgnoreCase(id)) {
+ Method method = desc.getReadMethod();
+ return method.getReturnType();
+ }
+ }
+ } catch (IntrospectionException e) {
+ LOGGER.error("{}", e);
+ }
+ return null;
+ }
+
+ @Override
+ public void set(Object obj, String id, Object content) {
+ try {
+ if (content instanceof String) {
+ Method method = setter(obj, id, String.class);
+ if (method != null) {
+ method.invoke(obj, (String) content);
+ }
+ } else if (content instanceof Double) {
+ Method method = setter(obj, id, Double.class);
+ if (method != null) {
+ method.invoke(obj, (Double) content);
+ }
+ } else if (content instanceof Integer) {
+ Method method = setter(obj, id, Integer.class);
+ if (method != null) {
+ method.invoke(obj, (Integer) content);
+ }
+ } else if (content instanceof Long) {
+ Method method = setter(obj, id, Long.class);
+ if (method != null) {
+ method.invoke(obj, (Long) content);
+ }
+ } else if (content instanceof Boolean) {
+ Method method = setter(obj, id, Boolean.class);
+ if (method != null) {
+ method.invoke(obj, (Boolean) content);
+ }
+ } else if (content instanceof BigDecimal) {
+ Method method = setter(obj, id, BigDecimal.class);
+ if (method != null) {
+ method.invoke(obj, (BigDecimal) content);
+ }
+ } else if (content instanceof IDto) {
+ Method method = setter(obj, id, IDto.class);
+ if (method != null) {
+ method.invoke(obj, (IDto) content);
+ }
+ } else if (content instanceof Date) {
+ Method method = setter(obj, id, Date.class);
+ if (method != null) {
+ method.invoke(obj, (Date) content);
+ }
+ } else if (content instanceof DateTime) {
+ Method method = setter(obj, id, DateTime.class);
+ if (method != null) {
+ method.invoke(obj, (DateTime) content);
+ }
+ }
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+
+ @Override
+ public Object get(Object obj, String id) {
+ Method method = getter(obj, id);
+ if (method == null) {
+ return null;
+ }
+ try {
+ return method.invoke(obj);
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ return null;
+ }
+ }
+
+ @Override
+ public void clear(Object obj, String id) {
+ Method method = setter(obj, id, String.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, "");
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, Double.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, 0.0);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, BigDecimal.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, 0.0);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, Integer.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, 0);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, Long.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, 0L);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, IDto.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, (Object[])null);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, Date.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, (Date)null);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ method = setter(obj, id, DateTime.class);
+ if (method != null) {
+ try {
+ method.invoke(obj, (DateTime)null);
+ return;
+ } catch (IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
+ LOGGER.error("{}", e);
+ }
+ }
+ }
+
+ abstract public void init();
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/POSServiceBinder.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/POSServiceBinder.java
new file mode 100644
index 0000000..fe972c6
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/POSServiceBinder.java
@@ -0,0 +1,32 @@
+package org.eclipse.osbp.abstractstatemachine;
+
+import org.eclipse.osbp.ui.api.pos.IPOSService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component
+public class POSServiceBinder {
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory.getLogger("servicebinder");
+
+ public static IPOSService posService;
+
+ @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC)
+ public void bindPOSService(IPOSService posService) {
+ LOGGER.debug(POSServiceBinder.class.getCanonicalName()+" bound");
+ POSServiceBinder.posService = posService;
+ }
+
+ public void unbindPOSService(IPOSService posService) {
+ LOGGER.debug(POSServiceBinder.class.getCanonicalName() + " unbound");
+ POSServiceBinder.posService = null;
+ }
+
+ public static IPOSService getPosService() {
+ return posService;
+ }
+}
diff --git a/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/TaskEventSource.java b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/TaskEventSource.java
new file mode 100644
index 0000000..6db5e19
--- /dev/null
+++ b/org.eclipse.osbp.abstractstatemachine/src/org/eclipse/osbp/abstractstatemachine/TaskEventSource.java
@@ -0,0 +1,25 @@
+package org.eclipse.osbp.abstractstatemachine;
+
+import java.util.TimerTask;
+
+import org.eclipse.osbp.ui.api.message.MessageEvent;
+import org.eclipse.osbp.ui.api.statemachine.IStateMachine;
+
+import com.vaadin.ui.UI;
+
+public class TaskEventSource extends TimerTask {
+ private IStateMachine statemachine;
+ private MessageEvent event;
+
+ public TaskEventSource(IStateMachine statemachine, MessageEvent event) {
+ this.statemachine = statemachine;
+ this.event = event;
+ }
+
+ @Override
+ public void run() {
+ if (UI.getCurrent().isAttached())
+ statemachine.processEvent(statemachine, event);
+ }
+
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..070b679
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#=======================================================================
+# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany).
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Loetz GmbH&Co.KG - initial API and implementation
+#=======================================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.releng.maven</groupId>
+ <artifactId>org.eclipse.osbp.releng.maven.parent.tycho</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.eclipse.osbp.abstractstatemachine</groupId>
+ <artifactId>org.eclipse.osbp.abstractstatemachine.aggregator</artifactId>
+ <packaging>pom</packaging>
+
+ <url>${osbp.site.repository.url}</url>
+ <scm>
+ <url>${osbp.scm.url}</url>
+ <connection>${osbp.scm.connection}</connection>
+ <developerConnection>${osbp.scm.connection.dev}</developerConnection>
+ <tag>HEAD</tag>
+ </scm>
+ <distributionManagement>
+ <site>
+ <id>gh-pages</id>
+ <name>OSBP GitHub Pages</name>
+ <url>${distribution.site.url}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+
+ <osbp.gitrepo.name>${project.groupId}</osbp.gitrepo.name>
+ </properties>
+
+ <modules>
+ <module>org.eclipse.osbp.abstractstatemachine</module>
+ <module>org.eclipse.osbp.abstractstatemachine.feature</module>
+ </modules>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <filters>
+ <filter>
+ <type>eclipse-plugin</type>
+ <id>org.apache.aries.transaction.manager</id>
+ <restrictTo>
+ <!-- use a range that does not exist, we can not mix removeall and versionRange -->
+ <versionRange>[0.5.0,0.5.1)</versionRange>
+ </restrictTo>
+ </filter>
+ </filters>
+ <resolver>p2</resolver>
+ <pomDependencies>consider</pomDependencies>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>