Skip to content

Commit

Permalink
Added State service
Browse files Browse the repository at this point in the history
Added a service for managing other services' states and did first pass
at having the vaadin csv service interacting with it.

In response to issue #179

Signed-off-by: Robert Smith <smithrw@ornl.gov>
  • Loading branch information
SmithRWORNL committed Feb 27, 2019
1 parent 0dbf9da commit 7872614
Show file tree
Hide file tree
Showing 19 changed files with 778 additions and 31 deletions.
1 change: 1 addition & 0 deletions org.eclipse.eavp.aggregator/pom.xml
Expand Up @@ -16,6 +16,7 @@
<module>../org.eclipse.eavp.micro</module>
<module>../org.eclipse.eavp.test.micro</module>
<module>../org.eclipse.eavp.micro.rdf</module>
<module>../org.eclipse.eavp.micro.state</module>
<module>../org.eclipse.eavp.micro.vaadin.csv</module>
<module>../org.eclipse.eavp.test.micro.vaadin.csv</module>
</modules>
Expand Down
Expand Up @@ -150,7 +150,7 @@ public InputStream get(@QueryParam("identifier") String identifier, @QueryParam(
}

// If the real value couldn't be found, return an empty stream
return new ByteArrayInputStream(null);
return new ByteArrayInputStream(new byte[0]);
}

/**
Expand Down Expand Up @@ -193,7 +193,7 @@ public InputStream getDestructive(@QueryParam("identifier") String identifier,
}

// If the real value couldn't be found, return an empty stream
return new ByteArrayInputStream(null);
return new ByteArrayInputStream(new byte[0]);
}

/**
Expand All @@ -203,11 +203,13 @@ public InputStream getDestructive(@QueryParam("identifier") String identifier,
* @param service The service which created the new artifact
* @param artifact The artifact to be stored in the database
*/
@POST
@PUT
@Path("/put")
public void put(@QueryParam("identifier") String identifier,
@QueryParam("service") String service, InputStream artifact) {

System.out.println("RDF PUT identifier: " + identifier + " service: " + service + " artifact: " + artifact);

//Delete any previous artifact
delete(identifier, service);

Expand Down
81 changes: 81 additions & 0 deletions org.eclipse.eavp.micro.state/.classpath
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/atmosphere-runtime-2.4.11.vaadin2.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/commons-lang3-3.3.2.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/dcharts-widget-1.7.0.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/gentyref-1.2.0.vaadin1.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/gwt-servlet-2.8.1.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/vaadin-context-menu-2.0.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="WEB-INF/lib/jsoup-1.8.3.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/aopalliance-repackaged-2.5.0-b42.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/cdi-api-1.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/el-api-2.2.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/flute-1.3.0.gg2.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/hk2-api-2.5.0-b42.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/hk2-locator-2.5.0-b42.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/hk2-utils-2.5.0-b42.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javassist-3.22.0-CR2.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.annotation-api-1.2.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.inject-1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.inject-2.5.0-b42.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.json-1.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.json-api-1.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.json.bind-api-1.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.servlet-api-3.0.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/javax.ws.rs-api-2.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jaxb-api-2.2.7.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-client.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-common.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-container-servlet-core.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-container-servlet.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-hk2.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-media-jaxb.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-media-json-binding.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-media-sse.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-server.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jsr250-api-1.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/org.osgi.core-4.2.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/osgi-resource-locator-1.0.1.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/persistence-api-1.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/sac-1.3.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/validation-api-1.1.0.Final.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/yasson-1.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/jersey-media-multipart-2.17.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/mimepull-1.9.3.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/aceeditor-0.8.15.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/vaadin-client-compiled-8.4.0.jar"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="target/generated-resources/gwt">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="WEB-INF/lib/spring-boot-starter-security-2.0.3.RELEASE.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/spring-core-5.0.7.RELEASE.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/spring-ldap-core-2.3.2.RELEASE.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/spring-security-ldap-5.0.6.RELEASE.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/vaadin-push-8.4.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/vaadin-server-8.4.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/vaadin-shared-8.4.0.jar"/>
<classpathentry kind="lib" path="WEB-INF/lib/vaadin-themes-8.4.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
3 changes: 3 additions & 0 deletions org.eclipse.eavp.micro.state/.gitignore
@@ -0,0 +1,3 @@
/bin
/target
/WEB-INF/*
40 changes: 40 additions & 0 deletions org.eclipse.eavp.micro.state/.project
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.eavp.micro.state</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</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.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
28 changes: 28 additions & 0 deletions org.eclipse.eavp.micro.state/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>July 1, 2014</p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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>
22 changes: 22 additions & 0 deletions org.eclipse.eavp.micro.state/build.properties
@@ -0,0 +1,22 @@
output.. = bin/
source.. = src/
bin.includes = .,\
META-INF/,\
plugin.xml,\
build.properties,\
icons/,\
about.html,\
license.html,\
WEB-INF/lib/atmosphere-runtime-2.4.11.vaadin2.jar,\
WEB-INF/lib/commons-lang3-3.3.2.jar,\
WEB-INF/lib/dcharts-widget-1.7.0.jar,\
WEB-INF/lib/gentyref-1.2.0.vaadin1.jar,\
WEB-INF/lib/gwt-servlet-2.8.1.jar,\
WEB-INF/lib/vaadin-client-compiled-8.2.0.jar,\
WEB-INF/lib/vaadin-context-menu-2.0.0.jar,\
WEB-INF/lib/vaadin-push-8.2.0.jar,\
WEB-INF/lib/vaadin-server-8.2.0.jar,\
WEB-INF/lib/vaadin-shared-8.2.0.jar,\
WEB-INF/lib/vaadin-themes-8.2.0.jar
src.includes = VisualizationRCPApp.launch,\
icons/
107 changes: 107 additions & 0 deletions org.eclipse.eavp.micro.state/license.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 &quot;CONTENT&quot;). 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
(&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</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 (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</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 &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; 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 (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; 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 &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). 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 &quot;src&quot; 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 (&quot;Feature Update License&quot;) 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 &quot;license&quot; property of files named &quot;feature.properties&quot; 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 (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
other materials (collectively &quot;Installable Software&quot;). 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>
(&quot;Specification&quot;).</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 (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
on a machine (&quot;Target Machine&quot;) 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 (&quot;Installable Software Agreement&quot;) 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>

0 comments on commit 7872614

Please sign in to comment.