Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Joy2013-09-19 14:54:43 +0000
committerMark Joy2013-11-05 17:19:28 +0000
commit0b44c374e541bd2e604ca2ffa4e2625400db3328 (patch)
tree008b2a86ef407ec20d55f172973125cc79f69b85 /plugins/org.eclipse.osee.orcs.rest
parent69902b6e232a1c41a19951848ad815ce8e2695af (diff)
downloadorg.eclipse.osee-0b44c374e541bd2e604ca2ffa4e2625400db3328.tar.gz
org.eclipse.osee-0b44c374e541bd2e604ca2ffa4e2625400db3328.tar.xz
org.eclipse.osee-0b44c374e541bd2e604ca2ffa4e2625400db3328.zip
feature[ats_VHLVP]: Generate REST API documentation and WADL.
Change-Id: Iae4694914895459bf415e437e4533bc1c07b2870 Signed-off-by: Mark Joy <mark.joy@boeing.com>
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.rest')
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/REST-INF/.gitignore3
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/REST-INF/application-doc.xml4
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/REST-INF/application-grammars.xml4
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/build.properties3
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/pom.xml144
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/ArtifactsResource.java3
6 files changed, 158 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.orcs.rest/REST-INF/.gitignore b/plugins/org.eclipse.osee.orcs.rest/REST-INF/.gitignore
new file mode 100644
index 0000000000..8c14cbaaf8
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs.rest/REST-INF/.gitignore
@@ -0,0 +1,3 @@
+/doc
+/application.wadl
+/resourcedoc.xml
diff --git a/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-doc.xml b/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-doc.xml
new file mode 100644
index 0000000000..cb7141a240
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-doc.xml
@@ -0,0 +1,4 @@
+<applicationDocs targetNamespace="http://research.sun.com/wadl/2006/10">
+ <doc xml:lang="en" title="The OSEE Branch API">
+ </doc>
+</applicationDocs> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-grammars.xml b/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-grammars.xml
new file mode 100644
index 0000000000..ae7652d9f8
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs.rest/REST-INF/application-grammars.xml
@@ -0,0 +1,4 @@
+<grammars xmlns="http://research.sun.com/wadl/2006/10" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xi="http://www.w3.org/1999/XML/xinclude">
+ <include href="xsd0.xsd" />
+</grammars> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.rest/build.properties b/plugins/org.eclipse.osee.orcs.rest/build.properties
index c58ea2178c..d9e9369c5d 100644
--- a/plugins/org.eclipse.osee.orcs.rest/build.properties
+++ b/plugins/org.eclipse.osee.orcs.rest/build.properties
@@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- OSGI-INF/
+ OSGI-INF/,\
+ REST-INF/
diff --git a/plugins/org.eclipse.osee.orcs.rest/pom.xml b/plugins/org.eclipse.osee.orcs.rest/pom.xml
index a6a015ba6a..17fd8c8449 100644
--- a/plugins/org.eclipse.osee.orcs.rest/pom.xml
+++ b/plugins/org.eclipse.osee.orcs.rest/pom.xml
@@ -29,6 +29,148 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>${maven-clean-version}</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>REST-INF</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>application-doc.xml</exclude>
+ <exclude>application-grammars.xml</exclude>
+ <exclude>.gitignore</exclude>
+ </excludes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${javadoc-version}</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>resource-doc-orcs</id>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <debug>false</debug>
+ <encoding>UTF-8</encoding>
+ <verbose>false</verbose>
+ <show>public</show>
+ <sourcepath>${basedir}/src:${basedir}/../org.eclipse.osee.orcs.rest.model/src</sourcepath>
+ <subpackages>org.eclipse.osee.orcs.rest.internal.search:org.eclipse.osee.orcs.rest.internal:org.eclipse.osee.orcs.rest.model:org.eclipse.osee.orcs.rest.model.search</subpackages>
+ <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
+ <docletArtifacts>
+ <docletArtifact>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>wadl-resourcedoc-doclet</artifactId>
+ <version>${jersey-wadlgen-version}</version>
+ </docletArtifact>
+ <docletArtifact>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey-version}</version>
+ </docletArtifact>
+ <docletArtifact>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${xerces-version}</version>
+ </docletArtifact>
+ </docletArtifacts>
+ <additionalparam>-output
+ ${rest-output-directory}/resourcedoc.xml</additionalparam>
+ <useStandardDocletOptions>false</useStandardDocletOptions>
+ </configuration>
+ </execution>
+ <execution>
+ <id>jaxb-report-orcs</id>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <inherited>false</inherited>
+ <debug>false</debug>
+ <verbose>false</verbose>
+ <name>JAXB Report</name>
+ <description>All the JAXB models</description>
+ <sourcepath>${basedir}/../org.eclipse.osee.orcs.rest.model/src</sourcepath>
+ <subpackages>org.eclipse.osee.orcs.rest.model:org.eclipse.osee.orcs.rest.model.search</subpackages>
+ <reportOutputDirectory>${rest-output-directory}</reportOutputDirectory>
+ <destDir>doc/models</destDir>
+ <doclet>com.lunatech.doclets.jax.jaxb.JAXBDoclet</doclet>
+ <docletArtifacts>
+ <docletArtifact>
+ <groupId>com.lunatech.jax-doclets</groupId>
+ <artifactId>doclets</artifactId>
+ <version>${jaxdoclet-version}</version>
+ </docletArtifact>
+ </docletArtifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>maven-wadl-plugin</artifactId>
+ <version>${jersey-wadlgen-version}</version>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <phase>compile</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <wadlFile>${rest-output-directory}/application.wadl</wadlFile>
+ <formatWadlFile>true</formatWadlFile>
+ <baseUri>oseex</baseUri>
+ <packagesResourceConfig>
+ <param>org.eclipse.osee.orcs.rest.internal</param>
+ <param>org.eclipse.osee.orcs.rest.internal.search</param>
+ <param>org.eclipse.osee.orcs.rest.model.search</param>
+ </packagesResourceConfig>
+ <wadlGenerators>
+ <wadlGeneratorDescription>
+ <className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
+ <properties>
+ <property>
+ <name>applicationDocsFile</name>
+ <value>${rest-output-directory}/application-doc.xml</value>
+ </property>
+ </properties>
+ </wadlGeneratorDescription>
+ <wadlGeneratorDescription>
+ <className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport</className>
+ <properties>
+ <property>
+ <name>grammarsFile</name>
+ <value>${rest-output-directory}/application-grammars.xml</value>
+ </property>
+ </properties>
+ </wadlGeneratorDescription>
+ <wadlGeneratorDescription>
+ <className>com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport</className>
+ <properties>
+ <property>
+ <name>resourceDocFile</name>
+ <value>${rest-output-directory}/resourcedoc.xml</value>
+ </property>
+ </properties>
+ </wadlGeneratorDescription>
+ </wadlGenerators>
+ </configuration>
+ </plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/ArtifactsResource.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/ArtifactsResource.java
index cce74a1b98..8caf6ae2e8 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/ArtifactsResource.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/ArtifactsResource.java
@@ -60,7 +60,8 @@ public class ArtifactsResource {
public String getAsHtml() throws OseeCoreException {
IOseeBranch branch = TokenFactory.createBranch(branchUuid, "");
QueryFactory factory = OrcsApplication.getOrcsApi().getQueryFactory(null);
- ResultSet<ArtifactReadable> results = factory.fromBranch(branch).andNameEquals(DEFAULT_HIERARCHY_ROOT_NAME).getResults();
+ ResultSet<ArtifactReadable> results =
+ factory.fromBranch(branch).andNameEquals(DEFAULT_HIERARCHY_ROOT_NAME).getResults();
ArtifactReadable rootArtifact = results.getExactlyOne();
ResultSet<ArtifactReadable> arts = rootArtifact.getChildren();

Back to the top