diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-02-13 11:29:56 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-02-19 14:31:28 +0000 |
commit | def0f11148b1fb0d97d4bfa16fc2224de0af7115 (patch) | |
tree | 590a3054f10b8e690dae1af8228c0b348cf73b75 /controlloop/common/model-impl | |
parent | 2d70f7de3ca5e68a92116d586153ebce7941c67f (diff) |
Rename maven modules to mirror directory structure
The naming of Maven modules in drools-applications was not
aligned with the directory structure in the git repository
of drools-applications. Therefore it was difficult to
see the strucutre of the repository in Eclipse and other
IDEs. This change amends the Maven module IDs to
reflect the repository directory structure.
This patch reset fixes the previos patch set, where many
references to maven modules internally in drools-applciations
were missed. See also changes in engine and docker repos.
Updated to reflect repo directory structure in maven
artifact groups.
Issue-ID: POLICY-238
Change-Id: I8ab1a7ecdb664045222bbbfda269135e3e449109
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'controlloop/common/model-impl')
52 files changed, 3430 insertions, 3423 deletions
diff --git a/controlloop/common/model-impl/aai/pom.xml b/controlloop/common/model-impl/aai/pom.xml index 19341af8e..5d527819b 100644 --- a/controlloop/common/model-impl/aai/pom.xml +++ b/controlloop/common/model-impl/aai/pom.xml @@ -1,50 +1,50 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <artifactId>aai</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>aai</artifactId> - <dependencies> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-core</artifactId> - <version>1.7.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-endpoints</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-core</artifactId> + <version>1.7.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-endpoints</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/appc/pom.xml b/controlloop/common/model-impl/appc/pom.xml index ce43e153b..d69f1eda8 100644 --- a/controlloop/common/model-impl/appc/pom.xml +++ b/controlloop/common/model-impl/appc/pom.xml @@ -20,26 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>appc</artifactId> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>appc</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/appclcm/pom.xml b/controlloop/common/model-impl/appclcm/pom.xml index 73ff74f70..26368ee9a 100644 --- a/controlloop/common/model-impl/appclcm/pom.xml +++ b/controlloop/common/model-impl/appclcm/pom.xml @@ -20,26 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>appclcm</artifactId> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>appclcm</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/events/pom.xml b/controlloop/common/model-impl/events/pom.xml index e95afc855..f3d56f67b 100644 --- a/controlloop/common/model-impl/events/pom.xml +++ b/controlloop/common/model-impl/events/pom.xml @@ -20,24 +20,27 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + <artifactId>events</artifactId> + <dependencies> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/pom.xml b/controlloop/common/model-impl/pom.xml index 78ddad704..2d61479bf 100644 --- a/controlloop/common/model-impl/pom.xml +++ b/controlloop/common/model-impl/pom.xml @@ -19,30 +19,30 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <artifactId>model-impl</artifactId> - <packaging>pom</packaging> - - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>common</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> + <artifactId>common</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> - <modules> - <module>aai</module> - <module>appc</module> - <module>appclcm</module> - <module>events</module> - <module>so</module> - <module>rest</module> - <module>sdc</module> - <module>trafficgenerator</module> - <module>vfc</module> - </modules> + <modules> + <module>aai</module> + <module>appc</module> + <module>appclcm</module> + <module>events</module> + <module>so</module> + <module>rest</module> + <module>sdc</module> + <module>trafficgenerator</module> + <module>vfc</module> + </modules> </project> diff --git a/controlloop/common/model-impl/rest/pom.xml b/controlloop/common/model-impl/rest/pom.xml index 2e1303eae..06fd30da7 100644 --- a/controlloop/common/model-impl/rest/pom.xml +++ b/controlloop/common/model-impl/rest/pom.xml @@ -21,32 +21,32 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>rest</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>rest</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.5.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java index 96dec30db..0bf1da8d5 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestGet.java @@ -1,52 +1,52 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestGet {
-
- @Test(expected = NullPointerException.class)
- public void testUrlNull() {
- RESTManager mgr = new RESTManager();
- mgr.get(null, "user", null, null);
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.get("nothing", null, null, null);
- }
-
- @Test
- public void testUrlExampleOrg() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null);
- assertEquals((Integer)200, result.a);
- assertTrue(result.b != null);
- assertTrue(result.b.length() > 0);
- }
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * 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.policy.rest; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestGet { + + @Test(expected = NullPointerException.class) + public void testUrlNull() { + RESTManager mgr = new RESTManager(); + mgr.get(null, "user", null, null); + } + + @Test(expected = IllegalArgumentException.class) + public void testUsernameNull() { + RESTManager mgr = new RESTManager(); + mgr.get("nothing", null, null, null); + } + + @Test + public void testUrlExampleOrg() { + RESTManager mgr = new RESTManager(); + + Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null); + assertEquals((Integer)200, result.a); + assertTrue(result.b != null); + assertTrue(result.b.length() > 0); + } }
\ No newline at end of file diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java index 3ada0a74e..aea5a7387 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPair.java @@ -1,42 +1,42 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPair {
-
- @Test
- public void testPair() {
- RESTManager mgr = new RESTManager();
-
- Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2);
- assertEquals((Integer) 1, (Integer) pii.a);
- assertEquals((Integer) 2, (Integer) pii.b);
-
- Pair<Integer, String> pis = mgr.new Pair<>(1, "test");
- assertEquals((Integer) 1, (Integer) pis.a);
- assertEquals("test", pis.b);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * 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.policy.rest; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestPair { + + @Test + public void testPair() { + RESTManager mgr = new RESTManager(); + + Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2); + assertEquals((Integer) 1, (Integer) pii.a); + assertEquals((Integer) 2, (Integer) pii.b); + + Pair<Integer, String> pis = mgr.new Pair<>(1, "test"); + assertEquals((Integer) 1, (Integer) pis.a); + assertEquals("test", pis.b); + } +} diff --git a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java index 40f1b3089..1cdde22e8 100755 --- a/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java +++ b/controlloop/common/model-impl/rest/src/test/java/org/onap/policy/rest/TestPost.java @@ -1,42 +1,42 @@ -/*-
- * ============LICENSE_START=======================================================
- * rest
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.rest;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-import org.onap.policy.rest.RESTManager.Pair;
-
-public class TestPost {
-
- @Test(expected = IllegalArgumentException.class)
- public void testUsernameNull() {
- RESTManager mgr = new RESTManager();
- mgr.post("nothing", null, null, null, null, null);
- }
-
- @Test
- public void testBodyNull() {
- RESTManager mgr = new RESTManager();
- Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null);
- assertEquals(null, result);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * rest + * ================================================================================ + * + * ================================================================================ + * 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.policy.rest; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.rest.RESTManager.Pair; + +public class TestPost { + + @Test(expected = IllegalArgumentException.class) + public void testUsernameNull() { + RESTManager mgr = new RESTManager(); + mgr.post("nothing", null, null, null, null, null); + } + + @Test + public void testBodyNull() { + RESTManager mgr = new RESTManager(); + Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null); + assertEquals(null, result); + } +} diff --git a/controlloop/common/model-impl/sdc/pom.xml b/controlloop/common/model-impl/sdc/pom.xml index 76c9de307..54724e678 100644 --- a/controlloop/common/model-impl/sdc/pom.xml +++ b/controlloop/common/model-impl/sdc/pom.xml @@ -1,19 +1,21 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <artifactId>sdc</artifactId> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <artifactId>sdc</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java index 58999f384..7e64787f8 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResource.java @@ -1,152 +1,152 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestResource {
-
- @Test
- public void testConstructors() {
- Resource res = new Resource();
- assertEquals(null, res.getResourceUUID());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- UUID uuid = UUID.randomUUID();
- res = new Resource(uuid);
- assertEquals(uuid, res.getResourceUUID());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceName());
- assertEquals(null, res.getResourceType());
- assertEquals(null, res.getResourceVersion());
-
- String name = "constTest";
- res = new Resource(name, ResourceType.CP);
- assertEquals(null, res.getResourceUUID());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.CP, res.getResourceType());
- assertEquals(null, res.getResourceInvariantUUID());
- assertEquals(null, res.getResourceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF);
- assertEquals(uuid, res.getResourceUUID());
- assertEquals(uuidInvariant, res.getResourceInvariantUUID());
- assertEquals(name, res.getResourceName());
- assertEquals(ResourceType.VF, res.getResourceType());
- assertEquals(version, res.getResourceVersion());
-
- Resource r2 = new Resource(res);
- assertEquals(uuid, r2.getResourceUUID());
- assertEquals(uuidInvariant, r2.getResourceInvariantUUID());
- assertEquals(name, r2.getResourceName());
- assertEquals(ResourceType.VF, r2.getResourceType());
- assertEquals(version, r2.getResourceVersion());
- }
-
- @Test
- public void testUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceUUID(uuid);
- assertEquals(uuid, res.getResourceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- Resource res = new Resource();
- UUID uuid = UUID.randomUUID();
- res.setResourceInvariantUUID(uuid);
- assertEquals(uuid, res.getResourceInvariantUUID());
- }
-
- @Test
- public void testName() {
- Resource res = new Resource();
- String name = "nameTest";
- res.setResourceName(name);
- assertEquals(name, res.getResourceName());
- }
-
- @Test
- public void testVersion() {
- Resource res = new Resource();
- String version = "versionTest";
- res.setResourceVersion(version);
- assertEquals(version, res.getResourceVersion());
- }
-
- @Test
- public void testType() {
- Resource res = new Resource();
- res.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, res.getResourceType());
- }
-
- @Test
- public void testEquals() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertTrue(r1.equals(r2));
- assertTrue(r2.equals(r1));
- }
-
- @Test
- public void testToString() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.toString(), r2.toString());
- }
-
- @Test
- public void testHashCode() {
- Resource r1 = new Resource();
- Resource r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
-
- r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
- ResourceType.VFC);
- r2 = new Resource(r1);
- assertEquals(r1.hashCode(), r2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * 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.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestResource { + + @Test + public void testConstructors() { + Resource res = new Resource(); + assertEquals(null, res.getResourceUUID()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceName()); + assertEquals(null, res.getResourceType()); + assertEquals(null, res.getResourceVersion()); + + UUID uuid = UUID.randomUUID(); + res = new Resource(uuid); + assertEquals(uuid, res.getResourceUUID()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceName()); + assertEquals(null, res.getResourceType()); + assertEquals(null, res.getResourceVersion()); + + String name = "constTest"; + res = new Resource(name, ResourceType.CP); + assertEquals(null, res.getResourceUUID()); + assertEquals(name, res.getResourceName()); + assertEquals(ResourceType.CP, res.getResourceType()); + assertEquals(null, res.getResourceInvariantUUID()); + assertEquals(null, res.getResourceVersion()); + + uuid = UUID.randomUUID(); + UUID uuidInvariant = UUID.randomUUID(); + name = "constTestUUID"; + String version = "0.0.1"; + res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF); + assertEquals(uuid, res.getResourceUUID()); + assertEquals(uuidInvariant, res.getResourceInvariantUUID()); + assertEquals(name, res.getResourceName()); + assertEquals(ResourceType.VF, res.getResourceType()); + assertEquals(version, res.getResourceVersion()); + + Resource r2 = new Resource(res); + assertEquals(uuid, r2.getResourceUUID()); + assertEquals(uuidInvariant, r2.getResourceInvariantUUID()); + assertEquals(name, r2.getResourceName()); + assertEquals(ResourceType.VF, r2.getResourceType()); + assertEquals(version, r2.getResourceVersion()); + } + + @Test + public void testUuid() { + Resource res = new Resource(); + UUID uuid = UUID.randomUUID(); + res.setResourceUUID(uuid); + assertEquals(uuid, res.getResourceUUID()); + } + + @Test + public void testInvariantUuid() { + Resource res = new Resource(); + UUID uuid = UUID.randomUUID(); + res.setResourceInvariantUUID(uuid); + assertEquals(uuid, res.getResourceInvariantUUID()); + } + + @Test + public void testName() { + Resource res = new Resource(); + String name = "nameTest"; + res.setResourceName(name); + assertEquals(name, res.getResourceName()); + } + + @Test + public void testVersion() { + Resource res = new Resource(); + String version = "versionTest"; + res.setResourceVersion(version); + assertEquals(version, res.getResourceVersion()); + } + + @Test + public void testType() { + Resource res = new Resource(); + res.setResourceType(ResourceType.CP); + assertEquals(ResourceType.CP, res.getResourceType()); + } + + @Test + public void testEquals() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertTrue(r1.equals(r2)); + assertTrue(r2.equals(r1)); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertTrue(r1.equals(r2)); + assertTrue(r2.equals(r1)); + } + + @Test + public void testToString() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertEquals(r1.toString(), r2.toString()); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertEquals(r1.toString(), r2.toString()); + } + + @Test + public void testHashCode() { + Resource r1 = new Resource(); + Resource r2 = new Resource(r1); + assertEquals(r1.hashCode(), r2.hashCode()); + + r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1", + ResourceType.VFC); + r2 = new Resource(r1); + assertEquals(r1.hashCode(), r2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java index ef5986f05..77847f167 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestResourceInstance.java @@ -1,155 +1,155 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestResourceInstance {
-
- @Test
- public void testConstructors() {
- ResourceInstance ri = new ResourceInstance();
- assertEquals(null, ri.getResourceInstanceName());
- assertEquals(null, ri.getResourceUUID());
- assertEquals(null, ri.getResourceInvariantUUID());
- assertEquals(null, ri.getResourceName());
- assertEquals(null, ri.getResourceType());
- assertEquals(null, ri.getResourceVersion());
-
- ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null);
- assertEquals(null, ri2.getResourceInstanceName());
- assertEquals(null, ri2.getResourceUUID());
- assertEquals(null, ri2.getResourceInvariantUUID());
- assertEquals(null, ri2.getResourceName());
- assertEquals(null, ri2.getResourceType());
- assertEquals(null, ri2.getResourceVersion());
-
- ri2 = new ResourceInstance(ri);
- assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName());
- assertEquals(ri2.getResourceUUID(), ri.getResourceUUID());
- assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID());
- assertEquals(ri2.getResourceName(), ri.getResourceName());
- assertEquals(ri2.getResourceType(), ri.getResourceType());
- assertEquals(ri2.getResourceVersion(), ri.getResourceVersion());
- }
-
- @Test
- public void testInstanceName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTestInstance";
- ri.setResourceInstanceName(name);;
- assertEquals(name, ri.getResourceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceUUID(uuid);
- assertEquals(uuid, ri.getResourceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- ResourceInstance ri = new ResourceInstance();
- UUID uuid = UUID.randomUUID();
- ri.setResourceInvariantUUID(uuid);
- assertEquals(uuid, ri.getResourceInvariantUUID());
- }
-
- @Test
- public void testName() {
- ResourceInstance ri = new ResourceInstance();
- String name = "nameTest";
- ri.setResourceName(name);
- assertEquals(name, ri.getResourceName());
- }
-
- @Test
- public void testVersion() {
- ResourceInstance ri = new ResourceInstance();
- String version = "versionTest";
- ri.setResourceVersion(version);
- assertEquals(version, ri.getResourceVersion());
- }
-
- @Test
- public void testType() {
- ResourceInstance ri = new ResourceInstance();
- ri.setResourceType(ResourceType.CP);
- assertEquals(ResourceType.CP, ri.getResourceType());
- }
-
- @Test
- public void testEquals() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertTrue(ri1.equals(ri2));
- assertTrue(ri2.equals(ri1));
- }
-
- @Test
- public void testToString() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.toString(), ri2.toString());
- }
-
- @Test
- public void testHashCode() {
- ResourceInstance ri1 = new ResourceInstance();
- ResourceInstance ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
-
- ri1.setResourceInstanceName("instance");
- ri1.setResourceName("resource");
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceInvariantUUID(UUID.randomUUID());
- ri1.setResourceVersion("0.0.0");
- ri1.setResourceType(ResourceType.VL);
- ri2 = new ResourceInstance(ri1);
- assertEquals(ri1.hashCode(), ri2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * 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.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestResourceInstance { + + @Test + public void testConstructors() { + ResourceInstance ri = new ResourceInstance(); + assertEquals(null, ri.getResourceInstanceName()); + assertEquals(null, ri.getResourceUUID()); + assertEquals(null, ri.getResourceInvariantUUID()); + assertEquals(null, ri.getResourceName()); + assertEquals(null, ri.getResourceType()); + assertEquals(null, ri.getResourceVersion()); + + ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null); + assertEquals(null, ri2.getResourceInstanceName()); + assertEquals(null, ri2.getResourceUUID()); + assertEquals(null, ri2.getResourceInvariantUUID()); + assertEquals(null, ri2.getResourceName()); + assertEquals(null, ri2.getResourceType()); + assertEquals(null, ri2.getResourceVersion()); + + ri2 = new ResourceInstance(ri); + assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName()); + assertEquals(ri2.getResourceUUID(), ri.getResourceUUID()); + assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID()); + assertEquals(ri2.getResourceName(), ri.getResourceName()); + assertEquals(ri2.getResourceType(), ri.getResourceType()); + assertEquals(ri2.getResourceVersion(), ri.getResourceVersion()); + } + + @Test + public void testInstanceName() { + ResourceInstance ri = new ResourceInstance(); + String name = "nameTestInstance"; + ri.setResourceInstanceName(name);; + assertEquals(name, ri.getResourceInstanceName()); + } + + @Test + public void testUuid() { + ResourceInstance ri = new ResourceInstance(); + UUID uuid = UUID.randomUUID(); + ri.setResourceUUID(uuid); + assertEquals(uuid, ri.getResourceUUID()); + } + + @Test + public void testInvariantUuid() { + ResourceInstance ri = new ResourceInstance(); + UUID uuid = UUID.randomUUID(); + ri.setResourceInvariantUUID(uuid); + assertEquals(uuid, ri.getResourceInvariantUUID()); + } + + @Test + public void testName() { + ResourceInstance ri = new ResourceInstance(); + String name = "nameTest"; + ri.setResourceName(name); + assertEquals(name, ri.getResourceName()); + } + + @Test + public void testVersion() { + ResourceInstance ri = new ResourceInstance(); + String version = "versionTest"; + ri.setResourceVersion(version); + assertEquals(version, ri.getResourceVersion()); + } + + @Test + public void testType() { + ResourceInstance ri = new ResourceInstance(); + ri.setResourceType(ResourceType.CP); + assertEquals(ResourceType.CP, ri.getResourceType()); + } + + @Test + public void testEquals() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertTrue(ri1.equals(ri2)); + assertTrue(ri2.equals(ri1)); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertTrue(ri1.equals(ri2)); + assertTrue(ri2.equals(ri1)); + } + + @Test + public void testToString() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertEquals(ri1.toString(), ri2.toString()); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertEquals(ri1.toString(), ri2.toString()); + } + + @Test + public void testHashCode() { + ResourceInstance ri1 = new ResourceInstance(); + ResourceInstance ri2 = new ResourceInstance(ri1); + assertEquals(ri1.hashCode(), ri2.hashCode()); + + ri1.setResourceInstanceName("instance"); + ri1.setResourceName("resource"); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceInvariantUUID(UUID.randomUUID()); + ri1.setResourceVersion("0.0.0"); + ri1.setResourceType(ResourceType.VL); + ri2 = new ResourceInstance(ri1); + assertEquals(ri1.hashCode(), ri2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java index 4d1fa99e6..e5760236b 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestService.java @@ -1,137 +1,137 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestService {
-
- @Test
- public void testConstructors() {
- Service svc = new Service();
- assertEquals(null, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- UUID uuid = UUID.randomUUID();
- svc = new Service(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceName());
- assertEquals(null, svc.getServiceVersion());
-
- String name = "constTest";
- svc = new Service(name);
- assertEquals(null, svc.getServiceUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(null, svc.getServiceInvariantUUID());
- assertEquals(null, svc.getServiceVersion());
-
- uuid = UUID.randomUUID();
- UUID uuidInvariant = UUID.randomUUID();
- name = "constTestUUID";
- String version = "0.0.1";
- svc = new Service(uuid, uuidInvariant, name, version);
- assertEquals(uuid, svc.getServiceUUID());
- assertEquals(uuidInvariant, svc.getServiceInvariantUUID());
- assertEquals(name, svc.getServiceName());
- assertEquals(version, svc.getServiceVersion());
-
- Service s2 = new Service(svc);
- assertEquals(uuid, s2.getServiceUUID());
- assertEquals(uuidInvariant, s2.getServiceInvariantUUID());
- assertEquals(name, s2.getServiceName());
- assertEquals(version, s2.getServiceVersion());
- }
-
- @Test
- public void testUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceUUID(uuid);
- assertEquals(uuid, svc.getServiceUUID());
- }
-
- @Test
- public void testInvariantUuid() {
- Service svc = new Service();
- UUID uuid = UUID.randomUUID();
- svc.setServiceInvariantUUID(uuid);
- assertEquals(uuid, svc.getServiceInvariantUUID());
- }
-
- @Test
- public void testName() {
- Service svc = new Service();
- String name = "nameTest";
- svc.setServiceName(name);
- assertEquals(name, svc.getServiceName());
- }
-
- @Test
- public void testVersion() {
- Service svc = new Service();
- String version = "versionTest";
- svc.setServiceVersion(version);
- assertEquals(version, svc.getServiceVersion());
- }
-
- @Test
- public void testEquals() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertTrue(s1.equals(s2));
- assertTrue(s2.equals(s1));
- }
-
- @Test
- public void testToString() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.toString(), s2.toString());
- }
-
- @Test
- public void testHashCode() {
- Service s1 = new Service();
- Service s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
-
- s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
- s2 = new Service(s1);
- assertEquals(s1.hashCode(), s2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * 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.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestService { + + @Test + public void testConstructors() { + Service svc = new Service(); + assertEquals(null, svc.getServiceUUID()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceName()); + assertEquals(null, svc.getServiceVersion()); + + UUID uuid = UUID.randomUUID(); + svc = new Service(uuid); + assertEquals(uuid, svc.getServiceUUID()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceName()); + assertEquals(null, svc.getServiceVersion()); + + String name = "constTest"; + svc = new Service(name); + assertEquals(null, svc.getServiceUUID()); + assertEquals(name, svc.getServiceName()); + assertEquals(null, svc.getServiceInvariantUUID()); + assertEquals(null, svc.getServiceVersion()); + + uuid = UUID.randomUUID(); + UUID uuidInvariant = UUID.randomUUID(); + name = "constTestUUID"; + String version = "0.0.1"; + svc = new Service(uuid, uuidInvariant, name, version); + assertEquals(uuid, svc.getServiceUUID()); + assertEquals(uuidInvariant, svc.getServiceInvariantUUID()); + assertEquals(name, svc.getServiceName()); + assertEquals(version, svc.getServiceVersion()); + + Service s2 = new Service(svc); + assertEquals(uuid, s2.getServiceUUID()); + assertEquals(uuidInvariant, s2.getServiceInvariantUUID()); + assertEquals(name, s2.getServiceName()); + assertEquals(version, s2.getServiceVersion()); + } + + @Test + public void testUuid() { + Service svc = new Service(); + UUID uuid = UUID.randomUUID(); + svc.setServiceUUID(uuid); + assertEquals(uuid, svc.getServiceUUID()); + } + + @Test + public void testInvariantUuid() { + Service svc = new Service(); + UUID uuid = UUID.randomUUID(); + svc.setServiceInvariantUUID(uuid); + assertEquals(uuid, svc.getServiceInvariantUUID()); + } + + @Test + public void testName() { + Service svc = new Service(); + String name = "nameTest"; + svc.setServiceName(name); + assertEquals(name, svc.getServiceName()); + } + + @Test + public void testVersion() { + Service svc = new Service(); + String version = "versionTest"; + svc.setServiceVersion(version); + assertEquals(version, svc.getServiceVersion()); + } + + @Test + public void testEquals() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertTrue(s1.equals(s2)); + assertTrue(s2.equals(s1)); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertTrue(s1.equals(s2)); + assertTrue(s2.equals(s1)); + } + + @Test + public void testToString() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertEquals(s1.toString(), s2.toString()); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertEquals(s1.toString(), s2.toString()); + } + + @Test + public void testHashCode() { + Service s1 = new Service(); + Service s2 = new Service(s1); + assertEquals(s1.hashCode(), s2.hashCode()); + + s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1"); + s2 = new Service(s1); + assertEquals(s1.hashCode(), s2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java index 06004456b..5ee4a9de8 100644 --- a/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java +++ b/controlloop/common/model-impl/sdc/src/test/java/org/onap/policy/sdc/TestServiceInstance.java @@ -1,170 +1,170 @@ -/*-
- * ============LICENSE_START=======================================================
- * sdc
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.sdc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestServiceInstance {
-
- @Test
- public void testConstructors() {
- ServiceInstance si = new ServiceInstance();
- assertEquals(null, si.getServiceInstanceName());
- assertEquals(null, si.getServiceUUID());
- assertEquals(null, si.getServiceInstanceUUID());
- assertEquals(null, si.getServiceName());
- assertEquals(null, si.getPersonaModelUUID());
- assertEquals(null, si.getWidgetModelUUID());
- assertEquals(null, si.getWidgetModelVersion());
-
- ServiceInstance si2 = new ServiceInstance((ServiceInstance) null);
- assertEquals(null, si2.getServiceInstanceName());
- assertEquals(null, si2.getServiceUUID());
- assertEquals(null, si2.getServiceInstanceUUID());
- assertEquals(null, si2.getServiceName());
- assertEquals(null, si2.getPersonaModelUUID());
- assertEquals(null, si2.getWidgetModelUUID());
- assertEquals(null, si2.getWidgetModelVersion());
-
- si2 = new ServiceInstance(si);
- assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName());
- assertEquals(si2.getServiceUUID(), si.getServiceUUID());
- assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID());
- assertEquals(si2.getServiceName(), si.getServiceName());
- assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID());
- assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID());
- assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion());
- }
-
- @Test
- public void testInstanceName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTestInstance";
- si.setServiceInstanceName(name);;
- assertEquals(name, si.getServiceInstanceName());
- }
-
- @Test
- public void testUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceUUID(uuid);
- assertEquals(uuid, si.getServiceUUID());
- }
-
- @Test
- public void testInstanceUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setServiceInstanceUUID(uuid);
- assertEquals(uuid, si.getServiceInstanceUUID());
- }
-
- @Test
- public void testName() {
- ServiceInstance si = new ServiceInstance();
- String name = "nameTest";
- si.setServiceName(name);
- assertEquals(name, si.getServiceName());
- }
-
- @Test
- public void testPersonaModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setPersonaModelUUID(uuid);
- assertEquals(uuid, si.getPersonaModelUUID());
- }
-
- @Test
- public void testWidgetModelUuid() {
- ServiceInstance si = new ServiceInstance();
- UUID uuid = UUID.randomUUID();
- si.setWidgetModelUUID(uuid);
- assertEquals(uuid, si.getWidgetModelUUID());
- }
-
- @Test
- public void testWidgetModelVersion() {
- ServiceInstance si = new ServiceInstance();
- String version = "2.2.2";
- si.setWidgetModelVersion(version);;
- assertEquals(version, si.getWidgetModelVersion());
- }
-
- @Test
- public void testEquals() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertTrue(si1.equals(si2));
- assertTrue(si2.equals(si1));
- }
-
- @Test
- public void testToString() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.toString(), si2.toString());
- }
-
- @Test
- public void testHashCode() {
- ServiceInstance si1 = new ServiceInstance();
- ServiceInstance si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
-
- si1.setServiceInstanceName("instance");
- si1.setServiceName("service");
- si1.setServiceInstanceUUID(UUID.randomUUID());
- si1.setServiceUUID(UUID.randomUUID());
- si1.setPersonaModelUUID(UUID.randomUUID());
- si1.setWidgetModelUUID(UUID.randomUUID());
- si1.setWidgetModelVersion("3.3.3");
- si2 = new ServiceInstance(si1);
- assertEquals(si1.hashCode(), si2.hashCode());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * sdc + * ================================================================================ + * + * ================================================================================ + * 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.policy.sdc; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +public class TestServiceInstance { + + @Test + public void testConstructors() { + ServiceInstance si = new ServiceInstance(); + assertEquals(null, si.getServiceInstanceName()); + assertEquals(null, si.getServiceUUID()); + assertEquals(null, si.getServiceInstanceUUID()); + assertEquals(null, si.getServiceName()); + assertEquals(null, si.getPersonaModelUUID()); + assertEquals(null, si.getWidgetModelUUID()); + assertEquals(null, si.getWidgetModelVersion()); + + ServiceInstance si2 = new ServiceInstance((ServiceInstance) null); + assertEquals(null, si2.getServiceInstanceName()); + assertEquals(null, si2.getServiceUUID()); + assertEquals(null, si2.getServiceInstanceUUID()); + assertEquals(null, si2.getServiceName()); + assertEquals(null, si2.getPersonaModelUUID()); + assertEquals(null, si2.getWidgetModelUUID()); + assertEquals(null, si2.getWidgetModelVersion()); + + si2 = new ServiceInstance(si); + assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName()); + assertEquals(si2.getServiceUUID(), si.getServiceUUID()); + assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID()); + assertEquals(si2.getServiceName(), si.getServiceName()); + assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID()); + assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID()); + assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion()); + } + + @Test + public void testInstanceName() { + ServiceInstance si = new ServiceInstance(); + String name = "nameTestInstance"; + si.setServiceInstanceName(name);; + assertEquals(name, si.getServiceInstanceName()); + } + + @Test + public void testUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setServiceUUID(uuid); + assertEquals(uuid, si.getServiceUUID()); + } + + @Test + public void testInstanceUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setServiceInstanceUUID(uuid); + assertEquals(uuid, si.getServiceInstanceUUID()); + } + + @Test + public void testName() { + ServiceInstance si = new ServiceInstance(); + String name = "nameTest"; + si.setServiceName(name); + assertEquals(name, si.getServiceName()); + } + + @Test + public void testPersonaModelUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setPersonaModelUUID(uuid); + assertEquals(uuid, si.getPersonaModelUUID()); + } + + @Test + public void testWidgetModelUuid() { + ServiceInstance si = new ServiceInstance(); + UUID uuid = UUID.randomUUID(); + si.setWidgetModelUUID(uuid); + assertEquals(uuid, si.getWidgetModelUUID()); + } + + @Test + public void testWidgetModelVersion() { + ServiceInstance si = new ServiceInstance(); + String version = "2.2.2"; + si.setWidgetModelVersion(version);; + assertEquals(version, si.getWidgetModelVersion()); + } + + @Test + public void testEquals() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertTrue(si1.equals(si2)); + assertTrue(si2.equals(si1)); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertTrue(si1.equals(si2)); + assertTrue(si2.equals(si1)); + } + + @Test + public void testToString() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertEquals(si1.toString(), si2.toString()); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertEquals(si1.toString(), si2.toString()); + } + + @Test + public void testHashCode() { + ServiceInstance si1 = new ServiceInstance(); + ServiceInstance si2 = new ServiceInstance(si1); + assertEquals(si1.hashCode(), si2.hashCode()); + + si1.setServiceInstanceName("instance"); + si1.setServiceName("service"); + si1.setServiceInstanceUUID(UUID.randomUUID()); + si1.setServiceUUID(UUID.randomUUID()); + si1.setPersonaModelUUID(UUID.randomUUID()); + si1.setWidgetModelUUID(UUID.randomUUID()); + si1.setWidgetModelVersion("3.3.3"); + si2 = new ServiceInstance(si1); + assertEquals(si1.hashCode(), si2.hashCode()); + } +} diff --git a/controlloop/common/model-impl/so/pom.xml b/controlloop/common/model-impl/so/pom.xml index 718a82eef..a026236a6 100644 --- a/controlloop/common/model-impl/so/pom.xml +++ b/controlloop/common/model-impl/so/pom.xml @@ -19,51 +19,51 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>so</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>so</artifactId> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java index 2cc22f379..ea1257d4d 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOAsyncRequestStatus.java @@ -1,125 +1,125 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOAsyncRequestStatus implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("correlator")
- private String correlator;
-
- @SerializedName("requestId")
- private String requestId;
-
- @SerializedName("instanceReferences")
- private SOInstanceReferences instanceReferences;
-
- @SerializedName("startTime")
- private LocalDateTime startTime;
-
- @SerializedName("finishTime")
- private LocalDateTime finishTime;
-
- @SerializedName("requestScope")
- private String requestScope;
-
- @SerializedName("requestType")
- private String requestType;
-
- @SerializedName("requestStatus")
- private SORequestStatus requestStatus;
-
- public SOAsyncRequestStatus() {
- // required by author
- }
-
- public String getCorrelator() {
- return correlator;
- }
-
-
- public LocalDateTime getFinishTime() {
- return finishTime;
- }
-
- public SOInstanceReferences getInstanceReferences() {
- return instanceReferences;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public String getRequestScope() {
- return requestScope;
- }
-
- public SORequestStatus getRequestStatus() {
- return requestStatus;
- }
-
- public String getRequestType() {
- return requestType;
- }
-
- public LocalDateTime getStartTime() {
- return startTime;
- }
-
- public void setCorrelator(String correlator) {
- this.correlator = correlator;
- }
-
- public void setFinishTime(LocalDateTime finishTime) {
- this.finishTime = finishTime;
- }
-
- public void setInstanceReferences(SOInstanceReferences instanceReferences) {
- this.instanceReferences = instanceReferences;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
- public void setRequestScope(String requestScope) {
- this.requestScope = requestScope;
- }
-
- public void setRequestStatus(SORequestStatus requestStatus) {
- this.requestStatus = requestStatus;
- }
-
- public void setRequestType(String requestType) {
- this.requestType = requestType;
- }
-
- public void setStartTime(LocalDateTime startTime) {
- this.startTime = startTime;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.google.gson.annotations.SerializedName; + +public class SOAsyncRequestStatus implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("correlator") + private String correlator; + + @SerializedName("requestId") + private String requestId; + + @SerializedName("instanceReferences") + private SOInstanceReferences instanceReferences; + + @SerializedName("startTime") + private LocalDateTime startTime; + + @SerializedName("finishTime") + private LocalDateTime finishTime; + + @SerializedName("requestScope") + private String requestScope; + + @SerializedName("requestType") + private String requestType; + + @SerializedName("requestStatus") + private SORequestStatus requestStatus; + + public SOAsyncRequestStatus() { + // required by author + } + + public String getCorrelator() { + return correlator; + } + + + public LocalDateTime getFinishTime() { + return finishTime; + } + + public SOInstanceReferences getInstanceReferences() { + return instanceReferences; + } + + public String getRequestId() { + return requestId; + } + + public String getRequestScope() { + return requestScope; + } + + public SORequestStatus getRequestStatus() { + return requestStatus; + } + + public String getRequestType() { + return requestType; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setCorrelator(String correlator) { + this.correlator = correlator; + } + + public void setFinishTime(LocalDateTime finishTime) { + this.finishTime = finishTime; + } + + public void setInstanceReferences(SOInstanceReferences instanceReferences) { + this.instanceReferences = instanceReferences; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public void setRequestScope(String requestScope) { + this.requestScope = requestScope; + } + + public void setRequestStatus(SORequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java index a1233bff1..7ad497a9f 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOCloudConfiguration.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOCloudConfiguration implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("lcpCloudRegionId")
- private String lcpCloudRegionId;
-
- @SerializedName("tenantId")
- private String tenantId;
-
- public SOCloudConfiguration() {
- //required by author
- }
-
- public String getLcpCloudRegionId() {
- return lcpCloudRegionId;
- }
-
- public String getTenantId() {
- return tenantId;
- }
-
- public void setLcpCloudRegionId(String lcpCloudRegionId) {
- this.lcpCloudRegionId = lcpCloudRegionId;
- }
-
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOCloudConfiguration implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("lcpCloudRegionId") + private String lcpCloudRegionId; + + @SerializedName("tenantId") + private String tenantId; + + public SOCloudConfiguration() { + //required by author + } + + public String getLcpCloudRegionId() { + return lcpCloudRegionId; + } + + public String getTenantId() { + return tenantId; + } + + public void setLcpCloudRegionId(String lcpCloudRegionId) { + this.lcpCloudRegionId = lcpCloudRegionId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java index f2155082d..307e0514f 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOInstanceReferences.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOInstanceReferences implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("requestId")
- private String requestId;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- public SOInstanceReferences() {
- //requried by author
- }
-
- public String getInstanceId() {
- return instanceId;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOInstanceReferences implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("requestId") + private String requestId; + + @SerializedName("instanceId") + private String instanceId; + + public SOInstanceReferences() { + //requried by author + } + + public String getInstanceId() { + return instanceId; + } + + public String getRequestId() { + return requestId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java index cab396d01..975a21cbc 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOPolicyExceptionHolder.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOPolicyExceptionHolder implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("messageId")
- private String messageId;
-
- @SerializedName("text")
- private String text;
-
- public SOPolicyExceptionHolder() {
- //required by author
- }
-
- public String getMessageId() {
- return messageId;
- }
-
- public String getText() {
- return text;
- }
-
- public void setMessageId(String messageId) {
- this.messageId = messageId;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOPolicyExceptionHolder implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("messageId") + private String messageId; + + @SerializedName("text") + private String text; + + public SOPolicyExceptionHolder() { + //required by author + } + + public String getMessageId() { + return messageId; + } + + public String getText() { + return text; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public void setText(String text) { + this.text = text; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java index 2bd46e04c..e7f3efc57 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstance.java @@ -1,70 +1,70 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORelatedInstance implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- @SerializedName("instanceName")
- private String instanceName;
-
- @SerializedName("modelInfo")
- private SOModelInfo modelInfo;
-
- public SORelatedInstance() {
- //required by author
- }
-
- public String getInstanceId() {
- return instanceId;
- }
-
-
- public String getInstanceName() {
- return instanceName;
- }
-
- public SOModelInfo getModelInfo() {
- return modelInfo;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setInstanceName(String instanceName) {
- this.instanceName = instanceName;
- }
-
-
- public void setModelInfo(SOModelInfo modelInfo) {
- this.modelInfo = modelInfo;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORelatedInstance implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceId") + private String instanceId; + + @SerializedName("instanceName") + private String instanceName; + + @SerializedName("modelInfo") + private SOModelInfo modelInfo; + + public SORelatedInstance() { + //required by author + } + + public String getInstanceId() { + return instanceId; + } + + + public String getInstanceName() { + return instanceName; + } + + public SOModelInfo getModelInfo() { + return modelInfo; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + + public void setModelInfo(SOModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java index 71fb11949..1148ef1e0 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORelatedInstanceListElement.java @@ -1,46 +1,46 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORelatedInstanceListElement implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("relatedInstance")
- private SORelatedInstance relatedInstance;
-
- public SORelatedInstanceListElement() {
- //required by author
- }
-
- public SORelatedInstance getRelatedInstance() {
- return relatedInstance;
- }
-
- public void setRelatedInstance(SORelatedInstance relatedInstance) {
- this.relatedInstance = relatedInstance;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORelatedInstanceListElement implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("relatedInstance") + private SORelatedInstance relatedInstance; + + public SORelatedInstanceListElement() { + //required by author + } + + public SORelatedInstance getRelatedInstance() { + return relatedInstance; + } + + public void setRelatedInstance(SORelatedInstance relatedInstance) { + this.relatedInstance = relatedInstance; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java index be5ef139a..73ebba260 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequest.java @@ -1,114 +1,114 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequest implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("requestId")
- private UUID requestId;
-
- @SerializedName("startTime")
- private String startTime;
-
- @SerializedName("finishTime")
- private LocalDateTime finishTime;
-
- @SerializedName("requestScope")
- private String requestScope;
-
- @SerializedName("requestType")
- private String requestType;
-
- @SerializedName("requestDetails")
- private SORequestDetails requestDetails;
-
- @SerializedName("requestStatus")
- private SORequestStatus requestStatus;
-
- public SORequest() {
- // required by author
- }
-
- public LocalDateTime getFinishTime() {
- return finishTime;
- }
-
- public SORequestDetails getRequestDetails() {
- return requestDetails;
- }
-
- public UUID getRequestId() {
- return requestId;
- }
-
- public String getRequestScope() {
- return requestScope;
- }
-
- public SORequestStatus getRequestStatus() {
- return requestStatus;
- }
-
- public String getRequestType() {
- return requestType;
- }
-
- public String getStartTime() {
- return startTime;
- }
-
- public void setFinishTime(LocalDateTime finishTime) {
- this.finishTime = finishTime;
- }
-
- public void setRequestDetails(SORequestDetails requestDetails) {
- this.requestDetails = requestDetails;
- }
-
- public void setRequestId(UUID requestId) {
- this.requestId = requestId;
- }
-
- public void setRequestScope(String requestScope) {
- this.requestScope = requestScope;
- }
-
- public void setRequestStatus(SORequestStatus requestStatus) {
- this.requestStatus = requestStatus;
- }
-
- public void setRequestType(String requestType) {
- this.requestType = requestType;
- }
-
- public void setStartTime(String startTime) {
- this.startTime = startTime;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.UUID; + +import com.google.gson.annotations.SerializedName; + +public class SORequest implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("requestId") + private UUID requestId; + + @SerializedName("startTime") + private String startTime; + + @SerializedName("finishTime") + private LocalDateTime finishTime; + + @SerializedName("requestScope") + private String requestScope; + + @SerializedName("requestType") + private String requestType; + + @SerializedName("requestDetails") + private SORequestDetails requestDetails; + + @SerializedName("requestStatus") + private SORequestStatus requestStatus; + + public SORequest() { + // required by author + } + + public LocalDateTime getFinishTime() { + return finishTime; + } + + public SORequestDetails getRequestDetails() { + return requestDetails; + } + + public UUID getRequestId() { + return requestId; + } + + public String getRequestScope() { + return requestScope; + } + + public SORequestStatus getRequestStatus() { + return requestStatus; + } + + public String getRequestType() { + return requestType; + } + + public String getStartTime() { + return startTime; + } + + public void setFinishTime(LocalDateTime finishTime) { + this.finishTime = finishTime; + } + + public void setRequestDetails(SORequestDetails requestDetails) { + this.requestDetails = requestDetails; + } + + public void setRequestId(UUID requestId) { + this.requestId = requestId; + } + + public void setRequestScope(String requestScope) { + this.requestScope = requestScope; + } + + public void setRequestStatus(SORequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java index 49860417c..763210831 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestError.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestError implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("policyException")
- private SOPolicyExceptionHolder policyException;
-
- @SerializedName("serviceException")
- private SOServiceExceptionHolder serviceException;
-
- public SORequestError() {
- // required by author
- }
-
- public SOPolicyExceptionHolder getPolicyException() {
- return policyException;
- }
-
- public SOServiceExceptionHolder getServiceException() {
- return serviceException;
- }
-
- public void setPolicyException(SOPolicyExceptionHolder policyException) {
- this.policyException = policyException;
- }
-
- public void setServiceException(SOServiceExceptionHolder serviceException) {
- this.serviceException = serviceException;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestError implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("policyException") + private SOPolicyExceptionHolder policyException; + + @SerializedName("serviceException") + private SOServiceExceptionHolder serviceException; + + public SORequestError() { + // required by author + } + + public SOPolicyExceptionHolder getPolicyException() { + return policyException; + } + + public SOServiceExceptionHolder getServiceException() { + return serviceException; + } + + public void setPolicyException(SOPolicyExceptionHolder policyException) { + this.policyException = policyException; + } + + public void setServiceException(SOServiceExceptionHolder serviceException) { + this.serviceException = serviceException; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java index 28bc0b87e..fd92e3284 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestInfo.java @@ -1,145 +1,145 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestInfo implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceName")
- private String instanceName;
-
- @SerializedName("source")
- private String source;
-
- @SerializedName("productFamilyId")
- private String productFamilyId;
-
- @SerializedName("suppressRollback")
- private boolean suppressRollback;
-
- @SerializedName("billingAccountNumber")
- private String billingAccountNumber;
-
- @SerializedName("callbackUrl")
- private String callbackUrl;
-
- @SerializedName("correlator")
- private String correlator;
-
- @SerializedName("orderNumber")
- private String orderNumber;
-
- @SerializedName("orderVersion")
- private Integer orderVersion;
-
- @SerializedName("requestorId")
- private String requestorId;
-
- public SORequestInfo() {
- // required by author
- }
-
- public String getBillingAccountNumber() {
- return billingAccountNumber;
- }
-
- public String getCallbackUrl() {
- return callbackUrl;
- }
-
- public String getCorrelator() {
- return correlator;
- }
-
- public String getInstanceName() {
- return instanceName;
- }
-
- public String getOrderNumber() {
- return orderNumber;
- }
-
- public Integer getOrderVersion() {
- return orderVersion;
- }
-
- public String getProductFamilyId() {
- return productFamilyId;
- }
-
- public String getRequestorId() {
- return requestorId;
- }
-
- public String getSource() {
- return source;
- }
-
- public boolean isSuppressRollback() {
- return suppressRollback;
- }
-
- public void setBillingAccountNumber(String billingAccountNumber) {
- this.billingAccountNumber = billingAccountNumber;
- }
-
- public void setCallbackUrl(String callbackUrl) {
- this.callbackUrl = callbackUrl;
- }
-
- public void setCorrelator(String correlator) {
- this.correlator = correlator;
- }
-
- public void setInstanceName(String instanceName) {
- this.instanceName = instanceName;
- }
-
- public void setOrderNumber(String orderNumber) {
- this.orderNumber = orderNumber;
- }
-
- public void setOrderVersion(Integer orderVersion) {
- this.orderVersion = orderVersion;
- }
-
- public void setProductFamilyId(String productFamilyId) {
- this.productFamilyId = productFamilyId;
- }
-
- public void setRequestorId(String requestorId) {
- this.requestorId = requestorId;
- }
-
- public void setSource(String source) {
- this.source = source;
- }
-
- public void setSuppressRollback(boolean suppressRollback) {
- this.suppressRollback = suppressRollback;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestInfo implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceName") + private String instanceName; + + @SerializedName("source") + private String source; + + @SerializedName("productFamilyId") + private String productFamilyId; + + @SerializedName("suppressRollback") + private boolean suppressRollback; + + @SerializedName("billingAccountNumber") + private String billingAccountNumber; + + @SerializedName("callbackUrl") + private String callbackUrl; + + @SerializedName("correlator") + private String correlator; + + @SerializedName("orderNumber") + private String orderNumber; + + @SerializedName("orderVersion") + private Integer orderVersion; + + @SerializedName("requestorId") + private String requestorId; + + public SORequestInfo() { + // required by author + } + + public String getBillingAccountNumber() { + return billingAccountNumber; + } + + public String getCallbackUrl() { + return callbackUrl; + } + + public String getCorrelator() { + return correlator; + } + + public String getInstanceName() { + return instanceName; + } + + public String getOrderNumber() { + return orderNumber; + } + + public Integer getOrderVersion() { + return orderVersion; + } + + public String getProductFamilyId() { + return productFamilyId; + } + + public String getRequestorId() { + return requestorId; + } + + public String getSource() { + return source; + } + + public boolean isSuppressRollback() { + return suppressRollback; + } + + public void setBillingAccountNumber(String billingAccountNumber) { + this.billingAccountNumber = billingAccountNumber; + } + + public void setCallbackUrl(String callbackUrl) { + this.callbackUrl = callbackUrl; + } + + public void setCorrelator(String correlator) { + this.correlator = correlator; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public void setOrderVersion(Integer orderVersion) { + this.orderVersion = orderVersion; + } + + public void setProductFamilyId(String productFamilyId) { + this.productFamilyId = productFamilyId; + } + + public void setRequestorId(String requestorId) { + this.requestorId = requestorId; + } + + public void setSource(String source) { + this.source = source; + } + + public void setSuppressRollback(boolean suppressRollback) { + this.suppressRollback = suppressRollback; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java index c1a6c7d85..169752057 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestParameters.java @@ -1,60 +1,60 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestParameters implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("subscriptionServiceType")
- private String subscriptionServiceType;
-
- @SerializedName("userParams")
- private List<Map<String, String>> userParams = new LinkedList<>();
-
- public SORequestParameters() {
- // required by author
- }
-
- public String getSubscriptionServiceType() {
- return subscriptionServiceType;
- }
-
- public List<Map<String, String>> getUserParams() {
- return userParams;
- }
-
- public void setSubscriptionServiceType(String subscriptionServiceType) {
- this.subscriptionServiceType = subscriptionServiceType;
- }
-
- public void setUserParams(List<Map<String, String>> userParams) {
- this.userParams = userParams;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.google.gson.annotations.SerializedName; + +public class SORequestParameters implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("subscriptionServiceType") + private String subscriptionServiceType; + + @SerializedName("userParams") + private List<Map<String, String>> userParams = new LinkedList<>(); + + public SORequestParameters() { + // required by author + } + + public String getSubscriptionServiceType() { + return subscriptionServiceType; + } + + public List<Map<String, String>> getUserParams() { + return userParams; + } + + public void setSubscriptionServiceType(String subscriptionServiceType) { + this.subscriptionServiceType = subscriptionServiceType; + } + + public void setUserParams(List<Map<String, String>> userParams) { + this.userParams = userParams; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java index 913402db3..ed14f6b58 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestReferences.java @@ -1,53 +1,53 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestReferences implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("instanceId")
- private String instanceId;
-
- @SerializedName("requestId")
- private String requestId;
-
- public String getInstanceId() {
- return instanceId;
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public void setInstanceId(String instanceId) {
- this.instanceId = instanceId;
- }
-
- public void setRequestId(String requestId) {
- this.requestId = requestId;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestReferences implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("instanceId") + private String instanceId; + + @SerializedName("requestId") + private String requestId; + + public String getInstanceId() { + return instanceId; + } + + public String getRequestId() { + return requestId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java index 8c5e7848c..2e77c157b 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SORequestStatus.java @@ -1,82 +1,82 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SORequestStatus implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("percentProgress")
- private int percentProgress;
-
- @SerializedName("requestState")
- private String requestState;
-
- @SerializedName("timestamp")
- private String timestamp;
-
- @SerializedName("wasRolledBack")
- private boolean wasRolledBack;
-
- public SORequestStatus() {
- //required by author
- }
-
- public int getPercentProgress() {
- return percentProgress;
- }
-
- public String getRequestState() {
- return requestState;
- }
-
- public String getTimestamp() {
- return timestamp;
- }
-
- public boolean isWasRolledBack() {
- return wasRolledBack;
- }
-
- public void setPercentProgress(int percentProgress) {
- this.percentProgress = percentProgress;
- }
-
- public void setRequestState(String requestState) {
- this.requestState = requestState;
- }
-
- public void setTimestamp(String timestamp) {
- this.timestamp = timestamp;
- }
-
- public void setWasRolledBack(boolean wasRolledBack) {
- this.wasRolledBack = wasRolledBack;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SORequestStatus implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("percentProgress") + private int percentProgress; + + @SerializedName("requestState") + private String requestState; + + @SerializedName("timestamp") + private String timestamp; + + @SerializedName("wasRolledBack") + private boolean wasRolledBack; + + public SORequestStatus() { + //required by author + } + + public int getPercentProgress() { + return percentProgress; + } + + public String getRequestState() { + return requestState; + } + + public String getTimestamp() { + return timestamp; + } + + public boolean isWasRolledBack() { + return wasRolledBack; + } + + public void setPercentProgress(int percentProgress) { + this.percentProgress = percentProgress; + } + + public void setRequestState(String requestState) { + this.requestState = requestState; + } + + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + + public void setWasRolledBack(boolean wasRolledBack) { + this.wasRolledBack = wasRolledBack; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java index 61366d3c5..703e13be5 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOServiceExceptionHolder.java @@ -1,66 +1,66 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOServiceExceptionHolder implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("messageId")
- private String messageId;
-
- @SerializedName("text")
- private String text;
-
- @SerializedName("variables")
- private List<String> variables = new LinkedList<>();
-
- public SOServiceExceptionHolder() {
- // required by author
- }
-
- public String getMessageId() {
- return messageId;
- }
-
- public String getText() {
- return text;
- }
-
- public List<String> getVariables() {
- return variables;
- }
-
- public void setMessageId(String messageId) {
- this.messageId = messageId;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class SOServiceExceptionHolder implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("messageId") + private String messageId; + + @SerializedName("text") + private String text; + + @SerializedName("variables") + private List<String> variables = new LinkedList<>(); + + public SOServiceExceptionHolder() { + // required by author + } + + public String getMessageId() { + return messageId; + } + + public String getText() { + return text; + } + + public List<String> getVariables() { + return variables; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public void setText(String text) { + this.text = text; + } + +} diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java index 14c46b0c1..618e9ec1e 100644 --- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java +++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOSubscriberInfo.java @@ -1,68 +1,68 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class SOSubscriberInfo implements Serializable {
-
- private static final long serialVersionUID = -3283942659786236032L;
-
- @SerializedName("globalSubscriberId")
- private String globalSubscriberId;
-
- @SerializedName("subscriberCommonSiteId")
- private String subscriberCommonSiteId;
-
- @SerializedName("subscriberName")
- private String subscriberName;
-
- public SOSubscriberInfo() {
- //required by author
- }
-
- public String getGlobalSubscriberId() {
- return globalSubscriberId;
- }
-
- public String getSubscriberCommonSiteId() {
- return subscriberCommonSiteId;
- }
-
- public String getSubscriberName() {
- return subscriberName;
- }
-
- public void setGlobalSubscriberId(String globalSubscriberId) {
- this.globalSubscriberId = globalSubscriberId;
- }
-
- public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
- this.subscriberCommonSiteId = subscriberCommonSiteId;
- }
-
- public void setSubscriberName(String subscriberName) {
- this.subscriberName = subscriberName;
- }
-
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class SOSubscriberInfo implements Serializable { + + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("globalSubscriberId") + private String globalSubscriberId; + + @SerializedName("subscriberCommonSiteId") + private String subscriberCommonSiteId; + + @SerializedName("subscriberName") + private String subscriberName; + + public SOSubscriberInfo() { + //required by author + } + + public String getGlobalSubscriberId() { + return globalSubscriberId; + } + + public String getSubscriberCommonSiteId() { + return subscriberCommonSiteId; + } + + public String getSubscriberName() { + return subscriberName; + } + + public void setGlobalSubscriberId(String globalSubscriberId) { + this.globalSubscriberId = globalSubscriberId; + } + + public void setSubscriberCommonSiteId(String subscriberCommonSiteId) { + this.subscriberCommonSiteId = subscriberCommonSiteId; + } + + public void setSubscriberName(String subscriberName) { + this.subscriberName = subscriberName; + } + +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java index 119c29121..7c50ea097 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoAsyncRequestStatus.java @@ -1,78 +1,78 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.time.LocalDateTime;
-
-import org.junit.Test;
-
-public class TestSoAsyncRequestStatus {
-
- @Test
- public void testConstructor() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
-
- assertTrue(obj.getCorrelator() == null);
- assertTrue(obj.getFinishTime() == null);
- assertTrue(obj.getInstanceReferences() == null);
- assertTrue(obj.getRequestId() == null);
- assertTrue(obj.getRequestScope() == null);
- assertTrue(obj.getRequestStatus() == null);
- assertTrue(obj.getStartTime() == null);
- }
-
- @Test
- public void testSetGet() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
-
- obj.setCorrelator("correlator");
- assertEquals("correlator", obj.getCorrelator());
-
- LocalDateTime finishTime = LocalDateTime.now();
- obj.setFinishTime(finishTime);
- assertEquals(finishTime, obj.getFinishTime());
-
- SOInstanceReferences instanceReferences = new SOInstanceReferences();
- obj.setInstanceReferences(instanceReferences);
- assertEquals(instanceReferences, obj.getInstanceReferences());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
-
- obj.setRequestScope("requestScope");
- assertEquals("requestScope", obj.getRequestScope());
-
- SORequestStatus requestStatus = new SORequestStatus();
- obj.setRequestStatus(requestStatus);
- assertEquals(requestStatus, obj.getRequestStatus());
-
- obj.setRequestType("requestType");
- assertEquals("requestType", obj.getRequestType());
-
- LocalDateTime startTime = LocalDateTime.now();
- obj.setStartTime(startTime);
- assertEquals(startTime, obj.getStartTime());
-
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.time.LocalDateTime; + +import org.junit.Test; + +public class TestSoAsyncRequestStatus { + + @Test + public void testConstructor() { + SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + + assertTrue(obj.getCorrelator() == null); + assertTrue(obj.getFinishTime() == null); + assertTrue(obj.getInstanceReferences() == null); + assertTrue(obj.getRequestId() == null); + assertTrue(obj.getRequestScope() == null); + assertTrue(obj.getRequestStatus() == null); + assertTrue(obj.getStartTime() == null); + } + + @Test + public void testSetGet() { + SOAsyncRequestStatus obj = new SOAsyncRequestStatus(); + + obj.setCorrelator("correlator"); + assertEquals("correlator", obj.getCorrelator()); + + LocalDateTime finishTime = LocalDateTime.now(); + obj.setFinishTime(finishTime); + assertEquals(finishTime, obj.getFinishTime()); + + SOInstanceReferences instanceReferences = new SOInstanceReferences(); + obj.setInstanceReferences(instanceReferences); + assertEquals(instanceReferences, obj.getInstanceReferences()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + + obj.setRequestScope("requestScope"); + assertEquals("requestScope", obj.getRequestScope()); + + SORequestStatus requestStatus = new SORequestStatus(); + obj.setRequestStatus(requestStatus); + assertEquals(requestStatus, obj.getRequestStatus()); + + obj.setRequestType("requestType"); + assertEquals("requestType", obj.getRequestType()); + + LocalDateTime startTime = LocalDateTime.now(); + obj.setStartTime(startTime); + assertEquals(startTime, obj.getStartTime()); + + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java index f05912985..bab8970bb 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoCloudConfiguration.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoCloudConfiguration {
-
- @Test
- public void testConstructor() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
-
- assertTrue(obj.getLcpCloudRegionId() == null);
- assertTrue(obj.getTenantId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
-
- obj.setLcpCloudRegionId("lcpCloudRegionId");
- assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId());
-
- obj.setTenantId("tenantId");
- assertEquals("tenantId", obj.getTenantId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoCloudConfiguration { + + @Test + public void testConstructor() { + SOCloudConfiguration obj = new SOCloudConfiguration(); + + assertTrue(obj.getLcpCloudRegionId() == null); + assertTrue(obj.getTenantId() == null); + } + + @Test + public void testSetGet() { + SOCloudConfiguration obj = new SOCloudConfiguration(); + + obj.setLcpCloudRegionId("lcpCloudRegionId"); + assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId()); + + obj.setTenantId("tenantId"); + assertEquals("tenantId", obj.getTenantId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java index 8c63e9c65..ee083ae08 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoInstanceReferences.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoInstanceReferences {
-
- @Test
- public void testConstructor() {
- SOInstanceReferences obj = new SOInstanceReferences();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getRequestId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOInstanceReferences obj = new SOInstanceReferences();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoInstanceReferences { + + @Test + public void testConstructor() { + SOInstanceReferences obj = new SOInstanceReferences(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getRequestId() == null); + } + + @Test + public void testSetGet() { + SOInstanceReferences obj = new SOInstanceReferences(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java index 99f829fc7..037e82e4c 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoModelInfo.java @@ -1,69 +1,69 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoModelInfo {
-
- @Test
- public void testConstructor() {
- SOModelInfo obj = new SOModelInfo();
-
- assertTrue(obj.getModelCustomizationId() == null);
- assertTrue(obj.getModelCustomizationName() == null);
- assertTrue(obj.getModelInvariantId() == null);
- assertTrue(obj.getModelName() == null);
- assertTrue(obj.getModelType() == null);
- assertTrue(obj.getModelVersion() == null);
- assertTrue(obj.getModelVersionId() == null);
- }
-
- @Test
- public void testSetGet() {
- SOModelInfo obj = new SOModelInfo();
-
- obj.setModelCustomizationId("modelCustomizationId");
- assertEquals("modelCustomizationId", obj.getModelCustomizationId());
-
- obj.setModelCustomizationName("modelCustomizationName");
- assertEquals("modelCustomizationName", obj.getModelCustomizationName());
-
- obj.setModelInvariantId("modelInvariantId");
- assertEquals("modelInvariantId", obj.getModelInvariantId());
-
- obj.setModelName("modelName");
- assertEquals("modelName", obj.getModelName());
-
- obj.setModelType("modelType");
- assertEquals("modelType", obj.getModelType());
-
- obj.setModelVersion("modelVersion");
- assertEquals("modelVersion", obj.getModelVersion());
-
- obj.setModelVersionId("modelVersionId");
- assertEquals("modelVersionId", obj.getModelVersionId());
-
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoModelInfo { + + @Test + public void testConstructor() { + SOModelInfo obj = new SOModelInfo(); + + assertTrue(obj.getModelCustomizationId() == null); + assertTrue(obj.getModelCustomizationName() == null); + assertTrue(obj.getModelInvariantId() == null); + assertTrue(obj.getModelName() == null); + assertTrue(obj.getModelType() == null); + assertTrue(obj.getModelVersion() == null); + assertTrue(obj.getModelVersionId() == null); + } + + @Test + public void testSetGet() { + SOModelInfo obj = new SOModelInfo(); + + obj.setModelCustomizationId("modelCustomizationId"); + assertEquals("modelCustomizationId", obj.getModelCustomizationId()); + + obj.setModelCustomizationName("modelCustomizationName"); + assertEquals("modelCustomizationName", obj.getModelCustomizationName()); + + obj.setModelInvariantId("modelInvariantId"); + assertEquals("modelInvariantId", obj.getModelInvariantId()); + + obj.setModelName("modelName"); + assertEquals("modelName", obj.getModelName()); + + obj.setModelType("modelType"); + assertEquals("modelType", obj.getModelType()); + + obj.setModelVersion("modelVersion"); + assertEquals("modelVersion", obj.getModelVersion()); + + obj.setModelVersionId("modelVersionId"); + assertEquals("modelVersionId", obj.getModelVersionId()); + + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java index 978ec8a59..1c619a8c6 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoPolicyExceptionHolder.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoPolicyExceptionHolder {
-
- @Test
- public void testConstructor() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
-
- assertTrue(obj.getMessageId() == null);
- assertTrue(obj.getText() == null);
- }
-
- @Test
- public void testSetGet() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
-
- obj.setMessageId("messageId");
- assertEquals("messageId", obj.getMessageId());
-
- obj.setText("text");
- assertEquals("text", obj.getText());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoPolicyExceptionHolder { + + @Test + public void testConstructor() { + SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + + assertTrue(obj.getMessageId() == null); + assertTrue(obj.getText() == null); + } + + @Test + public void testSetGet() { + SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder(); + + obj.setMessageId("messageId"); + assertEquals("messageId", obj.getMessageId()); + + obj.setText("text"); + assertEquals("text", obj.getText()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java index a8e94b8e2..048288377 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstance.java @@ -1,53 +1,53 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- * Copyright (C) 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=========================================================
- */
-
-package org.onap.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRelatedInstance {
-
- @Test
- public void testConstructor() {
- SORelatedInstance obj = new SORelatedInstance();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getInstanceName() == null);
- assertTrue(obj.getModelInfo() == null);
- }
-
- @Test
- public void testSetGet() {
- SORelatedInstance obj = new SORelatedInstance();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setInstanceName("instanceName");
- assertEquals("instanceName", obj.getInstanceName());
-
- SOModelInfo modelInfo = new SOModelInfo();
- obj.setModelInfo(modelInfo);
- assertEquals(modelInfo, obj.getModelInfo());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * Copyright (C) 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========================================================= + */ + +package org.onap.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRelatedInstance { + + @Test + public void testConstructor() { + SORelatedInstance obj = new SORelatedInstance(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getInstanceName() == null); + assertTrue(obj.getModelInfo() == null); + } + + @Test + public void testSetGet() { + SORelatedInstance obj = new SORelatedInstance(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setInstanceName("instanceName"); + assertEquals("instanceName", obj.getInstanceName()); + + SOModelInfo modelInfo = new SOModelInfo(); + obj.setModelInfo(modelInfo); + assertEquals(modelInfo, obj.getModelInfo()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java index 17abd06e3..83f1d5849 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRelatedInstanceListElement.java @@ -1,45 +1,45 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRelatedInstanceListElement {
-
- @Test
- public void testConstructor() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
-
- assertTrue(obj.getRelatedInstance() == null);
- }
-
- @Test
- public void testSetGet() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
-
- SORelatedInstance relatedInstance = new SORelatedInstance();
- obj.setRelatedInstance(relatedInstance);
- assertEquals(relatedInstance, obj.getRelatedInstance());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRelatedInstanceListElement { + + @Test + public void testConstructor() { + SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + + assertTrue(obj.getRelatedInstance() == null); + } + + @Test + public void testSetGet() { + SORelatedInstanceListElement obj = new SORelatedInstanceListElement(); + + SORelatedInstance relatedInstance = new SORelatedInstance(); + obj.setRelatedInstance(relatedInstance); + assertEquals(relatedInstance, obj.getRelatedInstance()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java index 229765a72..f58254184 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequest.java @@ -1,72 +1,72 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestSoRequest {
-
- @Test
- public void testConstructor() {
- SORequest obj = new SORequest();
-
- assertTrue(obj.getFinishTime() == null);
- assertTrue(obj.getRequestDetails() == null);
- assertTrue(obj.getRequestId() == null);
- assertTrue(obj.getRequestScope() == null);
- assertTrue(obj.getRequestStatus() == null);
- assertTrue(obj.getRequestType() == null);
- assertTrue(obj.getStartTime() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequest obj = new SORequest();
-
- LocalDateTime finishTime = LocalDateTime.now();
- obj.setFinishTime(finishTime);
- assertEquals(finishTime, obj.getFinishTime());
-
- UUID uuid = UUID.randomUUID();
- obj.setRequestId(uuid);
- assertEquals(uuid, obj.getRequestId());
-
- obj.setRequestScope("requestScope");
- assertEquals("requestScope", obj.getRequestScope());
-
- SORequestStatus requestStatus = new SORequestStatus();
- obj.setRequestStatus(requestStatus);
- assertEquals(requestStatus, obj.getRequestStatus());
-
- obj.setRequestType("requestType");
- assertEquals("requestType", obj.getRequestType());
-
- LocalDateTime startTime = LocalDateTime.now();
- obj.setStartTime(startTime.toString());
- assertEquals(startTime.toString(), obj.getStartTime());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.time.LocalDateTime; +import java.util.UUID; + +import org.junit.Test; + +public class TestSoRequest { + + @Test + public void testConstructor() { + SORequest obj = new SORequest(); + + assertTrue(obj.getFinishTime() == null); + assertTrue(obj.getRequestDetails() == null); + assertTrue(obj.getRequestId() == null); + assertTrue(obj.getRequestScope() == null); + assertTrue(obj.getRequestStatus() == null); + assertTrue(obj.getRequestType() == null); + assertTrue(obj.getStartTime() == null); + } + + @Test + public void testSetGet() { + SORequest obj = new SORequest(); + + LocalDateTime finishTime = LocalDateTime.now(); + obj.setFinishTime(finishTime); + assertEquals(finishTime, obj.getFinishTime()); + + UUID uuid = UUID.randomUUID(); + obj.setRequestId(uuid); + assertEquals(uuid, obj.getRequestId()); + + obj.setRequestScope("requestScope"); + assertEquals("requestScope", obj.getRequestScope()); + + SORequestStatus requestStatus = new SORequestStatus(); + obj.setRequestStatus(requestStatus); + assertEquals(requestStatus, obj.getRequestStatus()); + + obj.setRequestType("requestType"); + assertEquals("requestType", obj.getRequestType()); + + LocalDateTime startTime = LocalDateTime.now(); + obj.setStartTime(startTime.toString()); + assertEquals(startTime.toString(), obj.getStartTime()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java index 42dfe0805..6e9a2bade 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestDetails.java @@ -1,174 +1,174 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-
-public class TestSoRequestDetails {
-
- @Test
- public void testConstructor() {
- SORequestDetails obj = new SORequestDetails();
-
- assertTrue(obj.getCloudConfiguration() == null);
- assertTrue(obj.getModelInfo() == null);
- assertTrue(obj.getRequestInfo() == null);
- assertTrue(obj.getRequestParameters() == null);
- assertTrue(obj.getSubscriberInfo() == null);
-
- assertTrue(obj.getRelatedInstanceList() != null);
- assertEquals(0, obj.getRelatedInstanceList().size());
- }
-
- @Test
- public void testSetGet() {
- SORequestDetails obj = new SORequestDetails();
-
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
- obj.setCloudConfiguration(cloudConfiguration);
- assertEquals(cloudConfiguration, obj.getCloudConfiguration());
-
- SOModelInfo modelInfo = new SOModelInfo();
- obj.setModelInfo(modelInfo);
- assertEquals(modelInfo, obj.getModelInfo());
-
- SORequestInfo requestInfo = new SORequestInfo();
- obj.setRequestInfo(requestInfo);
- assertEquals(requestInfo, obj.getRequestInfo());
-
- SORequestParameters requestParameters = new SORequestParameters();
- obj.setRequestParameters(requestParameters);
- assertEquals(requestParameters, obj.getRequestParameters());
-
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
- obj.setSubscriberInfo(subscriberInfo);
- assertEquals(subscriberInfo, obj.getSubscriberInfo());
- }
-
- @Test
- public void testSOMRequestDetailsMethods() {
- SORequestDetails details = new SORequestDetails();
- assertNotNull(details);
- assertNotEquals(0, details.hashCode());
-
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
- details.setCloudConfiguration(cloudConfiguration);
- assertEquals(cloudConfiguration, details.getCloudConfiguration());
- assertNotEquals(0, details.hashCode());
-
- SOModelInfo modelInfo = new SOModelInfo();
- details.setModelInfo(modelInfo);
- assertEquals(modelInfo, details.getModelInfo());
- assertNotEquals(0, details.hashCode());
-
- List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>();
- details.setRelatedInstanceList(relatedInstanceList);
- assertEquals(relatedInstanceList, details.getRelatedInstanceList());
- assertNotEquals(0, details.hashCode());
-
- SORequestInfo requestInfo = new SORequestInfo();
- details.setRequestInfo(requestInfo);
- assertEquals(requestInfo, details.getRequestInfo());
- assertNotEquals(0, details.hashCode());
-
- SORequestParameters requestParameters = new SORequestParameters();
- details.setRequestParameters(requestParameters);
- assertEquals(requestParameters, details.getRequestParameters());
- assertNotEquals(0, details.hashCode());
-
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
- details.setSubscriberInfo(subscriberInfo);
- assertEquals(subscriberInfo, details.getSubscriberInfo());
- assertNotEquals(0, details.hashCode());
-
- assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46));
-
- SORequestDetails copiedDetails = new SORequestDetails(details);
-
- assertTrue(details.equals(details));
- assertTrue(details.equals(copiedDetails));
- assertFalse(details.equals(null));
- assertFalse(details.equals("Hello"));
-
- details.setCloudConfiguration(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setCloudConfiguration(null);
- assertTrue(details.equals(copiedDetails));
- details.setCloudConfiguration(cloudConfiguration);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setCloudConfiguration(cloudConfiguration);
- assertTrue(details.equals(copiedDetails));
-
- details.setModelInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setModelInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setModelInfo(modelInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setModelInfo(modelInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRequestInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setRequestInfo(requestInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestInfo(requestInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRequestParameters(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestParameters(null);
- assertTrue(details.equals(copiedDetails));
- details.setRequestParameters(requestParameters);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRequestParameters(requestParameters);
- assertTrue(details.equals(copiedDetails));
-
- details.setSubscriberInfo(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setSubscriberInfo(null);
- assertTrue(details.equals(copiedDetails));
- details.setSubscriberInfo(subscriberInfo);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setSubscriberInfo(subscriberInfo);
- assertTrue(details.equals(copiedDetails));
-
- details.setRelatedInstanceList(null);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRelatedInstanceList(null);
- assertTrue(details.equals(copiedDetails));
- details.setRelatedInstanceList(relatedInstanceList);
- assertFalse(details.equals(copiedDetails));
- copiedDetails.setRelatedInstanceList(relatedInstanceList);
- assertTrue(details.equals(copiedDetails));
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +public class TestSoRequestDetails { + + @Test + public void testConstructor() { + SORequestDetails obj = new SORequestDetails(); + + assertTrue(obj.getCloudConfiguration() == null); + assertTrue(obj.getModelInfo() == null); + assertTrue(obj.getRequestInfo() == null); + assertTrue(obj.getRequestParameters() == null); + assertTrue(obj.getSubscriberInfo() == null); + + assertTrue(obj.getRelatedInstanceList() != null); + assertEquals(0, obj.getRelatedInstanceList().size()); + } + + @Test + public void testSetGet() { + SORequestDetails obj = new SORequestDetails(); + + SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + obj.setCloudConfiguration(cloudConfiguration); + assertEquals(cloudConfiguration, obj.getCloudConfiguration()); + + SOModelInfo modelInfo = new SOModelInfo(); + obj.setModelInfo(modelInfo); + assertEquals(modelInfo, obj.getModelInfo()); + + SORequestInfo requestInfo = new SORequestInfo(); + obj.setRequestInfo(requestInfo); + assertEquals(requestInfo, obj.getRequestInfo()); + + SORequestParameters requestParameters = new SORequestParameters(); + obj.setRequestParameters(requestParameters); + assertEquals(requestParameters, obj.getRequestParameters()); + + SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + obj.setSubscriberInfo(subscriberInfo); + assertEquals(subscriberInfo, obj.getSubscriberInfo()); + } + + @Test + public void testSOMRequestDetailsMethods() { + SORequestDetails details = new SORequestDetails(); + assertNotNull(details); + assertNotEquals(0, details.hashCode()); + + SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration(); + details.setCloudConfiguration(cloudConfiguration); + assertEquals(cloudConfiguration, details.getCloudConfiguration()); + assertNotEquals(0, details.hashCode()); + + SOModelInfo modelInfo = new SOModelInfo(); + details.setModelInfo(modelInfo); + assertEquals(modelInfo, details.getModelInfo()); + assertNotEquals(0, details.hashCode()); + + List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>(); + details.setRelatedInstanceList(relatedInstanceList); + assertEquals(relatedInstanceList, details.getRelatedInstanceList()); + assertNotEquals(0, details.hashCode()); + + SORequestInfo requestInfo = new SORequestInfo(); + details.setRequestInfo(requestInfo); + assertEquals(requestInfo, details.getRequestInfo()); + assertNotEquals(0, details.hashCode()); + + SORequestParameters requestParameters = new SORequestParameters(); + details.setRequestParameters(requestParameters); + assertEquals(requestParameters, details.getRequestParameters()); + assertNotEquals(0, details.hashCode()); + + SOSubscriberInfo subscriberInfo = new SOSubscriberInfo(); + details.setSubscriberInfo(subscriberInfo); + assertEquals(subscriberInfo, details.getSubscriberInfo()); + assertNotEquals(0, details.hashCode()); + + assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46)); + + SORequestDetails copiedDetails = new SORequestDetails(details); + + assertTrue(details.equals(details)); + assertTrue(details.equals(copiedDetails)); + assertFalse(details.equals(null)); + assertFalse(details.equals("Hello")); + + details.setCloudConfiguration(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setCloudConfiguration(null); + assertTrue(details.equals(copiedDetails)); + details.setCloudConfiguration(cloudConfiguration); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setCloudConfiguration(cloudConfiguration); + assertTrue(details.equals(copiedDetails)); + + details.setModelInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setModelInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setModelInfo(modelInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setModelInfo(modelInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRequestInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setRequestInfo(requestInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestInfo(requestInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRequestParameters(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestParameters(null); + assertTrue(details.equals(copiedDetails)); + details.setRequestParameters(requestParameters); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRequestParameters(requestParameters); + assertTrue(details.equals(copiedDetails)); + + details.setSubscriberInfo(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setSubscriberInfo(null); + assertTrue(details.equals(copiedDetails)); + details.setSubscriberInfo(subscriberInfo); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setSubscriberInfo(subscriberInfo); + assertTrue(details.equals(copiedDetails)); + + details.setRelatedInstanceList(null); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRelatedInstanceList(null); + assertTrue(details.equals(copiedDetails)); + details.setRelatedInstanceList(relatedInstanceList); + assertFalse(details.equals(copiedDetails)); + copiedDetails.setRelatedInstanceList(relatedInstanceList); + assertTrue(details.equals(copiedDetails)); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java index 1108daf3d..a3c19cf41 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestError.java @@ -1,50 +1,50 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestError {
-
- @Test
- public void testConstructor() {
- SORequestError obj = new SORequestError();
-
- assertTrue(obj.getPolicyException() == null);
- assertTrue(obj.getServiceException() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequestError obj = new SORequestError();
-
- SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder();
- obj.setPolicyException(policyException);
- assertEquals(policyException, obj.getPolicyException());
-
- SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder();
- obj.setServiceException(serviceException);
- assertEquals(serviceException, obj.getServiceException());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestError { + + @Test + public void testConstructor() { + SORequestError obj = new SORequestError(); + + assertTrue(obj.getPolicyException() == null); + assertTrue(obj.getServiceException() == null); + } + + @Test + public void testSetGet() { + SORequestError obj = new SORequestError(); + + SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder(); + obj.setPolicyException(policyException); + assertEquals(policyException, obj.getPolicyException()); + + SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder(); + obj.setServiceException(serviceException); + assertEquals(serviceException, obj.getServiceException()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java index d1b7f247c..a77fe8bf4 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestInfo.java @@ -1,81 +1,81 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestInfo {
-
- @Test
- public void testConstructor() {
- SORequestInfo obj = new SORequestInfo();
-
- assertTrue(obj.getBillingAccountNumber() == null);
- assertTrue(obj.getCallbackUrl() == null);
- assertTrue(obj.getCorrelator() == null);
- assertTrue(obj.getInstanceName() == null);
- assertTrue(obj.getOrderNumber() == null);
- assertTrue(obj.getOrderVersion() == null);
- assertTrue(obj.getProductFamilyId() == null);
- assertTrue(obj.getRequestorId() == null);
- assertTrue(obj.getSource() == null);
- assertTrue(obj.isSuppressRollback() == false);
- }
-
- @Test
- public void testSetGet() {
- SORequestInfo obj = new SORequestInfo();
-
- obj.setBillingAccountNumber("billingAccountNumber");
- assertEquals("billingAccountNumber", obj.getBillingAccountNumber());
-
- obj.setCallbackUrl("callbackUrl");
- assertEquals("callbackUrl", obj.getCallbackUrl());
-
- obj.setCorrelator("correlator");
- assertEquals("correlator", obj.getCorrelator());
-
- obj.setInstanceName("instanceName");
- assertEquals("instanceName", obj.getInstanceName());
-
- obj.setOrderNumber("orderNumber");
- assertEquals("orderNumber", obj.getOrderNumber());
-
- int orderVersion = 2008;
- obj.setOrderVersion(orderVersion);
- assertEquals((Integer) orderVersion, obj.getOrderVersion());
-
- obj.setProductFamilyId("productFamilyId");
- assertEquals("productFamilyId", obj.getProductFamilyId());
-
- obj.setRequestorId("requestorId");
- assertEquals("requestorId", obj.getRequestorId());
-
- obj.setSource("source");
- assertEquals("source", obj.getSource());
-
- obj.setSuppressRollback(true);
- assertEquals(true, obj.isSuppressRollback());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestInfo { + + @Test + public void testConstructor() { + SORequestInfo obj = new SORequestInfo(); + + assertTrue(obj.getBillingAccountNumber() == null); + assertTrue(obj.getCallbackUrl() == null); + assertTrue(obj.getCorrelator() == null); + assertTrue(obj.getInstanceName() == null); + assertTrue(obj.getOrderNumber() == null); + assertTrue(obj.getOrderVersion() == null); + assertTrue(obj.getProductFamilyId() == null); + assertTrue(obj.getRequestorId() == null); + assertTrue(obj.getSource() == null); + assertTrue(obj.isSuppressRollback() == false); + } + + @Test + public void testSetGet() { + SORequestInfo obj = new SORequestInfo(); + + obj.setBillingAccountNumber("billingAccountNumber"); + assertEquals("billingAccountNumber", obj.getBillingAccountNumber()); + + obj.setCallbackUrl("callbackUrl"); + assertEquals("callbackUrl", obj.getCallbackUrl()); + + obj.setCorrelator("correlator"); + assertEquals("correlator", obj.getCorrelator()); + + obj.setInstanceName("instanceName"); + assertEquals("instanceName", obj.getInstanceName()); + + obj.setOrderNumber("orderNumber"); + assertEquals("orderNumber", obj.getOrderNumber()); + + int orderVersion = 2008; + obj.setOrderVersion(orderVersion); + assertEquals((Integer) orderVersion, obj.getOrderVersion()); + + obj.setProductFamilyId("productFamilyId"); + assertEquals("productFamilyId", obj.getProductFamilyId()); + + obj.setRequestorId("requestorId"); + assertEquals("requestorId", obj.getRequestorId()); + + obj.setSource("source"); + assertEquals("source", obj.getSource()); + + obj.setSuppressRollback(true); + assertEquals(true, obj.isSuppressRollback()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java index cb32be531..1ebf5d76f 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestParameters.java @@ -1,46 +1,46 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestParameters {
-
- @Test
- public void testConstructor() {
- SORequestParameters obj = new SORequestParameters();
-
- assertTrue(obj.getSubscriptionServiceType() == null);
- assertTrue(obj.getUserParams() != null);
- assertEquals(0, obj.getUserParams().size());
- }
-
- @Test
- public void testSetGet() {
- SORequestParameters obj = new SORequestParameters();
-
- obj.setSubscriptionServiceType("subscriptionServiceType");
- assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestParameters { + + @Test + public void testConstructor() { + SORequestParameters obj = new SORequestParameters(); + + assertTrue(obj.getSubscriptionServiceType() == null); + assertTrue(obj.getUserParams() != null); + assertEquals(0, obj.getUserParams().size()); + } + + @Test + public void testSetGet() { + SORequestParameters obj = new SORequestParameters(); + + obj.setSubscriptionServiceType("subscriptionServiceType"); + assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java index e212ba1c3..498a2e00b 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestReferences.java @@ -1,48 +1,48 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestReferences {
-
- @Test
- public void testConstructor() {
- SORequestReferences obj = new SORequestReferences();
-
- assertTrue(obj.getInstanceId() == null);
- assertTrue(obj.getRequestId() == null);
- }
-
- @Test
- public void testSetGet() {
- SORequestReferences obj = new SORequestReferences();
-
- obj.setInstanceId("instanceId");
- assertEquals("instanceId", obj.getInstanceId());
-
- obj.setRequestId("requestId");
- assertEquals("requestId", obj.getRequestId());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestReferences { + + @Test + public void testConstructor() { + SORequestReferences obj = new SORequestReferences(); + + assertTrue(obj.getInstanceId() == null); + assertTrue(obj.getRequestId() == null); + } + + @Test + public void testSetGet() { + SORequestReferences obj = new SORequestReferences(); + + obj.setInstanceId("instanceId"); + assertEquals("instanceId", obj.getInstanceId()); + + obj.setRequestId("requestId"); + assertEquals("requestId", obj.getRequestId()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java index 9fa0b9741..1b8d745fd 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoRequestStatus.java @@ -1,57 +1,57 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoRequestStatus {
-
- @Test
- public void testConstructor() {
- SORequestStatus obj = new SORequestStatus();
-
- assertEquals(0, obj.getPercentProgress());
- assertTrue(obj.getRequestState() == null);
- assertTrue(obj.getTimestamp() == null);
- assertFalse(obj.isWasRolledBack());
- }
-
- @Test
- public void testSetGet() {
- SORequestStatus obj = new SORequestStatus();
-
- obj.setPercentProgress(2008);
- assertEquals(2008, obj.getPercentProgress());
-
- obj.setRequestState("requestState");
- assertEquals("requestState", obj.getRequestState());
-
- obj.setTimestamp("timestamp");
- assertEquals("timestamp", obj.getTimestamp());
-
- obj.setWasRolledBack(true);
- assertTrue(obj.isWasRolledBack());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoRequestStatus { + + @Test + public void testConstructor() { + SORequestStatus obj = new SORequestStatus(); + + assertEquals(0, obj.getPercentProgress()); + assertTrue(obj.getRequestState() == null); + assertTrue(obj.getTimestamp() == null); + assertFalse(obj.isWasRolledBack()); + } + + @Test + public void testSetGet() { + SORequestStatus obj = new SORequestStatus(); + + obj.setPercentProgress(2008); + assertEquals(2008, obj.getPercentProgress()); + + obj.setRequestState("requestState"); + assertEquals("requestState", obj.getRequestState()); + + obj.setTimestamp("timestamp"); + assertEquals("timestamp", obj.getTimestamp()); + + obj.setWasRolledBack(true); + assertTrue(obj.isWasRolledBack()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java index edac2fa0d..cf9a85e83 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponse.java @@ -1,59 +1,59 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoResponse {
-
- @Test
- public void testConstructor() {
- SOResponse obj = new SOResponse();
-
- assertEquals(0, obj.getHttpResponseCode());
- assertTrue(obj.getRequest() == null);
- assertTrue(obj.getRequestError() == null);
- assertTrue(obj.getRequestReferences() == null);
- }
-
- @Test
- public void testSetGet() {
- SOResponse obj = new SOResponse();
-
- obj.setHttpResponseCode(2008);
- assertEquals(2008, obj.getHttpResponseCode());
-
- SORequest request = new SORequest();
- obj.setRequest(request);
- assertEquals(request, obj.getRequest());
-
- SORequestError requestError = new SORequestError();
- obj.setRequestError(requestError);
- assertEquals(requestError, obj.getRequestError());
-
- SORequestReferences requestReferences = new SORequestReferences();
- obj.setRequestReferences(requestReferences);
- assertEquals(requestReferences, obj.getRequestReferences());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoResponse { + + @Test + public void testConstructor() { + SOResponse obj = new SOResponse(); + + assertEquals(0, obj.getHttpResponseCode()); + assertTrue(obj.getRequest() == null); + assertTrue(obj.getRequestError() == null); + assertTrue(obj.getRequestReferences() == null); + } + + @Test + public void testSetGet() { + SOResponse obj = new SOResponse(); + + obj.setHttpResponseCode(2008); + assertEquals(2008, obj.getHttpResponseCode()); + + SORequest request = new SORequest(); + obj.setRequest(request); + assertEquals(request, obj.getRequest()); + + SORequestError requestError = new SORequestError(); + obj.setRequestError(requestError); + assertEquals(requestError, obj.getRequestError()); + + SORequestReferences requestReferences = new SORequestReferences(); + obj.setRequestReferences(requestReferences); + assertEquals(requestReferences, obj.getRequestReferences()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java index 7b4830125..860761a39 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoResponseWrapper.java @@ -1,106 +1,106 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.UUID;
-
-import org.junit.Test;
-
-public class TestSoResponseWrapper {
-
- @Test
- public void testConstructor() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
-
- assertEquals(response, obj.getSoResponse());
- assertEquals("reqID", obj.getRequestID());
- }
-
- @Test
- public void testSetGet() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
-
- SOResponse response2 = new SOResponse();
- response2.setHttpResponseCode(2008);
- obj.setSoResponse(response2);
- assertEquals(response2, obj.getSoResponse());
-
- obj.setRequestID("id2");
- assertEquals("id2", obj.getRequestID());
- }
-
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testSOResponseWrapperMethods() {
- String requestID = UUID.randomUUID().toString();
- SOResponse response = new SOResponse();
-
- SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestID);
- assertNotNull(responseWrapper);
- assertNotEquals(0, responseWrapper.hashCode());
-
- assertEquals(response, responseWrapper.getSoResponse());
-
- assertNotEquals(0, responseWrapper.hashCode());
-
- assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46));
-
- SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestID);
-
- assertEquals(responseWrapper, responseWrapper);
- assertEquals(responseWrapper, identicalResponseWrapper);
- assertNotEquals(null, responseWrapper);
- assertNotEquals("Hello", responseWrapper);
- assertFalse(responseWrapper.equals(null));
- assertFalse(responseWrapper.equals("AString"));
-
- assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null));
- assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper);
-
- assertNotEquals(0, new SOResponseWrapper(null, null).hashCode());
-
- identicalResponseWrapper.setSoResponse(new SOResponse());
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setSoResponse(response);
- assertEquals(responseWrapper, identicalResponseWrapper);
-
- identicalResponseWrapper.setRequestID(UUID.randomUUID().toString());
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestID);
- assertEquals(responseWrapper, identicalResponseWrapper);
-
- responseWrapper.setRequestID(null);
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(null);
- assertEquals(responseWrapper, identicalResponseWrapper);
- responseWrapper.setRequestID(requestID);
- assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestID);
- assertEquals(responseWrapper, identicalResponseWrapper);
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.UUID; + +import org.junit.Test; + +public class TestSoResponseWrapper { + + @Test + public void testConstructor() { + SOResponse response = new SOResponse(); + SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + + assertEquals(response, obj.getSoResponse()); + assertEquals("reqID", obj.getRequestID()); + } + + @Test + public void testSetGet() { + SOResponse response = new SOResponse(); + SOResponseWrapper obj = new SOResponseWrapper(response, "reqID"); + + SOResponse response2 = new SOResponse(); + response2.setHttpResponseCode(2008); + obj.setSoResponse(response2); + assertEquals(response2, obj.getSoResponse()); + + obj.setRequestID("id2"); + assertEquals("id2", obj.getRequestID()); + } + + @SuppressWarnings("unlikely-arg-type") + @Test + public void testSOResponseWrapperMethods() { + String requestID = UUID.randomUUID().toString(); + SOResponse response = new SOResponse(); + + SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestID); + assertNotNull(responseWrapper); + assertNotEquals(0, responseWrapper.hashCode()); + + assertEquals(response, responseWrapper.getSoResponse()); + + assertNotEquals(0, responseWrapper.hashCode()); + + assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46)); + + SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestID); + + assertEquals(responseWrapper, responseWrapper); + assertEquals(responseWrapper, identicalResponseWrapper); + assertNotEquals(null, responseWrapper); + assertNotEquals("Hello", responseWrapper); + assertFalse(responseWrapper.equals(null)); + assertFalse(responseWrapper.equals("AString")); + + assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null)); + assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper); + + assertNotEquals(0, new SOResponseWrapper(null, null).hashCode()); + + identicalResponseWrapper.setSoResponse(new SOResponse()); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setSoResponse(response); + assertEquals(responseWrapper, identicalResponseWrapper); + + identicalResponseWrapper.setRequestID(UUID.randomUUID().toString()); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(requestID); + assertEquals(responseWrapper, identicalResponseWrapper); + + responseWrapper.setRequestID(null); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(null); + assertEquals(responseWrapper, identicalResponseWrapper); + responseWrapper.setRequestID(requestID); + assertNotEquals(responseWrapper, identicalResponseWrapper); + identicalResponseWrapper.setRequestID(requestID); + assertEquals(responseWrapper, identicalResponseWrapper); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java index 877ea7146..7c802efaf 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoServiceExceptionHolder.java @@ -1,50 +1,50 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoServiceExceptionHolder {
-
- @Test
- public void testConstructor() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
-
- assertTrue(obj.getMessageId() == null);
- assertTrue(obj.getText() == null);
- assertTrue(obj.getVariables() != null);
- assertEquals(0, obj.getVariables().size());
- }
-
- @Test
- public void testSetGet() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
-
- obj.setMessageId("messageId");
- assertEquals("messageId", obj.getMessageId());
-
- obj.setText("text");
- assertEquals("text", obj.getText());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoServiceExceptionHolder { + + @Test + public void testConstructor() { + SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + + assertTrue(obj.getMessageId() == null); + assertTrue(obj.getText() == null); + assertTrue(obj.getVariables() != null); + assertEquals(0, obj.getVariables().size()); + } + + @Test + public void testSetGet() { + SOServiceExceptionHolder obj = new SOServiceExceptionHolder(); + + obj.setMessageId("messageId"); + assertEquals("messageId", obj.getMessageId()); + + obj.setText("text"); + assertEquals("text", obj.getText()); + } +} diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java index 0bff38c5c..b0662fa30 100755 --- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java +++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/TestSoSubscriberInfo.java @@ -1,52 +1,52 @@ -/*-
- * ============LICENSE_START=======================================================
- * so
- * ================================================================================
- *
- * ================================================================================
- * 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.policy.so;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-public class TestSoSubscriberInfo {
-
- @Test
- public void testConstructor() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
-
- assertTrue(obj.getGlobalSubscriberId() == null);
- assertTrue(obj.getSubscriberCommonSiteId() == null);
- assertTrue(obj.getSubscriberName() == null);
- }
-
- @Test
- public void testSetGet() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
-
- obj.setGlobalSubscriberId("globalSubscriberId");
- assertEquals("globalSubscriberId", obj.getGlobalSubscriberId());
-
- obj.setSubscriberCommonSiteId("subscriberCommonSiteId");
- assertEquals("subscriberCommonSiteId", obj.getSubscriberCommonSiteId());
-
- obj.setSubscriberName("subscriberName");
- assertEquals("subscriberName", obj.getSubscriberName());
- }
-}
+/*- + * ============LICENSE_START======================================================= + * so + * ================================================================================ + * + * ================================================================================ + * 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.policy.so; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class TestSoSubscriberInfo { + + @Test + public void testConstructor() { + SOSubscriberInfo obj = new SOSubscriberInfo(); + + assertTrue(obj.getGlobalSubscriberId() == null); + assertTrue(obj.getSubscriberCommonSiteId() == null); + assertTrue(obj.getSubscriberName() == null); + } + + @Test + public void testSetGet() { + SOSubscriberInfo obj = new SOSubscriberInfo(); + + obj.setGlobalSubscriberId("globalSubscriberId"); + assertEquals("globalSubscriberId", obj.getGlobalSubscriberId()); + + obj.setSubscriberCommonSiteId("subscriberCommonSiteId"); + assertEquals("subscriberCommonSiteId", obj.getSubscriberCommonSiteId()); + + obj.setSubscriberName("subscriberName"); + assertEquals("subscriberName", obj.getSubscriberName()); + } +} diff --git a/controlloop/common/model-impl/trafficgenerator/pom.xml b/controlloop/common/model-impl/trafficgenerator/pom.xml index fcf9893bb..975614e15 100644 --- a/controlloop/common/model-impl/trafficgenerator/pom.xml +++ b/controlloop/common/model-impl/trafficgenerator/pom.xml @@ -21,26 +21,26 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>trafficgenerator</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>trafficgenerator</artifactId> <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/model-impl/vfc/pom.xml b/controlloop/common/model-impl/vfc/pom.xml index ffd45cf9e..913fe7881 100644 --- a/controlloop/common/model-impl/vfc/pom.xml +++ b/controlloop/common/model-impl/vfc/pom.xml @@ -17,51 +17,51 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>vfc</artifactId> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>model-impl</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> - <parent> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>model-impl</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> + <artifactId>vfc</artifactId> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.13.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-applications</groupId> - <artifactId>rest</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.drools</groupId> - <artifactId>drools-core</artifactId> - <version>6.5.0.Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.drools-pdp</groupId> - <artifactId>policy-management</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.13.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId> + <artifactId>rest</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.drools</groupId> + <artifactId>drools-core</artifactId> + <version>6.5.0.Final</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </project> diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java index dd1ccfdd5..a8004203e 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java @@ -1,54 +1,54 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. 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.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealActionVmInfo implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. 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.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealActionVmInfo implements Serializable { + private static final long serialVersionUID = 3208673205100673119L; -
- @SerializedName("vmid")
- private String vmid;
-
- @SerializedName("vmname")
- private String vmname;
-
- public VFCHealActionVmInfo() {
- // Default constructor for VFCHealActionVmInfo
- }
-
- public String getVmid() {
- return vmid;
- }
-
- public void setVmid(String vmid) {
- this.vmid = vmid;
- }
-
- public String getVmname() {
- return vmname;
- }
-
- public void setVmname(String vmname) {
- this.vmname = vmname;
- }
-}
+ + @SerializedName("vmid") + private String vmid; + + @SerializedName("vmname") + private String vmname; + + public VFCHealActionVmInfo() { + // Default constructor for VFCHealActionVmInfo + } + + public String getVmid() { + return vmid; + } + + public void setVmid(String vmid) { + this.vmid = vmid; + } + + public String getVmname() { + return vmname; + } + + public void setVmname(String vmname) { + this.vmname = vmname; + } +} diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java index 4ffdb5b31..5c7555383 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java @@ -1,54 +1,54 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. 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.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealAdditionalParams implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. 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.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealAdditionalParams implements Serializable { + private static final long serialVersionUID = 2656694137285096191L; -
- @SerializedName("action")
- private String action;
-
- @SerializedName("actionvminfo")
- private VFCHealActionVmInfo actionInfo;
-
- public VFCHealAdditionalParams() {
- // Default constructor for VFCHealAdditionalParams
- }
-
- public String getAction() {
- return action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public VFCHealActionVmInfo getActionInfo() {
- return actionInfo;
- }
-
- public void setActionInfo(VFCHealActionVmInfo actionInfo) {
- this.actionInfo = actionInfo;
- }
-}
+ + @SerializedName("action") + private String action; + + @SerializedName("actionvminfo") + private VFCHealActionVmInfo actionInfo; + + public VFCHealAdditionalParams() { + // Default constructor for VFCHealAdditionalParams + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public VFCHealActionVmInfo getActionInfo() { + return actionInfo; + } + + public void setActionInfo(VFCHealActionVmInfo actionInfo) { + this.actionInfo = actionInfo; + } +} diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java index 787e341de..11ea495a8 100644 --- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java +++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java @@ -1,65 +1,65 @@ -/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2017 Intel Corp. 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.policy.vfc;
-
-import java.io.Serializable;
-
-import com.google.gson.annotations.SerializedName;
-
-public class VFCHealRequest implements Serializable {
-
+/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2017 Intel Corp. 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.policy.vfc; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class VFCHealRequest implements Serializable { + private static final long serialVersionUID = -7341931593089709247L; -
- @SerializedName("vnfInstanceId")
- private String vnfInstanceId;
-
- @SerializedName("cause")
- private String cause;
-
- @SerializedName("additionalParams")
- private VFCHealAdditionalParams additionalParams;
-
- public VFCHealRequest() {
- // Default constructor for VFCHealRequest
- }
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getCause() {
- return cause;
- }
-
- public void setCause(String cause) {
- this.cause = cause;
- }
-
- public VFCHealAdditionalParams getAdditionalParams() {
- return additionalParams;
- }
-
- public void setAdditionalParams(VFCHealAdditionalParams additionalParams) {
- this.additionalParams = additionalParams;
- }
-}
+ + @SerializedName("vnfInstanceId") + private String vnfInstanceId; + + @SerializedName("cause") + private String cause; + + @SerializedName("additionalParams") + private VFCHealAdditionalParams additionalParams; + + public VFCHealRequest() { + // Default constructor for VFCHealRequest + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public VFCHealAdditionalParams getAdditionalParams() { + return additionalParams; + } + + public void setAdditionalParams(VFCHealAdditionalParams additionalParams) { + this.additionalParams = additionalParams; + } +} |