From bc0989ddb7bb05e2d95ae4aad4438b4d4806f9dc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 8 Oct 2015 09:12:49 +0200 Subject: [PATCH] Refactored classes in thematically packages --- src/main/java/de/juplo/facebook/FacebookUtils.java | 2 ++ .../facebook/{ => client}/GraphApiErrorHandler.java | 3 ++- .../facebook/{ => exceptions}/GraphApiException.java | 2 +- .../GraphApiExceptionJackson1Deserializer.java | 2 +- .../GraphApiExceptionJackson2Deserializer.java | 2 +- .../{ => exceptions}/GraphMethodException.java | 2 +- .../facebook/{ => exceptions}/OAuthException.java | 2 +- .../{ => exceptions}/PageMigratedException.java | 2 +- .../{ => exceptions}/RateExceededException.java | 2 +- ...ignedRequestAwareUserRedirectRequiredException.java | 2 +- .../{ => exceptions}/UnexpectedErrorException.java | 2 +- .../{ => exceptions}/UnknownErrorException.java | 2 +- .../UnsupportedGetRequestException.java | 2 +- ...questAwareAuthorizationCodeAccessTokenProvider.java | 2 +- .../{ => client}/GraphApiErrorHandlerTest.java | 10 ++++++++-- .../{ => client}/MockClientHttpRequestFactory.java | 2 +- 16 files changed, 25 insertions(+), 16 deletions(-) rename src/main/java/de/juplo/facebook/{ => client}/GraphApiErrorHandler.java (97%) rename src/main/java/de/juplo/facebook/{ => exceptions}/GraphApiException.java (97%) rename src/main/java/de/juplo/facebook/{ => exceptions}/GraphApiExceptionJackson1Deserializer.java (98%) rename src/main/java/de/juplo/facebook/{ => exceptions}/GraphApiExceptionJackson2Deserializer.java (98%) rename src/main/java/de/juplo/facebook/{ => exceptions}/GraphMethodException.java (84%) rename src/main/java/de/juplo/facebook/{ => exceptions}/OAuthException.java (83%) rename src/main/java/de/juplo/facebook/{ => exceptions}/PageMigratedException.java (95%) rename src/main/java/de/juplo/facebook/{ => exceptions}/RateExceededException.java (85%) rename src/main/java/de/juplo/facebook/{ => exceptions}/SignedRequestAwareUserRedirectRequiredException.java (94%) rename src/main/java/de/juplo/facebook/{ => exceptions}/UnexpectedErrorException.java (85%) rename src/main/java/de/juplo/facebook/{ => exceptions}/UnknownErrorException.java (82%) rename src/main/java/de/juplo/facebook/{ => exceptions}/UnsupportedGetRequestException.java (83%) rename src/main/java/de/juplo/facebook/{ => token}/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java (99%) rename src/test/java/de/juplo/facebook/{ => client}/GraphApiErrorHandlerTest.java (97%) rename src/test/java/de/juplo/facebook/{ => client}/MockClientHttpRequestFactory.java (98%) diff --git a/src/main/java/de/juplo/facebook/FacebookUtils.java b/src/main/java/de/juplo/facebook/FacebookUtils.java index a0e6738..b2b8261 100644 --- a/src/main/java/de/juplo/facebook/FacebookUtils.java +++ b/src/main/java/de/juplo/facebook/FacebookUtils.java @@ -1,6 +1,8 @@ package de.juplo.facebook; +import de.juplo.facebook.token.SignedRequestAwareAuthorizationCodeAccessTokenProvider; +import de.juplo.facebook.client.GraphApiErrorHandler; import java.util.Arrays; import java.util.LinkedList; import java.util.List; diff --git a/src/main/java/de/juplo/facebook/GraphApiErrorHandler.java b/src/main/java/de/juplo/facebook/client/GraphApiErrorHandler.java similarity index 97% rename from src/main/java/de/juplo/facebook/GraphApiErrorHandler.java rename to src/main/java/de/juplo/facebook/client/GraphApiErrorHandler.java index 2864843..faff55e 100644 --- a/src/main/java/de/juplo/facebook/GraphApiErrorHandler.java +++ b/src/main/java/de/juplo/facebook/client/GraphApiErrorHandler.java @@ -1,5 +1,6 @@ -package de.juplo.facebook; +package de.juplo.facebook.client; +import de.juplo.facebook.exceptions.GraphApiException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/de/juplo/facebook/GraphApiException.java b/src/main/java/de/juplo/facebook/exceptions/GraphApiException.java similarity index 97% rename from src/main/java/de/juplo/facebook/GraphApiException.java rename to src/main/java/de/juplo/facebook/exceptions/GraphApiException.java index 18eaf81..03aa627 100644 --- a/src/main/java/de/juplo/facebook/GraphApiException.java +++ b/src/main/java/de/juplo/facebook/exceptions/GraphApiException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; import org.springframework.security.oauth2.common.exceptions.OAuth2Exception; diff --git a/src/main/java/de/juplo/facebook/GraphApiExceptionJackson1Deserializer.java b/src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson1Deserializer.java similarity index 98% rename from src/main/java/de/juplo/facebook/GraphApiExceptionJackson1Deserializer.java rename to src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson1Deserializer.java index 8a1d3bf..165e7ce 100644 --- a/src/main/java/de/juplo/facebook/GraphApiExceptionJackson1Deserializer.java +++ b/src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson1Deserializer.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; import java.io.IOException; import java.util.HashMap; diff --git a/src/main/java/de/juplo/facebook/GraphApiExceptionJackson2Deserializer.java b/src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson2Deserializer.java similarity index 98% rename from src/main/java/de/juplo/facebook/GraphApiExceptionJackson2Deserializer.java rename to src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson2Deserializer.java index becb51f..ea0e987 100644 --- a/src/main/java/de/juplo/facebook/GraphApiExceptionJackson2Deserializer.java +++ b/src/main/java/de/juplo/facebook/exceptions/GraphApiExceptionJackson2Deserializer.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; import com.fasterxml.jackson.core.JsonParser; diff --git a/src/main/java/de/juplo/facebook/GraphMethodException.java b/src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java similarity index 84% rename from src/main/java/de/juplo/facebook/GraphMethodException.java rename to src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java index 934243c..21c56c5 100644 --- a/src/main/java/de/juplo/facebook/GraphMethodException.java +++ b/src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/OAuthException.java b/src/main/java/de/juplo/facebook/exceptions/OAuthException.java similarity index 83% rename from src/main/java/de/juplo/facebook/OAuthException.java rename to src/main/java/de/juplo/facebook/exceptions/OAuthException.java index 1e80fe3..4537720 100644 --- a/src/main/java/de/juplo/facebook/OAuthException.java +++ b/src/main/java/de/juplo/facebook/exceptions/OAuthException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/PageMigratedException.java b/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java similarity index 95% rename from src/main/java/de/juplo/facebook/PageMigratedException.java rename to src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java index c3da159..d327b6d 100644 --- a/src/main/java/de/juplo/facebook/PageMigratedException.java +++ b/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; import java.util.regex.Matcher; diff --git a/src/main/java/de/juplo/facebook/RateExceededException.java b/src/main/java/de/juplo/facebook/exceptions/RateExceededException.java similarity index 85% rename from src/main/java/de/juplo/facebook/RateExceededException.java rename to src/main/java/de/juplo/facebook/exceptions/RateExceededException.java index b633069..cdda586 100644 --- a/src/main/java/de/juplo/facebook/RateExceededException.java +++ b/src/main/java/de/juplo/facebook/exceptions/RateExceededException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/SignedRequestAwareUserRedirectRequiredException.java b/src/main/java/de/juplo/facebook/exceptions/SignedRequestAwareUserRedirectRequiredException.java similarity index 94% rename from src/main/java/de/juplo/facebook/SignedRequestAwareUserRedirectRequiredException.java rename to src/main/java/de/juplo/facebook/exceptions/SignedRequestAwareUserRedirectRequiredException.java index 7bad046..51fbb12 100644 --- a/src/main/java/de/juplo/facebook/SignedRequestAwareUserRedirectRequiredException.java +++ b/src/main/java/de/juplo/facebook/exceptions/SignedRequestAwareUserRedirectRequiredException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; import java.util.Map; diff --git a/src/main/java/de/juplo/facebook/UnexpectedErrorException.java b/src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java similarity index 85% rename from src/main/java/de/juplo/facebook/UnexpectedErrorException.java rename to src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java index 031195f..5aefff6 100644 --- a/src/main/java/de/juplo/facebook/UnexpectedErrorException.java +++ b/src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/UnknownErrorException.java b/src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java similarity index 82% rename from src/main/java/de/juplo/facebook/UnknownErrorException.java rename to src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java index 9790973..6e336f4 100644 --- a/src/main/java/de/juplo/facebook/UnknownErrorException.java +++ b/src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/UnsupportedGetRequestException.java b/src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java similarity index 83% rename from src/main/java/de/juplo/facebook/UnsupportedGetRequestException.java rename to src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java index f1020c1..1d5b44d 100644 --- a/src/main/java/de/juplo/facebook/UnsupportedGetRequestException.java +++ b/src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.exceptions; /** diff --git a/src/main/java/de/juplo/facebook/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java b/src/main/java/de/juplo/facebook/token/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java similarity index 99% rename from src/main/java/de/juplo/facebook/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java rename to src/main/java/de/juplo/facebook/token/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java index fcae74a..e187542 100644 --- a/src/main/java/de/juplo/facebook/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java +++ b/src/main/java/de/juplo/facebook/token/SignedRequestAwareAuthorizationCodeAccessTokenProvider.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.token; import java.io.IOException; diff --git a/src/test/java/de/juplo/facebook/GraphApiErrorHandlerTest.java b/src/test/java/de/juplo/facebook/client/GraphApiErrorHandlerTest.java similarity index 97% rename from src/test/java/de/juplo/facebook/GraphApiErrorHandlerTest.java rename to src/test/java/de/juplo/facebook/client/GraphApiErrorHandlerTest.java index ef849cf..ddd19a6 100644 --- a/src/test/java/de/juplo/facebook/GraphApiErrorHandlerTest.java +++ b/src/test/java/de/juplo/facebook/client/GraphApiErrorHandlerTest.java @@ -1,5 +1,11 @@ -package de.juplo.facebook; - +package de.juplo.facebook.client; + +import de.juplo.facebook.exceptions.UnsupportedGetRequestException; +import de.juplo.facebook.exceptions.UnexpectedErrorException; +import de.juplo.facebook.exceptions.RateExceededException; +import de.juplo.facebook.exceptions.GraphApiException; +import de.juplo.facebook.exceptions.UnknownErrorException; +import de.juplo.facebook.exceptions.PageMigratedException; import java.util.Date; import java.util.Map; import java.util.Set; diff --git a/src/test/java/de/juplo/facebook/MockClientHttpRequestFactory.java b/src/test/java/de/juplo/facebook/client/MockClientHttpRequestFactory.java similarity index 98% rename from src/test/java/de/juplo/facebook/MockClientHttpRequestFactory.java rename to src/test/java/de/juplo/facebook/client/MockClientHttpRequestFactory.java index 3162182..7fee109 100644 --- a/src/test/java/de/juplo/facebook/MockClientHttpRequestFactory.java +++ b/src/test/java/de/juplo/facebook/client/MockClientHttpRequestFactory.java @@ -1,4 +1,4 @@ -package de.juplo.facebook; +package de.juplo.facebook.client; import java.io.ByteArrayInputStream; import java.io.IOException; -- 2.20.1