Removed depracated code and added Javadoc
This commit is contained in:
		| @@ -2,6 +2,10 @@ package com.release11.klaus.utilis; | ||||
|  | ||||
| import lombok.AllArgsConstructor; | ||||
|  | ||||
| /** | ||||
|  * Enum of keys for redis database. | ||||
|  * @author Rafał Żukowicz | ||||
|  */ | ||||
| @AllArgsConstructor | ||||
| public enum BusinessKey { | ||||
|     INTERFACE_NAME("interfaceName"), | ||||
| @@ -10,6 +14,10 @@ public enum BusinessKey { | ||||
|  | ||||
|     private final String phrase; | ||||
|  | ||||
|     /** | ||||
|      * Returns string value of given enum variant | ||||
|      * @return string value of enum | ||||
|      */ | ||||
|     public String getReasonPhrase() { | ||||
|         return this.phrase; | ||||
|     } | ||||
|   | ||||
| @@ -4,6 +4,7 @@ import com.release11.klaus.model.MockedMessageDto; | ||||
| import org.springframework.context.annotation.Bean; | ||||
| import org.springframework.context.annotation.Configuration; | ||||
|  | ||||
| //TODO: is it really necessary? kekw | ||||
| @Configuration | ||||
| public class ObjectConfig { | ||||
|     @Bean | ||||
|   | ||||
| @@ -15,6 +15,7 @@ import redis.clients.jedis.Jedis; | ||||
| import redis.clients.jedis.JedisPool; | ||||
| import redis.clients.jedis.Protocol; | ||||
|  | ||||
| //TODO: The check? Check if any of the following methods might be removed... | ||||
| public class RedisAppender extends UnsynchronizedAppenderBase<ILoggingEvent> { | ||||
|  | ||||
|     JedisPool pool; | ||||
|   | ||||
| @@ -4,10 +4,20 @@ import org.slf4j.MDC; | ||||
|  | ||||
| import java.util.Map; | ||||
|  | ||||
| //TODO: Check if constructor might be safely removed. It's static class tho | ||||
| /** | ||||
|  * This static class has one purpose and one purpose only. It logs data about incomming requests. | ||||
|  * The data from logs is received via {@link com.release11.klaus.repository.EventRepositoryImpl} | ||||
|  * @author Rafał Żukowski | ||||
|  */ | ||||
| public final class TrackingClient { | ||||
|  | ||||
|     private TrackingClient(){} | ||||
|  | ||||
|     /** | ||||
|      * Logs data inside the given map | ||||
|      * @param businessKeysMap map containing all the information about incomming request | ||||
|      */ | ||||
|     public static void setBusinessKeys(Map<BusinessKey, String> businessKeysMap){ | ||||
|         for (Map.Entry<BusinessKey, String> entry : businessKeysMap.entrySet()) { | ||||
|             MDC.put(entry.getKey().getReasonPhrase(), entry.getValue()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user