Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing page for the Series REST-API #382

Merged
merged 15 commits into from
Jun 15, 2017

Conversation

antego
Copy link
Contributor

@antego antego commented May 20, 2017

Implementation of requested feature #134

antego added 9 commits May 18, 2017 23:22
(cherry picked from commit 88f792b)
(cherry picked from commit e8f6855)
(cherry picked from commit dcc3a76)
…page

Conflicts:
	rest/pom.xml
	spi-impl/series/series-dao-webapp/src/main/webapp/WEB-INF/spring/api_v1_mvc.xml
	spi-impl/series/series-dao-webapp/src/main/webapp/WEB-INF/spring/dispatcher-servlet.xml
	spi-impl/series/series-dao-webapp/src/main/webapp/WEB-INF/web.xml
@antego
Copy link
Contributor Author

antego commented May 21, 2017

The merge conflict is because I've forgot to pull the changes from the upstream repo. Therefore I've edited the series-dao before It has been moved to the separate repo. @ridoo, can you tell me please in which SPI implementations the landing page should be added?

@ridoo
Copy link
Member

ridoo commented May 22, 2017

I think, it would be nice if you create an extra module which can be overlayed in the webapp module of the actual SPI implementation.

Probably this module can be further used later on to add other stuff like Web API documentation (not sure if there is a Jekyll-Maven plugin which could trigger a site build on mvn install),

What do you think?

Copy link
Member

@ridoo ridoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. move content to an extra module which can be overlayed (see examples on SOS webapp) on the actual webapp (like in dao-series-api)
  2. make changes to avoid configuration conflicts

public class LandingPageController {
@RequestMapping
public String redirectToLandingPage() {
return "redirect:/api/";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will break, if implementations choose different servlet contexts thant /api/* (see web.xml). You could configure the context, though, within the application.properties

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

<!-- </bean> -->
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a prefix different from / just to separate API-related content from stuff the actual webapp ships.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to the landing directory

@ridoo ridoo mentioned this pull request May 22, 2017
@antego
Copy link
Contributor Author

antego commented May 22, 2017

Yes, it makes sense to include resources in a common module. Also have found this maven-jekyll plugin. It can be an option, if the windows builds are not required.

@ridoo
Copy link
Member

ridoo commented May 23, 2017

cool .. you could give it a try .. make sure that you place the plugin in a profile which is only run on Linux machines

@antego
Copy link
Contributor Author

antego commented May 24, 2017

I can't build the proxy on the antego/series-sos-proxy@80327c5 commit.

[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[33,47] package org.n52.io.response.dataset.measurement does not exist
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[34,47] package org.n52.io.response.dataset.measurement does not exist
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[45,66] cannot find symbol
[ERROR] symbol: class MeasurementValue
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[60,12] cannot find symbol
[ERROR] symbol:   class MeasurementValue
[ERROR] location: class org.n52.proxy.db.da.ProxyMeasurementDataRepository
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[66,12] cannot find symbol
[ERROR] symbol:   class MeasurementValue
[ERROR] location: class org.n52.proxy.db.da.ProxyMeasurementDataRepository
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[72,15] cannot find symbol
[ERROR] symbol:   class MeasurementData
[ERROR] location: class org.n52.proxy.db.da.ProxyMeasurementDataRepository
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[78,15] cannot find symbol
[ERROR] symbol:   class MeasurementData
[ERROR] location: class org.n52.proxy.db.da.ProxyMeasurementDataRepository
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyTimeseriesRepository.java:[33,27] cannot find symbol
[ERROR] symbol:   class TimeseriesMetadataOutput
[ERROR] location: package org.n52.io.response
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyTimeseriesRepository.java:[50,15] cannot find symbol
[ERROR] symbol:   class TimeseriesMetadataOutput
[ERROR] location: class org.n52.proxy.db.da.ProxyTimeseriesRepository
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyMeasurementDataRepository.java:[43,8] cannot access org.n52.io.response.dataset.measurement.MeasurementData
[ERROR] class file for org.n52.io.response.dataset.measurement.MeasurementData not found
[ERROR] /home/anton/IdeaProjects/52north/series-sos-proxy/proxy-dao/src/main/java/org/n52/proxy/db/da/ProxyTimeseriesRepository.java:[44,8] cannot access org.n52.io.response.TimeseriesMetadataOutput
[ERROR] class file for org.n52.io.response.TimeseriesMetadataOutput not found

Did I forget to build something else?

@ridoo
Copy link
Member

ridoo commented May 26, 2017

Please check if you are on the newest revision ... hint: have a look at other repositories available

@antego
Copy link
Contributor Author

antego commented May 30, 2017

Copied the Jekyll docs to the new module for building them via the maven. Added the version label and link to source code.

@ridoo
Copy link
Member

ridoo commented May 31, 2017

@antego could you please also create PR on the https://github.com/52North/dao-series-api repo showing how you integrated the new overlay module? Please reference the PR here so that one can reproduce what you are doing

@antego
Copy link
Contributor Author

antego commented May 31, 2017 via email

@antego antego closed this May 31, 2017
@antego antego reopened this May 31, 2017
@antego
Copy link
Contributor Author

antego commented May 31, 2017

@ridoo I've created a PR which integrates the new module into a webapp 52North/sensorweb-server-dao-impl#43.

@ridoo ridoo merged commit d3e1483 into 52North:develop Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants