Commit 1e5737af authored by Oscar Scholten's avatar Oscar Scholten

ESSENTIALS-1043 improving REST setup tool and handling of 404s

- improving the REST setup tool to show the URL of the Content REST API resources
- adding exception mapper to suppress stack traces for 404s
- removing copyright header in spring-plain-rest-api.xml as it will be part of end project
parent 19ff0f2c
......@@ -28,12 +28,19 @@
<input type="checkbox" ng-model="isGenericContentRestApiEnabled"> Enable generic REST resources
</label>
</div>
<p>Choose the base URL for the generic REST resources</p>
<div class="input-group">
<span class="input-group-addon">http://localhost:8080/site/</span>
<input type="text" class="form-control" placeholder="<Endpoint name>"
ng-model="genericRestName" ng-pattern="/^[a-z\-]{1,}$/"
ng-required="isGenericContentRestApiEnabled"/>
<div ng-show="isGenericContentRestApiEnabled">
<p>Choose the base URL for the generic REST resources</p>
<div class="input-group">
<span class="input-group-addon">http://localhost:8080/site/</span>
<input type="text" class="form-control" placeholder="<Endpoint name>"
ng-model="genericRestName" ng-pattern="/^[a-z\-]{1,}$/"
ng-required="isGenericContentRestApiEnabled"/>
</div>
<p style="padding-top: 8px">The following REST resource will be available:
<a href="http://localhost:8080/site/{{genericRestName}}/documents" target="_blank">
http://localhost:8080/site/{{genericRestName}}/documents
</a>
</p>
</div>
</form>
<form novalidate name="manualRestForm">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2014 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -37,6 +22,7 @@
</list>
</property>
</bean>
<!--
JAXB CONTEXT MAPPINGS
-->
......@@ -54,11 +40,16 @@
-->
</bean>
<bean id="jaxrsRestExceptionMapper" class="org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper">
<property name="printStackTrace" value="false" />
</bean>
<bean id="essentialsRestAllEntityProviders" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="jaxrsRestJsonProvider"/>
<ref bean="jaxrsHippoContextProvider"/>
<ref bean="jaxrsRestExceptionMapper"/>
</list>
</property>
</bean>
......@@ -87,7 +78,4 @@
<property name="valveName" value="jaxrsRestPlainServiceValve"/>
</bean>
</beans>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment