diff options
Diffstat (limited to 'src/main')
12 files changed, 0 insertions, 429 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/prh/MainApp.java b/src/main/java/org/onap/dcaegen2/services/prh/MainApp.java deleted file mode 100644 index ca7cc362..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/MainApp.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.EnableScheduling; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -@SpringBootApplication -@Configuration -@ComponentScan -@EnableScheduling -public class MainApp { - - public static void main(String[] args) { - SpringApplication.run(MainApp.class, args); - } -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/consumer/config/dmaap/DmaapConsumerConfiguration.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/consumer/config/dmaap/DmaapConsumerConfiguration.java deleted file mode 100644 index 3ea3d213..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/consumer/config/dmaap/DmaapConsumerConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.consumer.config.dmaap; - -import org.immutables.value.Value; -import org.onap.dcaegen2.services.prh.event.executor.mutual.config.DmaapConfig; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -@Value.Immutable(prehash = true) -@Value.Style(stagedBuilder = true) -public abstract class DmaapConsumerConfiguration extends DmaapConfig { - - private static final long serialVersionUID = 1L; - - private String consumerId; - private String consumerGroup; - private Integer timeoutMS; - private Integer messageLimit; -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/AAIConfig.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/AAIConfig.java deleted file mode 100644 index 58858b5c..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/AAIConfig.java +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.mutual.config; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -public abstract class AAIConfig implements Config { - -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/Config.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/Config.java deleted file mode 100644 index d0784457..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/Config.java +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.mutual.config; - -import java.io.Serializable; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -interface Config extends Serializable { - -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/DmaapConfig.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/DmaapConfig.java deleted file mode 100644 index 0a2ee9d1..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/mutual/config/DmaapConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.mutual.config; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -public abstract class DmaapConfig implements Config { - - private String dmmaphostName; - private Integer dmmapportNumber; - private String dmmaptopicName; - private String dmmapprotocol; - private String dmmapuserName; - private String dmmapuserPassword; - private String dmmapcontentType; -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/aai/AAIDmaapProducerConfiguration.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/aai/AAIDmaapProducerConfiguration.java deleted file mode 100644 index 214ffa94..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/aai/AAIDmaapProducerConfiguration.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.publisher.config.aai; - -import java.net.URL; -import org.immutables.value.Value; -import org.onap.dcaegen2.services.prh.event.executor.mutual.config.DmaapConfig; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -@Value.Immutable(prehash = true) -@Value.Style(stagedBuilder = true) -public abstract class AAIDmaapProducerConfiguration extends DmaapConfig { - - private static final long serialVersionUID = 1L; - - private String aaiHost; - private Integer aaiHostPortNumber; - private String aaiProtocol; - private String aaiUserName; - private String aaiUserPassword; - private URL aaiProxyURL; - private boolean aaiIgnoreSSLCertificateErrors; -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/dmaap/DmaapProducerConfiguration.java b/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/dmaap/DmaapProducerConfiguration.java deleted file mode 100644 index 494fad4c..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/event/executor/publisher/config/dmaap/DmaapProducerConfiguration.java +++ /dev/null @@ -1,33 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.event.executor.publisher.config.dmaap; - -import org.onap.dcaegen2.services.prh.event.executor.mutual.config.DmaapConfig; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ - -public class DmaapProducerConfiguration extends DmaapConfig { - - private static final long serialVersionUID = 1L; - -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/exceptions/AAINotFoundException.java b/src/main/java/org/onap/dcaegen2/services/prh/exceptions/AAINotFoundException.java deleted file mode 100644 index 61b0c69b..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/exceptions/AAINotFoundException.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.exceptions; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -public class AAINotFoundException extends Exception { - - public AAINotFoundException(String message) { - super(message); - } -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java b/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java deleted file mode 100644 index 5902587b..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.tasks; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -@Component -public class DmaapConsumerTask implements DmaapTask { - - private static final Logger logger = LoggerFactory.getLogger(DmaapConsumerTask.class); - private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss"); - - @Override - public void execute() { - logger.info("Start task DmaapConsumerTask::execute() :: Execution Time - {}", dateTimeFormatter.format( - LocalDateTime.now())); - //TODO: ADD implementation for executing request to consume topic from dmaap - - logger.info("End task DmaapConsumerTask::execute() :: Execution Time - {}", - dateTimeFormatter.format(LocalDateTime.now())); - } -}
\ No newline at end of file diff --git a/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapTask.java b/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapTask.java deleted file mode 100644 index bb3fdc6d..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapTask.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.tasks; - -import org.onap.dcaegen2.services.prh.exceptions.AAINotFoundException; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -public interface DmaapTask { - - void execute() throws AAINotFoundException; - -} diff --git a/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTask.java b/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTask.java deleted file mode 100644 index c06eceb0..00000000 --- a/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTask.java +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2018 NOKIA 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========================================================= - */ -package org.onap.dcaegen2.services.prh.tasks; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import org.onap.dcaegen2.services.prh.exceptions.AAINotFoundException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -/** - * @author Przemysław Wąsala <przemyslaw.wasala@nokia.com> on 3/23/18 - * @project pnf-registration-handler - */ -@Component -public class ScheduledTask { - - private static final int FIXED_DELAY = 1000; - private static final Logger logger = LoggerFactory.getLogger(ScheduledTask.class); - private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss"); - - private final DmaapTask dmaapConsumerTask; - - @Autowired - public ScheduledTask(DmaapConsumerTask dmaapConsumerTask) { - this.dmaapConsumerTask = dmaapConsumerTask; - } - - - @Scheduled(fixedDelay = FIXED_DELAY) - public void scheduledTaskAskingDMaaPOfConsumeEvent() { - logger.info("Task scheduledTaskAskingDMaaPOfConsumeEvent() :: Execution Time - {}", dateTimeFormatter.format( - LocalDateTime.now())); - try { - dmaapConsumerTask.execute(); - } catch (AAINotFoundException e) { - logger.warn("Task scheduledTaskAskingDMaaPOfConsumeEvent()::AAINotFoundException :: Execution Time - {}:{}", - dateTimeFormatter.format( - LocalDateTime.now()), e.getMessage()); - } - } - -} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml deleted file mode 100644 index ef147c10..00000000 --- a/src/main/resources/application.yaml +++ /dev/null @@ -1,7 +0,0 @@ -server: - port: 8080 -logging: - level: - .: error - org.springframework: ERROR - org.onap.dcaegen2.services.prg: ERROR
\ No newline at end of file |