From db3fb92d91efe5906b1dd6c765e40c1fb0341312 Mon Sep 17 00:00:00 2001 From: Monika Bolleddula Date: Thu, 14 Mar 2019 12:37:41 -0400 Subject: [PATCH] MOB-6442 -> Update the d-types for max space and usage summary, to fix JSON PE -> Bump version --- build.gradle | 2 +- .../v2/library/LibraryInfo.java | 7 +++--- .../v2/library/UsageSummary.java | 25 ++++++++++--------- .../v2/library/LibraryInfoTest.java | 2 +- .../v2/library/UsageSummaryTest.java | 8 +++--- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index 28b6fbb2..4ef486f3 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ allprojects { group = 'com.constantcontact' def isRelease = Boolean.valueOf(project.hasProperty("release") ? project.property("release") as String : "false") - version = '5.2.2' + (isRelease ? "" : "-SNAPSHOT") + version = '5.2.3' + (isRelease ? "" : "-SNAPSHOT") } apply plugin: "net.wooga.github" diff --git a/components/src/main/java/com/constantcontact/v2/library/LibraryInfo.java b/components/src/main/java/com/constantcontact/v2/library/LibraryInfo.java index 7994608e..bf666b92 100644 --- a/components/src/main/java/com/constantcontact/v2/library/LibraryInfo.java +++ b/components/src/main/java/com/constantcontact/v2/library/LibraryInfo.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; + import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; @@ -31,7 +32,7 @@ public class LibraryInfo implements Serializable { protected int _maxFreeFileNum; @JsonProperty("max_premium_space_limit") - protected int _maxPremiumSpaceLimit; + protected long _maxPremiumSpaceLimit; @JsonProperty("image_root") protected String _imageRoot; @@ -53,11 +54,11 @@ public void setMaxFreeFileNum(int maxFreeFileNum) { _maxFreeFileNum = maxFreeFileNum; } - public int getMaxPremiumSpaceLimit() { + public long getMaxPremiumSpaceLimit() { return _maxPremiumSpaceLimit; } - public void setMaxPremiumSpaceLimit(int maxPremiumSpaceLimit) { + public void setMaxPremiumSpaceLimit(long maxPremiumSpaceLimit) { _maxPremiumSpaceLimit = maxPremiumSpaceLimit; } diff --git a/components/src/main/java/com/constantcontact/v2/library/UsageSummary.java b/components/src/main/java/com/constantcontact/v2/library/UsageSummary.java index fccd17d7..221e141a 100644 --- a/components/src/main/java/com/constantcontact/v2/library/UsageSummary.java +++ b/components/src/main/java/com/constantcontact/v2/library/UsageSummary.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; + import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; @@ -40,16 +41,16 @@ public class UsageSummary implements Serializable { protected int _documentCount; @JsonProperty("total_bytes_used") - protected int _totalBytesUsed; + protected long _totalBytesUsed; @JsonProperty("image_bytes_used") - protected int _imageBytesUsed; + protected long _imageBytesUsed; @JsonProperty("document_bytes_used") - protected int _documentBytesUsed; + protected long _documentBytesUsed; @JsonProperty("total_bytes_remaining") - protected int _totalBytesRemaining; + protected long _totalBytesRemaining; @JsonProperty("free_files_remaining") protected int _freeFilesRemaining; @@ -89,35 +90,35 @@ public void setDocumentCount(int documentCount) { _documentCount = documentCount; } - public int getTotalBytesUsed() { + public long getTotalBytesUsed() { return _totalBytesUsed; } - public void setTotalBytesUsed(int totalBytesUsed) { + public void setTotalBytesUsed(long totalBytesUsed) { _totalBytesUsed = totalBytesUsed; } - public int getImageBytesUsed() { + public long getImageBytesUsed() { return _imageBytesUsed; } - public void setImageBytesUsed(int imageBytesUsed) { + public void setImageBytesUsed(long imageBytesUsed) { _imageBytesUsed = imageBytesUsed; } - public int getDocumentBytesUsed() { + public long getDocumentBytesUsed() { return _documentBytesUsed; } - public void setDocumentBytesUsed(int documentBytesUsed) { + public void setDocumentBytesUsed(long documentBytesUsed) { _documentBytesUsed = documentBytesUsed; } - public int getTotalBytesRemaining() { + public long getTotalBytesRemaining() { return _totalBytesRemaining; } - public void setTotalBytesRemaining(int totalBytesRemaining) { + public void setTotalBytesRemaining(long totalBytesRemaining) { _totalBytesRemaining = totalBytesRemaining; } diff --git a/components/src/test/java/com/constantcontact/v2/library/LibraryInfoTest.java b/components/src/test/java/com/constantcontact/v2/library/LibraryInfoTest.java index 0f15aa73..a385afd2 100644 --- a/components/src/test/java/com/constantcontact/v2/library/LibraryInfoTest.java +++ b/components/src/test/java/com/constantcontact/v2/library/LibraryInfoTest.java @@ -25,7 +25,7 @@ public class LibraryInfoTest { private static final int MAX_FREE_FILE = 5; - private static final int MAX_PREMIUM_SPACE = 100; + private static final long MAX_PREMIUM_SPACE = 100; private static final int MAX_UPLOAD_SIZE = 1; diff --git a/components/src/test/java/com/constantcontact/v2/library/UsageSummaryTest.java b/components/src/test/java/com/constantcontact/v2/library/UsageSummaryTest.java index 68220811..89e04e3e 100644 --- a/components/src/test/java/com/constantcontact/v2/library/UsageSummaryTest.java +++ b/components/src/test/java/com/constantcontact/v2/library/UsageSummaryTest.java @@ -21,7 +21,7 @@ /** */ public class UsageSummaryTest { - private static final int DOCUMENTS_BYTES_USED = 5; + private static final long DOCUMENTS_BYTES_USED = 5; private static final int DOCUMENT_COUNT = 6; @@ -31,13 +31,13 @@ public class UsageSummaryTest { private static final int FREE_FILES_REMAINING = 9; - private static final int IMAGE_BYTES_USED = 10; + private static final long IMAGE_BYTES_USED = 10; private static final int IMAGE_COUNT = 11; - private static final int TOTAL_BYTES_USED = 12; + private static final long TOTAL_BYTES_USED = 12; - private static final int TOTAL_BYTES_REMAINING = 13; + private static final long TOTAL_BYTES_REMAINING = 13; static UsageSummary createUsageSummary() { UsageSummary usageSummary = new UsageSummary();