Skip to content

Commit

Permalink
Refactored code.
Browse files Browse the repository at this point in the history
Added package for config.
  • Loading branch information
sagaofsilence committed Mar 28, 2024
1 parent 1cfab36 commit 8c763da
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.RequestProcessingException;
import io.refactoring.http5.client.example.helper.BaseHttpRequestHelper;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
Expand All @@ -19,7 +20,9 @@
import org.apache.hc.core5.http.message.BasicNameValuePair;
import org.apache.hc.core5.net.URIBuilder;

/** Utility to handle HTTP requests for user entities.It uses built in types for HTTP processing */
/**
* Utility to handle HTTP requests for user entities. It uses built in types for HTTP processing.
*/
@Slf4j
public class UserSimpleHttpRequestHelper extends BaseHttpRequestHelper {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.RequestProcessingException;
import io.refactoring.http5.client.example.classic.handler.DataObjectResponseHandler;
import io.refactoring.http5.client.example.classic.util.UserRequestProcessingUtils;
import io.refactoring.http5.client.example.helper.BaseHttpRequestHelper;
import io.refactoring.http5.client.example.model.User;
import io.refactoring.http5.client.example.model.UserPage;

import java.net.URI;
import java.text.MessageFormat;
import java.util.Map;

import io.refactoring.http5.client.example.classic.handler.DataObjectResponseHandler;
import io.refactoring.http5.client.example.classic.util.UserRequestProcessingUtils;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.classic.methods.HttpGet;
Expand All @@ -22,7 +21,7 @@

/**
* Utility to handle HTTP requests for {@linkplain User} entities. It uses the user-defined types
* for HTTP processing
* for HTTP processing.
*/
@Slf4j
public class UserTypeHttpRequestHelper extends BaseHttpRequestHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import java.net.URISyntaxException;

import io.refactoring.http5.client.example.util.ConfigurationUtils;
import io.refactoring.http5.client.example.config.ConfigurationUtils;
import io.refactoring.http5.client.example.util.JsonUtils;
import lombok.NonNull;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpHost;
Expand All @@ -16,7 +17,7 @@ public abstract class RequestProcessingUtils {
protected final ConfigurationUtils configurationUtils = new ConfigurationUtils();

/**
* Converts a source object into string entity.
* Converts a source object into a string entity.
*
* @param source source object
* @return string entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.util;
package io.refactoring.http5.client.example.config;

import lombok.NonNull;
import org.apache.commons.configuration2.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package io.refactoring.http5.client.example.classic.helper;
package io.refactoring.http5.client.example.config.helper;

import io.refactoring.http5.client.example.classic.interceptor.CustomHttpExecutionInterceptor;
import io.refactoring.http5.client.example.classic.interceptor.CustomHttpRequestInterceptor;
import io.refactoring.http5.client.example.classic.interceptor.CustomHttpResponseInterceptor;
import io.refactoring.http5.client.example.config.interceptor.CustomHttpExecutionInterceptor;
import io.refactoring.http5.client.example.config.interceptor.CustomHttpRequestInterceptor;
import io.refactoring.http5.client.example.config.interceptor.CustomHttpResponseInterceptor;
import io.refactoring.http5.client.example.helper.BaseHttpRequestHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.HttpRoute;
import org.apache.hc.client5.http.config.RequestConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.classic.interceptor;
package io.refactoring.http5.client.example.config.interceptor;

import io.refactoring.http5.client.example.RequestProcessingException;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.classic.interceptor;
package io.refactoring.http5.client.example.config.interceptor;

import java.io.IOException;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.classic.interceptor;
package io.refactoring.http5.client.example.config.interceptor;

import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.refactoring.http5.client.example.classic.helper;
package io.refactoring.http5.client.example.helper;

import io.refactoring.http5.client.example.classic.util.JsonUtils;
import io.refactoring.http5.client.example.util.JsonUtils;
import lombok.extern.slf4j.Slf4j;

/** Base HTTP request handler. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.refactoring.http5.client.example.classic;

import io.refactoring.http5.client.example.BaseExampleTests;
import io.refactoring.http5.client.example.classic.util.JsonUtils;
import io.refactoring.http5.client.example.util.JsonUtils;

abstract class BaseClassicExampleTests extends BaseExampleTests {
protected final JsonUtils jsonUtils = new JsonUtils();
Expand Down

0 comments on commit 8c763da

Please sign in to comment.