Commit b6e24808 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch '2-populate-main-branch-with-initial-commit-release-0' into 'main'

Resolve "Populate main branch with initial commit (Release 0)"

Closes #2

See merge request !1
parents 9443f93c 7e42541d
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
/target/
.project
.classpath
/.settings

pom.xml

0 → 100644
+73 −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 http://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.centrallog.client</artifactId>
  <name>org.etsi.osl.centrallog.client</name>
  
	<dependencyManagement>
		<dependencies>
			<!-- Camel BOM -->
			<dependency>
				<groupId>org.apache.camel.springboot</groupId>
				<artifactId>camel-spring-boot-dependencies</artifactId>
				<version>${camel.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>  
	
	<dependencies>
		<!-- activeMQ -->
	

		<!-- Camel -->
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-spring-boot-starter</artifactId>
		</dependency>
		

		<dependency>
  			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-http-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-activemq</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.apache.activemq</groupId>
					<artifactId>activemq-broker</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-service-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-stream</artifactId>
		</dependency>

		
	</dependencies>
	
</project>
 No newline at end of file
+34 −0
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * CentralLoggerClient
 * %%
 * Copyright (C) 2019 - 2020 openslice.io
 * %%
 * 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.etsi.osl.centrallog.client;





/**
 * @author ctranoris
 *
 */
public enum CLevel {
	INFO,
	WARN,
	ERROR
}
+104 −0
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * CentralLoggerClient
 * %%
 * Copyright (C) 2019 - 2020 openslice.io
 * %%
 * 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.etsi.osl.centrallog.client;

import java.time.Instant;

/**
 * @author ctranoris
 *
 */
public class CentralLogMessage {

	private CLevel clevel;
	
	private String message;
	
	private String time;
	
	private String component;
	
	/**
	 * 
	 */
	public CentralLogMessage() {
		this.clevel=CLevel.WARN;
		this.message="This is the default CentralLogger message";
		this.time = Instant.now().toString();
	}
		
	/**
	 * @param cLevel
	 * @param message
	 */
	public CentralLogMessage(CLevel cLevel, String message) {
		super();
		this.clevel = cLevel;
		this.message = message;
		this.time = Instant.now().toString();
	}


	/**
	 * @return the cLevel
	 */
	public CLevel getclevel() {
		return clevel;
	}

	/**
	 * @param cLevel the cLevel to set
	 */
	public void setclevel(CLevel cLevel) {
		this.clevel = cLevel;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getComponent() {
		return component;
	}

	public void setComponent(String component) {
		this.component = component;
	}		
	
	
}
+51 −0
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * CentralLoggerClient
 * %%
 * Copyright (C) 2019 - 2020 openslice.io
 * %%
 * 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.etsi.osl.centrallog.client;


public class CentralLogPackage {
	String endpoint;
	CentralLogMessage centrallogmsg;

	/**
	 * 
	 */
	public CentralLogPackage() {
		this.endpoint = "";
		this.centrallogmsg = new CentralLogMessage();
	}

	public String getEndpoint() {
		return endpoint;
	}

	public void setEndpoint(String endpoint) {
		this.endpoint = endpoint;
	}
	
	public CentralLogMessage getCentralLogMessage()
	{
		return this.centrallogmsg;
	}
	public void setCentralLogMessage(CentralLogMessage clm)
	{
		this.centrallogmsg=clm;
	}
}
Loading