diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2024-07-11 17:03:40 +0100 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-09-12 08:20:02 +0000 |
commit | f750af0d8eb330c54bd8a4f3aea84543735eba95 (patch) | |
tree | 1143df62b6f3c809a1249646ee6ca38c65818684 /models/src/main/java/org/onap | |
parent | abe1caac52206d5fb5d6861bd0f55bb6407b15dc (diff) |
Code coverage and sonar fixes for ACM
Move element Objects from models to participant-acelement.
Add coverage in participant-element where missing.
Issue-ID: POLICY-5065
Change-Id: I2bdf9cefe4f0f219f78bcb1bb4fb6d882843c374
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models/src/main/java/org/onap')
6 files changed, 0 insertions, 221 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessage.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessage.java deleted file mode 100644 index 13a1b735b..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessage.java +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2022,2024 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.kafka.element; - -import java.time.Instant; -import java.util.UUID; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; - -@Getter -@Setter -@ToString -public class ElementMessage { - - @Setter(AccessLevel.NONE) - private ElementMessageType messageType; - - private ToscaConceptIdentifier elementId; - - private String message; - - private UUID messageId = UUID.randomUUID(); - - /** - * Time-stamp, in milliseconds, when the message was created. Defaults to the - * current time. - */ - private Instant timestamp = Instant.now(); - - /** - * Constructor for instantiating a element message class. - * - * @param messageType the message type - */ - public ElementMessage(ElementMessageType messageType) { - this.messageType = messageType; - } -} diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessageType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessageType.java deleted file mode 100644 index cb2eaae95..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementMessageType.java +++ /dev/null @@ -1,25 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021-2022,2024 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.kafka.element; - -public enum ElementMessageType { - STATUS, ACK_MSG -} diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementStatus.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementStatus.java deleted file mode 100644 index 497dca408..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/element/ElementStatus.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021-2022,2024 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.kafka.element; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -@Getter -@Setter -@ToString(callSuper = true) -public class ElementStatus extends ElementMessage { - - public ElementStatus() { - super(ElementMessageType.STATUS); - } - -} diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java deleted file mode 100644 index bb3670cb7..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2022,2024 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.rest.element; - -import lombok.Data; -import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; - -@Data -public class ElementConfig { - - private ToscaConceptIdentifier receiverId; - - private ElementType elementType; - - private Integer timerMs; - - private KafkaConfig topicParameterGroup; -} diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java deleted file mode 100644 index 4bc08a36e..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java +++ /dev/null @@ -1,26 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2022 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.rest.element; - -public enum ElementType { - - STARTER, BRIDGE, SINK -} diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/KafkaConfig.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/KafkaConfig.java deleted file mode 100644 index 35871fcbf..000000000 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/KafkaConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2022,2024 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.models.acm.messages.rest.element; - -import lombok.Data; - -@Data -public class KafkaConfig { - private String server; - - private String listenerTopic; - - private String publisherTopic; - - private Integer fetchTimeout; - - private String topicCommInfrastructure; - - private boolean useHttps; - -} |