aboutsummaryrefslogtreecommitdiffstats
path: root/winery/org.eclipse.winery.repository/README.md
blob: 92527a28e05b37247d3aee43c9f56341a90cb1b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Winery Repository

Setup, usage, and implementation hints are given in the [Eclipse Wiki]

## REST API
Winery offers a REST API to communicate with the backend.
When issuing an `OPTIONS` request to `winery/`, a [RestDoc] description of the possible interactions is presented.
The returned JSON can be views in a browsable html format using [restdoc-renderer].
If you install restdoc-renderer as `restdoc.html` in the `ROOT` of the tomcat, Winery automatically displays a link to the renderer in the about dialog.

## About the code
The code tries to make use of EL and JSP tags wherever possible. All data is accessible via a REST API.
The REST API does **not** follow the HATEOAS approach.
The URLs follow the pattern `/<type>/<encoded namespace>/<encoded id>`, where `type` is `servicetemplate`, `nodetype`, ...
Below a concrete instanance, subresources such as `name` exist.

Definitions are not modeled as explicit element. Only the nested elements are handled by Winery.
That means, it is not possible to specify custom definitions bundling a customized subset of available elements.

Intentionally, a QName should be unique within the repository.
We did not follow this assumption, but only require that QNames are unique within a type.
That means, the repository allows `{http://www.example.org}id` for both a service template and a node type.
We introduced TOSCAcomponentId uniquely identifying a TOSCA element.
Future versions might redesign the backend to use a QName as the unique key.

Currently, Winery is switching from plain Javascript library loading to [RequireJS].

The file `src/main/webapp/WEB-INF/common-functions.tld` and the files in `src/main/webapp/WEB-INF/tags/common` are copied from the sister project `org.eclipse.winery.topologymodler` at `mvn generate-sources`.

### Trouble shooting
In case, `Version.java` is not found, then run `mvn compile`, which should trigger a regeneration of Version.java.

The error message
`HTTP Status 500 - com.sun.jersey.api.container.ContainerException: org.apache.jasper.JasperException: The absolute uri: http://www.eclipse.org/winery/functions cannot be resolved in either web.xml or the jar files deployed with this application` indicates that `mvn generate-sources` was not run.

In case `javax.servlet.jsp.PageContext` cannot be found:
Project -> right click -> Properties -> Project Facets -> Dynamic Web Module -> "Runtimes" -> "New..."

When running in jetty 9.0.5, there is always the error message "Request Entity Too Large" when uploading a file.
There is the `maxFormContentSize` set in `jetty-web.xml`, but it currently does not help to solve this issue.

When doing a copy-libs-to-tomcat hack, possibly "W3C_XML_SCHEMA_NS_URI cannot be resolved or is not a field" appears.
Remove `stax-api-1.0.1.jar` out of `tomcat7/lib`: Java's `rt.jar` should be used instead for `javax.xml.XMLConstants`.

## License
Copyright (c) 2012-2014 University of Stuttgart.

All rights reserved. This program and the accompanying materials
are made available under the terms of the [Eclipse Public License v1.0]
and the [Apache License v2.0] which both accompany this distribution,
and are available at http://www.eclipse.org/legal/epl-v10.html
and http://www.apache.org/licenses/LICENSE-2.0

Contributors:
* Oliver Kopp - initial API and implementation


 [Apache License v2.0]: http://www.apache.org/licenses/LICENSE-2.0.html
 [Eclipse Wiki]: http://wiki.eclipse.org/winery
 [Eclipse Public License v1.0]: http://www.eclipse.org/legal/epl-v10.html
 [RequireJS]: http://requirejs.org/
 [RestDoc]: http://www.restdoc.org
 [restdoc-renderer]: https://github.com/hoegertn/restdoc-renderer