diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/ajsc/dmaap_v1/dmaap/v1/conf/FileMonitorBeans.xml | 6 | ||||
-rw-r--r-- | src/main/ajsc/dmaap_v1/dmaap/v1/conf/HelloWorldBeans.xml | 2 | ||||
-rw-r--r-- | src/main/ajsc/dmaap_v1/dmaap/v1/conf/jaxrsBeans.groovy | 20 | ||||
-rw-r--r-- | src/main/ajsc/dmaap_v1/dmaap/v1/conf/serviceBeans.xml | 42 | ||||
-rw-r--r-- | src/main/ajsc/dmaap_v1/dmaap/v1/routes/topicService.route | 4 | ||||
-rw-r--r-- | src/main/config/runner-web.xml | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/DMaaPCambriaExceptionMapper.java (renamed from src/main/java/com/att/nsa/dmaap/DMaaPCambriaExceptionMapper.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/DMaaPWebExceptionMapper.java (renamed from src/main/java/com/att/nsa/dmaap/DMaaPWebExceptionMapper.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/HelloWorld.java (renamed from src/main/java/com/att/nsa/dmaap/HelloWorld.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/JaxrsEchoService.java (renamed from src/main/java/com/att/nsa/dmaap/JaxrsEchoService.java) | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/JaxrsUserService.java (renamed from src/main/java/com/att/nsa/dmaap/JaxrsUserService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesListener.java (renamed from src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesListener.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesMap.java (renamed from src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/filemonitor/ServicePropertyService.java (renamed from src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertyService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/mmagent/CreateMirrorMaker.java (renamed from src/main/java/com/att/nsa/dmaap/mmagent/CreateMirrorMaker.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/mmagent/MMAgentUtil.java (renamed from src/main/java/com/att/nsa/dmaap/mmagent/MMAgentUtil.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/mmagent/MirrorMaker.java (renamed from src/main/java/com/att/nsa/dmaap/mmagent/MirrorMaker.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/mmagent/UpdateMirrorMaker.java (renamed from src/main/java/com/att/nsa/dmaap/mmagent/UpdateMirrorMaker.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/mmagent/UpdateWhiteList.java (renamed from src/main/java/com/att/nsa/dmaap/mmagent/UpdateWhiteList.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/AdminRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/AdminRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/ApiKeysRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/ApiKeysRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/EventsRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/EventsRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/MMRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/MMRestService.java) | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/MetricsRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/MetricsRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/ServiceUtil.java (renamed from src/main/java/com/att/nsa/dmaap/service/ServiceUtil.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/TopicRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/TopicRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/TransactionRestService.java (renamed from src/main/java/com/att/nsa/dmaap/service/TransactionRestService.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/service/UIRestServices.java (renamed from src/main/java/com/att/nsa/dmaap/service/UIRestServices.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/tools/ConfigTool.java (renamed from src/main/java/com/att/nsa/dmaap/tools/ConfigTool.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/tools/ConfigToolContext.java (renamed from src/main/java/com/att/nsa/dmaap/tools/ConfigToolContext.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/util/ContentLengthInterceptor.java (renamed from src/main/java/com/att/nsa/dmaap/util/ContentLengthInterceptor.java) | 222 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/util/DMaaPAuthFilter.java (renamed from src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java) | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/util/ServicePropertiesMapBean.java (renamed from src/main/java/com/att/nsa/dmaap/util/ServicePropertiesMapBean.java) | 4 | ||||
-rw-r--r-- | src/main/test/com/att/nsa/dmaap/DummyTest.java | 2 |
34 files changed, 181 insertions, 177 deletions
diff --git a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/FileMonitorBeans.xml b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/FileMonitorBeans.xml index a2c393c..cf25ab5 100644 --- a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/FileMonitorBeans.xml +++ b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/FileMonitorBeans.xml @@ -5,11 +5,11 @@ <bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" /> - <bean id="ServicePropertiesListener" class="com.att.nsa.dmaap.filemonitor.ServicePropertiesListener" /> + <bean id="ServicePropertiesListener" class="org.onap.dmaap.filemonitor.ServicePropertiesListener" /> - <bean id="ServicePropertiesMap" class="com.att.nsa.dmaap.filemonitor.ServicePropertiesMap" /> + <bean id="ServicePropertiesMap" class="org.onap.dmaap.filemonitor.ServicePropertiesMap" /> - <bean id="ServicePropertyService" class="com.att.nsa.dmaap.filemonitor.ServicePropertyService"> + <bean id="ServicePropertyService" class="org.onap.dmaap.filemonitor.ServicePropertyService"> <property name="loadOnStartup" value="false" /> <property name="fileChangedListener" ref="ServicePropertiesListener" /> <property name="filePropertiesMap" ref="ServicePropertiesMap" /> diff --git a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/HelloWorldBeans.xml b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/HelloWorldBeans.xml index 9cb67d4..04db236 100644 --- a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/HelloWorldBeans.xml +++ b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/HelloWorldBeans.xml @@ -4,5 +4,5 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="helloWorld" name="helloWorld" - class="com.att.nsa.dmaap.HelloWorld" /> + class="org.onap.dmaap.HelloWorld" /> </beans> diff --git a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/jaxrsBeans.groovy b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/jaxrsBeans.groovy index 430e723..b019fbc 100644 --- a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/jaxrsBeans.groovy +++ b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/jaxrsBeans.groovy @@ -3,16 +3,16 @@ xmlns jaxrs: "http://cxf.apache.org/jaxrs" xmlns util: "http://www.springframework.org/schema/util" - echoService(com.att.nsa.dmaap.JaxrsEchoService) - userService(com.att.nsa.dmaap.JaxrsUserService) - topicService(com.att.nsa.dmaap.service.TopicRestService) - eventService(com.att.nsa.dmaap.service.EventsRestService) - adminService(com.att.nsa.dmaap.service.AdminRestService) - apiKeyService(com.att.nsa.dmaap.service.ApiKeysRestService) - metricsService(com.att.nsa.dmaap.service.MetricsRestService) - transactionService(com.att.nsa.dmaap.service.TransactionRestService) - UIService(com.att.nsa.dmaap.service.UIRestServices) - mirrorService(com.att.nsa.dmaap.service.MMRestService) + echoService(org.onap.dmaap.JaxrsEchoService) + userService(org.onap.dmaap.JaxrsUserService) + topicService(org.onap.dmaap.service.TopicRestService) + eventService(org.onap.dmaap.service.EventsRestService) + adminServiceorg.onap.dmaap.service.AdminRestService) + apiKeyService(org.onap.dmaap.service.ApiKeysRestService) + metricsService(org.onap.dmaap.service.MetricsRestService) + transactionService(org.onap.dmaap.service.TransactionRestService) + UIService(org.onap.dmaap.service.UIRestServices) + mirrorService(org.onap.dmaap.service.MMRestService) util.list(id: 'jaxrsServices') { ref(bean:'echoService') diff --git a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/serviceBeans.xml b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/serviceBeans.xml index 0210d06..090a76b 100644 --- a/src/main/ajsc/dmaap_v1/dmaap/v1/conf/serviceBeans.xml +++ b/src/main/ajsc/dmaap_v1/dmaap/v1/conf/serviceBeans.xml @@ -13,7 +13,11 @@ location="classpath:msgRtrApi.properties,classpath:DMaaPErrorMesaages.properties" /> --> <context:component-scan - base-package="com.att,com.att.dmf.mr.utils, com.att.dmf.mr, com.att.dmf.mr.rest,com.att.dmf.mr.service, + base-package="org.onap.dmaap,org.onap.dmaap.filemonitor,org.onap.dmaap.mmagent,org.onap.dmaap.service,org.onap.dmaap.tools,org.onap.dmaap.util,org.onap.dmaap.filter,org.onap.dmaap.apiServer.metrics.cambria, + org.onap.dmaap.dmf.mr,org.onap.dmaap.dmf.mr.backends,org.onap.dmaap.dmf.mr.backends.kafka,org.onap.dmaap.dmf.mr.backends.memory,org.onap.dmaap.dmf.mr.beans,org.onap.dmaap.dmf.mr.constants,org.onap.dmaap.dmf.mr.exception, + org.onap.dmaap.dmf.mr.listener,org.onap.dmaap.dmf.mr.metabroker,org.onap.dmaap.dmf.mr.metrics.publisher,org.onap.dmaap.dmf.mr.metrics.publisher.impl,org.onap.dmaap.dmf.mr.resources,org.onap.dmaap.dmf.mr.resources.streamReaders,org.onap.dmaap.dmf.mr.security, + org.onap.dmaap.dmf.mr.security.impl,org.onap.dmaap.dmf.mr.service,org.onap.dmaap.dmf.mr.service.impl,org.onap.dmaap.dmf.mr.transaction,org.onap.dmaap.dmf.mr.transaction.impl,org.onap.dmaap.dmf.mr.utils, + com.att,com.att.dmf.mr.utils, com.att.dmf.mr, com.att.dmf.mr.rest,com.att.dmf.mr.service, com.att.dmf.mr.service.impl,com.att.dmf.mr.beans,com.att.dmf.mr.security,com.att.dmf.mr.exception,com.att.dmf.mr.backends,com.att.dmf.mr.backends.kafka, com.att.dmf.mr.transaction,com.att.dmf.mr.exception,com.att.nsa.dmaap,com.att.nsa.dmaap.service,com.att.nsa.dmaap.util,java.lang,java.util,com.att.dmf.mr.exception, com.att.dmf,com.att.nsa.dmaap.mmagent" /> <context:property-placeholder @@ -26,25 +30,25 @@ <bean id="jacksonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider" /> - <bean id="cambriaExMapper" class="com.att.nsa.dmaap.DMaaPCambriaExceptionMapper" /> + <bean id="cambriaExMapper" class="org.onap.dmaap.DMaaPCambriaExceptionMapper" /> - <bean id="webExMapper" class="com.att.nsa.dmaap.DMaaPWebExceptionMapper" /> + <bean id="webExMapper" class="org.onap.dmaap.DMaaPWebExceptionMapper" /> <!-- Your bean definitions goes here --> <!-- <bean id="performanceLog" name="performanceLog" class="com.att.ajsc.csi.logging.PerformanceTracking" /> --> <!-- <bean id="processRestletHeaders" name="processRestletHeaders" class="ajsc.restlet.ProcessRestletHeaders" /> --> <bean id="servicePropsBean" name="servicePropsBean" - class="com.att.nsa.dmaap.util.ServicePropertiesMapBean" /> + class="org.onap.dmaap.util.ServicePropertiesMapBean" /> <!-- Msgrtr beans --> - <bean id="propertyReader" class="com.att.dmf.mr.utils.PropertyReader" /> + <bean id="propertyReader" class="org.onap.dmaap.dmf.mr.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.dmf.mr.beans.DMaaPKafkaConsumerFactory.populateKafkaInternalDefaultsMap" /> + value="org.onap.dmaap.dmf.mr.beans.DMaaPKafkaConsumerFactory.populateKafkaInternalDefaultsMap" /> <!-- <property name="arguments"> <list> <ref bean="propertyReader" /> @@ -55,21 +59,21 @@ <bean id="drumlinRequestRouter" class="com.att.nsa.drumlin.service.framework.routing.DrumlinRequestRouter" /> - <bean id="dMaaPMetricsSet" class="com.att.dmf.mr.beans.DMaaPMetricsSet"> + <bean id="dMaaPMetricsSet" class="org.onap.dmaap.dmf.mr.beans.DMaaPMetricsSet"> <constructor-arg ref="propertyReader" /> </bean> - <bean id="dMaaPZkClient" class=" com.att.dmf.mr.beans.DMaaPZkClient"> + <bean id="dMaaPZkClient" class=" org.onap.dmaap.dmf.mr.beans.DMaaPZkClient"> <constructor-arg ref="propertyReader" /> </bean> - <bean id="dMaaPZkConfigDb" class="com.att.dmf.mr.beans.DMaaPZkConfigDb"> + <bean id="dMaaPZkConfigDb" class="org.onap.dmaap.dmf.mr.beans.DMaaPZkConfigDb"> <constructor-arg ref="dMaaPZkClient" /> <constructor-arg ref="propertyReader" /> </bean> - <bean id="kafkaPublisher" class=" com.att.dmf.mr.backends.kafka.KafkaPublisher"> + <bean id="kafkaPublisher" class="org.onap.dmaap.dmf.mr.backends.kafka.KafkaPublisher"> <constructor-arg ref="propertyReader" /> </bean> @@ -79,33 +83,33 @@ <constructor-arg ref="kafkalockavoid" /> </bean> --> - <bean id="dMaaPKafkaConsumerFactory" class=" com.att.dmf.mr.beans.DMaaPKafkaConsumerFactory"> + <bean id="dMaaPKafkaConsumerFactory" class="org.onap.dmaap.dmf.mr.beans.DMaaPKafkaConsumerFactory"> <constructor-arg ref="dMaaPMetricsSet" /> <constructor-arg ref="curator" /> <constructor-arg ref="kafkalockavoid" /> </bean> - <bean id="curator" class="com.att.dmf.mr.utils.DMaaPCuratorFactory" + <bean id="curator" class="org.onap.dmaap.dmf.mr.utils.DMaaPCuratorFactory" factory-method="getCurator"> <constructor-arg ref="propertyReader" /> </bean> - <bean id="dMaaPKafkaMetaBroker" class=" com.att.dmf.mr.beans.DMaaPKafkaMetaBroker"> + <bean id="dMaaPKafkaMetaBroker" class="org.onap.dmaap.dmf.mr.beans.DMaaPKafkaMetaBroker"> <constructor-arg ref="propertyReader" /> <constructor-arg ref="dMaaPZkClient" /> <constructor-arg ref="dMaaPZkConfigDb" /> </bean> - <bean id="q" class=" com.att.dmf.mr.backends.memory.MemoryQueue" /> + <bean id="q" class="org.onap.dmaap.dmf.mr.backends.memory.MemoryQueue" /> - <bean id="mmb" class=" com.att.dmf.mr.backends.memory.MemoryMetaBroker"> + <bean id="mmb" class="org.onap.dmaap.dmf.mr.backends.memory.MemoryMetaBroker"> <constructor-arg ref="q" /> <constructor-arg ref="dMaaPZkConfigDb" /> <!-- <constructor-arg ref="propertyReader" />--> </bean> - <bean id="dMaaPNsaApiDb" class="com.att.dmf.mr.beans.DMaaPNsaApiDb" + <bean id="dMaaPNsaApiDb" class="org.onap.dmaap.dmf.mr.beans.DMaaPNsaApiDb" factory-method="buildApiKeyDb"> <constructor-arg ref="propertyReader" /> <constructor-arg ref="dMaaPZkConfigDb" /> @@ -115,14 +119,14 @@ factory-method="buildTransactionDb"> <constructor-arg ref="propertyReader" /> <constructor-arg ref="dMaaPZkConfigDb" /> </bean> --> - <bean id="dMaaPAuthenticatorImpl" class="com.att.dmf.mr.security.DMaaPAuthenticatorImpl"> + <bean id="dMaaPAuthenticatorImpl" class="org.onap.dmaap.dmf.mr.security.DMaaPAuthenticatorImpl"> <constructor-arg ref="dMaaPNsaApiDb" /> </bean> - <bean id="defLength" class="com.att.mr.filter.DefaultLength"> + <bean id="defLength" class="org.onap.dmaap.mr.filter.DefaultLength"> <property name="defaultLength" value="${maxcontentlength}"></property> </bean> - <bean id="kafkalockavoid" class="com.att.dmf.mr.backends.kafka.KafkaLiveLockAvoider2" /> + <bean id="kafkalockavoid" class="org.onap.dmaap.dmf.mr.backends.kafka.KafkaLiveLockAvoider2" /> <bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/> diff --git a/src/main/ajsc/dmaap_v1/dmaap/v1/routes/topicService.route b/src/main/ajsc/dmaap_v1/dmaap/v1/routes/topicService.route index 57a8a70..b1073d8 100644 --- a/src/main/ajsc/dmaap_v1/dmaap/v1/routes/topicService.route +++ b/src/main/ajsc/dmaap_v1/dmaap/v1/routes/topicService.route @@ -10,8 +10,8 @@ <removeHeader headerName="exception"/> -<log message="Body= ** ${body}" loggingLevel="DEBUG" logName="com.att.nsa.dmaap"/> -<log message="Body= ** ${body}" loggingLevel="DEBUG" logName="com.att.nsa.dmaap.service"/> +<log message="Body= ** ${body}" loggingLevel="DEBUG" logName="org.onap.dmaap"/> +<log message="Body= ** ${body}" loggingLevel="DEBUG" logName="org.onap.dmaap.service"/> </route> diff --git a/src/main/config/runner-web.xml b/src/main/config/runner-web.xml index 2bcf11d..d86fa5e 100644 --- a/src/main/config/runner-web.xml +++ b/src/main/config/runner-web.xml @@ -69,7 +69,7 @@ <filter> <display-name>DMaaPAuthFilter</display-name> <filter-name>DMaaPAuthFilter</filter-name> - <filter-class>com.att.nsa.dmaap.util.DMaaPAuthFilter</filter-class> + <filter-class>org.onap.dmaap.util.DMaaPAuthFilter</filter-class> <init-param> <param-name>cadi_prop_files</param-name> <param-value>/appl/dmaapMR1/etc/cadi.properties </param-value> diff --git a/src/main/java/com/att/nsa/dmaap/DMaaPCambriaExceptionMapper.java b/src/main/java/org/onap/dmaap/DMaaPCambriaExceptionMapper.java index 5408d62..4b9324e 100644 --- a/src/main/java/com/att/nsa/dmaap/DMaaPCambriaExceptionMapper.java +++ b/src/main/java/org/onap/dmaap/DMaaPCambriaExceptionMapper.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import javax.inject.Singleton; diff --git a/src/main/java/com/att/nsa/dmaap/DMaaPWebExceptionMapper.java b/src/main/java/org/onap/dmaap/DMaaPWebExceptionMapper.java index a59f8ca..389fb5c 100644 --- a/src/main/java/com/att/nsa/dmaap/DMaaPWebExceptionMapper.java +++ b/src/main/java/org/onap/dmaap/DMaaPWebExceptionMapper.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import javax.inject.Singleton; diff --git a/src/main/java/com/att/nsa/dmaap/HelloWorld.java b/src/main/java/org/onap/dmaap/HelloWorld.java index a4cccba..5907e7f 100644 --- a/src/main/java/com/att/nsa/dmaap/HelloWorld.java +++ b/src/main/java/org/onap/dmaap/HelloWorld.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import org.apache.camel.Exchange; diff --git a/src/main/java/com/att/nsa/dmaap/JaxrsEchoService.java b/src/main/java/org/onap/dmaap/JaxrsEchoService.java index 72416da..1bebaf8 100644 --- a/src/main/java/com/att/nsa/dmaap/JaxrsEchoService.java +++ b/src/main/java/org/onap/dmaap/JaxrsEchoService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -31,7 +31,7 @@ import com.att.eelf.configuration.EELFManager; import com.att.ajsc.beans.PropertiesMapBean; -import com.att.nsa.dmaap.filemonitor.ServicePropertiesMap; +import org.onap.dmaap.filemonitor.ServicePropertiesMap; /** * Example JAX-RS Service diff --git a/src/main/java/com/att/nsa/dmaap/JaxrsUserService.java b/src/main/java/org/onap/dmaap/JaxrsUserService.java index 0631a13..714a9c1 100644 --- a/src/main/java/com/att/nsa/dmaap/JaxrsUserService.java +++ b/src/main/java/org/onap/dmaap/JaxrsUserService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesListener.java b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesListener.java index edbdadf..56cccca 100644 --- a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesListener.java +++ b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesListener.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.filemonitor; + package org.onap.dmaap.filemonitor; import java.io.File; diff --git a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesMap.java index 219a601..27cf0a2 100644 --- a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMap.java +++ b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertiesMap.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.filemonitor; + package org.onap.dmaap.filemonitor; import java.util.HashMap; diff --git a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertyService.java b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertyService.java index 55c1661..fe25e58 100644 --- a/src/main/java/com/att/nsa/dmaap/filemonitor/ServicePropertyService.java +++ b/src/main/java/org/onap/dmaap/filemonitor/ServicePropertyService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.filemonitor; + package org.onap.dmaap.filemonitor; import java.io.File; import java.io.FileInputStream; diff --git a/src/main/java/com/att/nsa/dmaap/mmagent/CreateMirrorMaker.java b/src/main/java/org/onap/dmaap/mmagent/CreateMirrorMaker.java index 35b4f03..72df46f 100644 --- a/src/main/java/com/att/nsa/dmaap/mmagent/CreateMirrorMaker.java +++ b/src/main/java/org/onap/dmaap/mmagent/CreateMirrorMaker.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.mmagent; + package org.onap.dmaap.mmagent; import java.util.Date; diff --git a/src/main/java/com/att/nsa/dmaap/mmagent/MMAgentUtil.java b/src/main/java/org/onap/dmaap/mmagent/MMAgentUtil.java index 8b1ec3f..f2ddaed 100644 --- a/src/main/java/com/att/nsa/dmaap/mmagent/MMAgentUtil.java +++ b/src/main/java/org/onap/dmaap/mmagent/MMAgentUtil.java @@ -22,7 +22,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.mmagent; + package org.onap.dmaap.mmagent; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/com/att/nsa/dmaap/mmagent/MirrorMaker.java b/src/main/java/org/onap/dmaap/mmagent/MirrorMaker.java index e3f688e..480c40f 100644 --- a/src/main/java/com/att/nsa/dmaap/mmagent/MirrorMaker.java +++ b/src/main/java/org/onap/dmaap/mmagent/MirrorMaker.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.mmagent; + package org.onap.dmaap.mmagent; public class MirrorMaker { public String name; diff --git a/src/main/java/com/att/nsa/dmaap/mmagent/UpdateMirrorMaker.java b/src/main/java/org/onap/dmaap/mmagent/UpdateMirrorMaker.java index 6e7a0f3..1c2f32c 100644 --- a/src/main/java/com/att/nsa/dmaap/mmagent/UpdateMirrorMaker.java +++ b/src/main/java/org/onap/dmaap/mmagent/UpdateMirrorMaker.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.mmagent; + package org.onap.dmaap.mmagent; import java.util.Date; diff --git a/src/main/java/com/att/nsa/dmaap/mmagent/UpdateWhiteList.java b/src/main/java/org/onap/dmaap/mmagent/UpdateWhiteList.java index a1064a4..dc67298 100644 --- a/src/main/java/com/att/nsa/dmaap/mmagent/UpdateWhiteList.java +++ b/src/main/java/org/onap/dmaap/mmagent/UpdateWhiteList.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.mmagent; + package org.onap.dmaap.mmagent; public class UpdateWhiteList { diff --git a/src/main/java/com/att/nsa/dmaap/service/AdminRestService.java b/src/main/java/org/onap/dmaap/service/AdminRestService.java index d2bf081..61f6a08 100644 --- a/src/main/java/com/att/nsa/dmaap/service/AdminRestService.java +++ b/src/main/java/org/onap/dmaap/service/AdminRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; import java.util.Enumeration; diff --git a/src/main/java/com/att/nsa/dmaap/service/ApiKeysRestService.java b/src/main/java/org/onap/dmaap/service/ApiKeysRestService.java index d44d259..49eddd9 100644 --- a/src/main/java/com/att/nsa/dmaap/service/ApiKeysRestService.java +++ b/src/main/java/org/onap/dmaap/service/ApiKeysRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; diff --git a/src/main/java/com/att/nsa/dmaap/service/EventsRestService.java b/src/main/java/org/onap/dmaap/service/EventsRestService.java index cd28967..2672261 100644 --- a/src/main/java/com/att/nsa/dmaap/service/EventsRestService.java +++ b/src/main/java/org/onap/dmaap/service/EventsRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/com/att/nsa/dmaap/service/MMRestService.java b/src/main/java/org/onap/dmaap/service/MMRestService.java index 853c9ba..fc3c9a1 100644 --- a/src/main/java/com/att/nsa/dmaap/service/MMRestService.java +++ b/src/main/java/org/onap/dmaap/service/MMRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; import java.io.InputStream; @@ -46,7 +46,7 @@ import org.onap.dmaap.dmf.mr.utils.ConfigurationReader; import org.onap.dmaap.dmf.mr.utils.DMaaPResponseBuilder; import org.onap.dmaap.dmf.mr.utils.Utils; import com.att.nsa.configs.ConfigDbException; -import com.att.nsa.dmaap.mmagent.*; +import org.onap.dmaap.mmagent.*; import com.att.nsa.drumlin.till.nv.rrNvReadable.missingReqdSetting; import com.att.nsa.security.ReadWriteSecuredResource.AccessDeniedException; import com.google.gson.Gson; diff --git a/src/main/java/com/att/nsa/dmaap/service/MetricsRestService.java b/src/main/java/org/onap/dmaap/service/MetricsRestService.java index 8ff58f3..0a9193b 100644 --- a/src/main/java/com/att/nsa/dmaap/service/MetricsRestService.java +++ b/src/main/java/org/onap/dmaap/service/MetricsRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; diff --git a/src/main/java/com/att/nsa/dmaap/service/ServiceUtil.java b/src/main/java/org/onap/dmaap/service/ServiceUtil.java index d73bcaf..7384e54 100644 --- a/src/main/java/com/att/nsa/dmaap/service/ServiceUtil.java +++ b/src/main/java/org/onap/dmaap/service/ServiceUtil.java @@ -17,7 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import org.onap.dmaap.dmf.mr.beans.DMaaPContext; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/com/att/nsa/dmaap/service/TopicRestService.java b/src/main/java/org/onap/dmaap/service/TopicRestService.java index 42049d2..bbf2708 100644 --- a/src/main/java/com/att/nsa/dmaap/service/TopicRestService.java +++ b/src/main/java/org/onap/dmaap/service/TopicRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/com/att/nsa/dmaap/service/TransactionRestService.java b/src/main/java/org/onap/dmaap/service/TransactionRestService.java index 9354f5c..8b806b0 100644 --- a/src/main/java/com/att/nsa/dmaap/service/TransactionRestService.java +++ b/src/main/java/org/onap/dmaap/service/TransactionRestService.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; diff --git a/src/main/java/com/att/nsa/dmaap/service/UIRestServices.java b/src/main/java/org/onap/dmaap/service/UIRestServices.java index f82d0a1..bca64c4 100644 --- a/src/main/java/com/att/nsa/dmaap/service/UIRestServices.java +++ b/src/main/java/org/onap/dmaap/service/UIRestServices.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.service; + package org.onap.dmaap.service; import java.io.IOException; diff --git a/src/main/java/com/att/nsa/dmaap/tools/ConfigTool.java b/src/main/java/org/onap/dmaap/tools/ConfigTool.java index d896bdd..2531318 100644 --- a/src/main/java/com/att/nsa/dmaap/tools/ConfigTool.java +++ b/src/main/java/org/onap/dmaap/tools/ConfigTool.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.tools; + package org.onap.dmaap.tools; import java.io.IOException; import java.io.PrintStream; diff --git a/src/main/java/com/att/nsa/dmaap/tools/ConfigToolContext.java b/src/main/java/org/onap/dmaap/tools/ConfigToolContext.java index f61d179..0e89098 100644 --- a/src/main/java/com/att/nsa/dmaap/tools/ConfigToolContext.java +++ b/src/main/java/org/onap/dmaap/tools/ConfigToolContext.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.tools; + package org.onap.dmaap.tools; import org.onap.dmaap.dmf.mr.beans.DMaaPMetricsSet; import com.att.nsa.cmdtool.CommandContext; diff --git a/src/main/java/com/att/nsa/dmaap/util/ContentLengthInterceptor.java b/src/main/java/org/onap/dmaap/util/ContentLengthInterceptor.java index 4ddc54a..b03eb5b 100644 --- a/src/main/java/com/att/nsa/dmaap/util/ContentLengthInterceptor.java +++ b/src/main/java/org/onap/dmaap/util/ContentLengthInterceptor.java @@ -19,120 +19,120 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.util;
-
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.http.HttpStatus;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.springframework.stereotype.Component;
-import org.onap.dmaap.dmf.mr.CambriaApiException;
-import org.onap.dmaap.dmf.mr.exception.DMaaPResponseCode;
-import org.onap.dmaap.dmf.mr.exception.ErrorResponse;
-import ajsc.beans.interceptors.AjscInterceptor;
-
-/**
- * AJSC Intercepter implementation of ContentLengthFilter
- */
-@Component
-public class ContentLengthInterceptor implements AjscInterceptor{
-
-
- private String defLength;
- //private Logger log = Logger.getLogger(ContentLengthInterceptor.class.toString());
- private static final EELFLogger log = EELFManager.getInstance().getLogger(ContentLengthInterceptor.class);
-
-
- /**
- * Intercepter method to intercept requests before processing
- */
- @Override
- public boolean allowOrReject(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse,
- Map map) throws Exception {
-
- log.info("inside Interceptor allowOrReject content length checking before pub/sub");
-
- JSONObject jsonObj = null;
- int requestLength = 0;
- setDefLength(System.getProperty("maxcontentlength"));
- try {
- // retrieving content length from message header
-
- if (null != httpservletrequest.getHeader("Content-Length")) {
- requestLength = Integer.parseInt(httpservletrequest.getHeader("Content-Length"));
- }
- // retrieving encoding from message header
- String transferEncoding = httpservletrequest.getHeader("Transfer-Encoding");
- // checking for no encoding, chunked and requestLength greater then
- // default length
- if (null != transferEncoding && !(transferEncoding.contains("chunked"))
- && (requestLength > Integer.parseInt(getDefLength()))) {
- jsonObj = new JSONObject().append("defaultlength", getDefLength())
- .append("requestlength", requestLength);
- log.error("message length is greater than default");
- throw new CambriaApiException(jsonObj);
- }
- else if (null == transferEncoding && (requestLength > Integer.parseInt(getDefLength())))
- {
- jsonObj = new JSONObject().append("defaultlength", getDefLength()).append(
- "requestlength", requestLength);
- log.error("Request message is not chunked or request length is greater than default length");
- throw new CambriaApiException(jsonObj);
-
-
- }
- else
- {
- //chain.doFilter(req, res);
- return true;
- }
-
- } catch (CambriaApiException | NumberFormatException | JSONException e) {
-
- log.info("Exception obj--"+e);
+ package org.onap.dmaap.util; + +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.http.HttpStatus; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import org.json.JSONException; +import org.json.JSONObject; +import org.springframework.stereotype.Component; +import org.onap.dmaap.dmf.mr.CambriaApiException; +import org.onap.dmaap.dmf.mr.exception.DMaaPResponseCode; +import org.onap.dmaap.dmf.mr.exception.ErrorResponse; +import ajsc.beans.interceptors.AjscInterceptor; + +/** + * AJSC Intercepter implementation of ContentLengthFilter + */ +@Component +public class ContentLengthInterceptor implements AjscInterceptor{ + + + private String defLength; + //private Logger log = Logger.getLogger(ContentLengthInterceptor.class.toString()); + private static final EELFLogger log = EELFManager.getInstance().getLogger(ContentLengthInterceptor.class); + + + /** + * Intercepter method to intercept requests before processing + */ + @Override + public boolean allowOrReject(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse, + Map map) throws Exception { + + log.info("inside Interceptor allowOrReject content length checking before pub/sub"); + + JSONObject jsonObj = null; + int requestLength = 0; + setDefLength(System.getProperty("maxcontentlength")); + try { + // retrieving content length from message header + + if (null != httpservletrequest.getHeader("Content-Length")) { + requestLength = Integer.parseInt(httpservletrequest.getHeader("Content-Length")); + } + // retrieving encoding from message header + String transferEncoding = httpservletrequest.getHeader("Transfer-Encoding"); + // checking for no encoding, chunked and requestLength greater then + // default length + if (null != transferEncoding && !(transferEncoding.contains("chunked")) + && (requestLength > Integer.parseInt(getDefLength()))) { + jsonObj = new JSONObject().append("defaultlength", getDefLength()) + .append("requestlength", requestLength); + log.error("message length is greater than default"); + throw new CambriaApiException(jsonObj); + } + else if (null == transferEncoding && (requestLength > Integer.parseInt(getDefLength()))) + { + jsonObj = new JSONObject().append("defaultlength", getDefLength()).append( + "requestlength", requestLength); + log.error("Request message is not chunked or request length is greater than default length"); + throw new CambriaApiException(jsonObj); + + + } + else + { + //chain.doFilter(req, res); + return true; + } + + } catch (CambriaApiException | NumberFormatException | JSONException e) { + + log.info("Exception obj--"+e); log.error("message size is greater then default"+e.getMessage()); String messg=e.toString(); if(jsonObj!=null){ messg=jsonObj.toString(); - }
- ErrorResponse errRes = new ErrorResponse(HttpStatus.SC_REQUEST_TOO_LONG,
- DMaaPResponseCode.MSG_SIZE_EXCEEDS_MSG_LIMIT.getResponseCode(), System.getProperty("msg_size_exceeds")
- + messg);
- log.info(errRes.toString());
-
-
- map.put(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"test");
+ } + ErrorResponse errRes = new ErrorResponse(HttpStatus.SC_REQUEST_TOO_LONG, + DMaaPResponseCode.MSG_SIZE_EXCEEDS_MSG_LIMIT.getResponseCode(), System.getProperty("msg_size_exceeds") + + messg); + log.info(errRes.toString()); + + + map.put(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"test"); httpservletresponse.setStatus(HttpStatus.SC_REQUEST_TOO_LONG); - if(httpservletresponse.getOutputStream()!=null){
+ if(httpservletresponse.getOutputStream()!=null){ httpservletresponse.getOutputStream().write(errRes.toString().getBytes()); - }
- return false;
- }
-
-
-
- }
-
-
- /**
- * Get Default Content Length
- * @return defLength
- */
- public String getDefLength() {
- return defLength;
- }
- /**
- * Set Default Content Length
- * @param defLength
- */
- public void setDefLength(String defLength) {
- this.defLength = defLength;
- }
-
-
-
-}
+ } + return false; + } + + + + } + + + /** + * Get Default Content Length + * @return defLength + */ + public String getDefLength() { + return defLength; + } + /** + * Set Default Content Length + * @param defLength + */ + public void setDefLength(String defLength) { + this.defLength = defLength; + } + + + +} diff --git a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java b/src/main/java/org/onap/dmaap/util/DMaaPAuthFilter.java index 4ef8626..547c4cd 100644 --- a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java +++ b/src/main/java/org/onap/dmaap/util/DMaaPAuthFilter.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.util; + package org.onap.dmaap.util; import java.io.IOException; diff --git a/src/main/java/com/att/nsa/dmaap/util/ServicePropertiesMapBean.java b/src/main/java/org/onap/dmaap/util/ServicePropertiesMapBean.java index b16162b..1778182 100644 --- a/src/main/java/com/att/nsa/dmaap/util/ServicePropertiesMapBean.java +++ b/src/main/java/org/onap/dmaap/util/ServicePropertiesMapBean.java @@ -19,9 +19,9 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap.util; + package org.onap.dmaap.util; -import com.att.nsa.dmaap.filemonitor.ServicePropertiesMap; +import org.onap.dmaap.filemonitor.ServicePropertiesMap; /** * Class ServicePropertiesMapBean diff --git a/src/main/test/com/att/nsa/dmaap/DummyTest.java b/src/main/test/com/att/nsa/dmaap/DummyTest.java index b979e31..17adcea 100644 --- a/src/main/test/com/att/nsa/dmaap/DummyTest.java +++ b/src/main/test/com/att/nsa/dmaap/DummyTest.java @@ -19,7 +19,7 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. * *******************************************************************************/ -package com.att.nsa.dmaap; + package org.onap.dmaap; import static org.junit.Assert.*; |