summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/beans-services.xml67
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/jetty-web.xml8
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/spring-mapper-servlet.xml12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/web.xml81
4 files changed, 168 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/beans-services.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/beans-services.xml
new file mode 100644
index 0000000000..c41bc03473
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/beans-services.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:websocket="http://www.springframework.org/schema/websocket"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/websocket
+ http://www.springframework.org/schema/websocket/spring-websocket.xsd">
+
+
+ <!-- CXF -->
+ <context:component-scan base-package="org.openecomp.sdcrests"/>
+
+ <!-- Needed for JSR-303 validations. May be removed when moving to JAX-RS 2.0 -->
+ <bean class="org.springframework.validation.beanvalidation.MethodValidationPostProcessor"/>
+
+ <bean id="jacksonObjectMapper" class="org.codehaus.jackson.map.ObjectMapper">
+ <property name="serializationInclusion" value="NON_NULL"/>
+ </bean>
+
+ <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
+ <property name="mapper" ref="jacksonObjectMapper"/>
+ </bean>
+
+ <!-- WEB-SOCKETS -->
+ <websocket:handlers allowed-origins="*">
+ <websocket:mapping path="/notificationHandler" handler="notificationHandler"/>
+ <websocket:handshake-handler ref="handshakeHandler"/>
+ </websocket:handlers>
+
+ <bean id="newNotificationsReader" class="org.openecomp.sdc.notification.workers.impl.NewNotificationsReaderRestImpl"/>
+
+ <bean id="notificationWorker" class="org.openecomp.sdc.notification.workers.NotificationWorker">
+ <constructor-arg ref="newNotificationsReader"/>
+ </bean>
+
+ <bean id="notificationHandler" class="org.openecomp.sdc.notification.websocket.NotificationWebsocketHandler">
+ <constructor-arg ref="notificationWorker"/>
+ </bean>
+
+ <bean class="org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean">
+ <property name="maxTextMessageBufferSize" value="8192"/>
+ <property name="maxBinaryMessageBufferSize" value="8192"/>
+ </bean>
+
+ <bean id="handshakeHandler" class="org.springframework.web.socket.server.support.DefaultHandshakeHandler">
+ <constructor-arg ref="upgradeStrategy"/>
+ </bean>
+
+ <bean id="upgradeStrategy" class="org.springframework.web.socket.server.jetty.JettyRequestUpgradeStrategy">
+ <constructor-arg ref="serverFactory"/>
+ </bean>
+
+ <bean id="serverFactory" class="org.eclipse.jetty.websocket.server.WebSocketServerFactory">
+ <constructor-arg>
+ <bean class="org.eclipse.jetty.websocket.api.WebSocketPolicy">
+ <constructor-arg value="SERVER"/>
+ <property name="inputBufferSize" value="8092"/>
+ <property name="idleTimeout" value="600000"/>
+ </bean>
+ </constructor-arg>
+ </bean>
+
+</beans>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/jetty-web.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/jetty-web.xml
new file mode 100644
index 0000000000..443b6a1fd3
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/jetty-web.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC
+ "-//Mort Bay Consulting//DTD Configure//EN"
+ "http://www.eclipse.org/jetty/configure_9_0.dtd">
+
+<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+ <Set name="contextPath">/notification-api</Set>
+</Configure>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/spring-mapper-servlet.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/spring-mapper-servlet.xml
new file mode 100644
index 0000000000..2851d560ce
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/spring-mapper-servlet.xml
@@ -0,0 +1,12 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+ <property name="mappings">
+ <props>
+ </props>
+ </property>
+ </bean>
+
+</beans>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/web.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..354fcbfac6
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,81 @@
+<web-app
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+ version="3.0">
+
+
+ <!-- Spring -->
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans-services.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.openecomp.server.listeners.OnboardingAppStartupListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>cross-origin</filter-name>
+ <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
+ <init-param>
+ <param-name>allowedOrigins</param-name>
+ <param-value>*</param-value>
+ </init-param>
+ <init-param>
+ <param-name>allowedMethods</param-name>
+ <param-value>*</param-value>
+ </init-param>
+ <init-param>
+ <param-name>allowedHeaders</param-name>
+ <param-value>*</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>cross-origin</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <!-- Spring WS Mapping -->
+ <servlet>
+ <servlet-name>spring-mapper</servlet-name>
+ <servlet-class>
+ org.springframework.web.servlet.DispatcherServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- CXF -->
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <init-param>
+ <param-name>redirects-list</param-name>
+ <param-value>
+ /docs/(\S)+\.json
+ </param-value>
+ </init-param>
+ <init-param>
+ <param-name>redirect-attributes</param-name>
+ <param-value>
+ javax.servlet.include.request_uri
+ </param-value>
+ </init-param>
+ <init-param>
+ <param-name>redirect-servlet-name</param-name>
+ <param-value>default</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>spring-mapper</servlet-name>
+ <url-pattern>/ws/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>