Commit 3cc38136 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch 'feature/#31' into 'develop'

Updated ServiceSpecificationRepoService to Send the Available Primitives through the Service Specifications

See merge request !27
parents 8e927356 35f7b5d8
Loading
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -303,6 +303,11 @@
			<version>2.0.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20210307</version>
		</dependency>
	</dependencies>

	<build>
@@ -444,6 +449,31 @@
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.2.5</version>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.12</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>
+10 −0
Original line number Diff line number Diff line
@@ -75,11 +75,13 @@ import org.etsi.osl.tmf.stm653.model.ServiceTestSpecificationUpdate;
import org.etsi.osl.tmf.stm653.reposervices.ServiceTestSpecificationRepoService;
import org.etsi.osl.tmf.util.AttachmentUtil;
import org.etsi.osl.tmf.util.KrokiClient;
import org.etsi.osl.tmf.util.PrimitivesParser;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.transform.ResultTransformer;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@@ -1210,6 +1212,14 @@ public class ServiceSpecificationRepoService {
				logger.error("nsdid getConstituentVxF null returned: " + nsd.toString() );
			}

			/******************** Begin Primitives Handling ********************/

			JSONObject allPrimitives = PrimitivesParser.extractPrimitives(nsd);
    
            addServiceSpecCharacteristic(serviceSpec, "PrimitivesList", "NSPrimitives", new Any(allPrimitives.toString(), ""), EValueType.TEXT);

            /********************* End Primitives Handling *********************/
			
			
			ResourceSpecificationRef resourceSpecificationItemRef = new ResourceSpecificationRef();
			resourceSpecificationItemRef.setId( resourceNSD.getId() );
+540 −0

File added.

Preview size limit exceeded, changes collapsed.

+527 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0

File added.

Preview size limit exceeded, changes collapsed.