From ccbaa009eeeb264bb11684a0c20f7c7fd33f8376 Mon Sep 17 00:00:00 2001 From: colin <98445953+colinmccloskey@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:20:17 -0500 Subject: [PATCH] Removing comments --- .../meta/cp4m/message/FBMessengerConfig.java | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/src/main/java/com/meta/cp4m/message/FBMessengerConfig.java b/src/main/java/com/meta/cp4m/message/FBMessengerConfig.java index 12de132..4ae9037 100644 --- a/src/main/java/com/meta/cp4m/message/FBMessengerConfig.java +++ b/src/main/java/com/meta/cp4m/message/FBMessengerConfig.java @@ -10,62 +10,61 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; + import java.util.UUID; public class FBMessengerConfig implements HandlerConfig { - private final String name; - private final String verifyToken; - private final String appSecret; - private final String pageAccessToken; - - public FBMessengerConfig( - @JsonProperty("name") String name, - @JsonProperty("verify_token") String verifyToken, - @JsonProperty("app_secret") String appSecret, - @JsonProperty("page_access_token") String pageAccessToken) { - - Preconditions.checkArgument(name != null && !name.isBlank(), "name cannot be blank"); - Preconditions.checkArgument( - verifyToken != null && !verifyToken.isBlank(), "verify_token cannot be blank"); - Preconditions.checkArgument( - appSecret != null && !appSecret.isBlank(), "app_secret cannot be blank"); - Preconditions.checkArgument( - pageAccessToken != null && !pageAccessToken.isBlank(), "page_access_token cannot be blank"); + private final String name; + private final String verifyToken; + private final String appSecret; + private final String pageAccessToken; - this.name = name; - this.verifyToken = verifyToken; - this.appSecret = appSecret; - this.pageAccessToken = pageAccessToken; - } + private FBMessengerConfig( + @JsonProperty("name") String name, + @JsonProperty("verify_token") String verifyToken, + @JsonProperty("app_secret") String appSecret, + @JsonProperty("page_access_token") String pageAccessToken) { + Preconditions.checkArgument(name != null && !name.isBlank(), "name cannot be blank"); + Preconditions.checkArgument( + verifyToken != null && !verifyToken.isBlank(), "verify_token cannot be blank"); + Preconditions.checkArgument( + appSecret != null && !appSecret.isBlank(), "app_secret cannot be blank"); + Preconditions.checkArgument( + pageAccessToken != null && !pageAccessToken.isBlank(), "page_access_token cannot be blank"); - public static FBMessengerConfig of(String verifyToken, String appSecret, String pageAccessToken) { - // human readability of the name only matters when it's coming from a config - return new FBMessengerConfig( - UUID.randomUUID().toString(), verifyToken, appSecret, pageAccessToken); - } + this.name = name; + this.verifyToken = verifyToken; + this.appSecret = appSecret; + this.pageAccessToken = pageAccessToken; + } - @Override - public String name() { - return name; - } + public static FBMessengerConfig of(String verifyToken, String appSecret, String pageAccessToken) { + // human readability of the name only matters when it's coming from a config + return new FBMessengerConfig( + UUID.randomUUID().toString(), verifyToken, appSecret, pageAccessToken); + } - public String verifyToken() { - return verifyToken; - } + @Override + public String name() { + return name; + } - public String appSecret() { - return appSecret; - } + public String verifyToken() { + return verifyToken; + } - @Override - public FBMessageHandler toMessageHandler() { - return new FBMessageHandler(this); - } + public String appSecret() { + return appSecret; + } - public String pageAccessToken() { - return pageAccessToken; - } // EAAICn2ZAELtYBO2pwykJbOqqEra8msZAjp98AZCFDr5raSYQBgkG5RVq40N0txHFnxMuPdmZArB3gY2R6YwQEk8Gk1LDeO98DZCZCmbyLg6S6conUSBdRgGTz99fBIPtn41ZAhSulBhQ5cg5Fu3Tw1zjlrnUZCNp2sBMuTZAsp1C3jfrIEMbMvZBR9ml7iksNbRZCFrEjvUlWeyZAPJsAiPdQyeRM00sqCDqSya2hB8R7QIc -} // EAAICn2ZAELtYBO3tZB7c3sObbkw6aHxrkCuZA7k2ECfZAunCJVkrAmgbvlDSAEMRjLl4FDPOiuBkZCkGYayMZBJrGCPJDkgdBqcf21StChoE4uOexspURdDiZCPTtdcxXGljsT4Xh0uieoM19M2Evm7O5LWjKPluRoGwUZBZC4lX4iF3TEw8JCa9npkIRnV823ZCvOyPP9QBo2uGScZCX1ZA + @Override + public FBMessageHandler toMessageHandler() { + return new FBMessageHandler(this); + } + public String pageAccessToken() { + return pageAccessToken; + } +} \ No newline at end of file