summaryrefslogtreecommitdiffstats
path: root/src/main/webapp/WEB-INF
diff options
context:
space:
mode:
authorVarun Gudisena <vg411h@att.com>2017-08-30 16:00:10 -0500
committerVarun Gudisena <vg411h@att.com>2017-08-30 16:00:18 -0500
commitca63da6e0cb7fb63e231343d0b52a40036f6b6aa (patch)
tree1f03578a5badef32c983b1ebcab9df447b30e214 /src/main/webapp/WEB-INF
parentd53cd5dba6a7a74bba79d8e4bca5c60d0c9779b8 (diff)
Add Initial Code Import
Added initial code for DMaaP Message Router Component Issue-id: DMAAP-76 Change-Id: Ica6f265ea4f2901cf47191f21b4448514ea7c8d4 Signed-off-by: Varun Gudisena <vg411h@att.com>
Diffstat (limited to 'src/main/webapp/WEB-INF')
-rw-r--r--src/main/webapp/WEB-INF/spring-context.xml122
-rw-r--r--src/main/webapp/WEB-INF/web.xml45
2 files changed, 167 insertions, 0 deletions
diff --git a/src/main/webapp/WEB-INF/spring-context.xml b/src/main/webapp/WEB-INF/spring-context.xml
new file mode 100644
index 0000000..d7f128e
--- /dev/null
+++ b/src/main/webapp/WEB-INF/spring-context.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ org.onap.dmaap
+ ================================================================================
+ Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ ============LICENSE_END=========================================================
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+ <!-- Dependency Injection with annotations -->
+ <context:component-scan
+ base-package="com.att.nsa.cambria.utils, com.att.nsa.cambria, com.att.nsa.cambria.rest,
+ com.att.nsa.cambria.service.impl,com.att.nsa.cambria.beans,com.att.nsa.cambria.security,
+ com.att.nsa.cambria.transaction,com.att.nsa.cambria.exception" />
+
+ <context:property-placeholder
+ location="classpath:msgRtrApi.properties,classpath:DMaaPErrorMesaages.properties" />
+
+
+ <bean id="propertyReader" class="com.att.nsa.cambria.utils.PropertyReader" />
+ <bean
+ class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <!-- Next value is the full qualified name of the static setter including
+ method name -->
+ <property name="staticMethod"
+ value="com.att.nsa.cambria.beans.DMaaPKafkaConsumerFactory.populateKafkaInternalDefaultsMap" />
+ <property name="arguments">
+ <list>
+ <ref bean="propertyReader" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="drumlinRequestRouter"
+ class="com.att.nsa.drumlin.service.framework.routing.DrumlinRequestRouter" />
+
+ <bean id="dMaaPMetricsSet" class="org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.beans.DMaaPMetricsSet">
+ <constructor-arg ref="propertyReader" />
+ </bean>
+
+ <bean id="dMaaPZkClient" class=" org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.beans.DMaaPZkClient">
+ <constructor-arg ref="propertyReader" />
+ </bean>
+
+ <bean id="dMaaPZkConfigDb" class=" org.onap.dmaap.messagerouter.msgrt.nsa.cambria.beans.DMaaPZkConfigDb">
+ <constructor-arg ref="dMaaPZkClient" />
+ <constructor-arg ref="propertyReader" />
+ </bean>
+
+ <bean id="kafkaPublisher" class=" org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.backends.kafka.KafkaPublisher">
+ <constructor-arg ref="propertyReader" />
+ </bean>
+
+ <bean id="dMaaPKafkaConsumerFactory" class=" org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.beans.DMaaPKafkaConsumerFactory">
+ <constructor-arg ref="propertyReader" />
+ <constructor-arg ref="dMaaPMetricsSet" />
+ <constructor-arg ref="curator" />
+ </bean>
+
+ <bean id="curator" class="org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.utils.DMaaPCuratorFactory"
+ factory-method="getCurator">
+ <constructor-arg ref="propertyReader" />
+ </bean>
+
+ <bean id="dMaaPKafkaMetaBroker" class=" org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.beans.DMaaPKafkaMetaBroker">
+ <constructor-arg ref="propertyReader" />
+ <constructor-arg ref="dMaaPZkClient" />
+ <constructor-arg ref="dMaaPZkConfigDb" />
+ </bean>
+
+ <bean id="q" class=" org.onap.dmaap.messagerouter.msgrtr.com.att.nsa.cambria.backends.memory.MemoryQueue" />
+
+ <bean id="mmb" class=" org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.backends.memory.MemoryMetaBroker">
+ <constructor-arg ref="q" />
+ <constructor-arg ref="dMaaPZkConfigDb" />
+ <!-- <constructor-arg ref="propertyReader" />-->
+ </bean>
+
+ <bean id="dMaaPNsaApiDb" class="org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.beans.DMaaPNsaApiDb"
+ factory-method="buildApiKeyDb">
+ <constructor-arg ref="propertyReader" />
+ <constructor-arg ref="dMaaPZkConfigDb" />
+ </bean>
+
+ <!-- <bean id="dMaaPTranDb" class="com.att.nsa.cambria.transaction.DMaaPTransactionDB"
+ factory-method="buildTransactionDb"> <constructor-arg ref="propertyReader"
+ /> <constructor-arg ref="dMaaPZkConfigDb" /> </bean> -->
+
+ <bean id="dMaaPAuthenticatorImpl" class="org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.security.DMaaPAuthenticatorImpl">
+ <constructor-arg ref="dMaaPNsaApiDb" />
+ </bean>
+ <bean id="defLength" class="org.onap.dmaap.messagerouter.msgrtr.nsa.filter.DefaultLength">
+ <property name="defaultLength" value="${maxcontentlength}"></property>
+ </bean>
+
+ <!-- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location"> <value>msgRtrApi.properties</value> </property>
+ </bean> -->
+
+</beans> \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..c3e07b5
--- /dev/null
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ org.onap.dmaap
+ ================================================================================
+ Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ ============LICENSE_END=========================================================
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+ -->
+
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>DMaaP</display-name>
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/spring-context.xml</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.listener.CambriaServletContextListener</listener-class>
+ </listener>
+ <filter>
+ <display-name>ContentLengthFilter</display-name>
+ <filter-name>ContentLengthFilter</filter-name>
+ <filter-class>org.onap.dmaap.messagerouter.msgrtr.nsa.filter.ContentLengthFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ContentLengthFilter</filter-name>
+ <url-pattern>/dmaaprest/events/*</url-pattern>
+ </filter-mapping>
+</web-app> \ No newline at end of file