Commit b03fa05b authored by Christos Tranoris's avatar Christos Tranoris
Browse files

adding classes

parent 4a6c2466
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+6 −0
Original line number Diff line number Diff line
/target/
/.apt_generated/
/.apt_generated_tests/
/.project
/.classpath
/.settings

pom.xml

0 → 100644
+137 −0
Original line number Diff line number Diff line
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.etsi.osl</groupId>
		<artifactId>org.etsi.osl.main</artifactId>
		<version>1.2.0-SNAPSHOT</version>
		<relativePath>../org.etsi.osl.main</relativePath>
	</parent>
	
  <artifactId>org.etsi.osl.model.tmf</artifactId>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<spring.boot-version>${spring-boot-version}</spring.boot-version>
		<lombok-version>1.18.28</lombok-version>
		<springdoc.version>${springdoc-version}</springdoc.version>
		<mapstruct.version>1.5.3.Final</mapstruct.version>
	</properties>


	<dependencyManagement>
		<dependencies>
			<!-- Spring Boot BOM -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot-version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>

	</dependencyManagement>
	
	<dependencies>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
			<version>${lombok-version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-hibernate5-jakarta</artifactId>
		</dependency>

	<!-- swagger -->
		<dependency>
			<groupId>org.springdoc</groupId>
			<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
			<version>${springdoc.version}</version>
		</dependency>


		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct</artifactId>
			<version>${mapstruct.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct-processor</artifactId>
			<version>${mapstruct.version}</version>
		</dependency>
	</dependencies>
	
		<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<compilerArgs>
							<arg>-parameters</arg>
						</compilerArgs>
						<annotationProcessorPaths>
							<path>
								<groupId>org.mapstruct</groupId>
								<artifactId>mapstruct-processor</artifactId>
								<version>${mapstruct.version}</version>
							</path>
							    <path>
						        <groupId>org.projectlombok</groupId>
						        <artifactId>lombok</artifactId>
								<version>${lombok-version}</version>	
						    </path>
						</annotationProcessorPaths>
					</configuration>
				</plugin>

				<plugin>
					<!-- run mvn license:update-file-header to manually update all headers 
						everywhere -->
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${maven-license-plugin.version}</version>
					<configuration>
						<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
						<processStartTag>========================LICENSE_START=================================</processStartTag>
						<processEndTag>=========================LICENSE_END==================================</processEndTag>
						<excludes>*.json</excludes>
					</configuration>
					<executions>
						<execution>
							<id>generate-license-headers</id>
							<goals>
								<goal>update-file-header</goal>
							</goals>
							<phase>process-sources</phase>
							<configuration>
								<licenseName>${license.licenseName}</licenseName>

							</configuration>
						</execution>
						<execution>
							<id>download-licenses</id>
							<goals>
								<goal>download-licenses</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>
</project>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
package org.etsi.osl.domain.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author ctranoris
 */

@Getter
@Setter
@AllArgsConstructor
public class DomainModelDefinition {
	
	//instance variables
	protected String uuid;
	protected String name;
	protected String version;
	protected String description;
	protected String category;
	
	
	
}
+32 −0
Original line number Diff line number Diff line
package org.etsi.osl.domain.model;

import org.etsi.osl.tmf.rcm634.model.ResourceSpecification;
import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationCreate;
import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationUpdate;

/**
 * @author ctranoris
 * 
 * Transforms the PoJo class to/from the equivalent TMF model 
 */
public interface ITMFRCM634_ModelTransformer {
	
	
	ResourceSpecificationCreate toRSpecCreate_InitRepo();
	
	
	default ResourceSpecificationCreate toRSpecCreate() {
		return null;
	}
	
	default ResourceSpecificationUpdate toRSpecUpdate() {
		return null;
	}
	
	/**
	 * loads the class fields from this model
	 * @param rSpec
	 */
	DomainModelDefinition fromRSpec( ResourceSpecification rSpec ) ;
	
}
+34 −0
Original line number Diff line number Diff line
package org.etsi.osl.domain.model;

import org.etsi.osl.tmf.ri639.model.Resource;
import org.etsi.osl.tmf.ri639.model.ResourceCreate;
import org.etsi.osl.tmf.ri639.model.ResourceUpdate;

/**
 * @author ctranoris
 * 
 * Transforms the PoJo class to/from the equivalent TMF model 
 */
public interface ITMFRI639_ModelTransformer {
	
	

	
	default ResourceCreate toResourceCreate() throws Exception {
		return null;
	};

	default ResourceUpdate toResourceUpdate() throws Exception {
		return null;
	};
	
	/**
	 * loads the class fields from this model
	 * @param rSpec
	 */
	default void fromResource( Resource rSpec ) {
		
	}

	
}
Loading