1
0
mirror of https://github.com/google/nomulus synced 2026-06-09 16:33:02 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
gbrodman f44642fe28 Add expiration/deletion to Valkey cache (#3024)
This will be necessary for the batch job that runs however often to
"catch up" to the existing state.

We also only store "real" domains in Valkey.
2026-04-30 21:48:59 +00:00
Ben McIlwain 6e77a6b0e7 Migrate EPP Flows, TLD, and Domain Base models to java.time (#3025)
Migrates the massive DomainBase, DomainHistory, and Registrar models to use java.time.Instant natively, removing all deprecated DateTime accessors and fixing their associated JPA converters.
Migrates the Tld entity and its entire JSON/YAML testing ecosystem, including implementing an InstantKeySerializer to preserve millisecond precision in Jackson.
Migrates the entire Epp Flow ecosystem (Create, Update, Delete, Renew, Transfer for Domains/Hosts/Contacts) to use native Instant parameters and operations.
Migrates EppTestCase and EppLifecycleDomainTest to use Instant natively instead of constantly double-wrapping timestamps.
Rebases against upstream and standardizes all Duration and DateTimeUtils static imports across the test suites.
2026-04-30 00:05:55 +00:00
Juan Celhay 859f356466 Add folder and files for skeleton cloud deploy delivery pipeline. (#3029) 2026-04-29 19:56:34 +00:00
Ben McIlwain fa15a66d9a Migrate Domain, Registrar, and Token models to java.time (#3022)
Migrated core EppResource and Token models from Joda-Time DateTime to java.time.Instant.

Specific migrations include:
- `DomainBase` and `Domain`: Migrated `registrationExpirationTime` and various other timestamps to use `Instant` directly.
- `Registrar`: Migrated `lastPocVerificationDate` and certificate dates to `Instant`.
- `BulkPricingPackage`: Migrated `nextBillingDate` and `lastNotificationSent`.
- `AllocationToken`: Migrated `tokenStatusTransitions` map keys to `Instant`.
- `LaunchNotice`: Migrated `acceptedTime` and `expirationTime`.

Updated all associated EPP flows (e.g., DomainCreateFlow, DomainRenewFlow), batch actions (e.g., CheckBulkComplianceAction, DeleteExpiredDomainsAction), command-line tools (e.g., UnrenewDomainCommand, UpdateBulkPricingPackageCommand), and tests to handle `Instant` directly.
2026-04-29 14:06:25 +00:00
sharma1210 76131fbd4e Add -J to --add-opens for Kythe extraction (#3028) 2026-04-29 08:15:27 +00:00
sharma1210 1196cd163b Fix Kythe extraction failure caused by Error Prone access to JDK internals (#3026) 2026-04-28 06:45:22 +00:00
gbrodman 4a412546f9 Upgrade beam deps (#3027)
https://docs.cloud.google.com/dataflow/docs/support/beam-runtime-support
looks like we need a later version for java 25
2026-04-27 19:40:10 +00:00
195 changed files with 2023 additions and 2206 deletions
+12 -3
View File
@@ -16,7 +16,11 @@ This document outlines foundational mandates, architectural patterns, and projec
## 2. Time and Precision Handling (java.time Migration)
- **Idiomatic java.time Usage:** Avoid redundant conversions between `Instant` and `DateTime`. If a field or parameter is an `Instant`, use it directly. Do not convert to `DateTime` just to call a deprecated method if an `Instant` alternative exists or can be easily created. Furthermore, you should not call `toInstant()` or `toDateTime()` conversion methods when not strictly necessary; always prefer to use an alternative method that returns the correct type if one exists (e.g. use `tm().getTxTime()` which returns an `Instant` instead of calling `tm().getTransactionTime().toInstant()`).
- **CRITICAL MISTAKE TO AVOID:** NEVER use `toInstant(clock.nowUtc())` or `toInstant(fakeClock.nowUtc())`. Both `Clock` and `FakeClock` have a `now()` method that natively returns a `java.time.Instant`. You MUST use `clock.now()` or `fakeClock.now()` directly. Converting `nowUtc()` to an Instant is an embarrassing mistake that demonstrates a lack of basic codebase familiarity.
- **CRITICAL MISTAKES TO AVOID:**
- NEVER use `toInstant(clock.nowUtc())` or `toInstant(fakeClock.nowUtc())`. Both `Clock` and `FakeClock` have a `now()` method that natively returns a `java.time.Instant`. You MUST use `clock.now()` or `fakeClock.now()` directly.
- NEVER double-wrap conversions like `toInstant(toDateTime(...))` or `toDateTime(toInstant(...))`.
- NEVER mark `Instant` parameters or local variables as `final` unnecessarily, as it clutters the codebase.
- When using test helpers like `assertThatCommand().atTime(...)` or `ForeignKeyUtils.loadResource(...)`, ALWAYS use the `Instant` overloads. DO NOT wrap `Instant` instances in `toDateTime(...)` just to pass them to deprecated overloads.
- **UTC Timezones:** Do not use `ZoneId.of("UTC")`. Use a statically imported `UTC` from `ZoneOffset` instead (`import static java.time.ZoneOffset.UTC;`).
- **Millisecond Precision:** Always truncate `Instant.now()` to milliseconds (using `.truncatedTo(ChronoUnit.MILLIS)`) to maintain consistency with Joda `DateTime` and the PostgreSQL schema (which enforces millisecond precision via JPA converters).
- **Clock Injection:**
@@ -135,13 +139,17 @@ This project treats Error Prone warnings as errors.
### 3. Build Strategy
- **Surgical Changes**: In large-scale migrations, focus on "leaf" nodes first (Utilities -> Models -> Flows -> Actions).
- **PR Size**: Minimize PR size by retaining Joda-Time bridge methods for high-level "Action" and "Flow" classes unless a full migration is requested. Reverting changes to DNS and Reporting logic while updating the underlying models is a valid strategy to keep PRs reviewable.
- **Validation**: Always run `./gradlew build -x test` before attempting to run unit tests. Unit tests will not run if there are compilation errors in any part of the `core` module. Before finalizing a PR or declaring a task done, you MUST run the entire build using `./gradlew build` and verify that it succeeds completely without errors. Do not declare success if formatting checks (e.g., `spotlessCheck` or `javaIncrementalFormatCheck`) or tests fail. If formatting fails, run `./gradlew spotlessApply` and then re-run `./gradlew build` to verify everything passes.
- **Validation**: Always run `./gradlew build -x test` before attempting to run unit tests. Unit tests will not run if there are compilation errors in any part of the `core` module. Before finalizing a PR or declaring a task done, you MUST verify your changes. **Prefer scoped builds** (e.g., `./gradlew :core:build`) if you are only modifying backend Java code. Running the global `./gradlew build` triggers the frontend `console-webapp` build, which unnecessarily runs `npmInstallDeps` and modifies `package-lock.json`. If you must run a global build, you must revert `console-webapp/package-lock.json` afterwards. Do not declare success if formatting checks (e.g., `spotlessCheck` or `javaIncrementalFormatCheck`) or tests fail. If formatting fails, run `./gradlew spotlessApply` and then re-run your build command to verify everything passes.
## 🚫 Common Pitfalls to Avoid
- **Mixing Joda and Java Durations:** Methods like `Tld.get().getRenewGracePeriodLength()` return a **Joda** `Duration`, which cannot be passed directly to `Instant.plus(...)` because it doesn't implement `TemporalAmount`. You MUST use `.plusMillis(duration.getMillis())` instead.
- **Serialization Precision (`.000Z`):** When asserting against or generating XML/YAML files, remember that millisecond precision (`.000Z`) is required. Always use `DateTimeUtils.formatInstant(...)` to format `Instant` objects (it preserves the `.000Z` suffix) instead of `Instant.toString()` (which drops it for exact seconds). We have added custom Jackson `InstantKeySerializer`s for this purpose, but you must keep this precision in mind when manually updating `.xml` or `.yaml` test data.
- **Static Imports:** Methods like `toDateTime`, `toInstant`, `plusYears`, `plusMonths`, and `minusDays` from `DateTimeUtils` MUST be statically imported. Do NOT use them fully qualified (e.g., `DateTimeUtils.plusMonths(...)`).
- **Redundant Parses:** Never write `toDateTime(Instant.parse(...))` or `toInstant(DateTime.parse(...))`. If you need a `DateTime`, use `DateTime.parse(...)` directly. If you need an `Instant`, use `Instant.parse(...)` directly.
- **cloneProjectedAtTime vs cloneProjectedAtInstant:** When converting tests and logic that use `clock.now()` to project resource state into the future or past, do not wrap the Java `Instant` in `toDateTime()` just to call `cloneProjectedAtTime()`. Instead, switch the method call to use the native `cloneProjectedAtInstant()` method which is available on all `EppResource` models.
- **Do not go in circles with the build:** If you see an `InlineMeSuggester` error, apply the suppression to **ALL** similar methods in that file and related files in one turn. Do not fix them one by one.
- **Do not go in circles with the build:** If you see an `InlineMeSuggester` error, apply the suppression to **ALL** similar methods in that file and related files in one turn. Do not fix them one by one. Furthermore, do not run a global `./gradlew build` when a scoped `./gradlew :core:build` or `./gradlew :core:test` is faster and more appropriate. Run global builds only when doing final verification.
- **Exception Conversion in Tests:** When migrating time types (e.g., from Joda `DateTime` to Java `Instant`), be extremely careful with tests that verify parsing failures (e.g., `assertThrows(IllegalArgumentException.class, ...)`). Joda's `DateTime.parse()` throws an `IllegalArgumentException` on failure, but `Instant.parse()` throws a `java.time.format.DateTimeParseException`. You must update the expected exception type in these tests to ensure they actually test the correct behavior, and verify the tests are not failing prematurely on the first line if it contains invalid data meant to be ignored.
- Dagger/AutoValue corruption: If you modify a builder or a component incorrectly, Dagger will fail to generate code, leading to hundreds of "cannot find symbol" errors. If this happens, `git checkout` the last working state of the specific file and re-apply changes more surgically.
- **`replace` tool context**: When using `replace` on large files (like `Tld.java` or `DomainBase.java`), provide significant surrounding context. These files have many similar method signatures (getters/setters) that can lead to incorrect replacements.
@@ -164,3 +172,4 @@ This protocol defines the standard for interacting with GitHub repositories and
## 3. PR Lifecycle Management
- **One Commit Per PR:** Ensure all changes are squashed into a single, clean commit. Use `git commit --amend --no-edit` for follow-up fixes.
- **Clean Workspace:** Always run `git status` and verify the repository state before declaring a task complete.
- **Package Lock:** The Gradle build automatically modifies `console-webapp/package-lock.json` via the `npmInstallDeps` task. ALWAYS revert this file (`git checkout console-webapp/package-lock.json`) before staging changes or finalizing a commit unless you explicitly modified NPM dependencies.
@@ -69,13 +69,18 @@ public abstract class DateTimeUtils {
* <p>Handles large/negative years by using a sign prefix if necessary, compatible with {@link
* Instant#parse}.
*/
public static final DateTimeFormatter ISO_8601_FORMATTER =
private static final DateTimeFormatter ISO_8601_FORMATTER =
new DateTimeFormatterBuilder()
.appendValue(ChronoField.YEAR, 4, 10, SignStyle.NORMAL)
.appendPattern("-MM-dd'T'HH:mm:ss.SSS'Z'")
.toFormatter()
.withZone(ZoneOffset.UTC);
/** Formats an {@link Instant} to an ISO-8601 string. */
public static String formatInstant(Instant instant) {
return ISO_8601_FORMATTER.format(instant);
}
/**
* Parses an ISO-8601 string to an {@link Instant}.
*
@@ -170,7 +175,7 @@ public abstract class DateTimeUtils {
* Adds years to a date, in the {@code Duration} sense of semantic years. Use this instead of
* {@link java.time.ZonedDateTime#plusYears} to ensure that we never end up on February 29.
*/
public static Instant plusYears(Instant now, long years) {
public static Instant plusYears(Instant now, int years) {
checkArgument(years >= 0);
return (years == 0)
? now
+114 -5
View File
@@ -104,7 +104,7 @@ PRESUBMITS = {
# System.(out|err).println should only appear in tools/ or load-testing/
PresubmitCheck(
r".*\bSystem\.(out|err)\.print", "java", {
r".*\bSystem\s*\.\s*(?:out|err)\s*\.\s*print.*", "java", {
"/tools/", "/example/", "/load-testing/",
"RegistryTestServerMain.java", "TestServerExtension.java"
}):
@@ -139,7 +139,7 @@ PRESUBMITS = {
):
"All soy templates must use strict autoescaping",
PresubmitCheck(
r".*\nimport (static )?.*\.shaded\..*",
r".*\nimport\s+(?:static\s+)?.*\.shaded\..*",
"java",
{"/node_modules/"},
):
@@ -163,7 +163,7 @@ PRESUBMITS = {
):
"Use status code from jakarta.servlet.http.HttpServletResponse.",
PresubmitCheck(
r".*mock\(Response\.class\).*",
r".*mock\(\s*Response\.class\s*\).*",
"java",
{"/node_modules/"},
):
@@ -181,13 +181,122 @@ PRESUBMITS = {
):
"Do not use javax.inject.* Use jakarta.inject.* instead.",
PresubmitCheck(
r".*import jakarta.persistence.(Pre|Post)(Persist|Load|Remove|Update);",
r".*import\s+jakarta\.persistence\.(?:Pre|Post)(?:Persist|Load|Remove|Update)\s*;",
"java",
{"EntityCallbacksListener.java"},
):
"Hibernate lifecycle events aren't called for embedded entities, so it's "
"usually best to avoid them. Instead, use the annotations defined in "
"EntityCallbacksListener.java"
"EntityCallbacksListener.java",
PresubmitCheck(
r".*\.isEqualTo\(\s*Optional\.of\(.*",
"java",
{},
):
"Do not use .isEqualTo(Optional.of(...)). Use Truth's .hasValue(...) instead.",
# TODO: Remove the java.time migration presubmit checks below once the entire codebase has been migrated to java.time.
PresubmitCheck(
r".*toDateTime\(\s*toInstant\(.*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not double-wrap toDateTime(toInstant(...)).",
PresubmitCheck(
r".*toInstant\(\s*toDateTime\(.*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not double-wrap toInstant(toDateTime(...)).",
PresubmitCheck(
r".*toInstant\([^;]*[cC]lock\.nowUtc\(\).*",
"java",
{},
):
"Do not use toInstant(clock.nowUtc()). Use clock.now() instead.",
PresubmitCheck(
r".*toDateTime\([^;]*[cC]lock\.now\(\).*",
"java",
{},
):
"Do not use toDateTime(clock.now()). Use clock.nowUtc() instead.",
PresubmitCheck(
r".*toInstant\([^;]*tm\(\)\.getTransactionTime\(\).*",
"java",
{},
):
"Do not use toInstant(tm().getTransactionTime()). Use tm().getTxTime() instead.",
PresubmitCheck(
r".*toDateTime\([^;]*tm\(\)\.getTxTime\(\).*",
"java",
{},
):
"Do not use toDateTime(tm().getTxTime()). Use tm().getTransactionTime() instead.",
PresubmitCheck(
r".*\(\s*Instant\s*\)\s*(?:this\.)?(?:fakeClock|clock)\.now\(\s*\).*",
"java",
{},
):
"Do not unnecessarily cast clock.now() to Instant.",
PresubmitCheck(
r".*toDateTime\(\s*Instant\.now\(.*",
"java",
{},
):
"Do not wrap Instant.now() in toDateTime. Use DateTime.now(UTC) directly.",
PresubmitCheck(
r".*toInstant\(\s*DateTime\.now\(.*",
"java",
{},
):
"Do not wrap DateTime.now() in toInstant. Use Instant.now().truncatedTo(ChronoUnit.MILLIS) directly.",
PresubmitCheck(
r".*toDateTime\(\s*Instant\.parse\(.*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap Instant.parse in toDateTime. Use DateTime.parse directly.",
PresubmitCheck(
r".*toInstant\(\s*DateTime\.parse\(.*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap DateTime.parse in toInstant. Use Instant.parse directly.",
PresubmitCheck(
r".*cloneProjectedAtTime\(\s*toDateTime\(.*",
"java",
{},
):
"Do not use cloneProjectedAtTime(toDateTime(...)). Use cloneProjectedAtInstant(...) instead.",
PresubmitCheck(
r".*ZoneId\.of\(\s*\"UTC\"\s*\).*",
"java",
{},
):
"Do not use ZoneId.of(\"UTC\"). Use java.time.ZoneOffset.UTC.",
PresubmitCheck(
r".*toDateTime\(\s*END_INSTANT\s*\).*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap END_INSTANT in toDateTime. Use END_OF_TIME.",
PresubmitCheck(
r".*toInstant\(\s*END_OF_TIME\s*\).*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap END_OF_TIME in toInstant. Use END_INSTANT.",
PresubmitCheck(
r".*toDateTime\(\s*START_INSTANT\s*\).*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap START_INSTANT in toDateTime. Use START_OF_TIME.",
PresubmitCheck(
r".*toInstant\(\s*START_OF_TIME\s*\).*",
"java",
{"DateTimeUtilsTest.java"},
):
"Do not wrap START_OF_TIME in toInstant. Use START_INSTANT."
}
# Note that this regex only works for one kind of Flyway file. If we want to
+145 -201
View File
@@ -19,13 +19,13 @@ com.github.ben-manes.caffeine:caffeine:3.2.3=compileClasspath,deploy_jar,nonprod
com.github.docker-java:docker-java-api:3.4.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport-zerodep:3.4.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport:3.4.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jffi:1.3.14=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jffi:1.3.15=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-a64asm:1.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-constants:0.10.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-enxio:0.32.19=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-ffi:2.2.18=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-posix:3.1.21=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-unixsocket:0.38.24=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-enxio:0.32.20=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-ffi:2.2.19=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-posix:3.1.22=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-unixsocket:0.38.25=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.jnr:jnr-x86asm:1.0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.android:annotations:4.1.1.4=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
@@ -37,81 +37,58 @@ com.google.api-client:google-api-client-servlet:2.9.0=compileClasspath,nonprodCo
com.google.api-client:google-api-client:2.9.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api.grpc:gapic-google-cloud-storage-v2:2.67.0=testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.9.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.9.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.181.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.181.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.181.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.181.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.43.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.44.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.114.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.115.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.14.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-pubsublite-v1:1.14.3=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:3.21.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.193.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.193.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-bigtable-v2:2.73.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-pubsub-v1:1.130.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-spanner-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-control-v2:2.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api.grpc:grpc-google-cloud-storage-v2:2.67.0=testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.43.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:grpc-google-common-protos:2.45.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.9.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.9.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1alpha:3.9.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1alpha:3.9.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.181.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.181.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.181.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.181.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.43.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.44.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.43.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.44.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:grpc-google-common-protos:2.65.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:3.21.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1alpha:3.21.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.193.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.193.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta:3.21.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-admin-v2:2.73.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-bigtable-v2:2.73.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-compute-v1:1.82.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.112.2=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.113.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.25.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.26.5=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.52.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.114.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.115.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.14.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-pubsublite-v1:1.14.3=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-datastore-v1:0.125.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-firestore-v1:3.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-monitoring-v3:3.85.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-pubsub-v1:1.130.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-secretmanager-v1beta2:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-executor-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-spanner-v1:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-control-v2:2.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api.grpc:proto-google-cloud-storage-v2:2.67.0=testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta2:0.141.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-cloud-tasks-v2beta3:0.141.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-common-protos:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.50.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.60.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api.grpc:proto-google-iam-v1:1.65.0=testCompileClasspath,testRuntimeClasspath
com.google.api:api-common:2.57.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api:api-common:2.62.0=testCompileClasspath,testRuntimeClasspath
com.google.api:gax-grpc:2.64.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api:gax-grpc:2.74.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api:gax-grpc:2.79.0=testCompileClasspath,testRuntimeClasspath
com.google.api:gax-httpjson:2.69.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api:gax-httpjson:2.74.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.api:gax-httpjson:2.79.0=testCompileClasspath,testRuntimeClasspath
com.google.api:gax:2.74.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-admin-directory:directory_v1-rev20260227-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20240815-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20240310-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-bigquery:v2-rev20251012-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20250606-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dataflow:v1b3-rev20260405-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-dns:v1-rev20260402-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-drive:v3-rev20260405-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-gmail:v1-rev20260112-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-gmail:v1-rev20260413-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-groupssettings:v1-rev20220614-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-healthcare:v1-rev20240130-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-iam:v2-rev20250502-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -119,58 +96,47 @@ com.google.apis:google-api-services-iamcredentials:v1-rev20211203-2.0.0=compileC
com.google.apis:google-api-services-monitoring:v3-rev20260129-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-pubsub:v1-rev20220904-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sheets:v4-rev20260213-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-sqladmin:v1beta4-rev20251201-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20250312-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.apis:google-api-services-sqladmin:v1beta4-rev20260317-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.apis:google-api-services-storage:v1-rev20251118-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.apis:google-api-services-storage:v1-rev20260204-2.0.0=testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.43.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.auth:google-auth-library-credentials:1.46.0=testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.43.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.46.0=testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-credentials:1.46.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auth:google-auth-library-oauth2-http:1.46.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.service:auto-service-annotations:1.0.1=nonprodAnnotationProcessor,testAnnotationProcessor
com.google.auto.service:auto-service-annotations:1.1.1=annotationProcessor,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.service:auto-service:1.1.1=annotationProcessor
com.google.auto.value:auto-value-annotations:1.11.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.auto.value:auto-value:1.11.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.auto.value:auto-value:1.11.1=annotationProcessor,testAnnotationProcessor
com.google.auto.value:auto-value:1.11.1=annotationProcessor,deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.auto:auto-common:1.2.2=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.cloud.bigdataoss:gcsio:2.2.16=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:util:2.2.16=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:gcsio:2.2.26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:util:2.2.26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.bigtable:bigtable-client-core-config:1.28.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.21.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.opentelemetry:detector-resources-support:0.31.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud.opentelemetry:detector-resources-support:0.33.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud.datastore:datastore-v1-proto-client:2.34.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.opentelemetry:detector-resources-support:0.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.opentelemetry:exporter-metrics:0.33.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.opentelemetry:shared-resourcemapping:0.33.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.28.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.28.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.9.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-bigquerystorage:3.9.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.43.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-bigtable:2.44.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud.sql:jdbc-socket-factory-core:1.28.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud.sql:postgres-socket-factory:1.28.3=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigquerystorage:3.21.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-bigtable:2.73.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-compute:1.82.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-grpc:2.54.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.cloud:google-cloud-core-grpc:2.64.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.cloud:google-cloud-core-grpc:2.69.0=testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core-http:2.54.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.cloud:google-cloud-core-http:2.69.0=testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-core:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.25.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-firestore:3.26.5=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:3.52.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-firestore:3.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-monitoring:3.85.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-nio:0.131.0=testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.132.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-pubsub:1.133.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsublite:1.14.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-pubsublite:1.14.3=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-pubsub:1.148.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-secretmanager:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.74.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:google-cloud-spanner:6.77.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-spanner:6.111.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage-control:2.44.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-storage:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:google-cloud-tasks:2.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:grpc-gcp:1.6.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:grpc-gcp:1.9.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.cloud:libraries-bom:26.48.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.25.1=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.26.5=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.37.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.10.1=soy
com.google.code.gson:gson:2.13.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -182,17 +148,15 @@ com.google.devtools.ksp:symbol-processing-api:2.2.20-2.0.3=annotationProcessor,t
com.google.errorprone:error_prone_annotation:2.48.0=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.20.0=soy
com.google.errorprone:error_prone_annotations:2.36.0=checkstyle
com.google.errorprone:error_prone_annotations:2.48.0=annotationProcessor,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotations:2.48.0=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.49.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_check_api:2.48.0=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.48.0=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.escapevelocity:escapevelocity:1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:23.5.26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger-system-backend:0.7.4=soy
com.google.flogger:flogger-system-backend:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger:0.7.4=soy
com.google.flogger:flogger:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:google-extensions:0.7.4=soy
com.google.flogger:google-extensions:0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:24.3.25=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger-system-backend:0.7.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.flogger:flogger:0.7.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.flogger:google-extensions:0.7.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.googlejavaformat:google-java-format:1.34.1=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.guava:failureaccess:1.0.1=soy
com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -201,8 +165,8 @@ com.google.guava:guava-testlib:33.3.0-jre=testRuntimeClasspath
com.google.guava:guava-testlib:33.6.0-jre=testCompileClasspath
com.google.guava:guava:32.1.1-jre=soy
com.google.guava:guava:33.4.8-jre=checkstyle
com.google.guava:guava:33.5.0-jre=annotationProcessor,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.guava:guava:33.6.0-jre=testCompileClasspath
com.google.guava:guava:33.5.0-jre=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.guava:guava:33.6.0-jre=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.gwt:gwt-user:2.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
@@ -212,8 +176,7 @@ com.google.http-client:google-http-client-appengine:2.1.0=testCompileClasspath,t
com.google.http-client:google-http-client-gson:2.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-jackson2:1.46.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.http-client:google-http-client-jackson2:2.1.0=testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-protobuf:1.44.2=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.http-client:google-http-client-protobuf:1.45.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-protobuf:2.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.http-client:google-http-client:2.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.inject:guice:7.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=checkstyle
@@ -231,12 +194,11 @@ com.google.oauth-client:google-oauth-client-servlet:1.36.0=deploy_jar,nonprodRun
com.google.oauth-client:google-oauth-client-servlet:1.39.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
com.google.oauth-client:google-oauth-client:1.39.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java-util:4.33.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
com.google.protobuf:protobuf-java-util:4.34.1=testCompileClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java-util:4.35.0-RC1=testCompileClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java:3.21.7=soy
com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
com.google.protobuf:protobuf-java:4.34.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.re2j:re2j:1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath
com.google.re2j:re2j:1.8=testRuntimeClasspath
com.google.protobuf:protobuf-java:4.35.0-RC1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.re2j:re2j:1.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.template:soy:2024-02-26=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.truth:truth:1.4.5=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.googlecode.json-simple:json-simple:1.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -291,70 +253,55 @@ io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,nonprodAnn
io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
io.github.java-diff-utils:java-diff-utils:4.16=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.ss-bhatt:testcontainers-valkey:1.0.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-alts:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-alts:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-alts:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-api:1.70.0=compileClasspath,nonprodCompileClasspath
io.grpc:grpc-api:1.71.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-api:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-api:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-auth:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-auth:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-auth:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-census:1.66.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-census:1.68.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-context:1.71.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-census:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-context:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-context:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-core:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-core:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-core:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-googleapis:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-googleapis:1.76.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-googleapis:1.80.0=testRuntimeClasspath
io.grpc:grpc-grpclb:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-grpclb:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-grpclb:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-inprocess:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-inprocess:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-inprocess:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-netty-shaded:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-netty-shaded:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-netty-shaded:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-netty:1.66.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-netty:1.68.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-opentelemetry:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-netty:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-opentelemetry:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-opentelemetry:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-protobuf-lite:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-protobuf-lite:1.76.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-protobuf-lite:1.80.0=testRuntimeClasspath
io.grpc:grpc-protobuf:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-protobuf:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-protobuf:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-rls:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-rls:1.76.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-rls:1.80.0=testRuntimeClasspath
io.grpc:grpc-services:1.66.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-services:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-services:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath
io.grpc:grpc-services:1.80.0=testRuntimeClasspath
io.grpc:grpc-stub:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-stub:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-stub:1.80.0=testCompileClasspath,testRuntimeClasspath
io.grpc:grpc-util:1.66.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-util:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-util:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath
io.grpc:grpc-util:1.80.0=testRuntimeClasspath
io.grpc:grpc-xds:1.66.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.grpc:grpc-xds:1.70.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
io.grpc:grpc-xds:1.76.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath
io.grpc:grpc-xds:1.80.0=testRuntimeClasspath
io.netty:netty-buffer:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-buffer:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-codec-http2:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-codec-http2:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-codec-http:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-codec-socks:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-codec:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-common:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-handler-proxy:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-handler:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-resolver:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-buffer:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http2:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-http:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-codec-socks:4.1.124.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-codec:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-common:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-handler-proxy:4.1.124.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-handler:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-resolver:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-boringssl-static:2.0.52.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-tcnative-classes:2.0.52.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-transport-native-unix-common:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.100.Final=compileClasspath,nonprodCompileClasspath,testCompileClasspath
io.netty:netty-transport:4.1.110.Final=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.netty:netty-transport-native-unix-common:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.netty:netty-transport:4.1.124.Final=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-api:0.31.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-exemplar-util:0.31.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opencensus:opencensus-contrib-grpc-metrics:0.31.0=compileClasspath,nonprodCompileClasspath,testCompileClasspath
@@ -372,29 +319,27 @@ io.opentelemetry.instrumentation:opentelemetry-grpc-1.6:2.1.0-alpha=compileClass
io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.1.0-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:2.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry.semconv:opentelemetry-semconv:1.29.0-alpha=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api-incubator:1.42.1-alpha=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-api:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-api:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-bom:1.42.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-common:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-context:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-context:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-context:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-exporter-logging:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-extension-incubator:1.35.0-alpha=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-common:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-common:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-common:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-logs:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-logs:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-logs:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-sdk:1.47.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk:1.51.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.opentelemetry:opentelemetry-sdk:1.60.1=testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-semconv:1.26.0-alpha=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.outfoxx:swiftpoet:1.3.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.perfmark:perfmark-api:0.27.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
io.protostuff:protostuff-api:1.8.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -416,11 +361,11 @@ javax.annotation:jsr250-api:1.0=compileClasspath,deploy_jar,nonprodCompileClassp
javax.inject:javax.inject:1=annotationProcessor,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
javax.jdo:jdo2-api:2.3-20090302111651=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
javax.validation:validation-api:1.0.0.GA=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
joda-time:joda-time:2.12.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
joda-time:joda-time:2.14.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
junit:junit:4.13.2=nonprodCompileClasspath,nonprodRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.arnx:nashorn-promise:0.1.1=testRuntimeClasspath
net.bytebuddy:byte-buddy-agent:1.17.7=testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.14.12=compileClasspath,nonprodCompileClasspath
net.bytebuddy:byte-buddy:1.17.7=compileClasspath,nonprodCompileClasspath
net.bytebuddy:byte-buddy:1.17.8=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath
net.bytebuddy:byte-buddy:1.18.8-jdk5=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.13.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -431,31 +376,32 @@ org.antlr:ST4:4.3.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodR
org.antlr:antlr-runtime:3.5.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.antlr:antlr4-runtime:4.13.2=checkstyle,compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.antlr:antlr4:4.13.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-format:15.0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:15.0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:15.0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.avro:avro:1.12.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-format:17.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-memory-core:17.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.arrow:arrow-vector:17.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.avro:avro:1.11.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-fn-execution:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-job-management:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-model-pipeline:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-construction-java:2.54.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-direct-java:2.60.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-core-java:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-direct-java:2.72.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-runners-java-fn-execution:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-core:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-expansion-service:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-arrow:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-avro:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-extensions-protobuf:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-fn-execution:2.54.0=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.60.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-harness:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-sdks-java-transform-service-launcher:2.72.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_60_1:0.1=testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-grpc-1_69_0:0.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.beam:beam-vendor-guava-32_1_2-jre:0.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-compress:1.28.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-compress:1.26.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-csv:1.14.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-exec:1.3=testRuntimeClasspath
org.apache.commons:commons-lang3:3.18.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
@@ -507,8 +453,6 @@ org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,deploy_jar,nonprodCo
org.eclipse.angus:angus-activation:2.0.3=jaxb
org.eclipse.angus:angus-activation:2.1.0-M1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.eclipse.angus:jakarta.mail:2.1.0-M1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections-api:11.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections:11.1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.1.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-webapp:12.1.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee:jetty-ee-webapp:12.1.8=testCompileClasspath,testRuntimeClasspath
@@ -519,8 +463,8 @@ org.eclipse.jetty:jetty-server:12.1.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-session:12.1.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-util:12.1.8=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-xml:12.1.8=testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:12.4.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:12.4.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:12.5.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:12.5.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:codemodel:4.0.7=jaxb
org.glassfish.jaxb:jaxb-core:4.0.6=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-core:4.0.7=jaxb
@@ -570,20 +514,20 @@ org.jline:jline:3.30.5=compileClasspath,deploy_jar,nonprodCompileClasspath,nonpr
org.joda:joda-money:2.0.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.json:json:20230618=soy
org.json:json:20251224=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jsoup:jsoup:1.22.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jsoup:jsoup:1.22.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=annotationProcessor,checkstyle,compileClasspath,deploy_jar,nonprodAnnotationProcessor,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
org.junit-pioneer:junit-pioneer:2.3.0=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-migrationsupport:5.13.4=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.14.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.14.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:1.14.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.14.4=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.14.4=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:1.14.4=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-runner:1.13.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-suite-api:1.14.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-suite-commons:1.14.3=testRuntimeClasspath
org.junit:junit-bom:5.14.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-suite-api:1.14.4=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-suite-commons:1.14.4=testRuntimeClasspath
org.junit:junit-bom:5.14.4=testCompileClasspath,testRuntimeClasspath
org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath
org.mockito:mockito-junit-jupiter:5.23.0=testCompileClasspath,testRuntimeClasspath
org.objenesis:objenesis:3.3=testRuntimeClasspath
@@ -647,12 +591,12 @@ tools.jackson.core:jackson-core:3.1.1=compileClasspath,deploy_jar,nonprodCompile
tools.jackson.core:jackson-databind:3.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
tools.jackson:jackson-bom:3.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-api:17.1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-diagram:17.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-operations:17.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-postgresql:17.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-text:17.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-diagram:17.10.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-operations:17.10.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-postgresql:17.10.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-text:17.10.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-tools:17.1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-utility:17.1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler:17.10.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
us.fatehi:schemacrawler:17.10.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
xerces:xmlParserAPIs:2.6.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
empty=devtool,shadow
@@ -32,8 +32,8 @@ import google.registry.request.auth.Auth;
import google.registry.ui.server.SendEmailUtils;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import java.time.Duration;
import java.util.Optional;
import org.joda.time.Days;
/**
* An action that checks all {@link BulkPricingPackage} objects for compliance with their max create
@@ -111,8 +111,7 @@ public class CheckBulkComplianceAction implements Runnable {
+ " 'DOMAIN_CREATE'",
Long.class)
.setParameter("token", bulkPricingPackage.getToken())
.setParameter(
"lastBilling", minusYears(bulkPricingPackage.getNextBillingDateInstant(), 1))
.setParameter("lastBilling", minusYears(bulkPricingPackage.getNextBillingDate(), 1))
.getSingleResult();
if (creates > bulkPricingPackage.getMaxCreates()) {
long overage = creates - bulkPricingPackage.getMaxCreates();
@@ -186,7 +185,7 @@ public class CheckBulkComplianceAction implements Runnable {
int daysSinceLastNotification =
bulkPricingPackage
.getLastNotificationSent()
.map(sentDate -> Days.daysBetween(sentDate, clock.nowUtc()).getDays())
.map(sentDate -> (int) Duration.between(sentDate, clock.now()).toDays())
.orElse(Integer.MAX_VALUE);
// Send a warning email if 30-39 days since last notification and an upgrade email if 40+ days
if (daysSinceLastNotification >= THIRTY_DAYS) {
@@ -222,7 +221,7 @@ public class CheckBulkComplianceAction implements Runnable {
bulkPricingPackage.getMaxDomains(),
activeDomains);
sendNotification(bulkToken, emailSubject, body, registrar.get());
tm().put(bulkPricingPackage.asBuilder().setLastNotificationSent(clock.nowUtc()).build());
tm().put(bulkPricingPackage.asBuilder().setLastNotificationSent(clock.now()).build());
} else {
throw new IllegalStateException(
String.format("Could not find registrar for bulk token %s", bulkToken));
@@ -172,7 +172,7 @@ public class DeleteExpiredDomainsAction implements Runnable {
() -> {
Domain transDomain = tm().loadByKey(domain.createVKey());
if (domain.getAutorenewEndTime().isEmpty()
|| domain.getAutorenewEndTime().get().isAfter(tm().getTransactionTime())) {
|| domain.getAutorenewEndTime().get().isAfter(tm().getTxTime())) {
logger.atSevere().log(
"Failed to delete domain %s because of its autorenew end time: %s.",
transDomain.getDomainName(), transDomain.getAutorenewEndTime());
@@ -134,7 +134,7 @@ public class RelockDomainAction implements Runnable {
String.format("Unknown revision ID %d", oldUnlockRevisionId)));
domain =
tm().loadByKey(VKey.create(Domain.class, oldLock.getRepoId()))
.cloneProjectedAtTime(tm().getTransactionTime());
.cloneProjectedAtTime(tm().getTxTime());
} catch (Throwable t) {
handleTransientFailure(Optional.ofNullable(oldLock), t);
return;
@@ -83,7 +83,7 @@ public class ResaveEntityAction implements Runnable {
resourceKey);
return;
}
tm().put(entity.get().cloneProjectedAtTime(tm().getTransactionTime()));
tm().put(entity.get().cloneProjectedAtTime(tm().getTxTime()));
if (!resaveTimes.isEmpty()) {
asyncTaskEnqueuer.enqueueAsyncResave(
VKey.createEppVKeyFromString(resourceKey), requestedTime, resaveTimes);
@@ -16,6 +16,8 @@ package google.registry.batch;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import static org.apache.http.HttpStatus.SC_INTERNAL_SERVER_ERROR;
import static org.apache.http.HttpStatus.SC_OK;
@@ -128,11 +130,11 @@ public class SendExpiringCertificateNotificationEmailAction implements Runnable
registrar,
registrar.getClientCertificate().isPresent()
&& certificateChecker.shouldReceiveExpiringNotification(
registrar.getLastExpiringCertNotificationSentDate(),
toDateTime(registrar.getLastExpiringCertNotificationSentDate()),
registrar.getClientCertificate().get()),
registrar.getFailoverClientCertificate().isPresent()
&& certificateChecker.shouldReceiveExpiringNotification(
registrar.getLastExpiringFailoverCertNotificationSentDate(),
toDateTime(registrar.getLastExpiringFailoverCertNotificationSentDate()),
registrar.getFailoverClientCertificate().get())))
.filter(
registrarInfo ->
@@ -210,7 +212,7 @@ public class SendExpiringCertificateNotificationEmailAction implements Runnable
Registrar.Builder newRegistrar = tm().loadByEntity(registrar).asBuilder();
switch (certificateType) {
case PRIMARY -> {
newRegistrar.setLastExpiringCertNotificationSentDate(now);
newRegistrar.setLastExpiringCertNotificationSentDate(toInstant(now));
tm().put(newRegistrar.build());
logger.atInfo().log(
"Updated last notification email sent date to %s for %s certificate of "
@@ -220,7 +222,7 @@ public class SendExpiringCertificateNotificationEmailAction implements Runnable
registrar.getRegistrarName());
}
case FAILOVER -> {
newRegistrar.setLastExpiringFailoverCertNotificationSentDate(now);
newRegistrar.setLastExpiringFailoverCertNotificationSentDate(toInstant(now));
tm().put(newRegistrar.build());
logger.atInfo().log(
"Updated last notification email sent date to %s for %s certificate of "
@@ -255,7 +257,7 @@ public class SendExpiringCertificateNotificationEmailAction implements Runnable
if (registrarInfo.isCertExpiring()
&& sendNotificationEmail(
registrar,
registrar.getLastExpiringCertNotificationSentDate(),
toDateTime(registrar.getLastExpiringCertNotificationSentDate()),
CertificateType.PRIMARY,
registrar.getClientCertificate())) {
numEmailsSent++;
@@ -263,7 +265,7 @@ public class SendExpiringCertificateNotificationEmailAction implements Runnable
if (registrarInfo.isFailOverCertExpiring()
&& sendNotificationEmail(
registrar,
registrar.getLastExpiringFailoverCertNotificationSentDate(),
toDateTime(registrar.getLastExpiringFailoverCertNotificationSentDate()),
CertificateType.FAILOVER,
registrar.getFailoverClientCertificate())) {
numEmailsSent++;
@@ -55,7 +55,6 @@ import google.registry.util.Clock;
import google.registry.util.SystemClock;
import jakarta.inject.Singleton;
import java.io.Serializable;
import java.time.Duration;
import java.time.Instant;
import java.util.Optional;
import java.util.Set;
@@ -312,8 +311,7 @@ public class ExpandBillingRecurrencesPipeline implements Serializable {
for (Instant eventTime : eventTimesToExpand) {
recurrenceLastExpansionTime = latestOf(recurrenceLastExpansionTime, eventTime);
oneTimesToExpandCounter.inc();
Instant billingTime =
eventTime.plus(Duration.ofMillis(tld.getAutoRenewGracePeriodLength().getMillis()));
Instant billingTime = eventTime.plusMillis(tld.getAutoRenewGracePeriodLength().getMillis());
// Note that the DomainHistory is created as of transaction time, as opposed to event time.
// This might be counterintuitive because other DomainHistories are created at the time
// mutation events occur, such as in DomainDeleteFlow or DomainRenewFlow. Therefore, it is
@@ -365,7 +365,7 @@ public class RdePipeline implements Serializable {
tm().loadByKey(
VKey.create(historyEntryClazz, new HistoryEntryId(repoId, revisionId))))
.getResourceAtPointInTime()
.map(resource -> resource.cloneProjectedAtTime(watermark))
.map(resource -> resource.cloneProjectedAtTime(toInstant(watermark)))
.get();
}
@@ -17,6 +17,7 @@ package google.registry.beam.resave;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toInstant;
import static org.apache.beam.sdk.values.TypeDescriptors.integers;
import com.google.common.collect.ImmutableList;
@@ -164,7 +165,7 @@ public class ResaveAllEppResourcesPipeline implements Serializable {
.collect(toImmutableList());
ImmutableList<EppResource> mappedResources =
tm().loadByKeys(keys).values().stream()
.map(r -> r.cloneProjectedAtTime(now))
.map(r -> r.cloneProjectedAtTime(toInstant(now)))
.collect(toImmutableList());
tm().putAll(mappedResources);
});
@@ -17,7 +17,7 @@ package google.registry.bsa.persistence;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static google.registry.bsa.DownloadStage.DONE;
import static google.registry.bsa.DownloadStage.DOWNLOAD_BLOCK_LISTS;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import com.google.common.base.Joiner;
import com.google.common.base.Objects;
@@ -84,7 +84,7 @@ class BsaDownload {
*/
String getJobName() {
// Return a value based on job start time, which is unique.
return ISO_8601_FORMATTER.format(getCreationTime()).toLowerCase(Locale.ROOT).replace(":", "");
return formatInstant(getCreationTime()).toLowerCase(Locale.ROOT).replace(":", "");
}
boolean isDone() {
@@ -117,8 +117,8 @@ public final class DownloadScheduler {
private boolean isTimeAgain(BsaDownload mostRecent, Duration interval) {
return mostRecent
.getCreationTime()
.plus(java.time.Duration.ofMillis(interval.getMillis()))
.minus(java.time.Duration.ofMillis(CRON_JITTER.getMillis()))
.plusMillis(interval.getMillis())
.minusMillis(CRON_JITTER.getMillis())
.isBefore(clock.now());
}
@@ -17,6 +17,7 @@ package google.registry.cache;
import com.google.common.collect.ImmutableList;
import google.registry.model.ForeignKeyUtils;
import google.registry.model.domain.Domain;
import google.registry.model.tld.Tld;
import google.registry.util.Clock;
import java.time.Instant;
import java.util.Optional;
@@ -52,11 +53,16 @@ public class MultilayerDomainCache extends MultilayerEppResourceCache<Domain>
Instant now = clock.now();
return possibleDomain
.filter(domain -> now.isBefore(domain.getDeletionTime()))
.map(domain -> domain.cloneProjectedAtInstant(now));
.map(domain -> domain.cloneProjectedAtTime(now));
}
@Override
protected String getJedisPrefix() {
return "Domain__";
return "d_";
}
@Override
protected boolean shouldPersistToRemoteCache(Domain domain) {
return Tld.get(domain.getTld()).getTldType().equals(Tld.TldType.REAL);
}
}
@@ -45,6 +45,10 @@ public abstract class MultilayerEppResourceCache<V extends EppResource> {
protected abstract String getJedisPrefix();
protected boolean shouldPersistToRemoteCache(V value) {
return true;
}
protected Optional<V> loadFromCaches(String key) {
// hopefully the resource is in the local cache
Optional<V> possibleValue = Optional.ofNullable(localCache.getIfPresent(key));
@@ -65,7 +69,9 @@ public abstract class MultilayerEppResourceCache<V extends EppResource> {
.map(
v -> {
// Optional has no direct "peek" functionality to fill the caches
jedisClient.set(jedisKey, v);
if (shouldPersistToRemoteCache(v)) {
jedisClient.set(new SimplifiedJedisClient.JedisResource<>(jedisKey, v));
}
localCache.put(key, v);
return v;
});
@@ -44,6 +44,6 @@ public class MultilayerHostCache extends MultilayerEppResourceCache<Host> implem
@Override
protected String getJedisPrefix() {
return "Host__";
return "h_";
}
}
@@ -16,6 +16,9 @@ package google.registry.cache;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.Iterables;
import com.google.common.collect.Streams;
import google.registry.model.EppResource;
import io.protostuff.LinkedBuffer;
import io.protostuff.ProtostuffIOUtil;
@@ -23,7 +26,9 @@ import io.protostuff.Schema;
import io.protostuff.runtime.RuntimeSchema;
import java.nio.charset.StandardCharsets;
import java.util.Optional;
import redis.clients.jedis.AbstractPipeline;
import redis.clients.jedis.UnifiedJedis;
import redis.clients.jedis.params.SetParams;
/**
* A {@link UnifiedJedis} client that handles serialization/deserialization.
@@ -35,6 +40,10 @@ import redis.clients.jedis.UnifiedJedis;
*/
public class SimplifiedJedisClient<V extends EppResource> {
public record JedisResource<V extends EppResource>(String key, V value) {}
private static final int BATCH_SIZE = 500;
private final Schema<V> valueSchema;
private final UnifiedJedis jedis;
@@ -57,10 +66,50 @@ public class SimplifiedJedisClient<V extends EppResource> {
}
/** Sets the value in the remote cache. */
public void set(String key, V value) {
checkNotNull(key, "Key cannot be null");
checkNotNull(value, "Value cannot be null");
jedis.set(key.getBytes(StandardCharsets.UTF_8), serialize(value));
public void set(JedisResource<V> resource) {
checkNotNull(resource.key, "Key cannot be null");
checkNotNull(resource.value, "Value cannot be null");
jedis.set(
resource.key.getBytes(StandardCharsets.UTF_8),
serialize(resource.value),
new SetParams().pxAt(resource.value.getDeletionTime().toEpochMilli()));
}
/** Sets multiple values in the remote cache using a Jedis {@link AbstractPipeline}. */
public void setAll(ImmutableCollection<JedisResource<V>> resources) {
for (Iterable<JedisResource<V>> batch : Iterables.partition(resources, BATCH_SIZE)) {
AbstractPipeline pipeline = jedis.pipelined();
batch.forEach(
resource ->
pipeline.set(
resource.key.getBytes(StandardCharsets.UTF_8),
serialize(resource.value),
new SetParams().pxAt(resource.value.getDeletionTime().toEpochMilli())));
pipeline.sync();
}
}
/**
* Deletes all values associated with the given keys in Valkey.
*
* <p>If any given key does not exist, it does nothing.
*
* <p>Note: we use {@code unlink} here instead of {@code del} so that the actual deletion can
* happen in the background whenever the server wants. The keys are removed from the namespace
* immediately, and we don't need the memory to be reclaimed this instant.
*
* <p>This could also be accomplished by using {@link #setAll(ImmutableCollection)} with
* expiration times that are in the past, but this is clearer.
*/
public void deleteAll(ImmutableCollection<String> keys) {
// we use a reasonably small batch size to avoid overwhelming the network
for (Iterable<String> batch : Iterables.partition(keys, BATCH_SIZE)) {
byte[][] keysToUnlink =
Streams.stream(batch)
.map(key -> key.getBytes(StandardCharsets.UTF_8))
.toArray(byte[][]::new);
jedis.unlink(keysToUnlink);
}
}
private byte[] serialize(V value) {
@@ -73,6 +122,7 @@ public class SimplifiedJedisClient<V extends EppResource> {
}
private V deserialize(byte[] data) {
// We use protobufs because other deserializers don't play nicely with immutable collections
V value = valueSchema.newMessage();
ProtostuffIOUtil.mergeFrom(data, value, valueSchema);
return value;
@@ -25,7 +25,7 @@ import static google.registry.model.registrar.RegistrarPoc.Type.MARKETING;
import static google.registry.model.registrar.RegistrarPoc.Type.TECH;
import static google.registry.model.registrar.RegistrarPoc.Type.WHOIS;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
@@ -40,10 +40,10 @@ import google.registry.util.Clock;
import google.registry.util.DateTimeUtils;
import jakarta.inject.Inject;
import java.io.IOException;
import java.time.Instant;
import java.util.Optional;
import java.util.function.Predicate;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/**
* Class for synchronizing all {@link Registrar} objects to a Google Spreadsheet.
@@ -63,7 +63,7 @@ class SyncRegistrarsSheet {
boolean wereRegistrarsModified() {
Optional<Cursor> cursor =
tm().transact(() -> tm().loadByKeyIfPresent(Cursor.createGlobalVKey(SYNC_REGISTRAR_SHEET)));
DateTime lastUpdateTime = cursor.isEmpty() ? START_OF_TIME : cursor.get().getCursorTime();
Instant lastUpdateTime = cursor.isEmpty() ? START_INSTANT : cursor.get().getCursorTimeInstant();
for (Registrar registrar : Registrar.loadAllCached()) {
if (DateTimeUtils.isAtOrAfter(registrar.getLastUpdateTime(), lastUpdateTime)) {
return true;
@@ -74,7 +74,7 @@ class SyncRegistrarsSheet {
/** Performs the synchronization operation. */
void run(String spreadsheetId) throws IOException {
final DateTime executionTime = clock.nowUtc();
Instant executionTime = clock.now();
sheetSynchronizer.synchronize(
spreadsheetId,
new Ordering<Registrar>() {
@@ -35,7 +35,6 @@ import static google.registry.monitoring.whitebox.CheckApiMetric.Tier.STANDARD;
import static google.registry.persistence.PersistenceModule.TransactionIsolationLevel.TRANSACTION_REPEATABLE_READ;
import static google.registry.persistence.transaction.TransactionManagerFactory.replicaTm;
import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DomainNameUtils.canonicalizeHostname;
import static org.json.simple.JSONValue.toJSONString;
@@ -61,9 +60,9 @@ import google.registry.request.Response;
import google.registry.request.auth.Auth;
import jakarta.inject.Inject;
import jakarta.servlet.http.HttpServletRequest;
import java.time.Instant;
import java.util.Map;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An action that returns availability and premium checks as JSON.
@@ -131,7 +130,7 @@ public class CheckApiAction implements Runnable {
// Throws an EppException with a reasonable error message which will be sent back to caller.
validateDomainNameWithIdnTables(domainName);
DateTime now = replicaTm().getTransactionTime();
Instant now = replicaTm().getTxTime();
Tld tld = Tld.get(domainName.parent().toString());
try {
verifyNotInPredelegation(tld, now);
@@ -166,7 +165,7 @@ public class CheckApiAction implements Runnable {
metricBuilder.status(SUCCESS).availability(availability);
responseBuilder.put("status", "success").put("available", availability.equals(AVAILABLE));
boolean isPremium = isDomainPremium(domainString, toInstant(now));
boolean isPremium = isDomainPremium(domainString, now);
metricBuilder.tier(isPremium ? PREMIUM : STANDARD);
responseBuilder.put("tier", isPremium ? "premium" : "standard");
if (!AVAILABLE.equals(availability)) {
@@ -183,7 +182,7 @@ public class CheckApiAction implements Runnable {
}
}
private boolean checkExists(String domainString, DateTime now) {
private boolean checkExists(String domainString, Instant now) {
return ForeignKeyUtils.loadKeyByCache(Domain.class, domainString, now).isPresent();
}
@@ -16,7 +16,6 @@ package google.registry.flows;
import static com.google.common.collect.Sets.intersection;
import static google.registry.model.EppResourceUtils.isLinked;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
@@ -50,7 +49,6 @@ import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import org.joda.time.DateTime;
/** Static utility functions for resource flows. */
public final class ResourceFlowUtils {
@@ -66,8 +64,7 @@ public final class ResourceFlowUtils {
}
/** Check if there are domains linked to the host to be deleted. Throws an exception if so. */
public static void checkLinkedDomains(final String targetId, final DateTime now)
throws EppException {
public static void checkLinkedDomains(final String targetId, Instant now) throws EppException {
VKey<Host> key =
ForeignKeyUtils.loadKey(Host.class, targetId, now)
.orElseThrow(() -> new ResourceDoesNotExistException(Host.class, targetId));
@@ -89,11 +86,6 @@ public final class ResourceFlowUtils {
}
}
public static <R extends EppResource & ForeignKeyedEppResource> R loadAndVerifyExistence(
Class<R> clazz, String targetId, DateTime now) throws ResourceDoesNotExistException {
return loadAndVerifyExistence(clazz, targetId, toInstant(now));
}
public static <R extends EppResource & ForeignKeyedEppResource> R loadAndVerifyExistence(
Class<R> clazz, String targetId, Instant now) throws ResourceDoesNotExistException {
return verifyExistence(clazz, targetId, ForeignKeyUtils.loadResource(clazz, targetId, now));
@@ -105,7 +97,7 @@ public final class ResourceFlowUtils {
}
public static <R extends EppResource> void verifyResourceDoesNotExist(
Class<R> clazz, String targetId, DateTime now, String registrarId) throws EppException {
Class<R> clazz, String targetId, Instant now, String registrarId) throws EppException {
Optional<R> resource = ForeignKeyUtils.loadResource(clazz, targetId, now);
if (resource.isPresent()) {
// These are similar exceptions, but we can track them internally as log-based metrics.
@@ -25,7 +25,7 @@ import google.registry.flows.domain.DomainCheckFlow;
import google.registry.model.eppinput.EppInput;
import google.registry.model.eppoutput.CheckData.DomainCheck;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import org.joda.time.DateTime;
import java.time.Instant;
/**
* A no-op base class for {@link DomainCheckFlow} custom logic.
@@ -75,7 +75,7 @@ public class DomainCheckFlowCustomLogic extends BaseFlowCustomLogic {
* but can be overridden in v&gt;=0.12 of the fee extension.
*/
public record AfterValidationParameters(
ImmutableMap<String, InternetDomainName> domainNames, DateTime asOfDate) {
ImmutableMap<String, InternetDomainName> domainNames, Instant asOfDate) {
public static Builder newBuilder() {
return new AutoBuilder_DomainCheckFlowCustomLogic_AfterValidationParameters_Builder();
@@ -87,7 +87,7 @@ public class DomainCheckFlowCustomLogic extends BaseFlowCustomLogic {
Builder setDomainNames(ImmutableMap<String, InternetDomainName> domainNames);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
AfterValidationParameters build();
}
@@ -102,7 +102,7 @@ public class DomainCheckFlowCustomLogic extends BaseFlowCustomLogic {
public record BeforeResponseParameters(
ImmutableList<DomainCheck> domainChecks,
ImmutableList<? extends ResponseExtension> responseExtensions,
DateTime asOfDate) {
Instant asOfDate) {
public static Builder newBuilder() {
return new AutoBuilder_DomainCheckFlowCustomLogic_BeforeResponseParameters_Builder();
@@ -116,7 +116,7 @@ public class DomainCheckFlowCustomLogic extends BaseFlowCustomLogic {
Builder setResponseExtensions(ImmutableList<? extends ResponseExtension> responseExtensions);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
BeforeResponseParameters build();
}
@@ -23,8 +23,8 @@ import google.registry.flows.domain.DomainPricingLogic;
import google.registry.flows.domain.FeesAndCredits;
import google.registry.model.eppinput.EppInput;
import google.registry.model.tld.Tld;
import java.time.Instant;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/**
* A no-op base class to customize {@link DomainPricingLogic}.
@@ -79,7 +79,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
FeesAndCredits feesAndCredits,
Tld tld,
InternetDomainName domainName,
DateTime asOfDate,
Instant asOfDate,
int years) {
public static Builder newBuilder() {
@@ -96,7 +96,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
Builder setDomainName(InternetDomainName domainName);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
Builder setYears(int years);
@@ -109,7 +109,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
FeesAndCredits feesAndCredits,
Tld tld,
InternetDomainName domainName,
DateTime asOfDate,
Instant asOfDate,
int years) {
public static Builder newBuilder() {
@@ -126,7 +126,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
Builder setDomainName(InternetDomainName domainName);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
Builder setYears(int years);
@@ -136,7 +136,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
/** A record to encapsulate parameters for a call to {@link #customizeRestorePrice} . */
public record RestorePriceParameters(
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, DateTime asOfDate) {
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, Instant asOfDate) {
public static Builder newBuilder() {
return new AutoBuilder_DomainPricingCustomLogic_RestorePriceParameters_Builder();
@@ -152,7 +152,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
Builder setDomainName(InternetDomainName domainName);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
RestorePriceParameters build();
}
@@ -160,7 +160,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
/** A record to encapsulate parameters for a call to {@link #customizeTransferPrice} . */
public record TransferPriceParameters(
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, DateTime asOfDate) {
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, Instant asOfDate) {
public static Builder newBuilder() {
return new AutoBuilder_DomainPricingCustomLogic_TransferPriceParameters_Builder();
@@ -176,7 +176,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
Builder setDomainName(InternetDomainName domainName);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
TransferPriceParameters build();
}
@@ -184,7 +184,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
/** A record to encapsulate parameters for a call to {@link #customizeUpdatePrice} . */
public record UpdatePriceParameters(
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, DateTime asOfDate) {
FeesAndCredits feesAndCredits, Tld tld, InternetDomainName domainName, Instant asOfDate) {
public static Builder newBuilder() {
return new AutoBuilder_DomainPricingCustomLogic_UpdatePriceParameters_Builder();
@@ -200,7 +200,7 @@ public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
Builder setDomainName(InternetDomainName domainName);
Builder setAsOfDate(DateTime asOfDate);
Builder setAsOfDate(Instant asOfDate);
UpdatePriceParameters build();
}
@@ -25,7 +25,7 @@ import google.registry.model.eppinput.EppInput;
import google.registry.model.eppoutput.EppResponse.ResponseData;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import google.registry.model.reporting.HistoryEntry;
import org.joda.time.DateTime;
import java.time.Instant;
/**
* A no-op base class for {@link DomainRenewFlow} custom logic.
@@ -80,7 +80,7 @@ public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
}
/** A class to encapsulate parameters for a call to {@link #afterValidation}. */
public record AfterValidationParameters(Domain existingDomain, int years, DateTime now) {
public record AfterValidationParameters(Domain existingDomain, int years, Instant now) {
public static Builder newBuilder() {
return new AutoBuilder_DomainRenewFlowCustomLogic_AfterValidationParameters_Builder();
@@ -94,7 +94,7 @@ public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
Builder setYears(int years);
Builder setNow(DateTime now);
Builder setNow(Instant now);
AfterValidationParameters build();
}
@@ -113,7 +113,7 @@ public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
HistoryEntry historyEntry,
EntityChanges entityChanges,
int years,
DateTime now) {
Instant now) {
public static Builder newBuilder() {
return new AutoBuilder_DomainRenewFlowCustomLogic_BeforeSaveParameters_Builder();
@@ -133,7 +133,7 @@ public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
Builder setYears(int years);
Builder setNow(DateTime now);
Builder setNow(Instant now);
BeforeSaveParameters build();
}
@@ -82,6 +82,7 @@ import google.registry.model.tld.label.ReservationType;
import google.registry.persistence.VKey;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
@@ -89,7 +90,6 @@ import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/**
* An EPP flow that checks whether a domain can be provisioned.
@@ -156,7 +156,7 @@ public final class DomainCheckFlow implements TransactionalFlow {
extensionManager.validate();
ImmutableList<String> domainNames = ((Check) resourceCommand).getTargetIds();
verifyTargetIdCount(domainNames, maxChecks);
DateTime now = clock.nowUtc();
Instant now = clock.now();
ImmutableMap.Builder<String, InternetDomainName> parsedDomainsBuilder =
new ImmutableMap.Builder<>();
// Only check that the registrar has access to a TLD the first time it is encountered
@@ -225,7 +225,7 @@ public final class DomainCheckFlow implements TransactionalFlow {
ImmutableSet<InternetDomainName> bsaBlockedDomainNames,
ImmutableMap<String, TldState> tldStates,
ImmutableMap<String, InternetDomainName> parsedDomains,
DateTime now)
Instant now)
throws EppException {
InternetDomainName idn = parsedDomains.get(domainName);
Optional<AllocationToken> token;
@@ -286,7 +286,7 @@ public final class DomainCheckFlow implements TransactionalFlow {
ImmutableMap<String, InternetDomainName> domainNames,
ImmutableMap<String, VKey<Domain>> existingDomains,
ImmutableSet<String> availableDomains,
DateTime now)
Instant now)
throws EppException {
Optional<FeeCheckCommandExtension> feeCheckOpt =
eppInput.getSingleExtension(FeeCheckCommandExtension.class);
@@ -480,7 +480,7 @@ public final class DomainCheckFlow implements TransactionalFlow {
}
static ImmutableSet<InternetDomainName> getBsaBlockedDomains(
ImmutableCollection<InternetDomainName> parsedDomains, DateTime now) {
ImmutableCollection<InternetDomainName> parsedDomains, Instant now) {
Map<String, ImmutableList<InternetDomainName>> labelToDomainNames =
parsedDomains.stream()
.filter(
@@ -49,10 +49,10 @@ import google.registry.model.tld.Tld;
import google.registry.model.tmch.ClaimsListDao;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import org.joda.time.DateTime;
/**
* An EPP flow that checks whether domain labels are trademarked.
@@ -103,7 +103,7 @@ public final class DomainClaimsCheckFlow implements TransactionalFlow {
checkAllowedAccessToTld(registrarId, tldStr);
checkHasBillingAccount(registrarId, tldStr);
Tld tld = Tld.get(tldStr);
DateTime now = clock.nowUtc();
Instant now = clock.now();
verifyNotInPredelegation(tld, now);
verifyClaimsPeriodNotEnded(tld, now);
}
@@ -121,6 +121,7 @@ import google.registry.model.tmch.ClaimsList;
import google.registry.model.tmch.ClaimsListDao;
import google.registry.tmch.LordnTaskUtils.LordnPhase;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
import org.joda.time.Duration;
@@ -236,7 +237,7 @@ public final class DomainCreateFlow implements MutatingFlow {
verifyRegistrarIsActive(registrarId);
extensionManager.validate();
verifyDomainDoesNotExist();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
DomainCommand.Create command = cloneAndLinkReferences((Create) resourceCommand, now);
Period period = command.getPeriod();
verifyUnitIsYears(period);
@@ -314,7 +315,7 @@ public final class DomainCreateFlow implements MutatingFlow {
// at this point so that we can verify it before the "after validation" extension point.
signedMarkId =
tmchUtils
.verifySignedMarks(launchCreate.get().getSignedMarks(), domainLabel, toInstant(now))
.verifySignedMarks(launchCreate.get().getSignedMarks(), domainLabel, now)
.getId();
}
verifyNotBlockedByBsa(domainName, tld, now, allocationToken);
@@ -328,11 +329,11 @@ public final class DomainCreateFlow implements MutatingFlow {
eppInput.getSingleExtension(FeeCreateCommandExtension.class);
FeesAndCredits feesAndCredits =
pricingLogic.getCreatePrice(
tld, targetId, toInstant(now), years, isAnchorTenant, isSunriseCreate, allocationToken);
tld, targetId, now, years, isAnchorTenant, isSunriseCreate, allocationToken);
validateFeeChallenge(feeCreate, feesAndCredits, defaultTokenUsed);
Optional<SecDnsCreateExtension> secDnsCreate =
validateSecDnsExtension(eppInput.getSingleExtension(SecDnsCreateExtension.class));
DateTime registrationExpirationTime = plusYears(now, years);
Instant registrationExpirationTime = plusYears(now, years);
String repoId = createDomainRepoId(tm().allocateId(), tld.getTldStr());
long historyRevisionId = tm().allocateId();
HistoryEntryId domainHistoryId = new HistoryEntryId(repoId, historyRevisionId);
@@ -435,21 +436,13 @@ public final class DomainCreateFlow implements MutatingFlow {
FeesAndCredits responseFeesAndCredits =
shouldShowDefaultPrice
? pricingLogic.getCreatePrice(
tld,
targetId,
toInstant(now),
years,
isAnchorTenant,
isSunriseCreate,
Optional.empty())
tld, targetId, now, years, isAnchorTenant, isSunriseCreate, Optional.empty())
: feesAndCredits;
BeforeResponseReturnData responseData =
flowCustomLogic.beforeResponse(
BeforeResponseParameters.newBuilder()
.setResData(
DomainCreateData.create(
targetId, toInstant(now), toInstant(registrationExpirationTime)))
.setResData(DomainCreateData.create(targetId, now, registrationExpirationTime))
.setResponseExtensions(createResponseExtensions(feeCreate, responseFeesAndCredits))
.build());
return responseBuilder
@@ -501,7 +494,7 @@ public final class DomainCreateFlow implements MutatingFlow {
private void verifyIsGaOrSpecialCase(
Tld tld,
ClaimsList claimsList,
DateTime now,
Instant now,
String domainLabel,
Optional<AllocationToken> allocationToken,
boolean isAnchorTenant,
@@ -565,14 +558,14 @@ public final class DomainCreateFlow implements MutatingFlow {
}
private DomainHistory buildDomainHistory(
Domain domain, Tld tld, DateTime now, Period period, Duration addGracePeriod) {
Domain domain, Tld tld, Instant now, Period period, Duration addGracePeriod) {
// We ignore prober transactions
if (tld.getTldType() == TldType.REAL) {
historyBuilder.setDomainTransactionRecords(
ImmutableSet.of(
DomainTransactionRecord.create(
tld.getTldStr(),
toInstant(now.plus(addGracePeriod)),
now.plusMillis(addGracePeriod.getMillis()),
TransactionReportField.netAddsFieldFromYears(period.getValue()),
1)));
}
@@ -588,7 +581,7 @@ public final class DomainCreateFlow implements MutatingFlow {
FeesAndCredits feesAndCredits,
HistoryEntryId domainHistoryId,
Optional<AllocationToken> allocationToken,
DateTime now) {
Instant now) {
ImmutableSet.Builder<Flag> flagsBuilder = new ImmutableSet.Builder<>();
// Sunrise and anchor tenancy are orthogonal tags and thus both can be present together.
if (isSunriseCreate) {
@@ -607,14 +600,14 @@ public final class DomainCreateFlow implements MutatingFlow {
.setRegistrarId(registrarId)
.setPeriodYears(years)
.setCost(feesAndCredits.getCreateCost())
.setEventTime(toInstant(now))
.setEventTime(now)
.setAllocationToken(allocationToken.map(AllocationToken::createVKey).orElse(null))
.setBillingTime(
toInstant(
now.plus(
isAnchorTenant
now.plusMillis(
(isAnchorTenant
? tld.getAnchorTenantAddGracePeriodLength()
: tld.getAddGracePeriodLength())))
: tld.getAddGracePeriodLength())
.getMillis()))
.setFlags(flagsBuilder.build())
.setDomainHistoryId(domainHistoryId)
.build();
@@ -622,7 +615,7 @@ public final class DomainCreateFlow implements MutatingFlow {
private BillingRecurrence createAutorenewBillingEvent(
HistoryEntryId domainHistoryId,
DateTime registrationExpirationTime,
Instant registrationExpirationTime,
boolean isAnchorTenant,
Optional<AllocationToken> allocationToken) {
// Non-standard renewal behaviors can occur for anchor tenants (always NONPREMIUM pricing) or if
@@ -639,7 +632,7 @@ public final class DomainCreateFlow implements MutatingFlow {
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(targetId)
.setRegistrarId(registrarId)
.setEventTime(toInstant(registrationExpirationTime))
.setEventTime(registrationExpirationTime)
.setRecurrenceEndTime(END_INSTANT)
.setDomainHistoryId(domainHistoryId)
.setRenewalPriceBehavior(renewalPriceBehavior)
@@ -648,11 +641,11 @@ public final class DomainCreateFlow implements MutatingFlow {
}
private Autorenew createAutorenewPollMessage(
HistoryEntryId domainHistoryId, DateTime registrationExpirationTime) {
HistoryEntryId domainHistoryId, Instant registrationExpirationTime) {
return new PollMessage.Autorenew.Builder()
.setTargetId(targetId)
.setRegistrarId(registrarId)
.setEventTime(toInstant(registrationExpirationTime))
.setEventTime(registrationExpirationTime)
.setMsg("Domain was auto-renewed.")
.setDomainHistoryId(domainHistoryId)
.build();
@@ -662,7 +655,7 @@ public final class DomainCreateFlow implements MutatingFlow {
Optional<DateTime> previousDeletionTime =
domainDeletionTimeCache.getDeletionTimeForDomain(targetId);
if (previousDeletionTime.isPresent()
&& !tm().getTransactionTime().isAfter(previousDeletionTime.get())) {
&& !tm().getTxTime().isAfter(toInstant(previousDeletionTime.get()))) {
throw new ResourceCreateContentionException(targetId);
}
}
@@ -683,10 +676,10 @@ public final class DomainCreateFlow implements MutatingFlow {
}
private static PollMessage.OneTime createNameCollisionOneTimePollMessage(
String domainName, HistoryEntry historyEntry, String registrarId, DateTime now) {
String domainName, HistoryEntry historyEntry, String registrarId, Instant now) {
return new PollMessage.OneTime.Builder()
.setRegistrarId(registrarId)
.setEventTime(toInstant(now))
.setEventTime(now)
.setMsg(COLLISION_MESSAGE) // Remind the registrar of the name collision policy.
.setResponseData(
ImmutableList.of(
@@ -100,6 +100,8 @@ import google.registry.model.tld.Tld;
import google.registry.model.tld.Tld.TldType;
import google.registry.model.transfer.TransferStatus;
import jakarta.inject.Inject;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.Collections;
import java.util.Optional;
import java.util.Set;
@@ -147,7 +149,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
flowCustomLogic.beforeValidation();
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
// Loads the target resource if it exists
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
Tld tld = Tld.get(existingDomain.getTld());
@@ -163,7 +165,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
} else {
builder = existingDomain.asBuilder();
}
builder.setLastEppUpdateTime(toInstant(now)).setLastEppUpdateRegistrarId(registrarId);
builder.setLastEppUpdateTime(now).setLastEppUpdateRegistrarId(registrarId);
Duration redemptionGracePeriodLength = tld.getRedemptionGracePeriodLength();
Duration pendingDeleteLength = tld.getPendingDeleteLength();
Optional<DomainDeleteSuperuserExtension> domainDeleteSuperuserExtension =
@@ -186,15 +188,17 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
: redemptionGracePeriodLength.plus(pendingDeleteLength);
HistoryEntryId domainHistoryId = createHistoryEntryId(existingDomain);
historyBuilder.setRevisionId(domainHistoryId.getRevisionId());
DateTime deletionTime = now.plus(durationUntilDelete);
Instant deletionTime = now.plusMillis(durationUntilDelete.getMillis());
if (durationUntilDelete.equals(Duration.ZERO)) {
builder.setDeletionTime(toInstant(now)).setStatusValues(null);
builder.setDeletionTime(now).setStatusValues(null);
} else {
DateTime redemptionTime = now.plus(redemptionGracePeriodLength);
Instant redemptionTime = now.plusMillis(redemptionGracePeriodLength.getMillis());
asyncTaskEnqueuer.enqueueAsyncResave(
existingDomain.createVKey(), now, ImmutableSortedSet.of(redemptionTime, deletionTime));
existingDomain.createVKey(),
toDateTime(now),
ImmutableSortedSet.of(toDateTime(redemptionTime), toDateTime(deletionTime)));
builder
.setDeletionTime(toInstant(deletionTime))
.setDeletionTime(deletionTime)
.setStatusValues(ImmutableSet.of(StatusValue.PENDING_DELETE))
// Clear out all old grace periods and add REDEMPTION, which does not include a key to a
// billing event because there isn't one for a domain delete.
@@ -203,7 +207,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
GracePeriod.createWithoutBillingEvent(
GracePeriodStatus.REDEMPTION,
existingDomain.getRepoId(),
toInstant(redemptionTime),
redemptionTime,
registrarId)));
// Note: The expiration time is unchanged, so if it's before the new deletion time, there will
// be a "phantom autorenew" where the expiration time advances. No poll message will be
@@ -238,22 +242,25 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
}
// Cancel any grace periods that were still active, and set the expiration time accordingly.
DateTime newExpirationTime = existingDomain.getRegistrationExpirationDateTime();
Instant newExpirationTime = existingDomain.getRegistrationExpirationTime();
for (GracePeriod gracePeriod : existingDomain.getGracePeriods()) {
// No cancellation is written if the grace period was not for a billable event.
if (gracePeriod.hasBillingEvent()) {
entitiesToInsert.add(
BillingCancellation.forGracePeriod(
gracePeriod, toInstant(now), domainHistoryId, targetId));
BillingCancellation.forGracePeriod(gracePeriod, now, domainHistoryId, targetId));
if (gracePeriod.getBillingEvent() != null) {
// Take the amount of registration time being refunded off the expiration time.
// This can be either add grace periods or renew grace periods.
BillingEvent billingEvent = tm().loadByKey(gracePeriod.getBillingEvent());
newExpirationTime = newExpirationTime.minusYears(billingEvent.getPeriodYears());
newExpirationTime =
newExpirationTime
.atZone(ZoneOffset.UTC)
.minusYears(billingEvent.getPeriodYears())
.toInstant();
} else if (gracePeriod.getBillingRecurrence() != null) {
// Take 1 year off the registration if in the autorenew grace period (no need to load the
// recurrence billing event; all autorenews are for 1 year).
newExpirationTime = newExpirationTime.minusYears(1);
newExpirationTime = newExpirationTime.atZone(ZoneOffset.UTC).minusYears(1).toInstant();
}
}
}
@@ -292,7 +299,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
flowCustomLogic.beforeResponse(
BeforeResponseParameters.newBuilder()
.setResultCode(
newDomain.getDeletionTime().isAfter(toInstant(now))
newDomain.getDeletionTime().isAfter(now)
? SUCCESS_WITH_ACTION_PENDING
: SUCCESS)
.setResponseExtensions(
@@ -305,7 +312,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
.build();
}
private void verifyDeleteAllowed(Domain existingDomain, Tld tld, DateTime now)
private void verifyDeleteAllowed(Domain existingDomain, Tld tld, Instant now)
throws EppException {
verifyOptionalAuthInfo(authInfo, existingDomain);
verifyNoDisallowedStatuses(existingDomain, ImmutableSet.of(StatusValue.PENDING_DELETE));
@@ -321,11 +328,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
}
private DomainHistory buildDomainHistory(
Domain domain,
Tld tld,
DateTime now,
Duration durationUntilDelete,
boolean inAddGracePeriod) {
Domain domain, Tld tld, Instant now, Duration durationUntilDelete, boolean inAddGracePeriod) {
// We ignore prober transactions
if (tld.getTldType() == TldType.REAL) {
Duration maxGracePeriod =
@@ -345,7 +348,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
cancelledRecords,
DomainTransactionRecord.create(
domain.getTld(),
toInstant(now.plus(durationUntilDelete)),
now.plusMillis(durationUntilDelete.getMillis()),
inAddGracePeriod
? TransactionReportField.DELETED_DOMAINS_GRACE
: TransactionReportField.DELETED_DOMAINS_NOGRACE,
@@ -355,7 +358,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
}
private PollMessage.OneTime createDeletePollMessage(
Domain existingDomain, HistoryEntryId domainHistoryId, DateTime deletionTime) {
Domain existingDomain, HistoryEntryId domainHistoryId, Instant deletionTime) {
Optional<MetadataExtension> metadataExtension =
eppInput.getSingleExtension(MetadataExtension.class);
boolean hasMetadataMessage =
@@ -379,10 +382,10 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
}
private PollMessage.OneTime createImmediateDeletePollMessage(
Domain existingDomain, HistoryEntryId domainHistoryId, DateTime now, DateTime deletionTime) {
Domain existingDomain, HistoryEntryId domainHistoryId, Instant now, Instant deletionTime) {
return new PollMessage.OneTime.Builder()
.setRegistrarId(existingDomain.getPersistedCurrentSponsorRegistrarId())
.setEventTime(toInstant(now))
.setEventTime(now)
.setDomainHistoryId(domainHistoryId)
.setMsg(
String.format(
@@ -397,7 +400,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
@Nullable
private ImmutableList<FeeTransformResponseExtension> getResponseExtensions(
BillingRecurrence billingRecurrence, Domain existingDomain, DateTime now) {
BillingRecurrence billingRecurrence, Domain existingDomain, Instant now) {
FeeTransformResponseExtension.Builder feeResponseBuilder = getDeleteResponseBuilder();
if (feeResponseBuilder == null) {
return ImmutableList.of();
@@ -419,14 +422,11 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
}
private Money getGracePeriodCost(
BillingRecurrence billingRecurrence, GracePeriod gracePeriod, DateTime now) {
BillingRecurrence billingRecurrence, GracePeriod gracePeriod, Instant now) {
if (gracePeriod.getType() == GracePeriodStatus.AUTO_RENEW) {
// If we updated the autorenew billing event, reuse it.
DateTime autoRenewTime =
toDateTime(
billingRecurrence
.getRecurrenceTimeOfYear()
.getLastInstanceBeforeOrAt(toInstant(now)));
toDateTime(billingRecurrence.getRecurrenceTimeOfYear().getLastInstanceBeforeOrAt(now));
return getDomainRenewCost(targetId, toInstant(autoRenewTime), 1);
}
return tm().loadByKey(checkNotNull(gracePeriod.getBillingEvent())).getCost();
@@ -42,8 +42,7 @@ import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
import static google.registry.util.CollectionUtils.nullToEmpty;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.isAtOrAfter;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DateTimeUtils.minusDays;
import static google.registry.util.DomainNameUtils.ACE_PREFIX;
import static java.util.stream.Collectors.joining;
@@ -125,6 +124,7 @@ import google.registry.tools.DigestType;
import google.registry.util.Idn;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.Comparator;
import java.util.List;
import java.util.Map.Entry;
@@ -133,7 +133,6 @@ import java.util.Set;
import javax.annotation.Nullable;
import org.joda.money.CurrencyUnit;
import org.joda.money.Money;
import org.joda.time.DateTime;
import org.joda.time.Duration;
import org.xbill.DNS.DNSSEC.Algorithm;
@@ -253,7 +252,7 @@ public class DomainFlowUtils {
public static void verifyNotBlockedByBsa(
InternetDomainName domainName,
Tld tld,
DateTime now,
Instant now,
Optional<AllocationToken> allocationToken)
throws DomainLabelBlockedByBsaException {
if (!isRegisterBsaCreate(domainName, allocationToken)
@@ -262,7 +261,7 @@ public class DomainFlowUtils {
}
}
public static boolean isBlockedByBsa(String domainLabel, Tld tld, DateTime now) {
public static boolean isBlockedByBsa(String domainLabel, Tld tld, Instant now) {
return isEnrolledWithBsa(tld, now) && isLabelBlocked(domainLabel);
}
@@ -458,7 +457,7 @@ public class DomainFlowUtils {
/** Verifies that a launch extension's specified phase matches the specified tld's phase. */
static void verifyLaunchPhaseMatchesRegistryPhase(
Tld tld, LaunchExtension launchExtension, DateTime now) throws EppException {
Tld tld, LaunchExtension launchExtension, Instant now) throws EppException {
if (!LAUNCH_PHASE_TO_TLD_STATES.containsKey(launchExtension.getPhase())
|| !LAUNCH_PHASE_TO_TLD_STATES
.get(launchExtension.getPhase())
@@ -474,8 +473,8 @@ public class DomainFlowUtils {
* this registrar.
*/
static void verifyPremiumNameIsNotBlocked(
String domainName, DateTime priceTime, String registrarId) throws EppException {
if (isDomainPremium(domainName, toInstant(priceTime))) {
String domainName, Instant priceTime, String registrarId) throws EppException {
if (isDomainPremium(domainName, priceTime)) {
if (Registrar.loadByRegistrarIdCached(registrarId).get().getBlockPremiumNames()) {
throw new PremiumNameBlockedException();
}
@@ -486,7 +485,7 @@ public class DomainFlowUtils {
* Helper to call {@link CreateOrUpdate#cloneAndLinkReferences} and convert exceptions to
* EppExceptions, since this is needed in several places.
*/
static <T extends CreateOrUpdate<T>> T cloneAndLinkReferences(T command, DateTime now)
static <T extends CreateOrUpdate<T>> T cloneAndLinkReferences(T command, Instant now)
throws EppException {
try {
return command.cloneAndLinkReferences(now);
@@ -532,7 +531,7 @@ public class DomainFlowUtils {
public static BillingRecurrence updateAutorenewRecurrenceEndTime(
Domain domain,
BillingRecurrence existingBillingRecurrence,
DateTime newEndTime,
Instant newEndTime,
@Nullable HistoryEntryId historyId) {
Optional<Autorenew> autorenewPollMessage =
tm().loadByKeyIfPresent(domain.getAutorenewPollMessage());
@@ -560,14 +559,14 @@ public class DomainFlowUtils {
// If the resultant autorenew poll message would have no poll messages to deliver, then just
// delete it. Otherwise, save it with the new end time.
if (isAtOrAfter(updatedAutorenewPollMessage.getEventTime(), toInstant(newEndTime))) {
if (isAtOrAfter(updatedAutorenewPollMessage.getEventTime(), newEndTime)) {
autorenewPollMessage.ifPresent(autorenew -> tm().delete(autorenew));
} else {
tm().put(updatedAutorenewPollMessage);
}
BillingRecurrence newBillingRecurrence =
existingBillingRecurrence.asBuilder().setRecurrenceEndTime(toInstant(newEndTime)).build();
existingBillingRecurrence.asBuilder().setRecurrenceEndTime(newEndTime).build();
tm().update(newBillingRecurrence);
return newBillingRecurrence;
}
@@ -582,13 +581,13 @@ public class DomainFlowUtils {
InternetDomainName domainName,
Optional<Domain> domain,
@Nullable CurrencyUnit topLevelCurrency,
DateTime currentDate,
Instant currentDate,
DomainPricingLogic pricingLogic,
Optional<AllocationToken> allocationToken,
boolean isAvailable,
@Nullable BillingRecurrence billingRecurrence)
throws EppException {
Instant now = toInstant(currentDate);
Instant now = currentDate;
// Use the custom effective date specified in the fee check request, if there is one.
if (feeRequest.getEffectiveDate().isPresent()) {
now = feeRequest.getEffectiveDate().get();
@@ -847,9 +846,12 @@ public class DomainFlowUtils {
*
* @throws ExceedsMaxRegistrationYearsException if the new registration period is too long
*/
public static void validateRegistrationPeriod(DateTime now, DateTime newExpirationTime)
public static void validateRegistrationPeriod(Instant now, Instant newExpirationTime)
throws EppException {
if (plusYears(now, MAX_REGISTRATION_YEARS).isBefore(newExpirationTime)) {
if (now.atZone(ZoneOffset.UTC)
.plusYears(MAX_REGISTRATION_YEARS)
.toInstant()
.isBefore(newExpirationTime)) {
throw new ExceedsMaxRegistrationYearsException();
}
}
@@ -935,7 +937,7 @@ public class DomainFlowUtils {
}
/** Check that the registry phase is not predelegation, during which some flows are forbidden. */
public static void verifyNotInPredelegation(Tld registry, DateTime now)
public static void verifyNotInPredelegation(Tld registry, Instant now)
throws BadCommandForRegistryPhaseException {
if (registry.getTldState(now) == PREDELEGATION) {
throw new BadCommandForRegistryPhaseException();
@@ -970,7 +972,7 @@ public class DomainFlowUtils {
/** Validate the notice from a launch create extension, allowing null as a valid notice. */
static void validateLaunchCreateNotice(
@Nullable LaunchNotice notice, String domainLabel, boolean isSuperuser, DateTime now)
@Nullable LaunchNotice notice, String domainLabel, boolean isSuperuser, Instant now)
throws EppException {
if (notice == null) {
return;
@@ -984,7 +986,7 @@ public class DomainFlowUtils {
throw new ExpiredClaimException();
}
// An acceptance within the past 48 hours is mandated by the TMCH Functional Spec.
if (notice.getAcceptedTime().isBefore(now.minusHours(48))) {
if (notice.getAcceptedTime().isBefore(minusDays(now, 2))) {
throw new AcceptedTooLongAgoException();
}
}
@@ -998,8 +1000,8 @@ public class DomainFlowUtils {
}
/** Check that the claims period hasn't ended. */
static void verifyClaimsPeriodNotEnded(Tld tld, DateTime now) throws ClaimsPeriodEndedException {
if (isAtOrAfter(now, tld.getClaimsPeriodEnd())) {
static void verifyClaimsPeriodNotEnded(Tld tld, Instant now) throws ClaimsPeriodEndedException {
if (!now.isBefore(tld.getClaimsPeriodEnd())) {
throw new ClaimsPeriodEndedException(tld.getTldStr());
}
}
@@ -1066,7 +1068,7 @@ public class DomainFlowUtils {
*/
public static ImmutableSet<DomainTransactionRecord> createCancelingRecords(
Domain domain,
final DateTime now,
Instant now,
Duration maxSearchPeriod,
final ImmutableSet<TransactionReportField> cancelableFields) {
@@ -1081,7 +1083,7 @@ public class DomainFlowUtils {
for (DomainTransactionRecord record :
historyEntry.getDomainTransactionRecords()) {
if (cancelableFields.contains(record.getReportField())
&& record.getReportingTime().isAfter(toInstant(now))) {
&& record.getReportingTime().isAfter(now)) {
return true;
}
}
@@ -1110,12 +1112,12 @@ public class DomainFlowUtils {
}
private static List<DomainHistory> findRecentHistoryEntries(
Domain domain, DateTime now, Duration maxSearchPeriod) {
Domain domain, Instant now, Duration maxSearchPeriod) {
return tm().query(
"FROM DomainHistory WHERE modificationTime >= :beginning AND repoId = "
+ ":repoId ORDER BY modificationTime ASC",
DomainHistory.class)
.setParameter("beginning", toInstant(now.minus(maxSearchPeriod)))
.setParameter("beginning", now.minusMillis(maxSearchPeriod.getMillis()))
.setParameter("repoId", domain.getRepoId())
.getResultList();
}
@@ -56,8 +56,8 @@ import google.registry.persistence.IsolationLevel;
import google.registry.persistence.PersistenceModule;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that returns information about a domain.
@@ -105,7 +105,7 @@ public final class DomainInfoFlow implements MutatingFlow {
flowCustomLogic.beforeValidation();
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = clock.nowUtc();
Instant now = clock.now();
Domain domain = loadAndVerifyExistence(Domain.class, targetId, now);
verifyOptionalAuthInfo(authInfo, domain);
flowCustomLogic.afterValidation(
@@ -124,7 +124,7 @@ public final class DomainInfoFlow implements MutatingFlow {
.setCreationTime(domain.getCreationTime())
.setLastEppUpdateTime(domain.getLastEppUpdateTime())
.setRegistrationExpirationTime(domain.getRegistrationExpirationTime())
.setLastTransferTime(domain.getLastTransferTimeInstant());
.setLastTransferTime(domain.getLastTransferTime());
// If authInfo is non-null, then the caller is authorized to see the full information since we
// will have already verified the authInfo is valid.
@@ -149,7 +149,7 @@ public final class DomainInfoFlow implements MutatingFlow {
.build();
}
private ImmutableList<ResponseExtension> getDomainResponseExtensions(Domain domain, DateTime now)
private ImmutableList<ResponseExtension> getDomainResponseExtensions(Domain domain, Instant now)
throws EppException {
ImmutableList.Builder<ResponseExtension> extensions = new ImmutableList.Builder<>();
addSecDnsExtensionIfPresent(extensions, domain.getDsData());
@@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.flows.domain.DomainFlowUtils.zeroInCurrency;
import static google.registry.flows.domain.token.AllocationTokenFlowUtils.discountTokenInvalidForPremiumName;
import static google.registry.pricing.PricingEngineProxy.getPricesForDomainName;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.PreconditionsUtils.checkArgumentPresent;
import com.google.common.net.InternetDomainName;
@@ -117,7 +116,7 @@ public final class DomainPricingLogic {
.setFeesAndCredits(feesBuilder.build())
.setTld(tld)
.setDomainName(InternetDomainName.from(domainName))
.setAsOfDate(toDateTime(dateTime))
.setAsOfDate(dateTime)
.setYears(years)
.build());
}
@@ -188,7 +187,7 @@ public final class DomainPricingLogic {
.build())
.setTld(tld)
.setDomainName(InternetDomainName.from(domainName))
.setAsOfDate(toDateTime(dateTime))
.setAsOfDate(dateTime)
.setYears(years)
.build());
}
@@ -212,7 +211,7 @@ public final class DomainPricingLogic {
.setFeesAndCredits(feesAndCredits.build())
.setTld(tld)
.setDomainName(InternetDomainName.from(domainName))
.setAsOfDate(toDateTime(dateTime))
.setAsOfDate(dateTime)
.build());
}
@@ -235,7 +234,7 @@ public final class DomainPricingLogic {
.build())
.setTld(tld)
.setDomainName(InternetDomainName.from(domainName))
.setAsOfDate(toDateTime(dateTime))
.setAsOfDate(dateTime)
.build());
}
@@ -253,7 +252,7 @@ public final class DomainPricingLogic {
.build())
.setTld(tld)
.setDomainName(InternetDomainName.from(domainName))
.setAsOfDate(toDateTime(dateTime))
.setAsOfDate(dateTime)
.build());
}
@@ -34,8 +34,7 @@ import static google.registry.flows.domain.token.AllocationTokenFlowUtils.maybeA
import static google.registry.flows.domain.token.AllocationTokenFlowUtils.verifyBulkTokenAllowedOnDomain;
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_RENEW;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DateTimeUtils.toDateTime;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -87,9 +86,10 @@ import google.registry.model.reporting.HistoryEntry.HistoryEntryId;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.model.tld.Tld;
import jakarta.inject.Inject;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.Optional;
import org.joda.money.Money;
import org.joda.time.DateTime;
import org.joda.time.Duration;
/**
@@ -164,7 +164,7 @@ public final class DomainRenewFlow implements MutatingFlow {
validateRegistrarIsLoggedIn(registrarId);
verifyRegistrarIsActive(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Renew command = (Renew) resourceCommand;
// Loads the target resource if it exists
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
@@ -191,8 +191,12 @@ public final class DomainRenewFlow implements MutatingFlow {
// If client passed an applicable static token this updates the domain
existingDomain = maybeApplyBulkPricingRemovalToken(existingDomain, allocationToken);
DateTime newExpirationTime =
plusYears(existingDomain.getRegistrationExpirationDateTime(), years); // Uncapped
Instant newExpirationTime =
existingDomain
.getRegistrationExpirationTime()
.atZone(ZoneOffset.UTC)
.plusYears(years)
.toInstant(); // Uncapped
validateRegistrationPeriod(now, newExpirationTime);
Optional<FeeRenewCommandExtension> feeRenew =
eppInput.getSingleExtension(FeeRenewCommandExtension.class);
@@ -202,7 +206,7 @@ public final class DomainRenewFlow implements MutatingFlow {
pricingLogic.getRenewPrice(
Tld.get(existingDomain.getTld()),
targetId,
toInstant(now),
now,
years,
existingBillingRecurrence,
allocationToken);
@@ -222,14 +226,14 @@ public final class DomainRenewFlow implements MutatingFlow {
// Create a new autorenew billing event and poll message starting at the new expiration time.
BillingRecurrence newAutorenewEvent =
newAutorenewBillingEvent(existingDomain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setRenewalPrice(existingBillingRecurrence.getRenewalPrice().orElse(null))
.setRenewalPriceBehavior(existingBillingRecurrence.getRenewalPriceBehavior())
.setDomainHistoryId(domainHistoryId)
.build();
PollMessage.Autorenew newAutorenewPollMessage =
newAutorenewPollMessage(existingDomain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setDomainHistoryId(domainHistoryId)
.build();
// End the old autorenew billing event and poll message now. This may delete the poll message.
@@ -238,7 +242,7 @@ public final class DomainRenewFlow implements MutatingFlow {
Domain newDomain =
existingDomain
.asBuilder()
.setLastEppUpdateTime(toInstant(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(registrarId)
.setRegistrationExpirationTime(newExpirationTime)
.setAutorenewBillingEvent(newAutorenewEvent.createVKey())
@@ -288,7 +292,7 @@ public final class DomainRenewFlow implements MutatingFlow {
}
private DomainHistory buildDomainHistory(
Domain newDomain, DateTime now, Period period, Duration renewGracePeriod) {
Domain newDomain, Instant now, Period period, Duration renewGracePeriod) {
Optional<MetadataExtension> metadataExtensionOpt =
eppInput.getSingleExtension(MetadataExtension.class);
if (metadataExtensionOpt.isPresent()) {
@@ -306,7 +310,7 @@ public final class DomainRenewFlow implements MutatingFlow {
ImmutableSet.of(
DomainTransactionRecord.create(
newDomain.getTld(),
toInstant(now.plus(renewGracePeriod)),
now.plusMillis(renewGracePeriod.getMillis()),
TransactionReportField.netRenewsFieldFromYears(period.getValue()),
1)))
.build();
@@ -331,7 +335,7 @@ public final class DomainRenewFlow implements MutatingFlow {
// If the date they specify doesn't match the expiration, fail. (This is an idempotence check).
if (!command
.getCurrentExpirationDate()
.equals(existingDomain.getRegistrationExpirationDateTime().toLocalDate())) {
.equals(toDateTime(existingDomain.getRegistrationExpirationTime()).toLocalDate())) {
throw new IncorrectCurrentExpirationDateException();
}
}
@@ -342,20 +346,20 @@ public final class DomainRenewFlow implements MutatingFlow {
int years,
HistoryEntryId domainHistoryId,
Optional<AllocationToken> allocationToken,
DateTime now) {
Instant now) {
return new BillingEvent.Builder()
.setReason(Reason.RENEW)
.setTargetId(targetId)
.setRegistrarId(registrarId)
.setPeriodYears(years)
.setCost(renewCost)
.setEventTime(toInstant(now))
.setEventTime(now)
.setAllocationToken(
allocationToken
.filter(t -> AllocationToken.TokenBehavior.DEFAULT.equals(t.getTokenBehavior()))
.map(AllocationToken::createVKey)
.orElse(null))
.setBillingTime(toInstant(now.plus(Tld.get(tld).getRenewGracePeriodLength())))
.setBillingTime(now.plusMillis(Tld.get(tld).getRenewGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build();
}
@@ -31,7 +31,6 @@ import static google.registry.flows.domain.DomainFlowUtils.verifyRegistrarIsActi
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_RESTORE;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -70,9 +69,10 @@ import google.registry.model.reporting.HistoryEntry.HistoryEntryId;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.model.tld.Tld;
import jakarta.inject.Inject;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.Optional;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* An EPP flow that requests that a domain in the redemption grace period be restored.
@@ -137,12 +137,11 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
verifyRegistrarIsActive(registrarId);
extensionManager.validate();
Update command = (Update) resourceCommand;
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
boolean isExpired = existingDomain.getRegistrationExpirationDateTime().isBefore(now);
boolean isExpired = existingDomain.getRegistrationExpirationTime().isBefore(now);
FeesAndCredits feesAndCredits =
pricingLogic.getRestorePrice(
Tld.get(existingDomain.getTld()), targetId, toInstant(now), isExpired);
pricingLogic.getRestorePrice(Tld.get(existingDomain.getTld()), targetId, now, isExpired);
Optional<FeeUpdateCommandExtension> feeUpdate =
eppInput.getSingleExtension(FeeUpdateCommandExtension.class);
verifyRestoreAllowed(command, existingDomain, feeUpdate, feesAndCredits, now);
@@ -150,8 +149,12 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
historyBuilder.setRevisionId(domainHistoryId.getRevisionId());
ImmutableSet.Builder<ImmutableObject> entitiesToInsert = new ImmutableSet.Builder<>();
DateTime newExpirationTime =
existingDomain.getRegistrationExpirationDateTime().plusYears(isExpired ? 1 : 0);
Instant newExpirationTime =
existingDomain
.getRegistrationExpirationTime()
.atZone(ZoneOffset.UTC)
.plusYears(isExpired ? 1 : 0)
.toInstant();
// Restore the expiration time on the deleted domain, except if that's already passed, then add
// a year and bill for it immediately, with no grace period.
if (isExpired) {
@@ -164,14 +167,14 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
BillingRecurrence autorenewEvent =
newAutorenewBillingEvent(existingDomain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setRecurrenceEndTime(END_INSTANT)
.setDomainHistoryId(domainHistoryId)
.build();
entitiesToInsert.add(autorenewEvent);
PollMessage.Autorenew autorenewPollMessage =
newAutorenewPollMessage(existingDomain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setAutorenewEndTime(END_INSTANT)
.setDomainHistoryId(domainHistoryId)
.build();
@@ -197,17 +200,14 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
.build();
}
private DomainHistory buildDomainHistory(Domain newDomain, DateTime now) {
private DomainHistory buildDomainHistory(Domain newDomain, Instant now) {
return historyBuilder
.setType(DOMAIN_RESTORE)
.setDomain(newDomain)
.setDomainTransactionRecords(
ImmutableSet.of(
DomainTransactionRecord.create(
newDomain.getTld(),
toInstant(now),
TransactionReportField.RESTORED_DOMAINS,
1)))
newDomain.getTld(), now, TransactionReportField.RESTORED_DOMAINS, 1)))
.build();
}
@@ -216,7 +216,7 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
Domain existingDomain,
Optional<FeeUpdateCommandExtension> feeUpdate,
FeesAndCredits feesAndCredits,
DateTime now)
Instant now)
throws EppException {
verifyOptionalAuthInfo(authInfo, existingDomain);
if (!isSuperuser) {
@@ -239,10 +239,10 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
private static Domain performRestore(
Domain existingDomain,
DateTime newExpirationTime,
Instant newExpirationTime,
BillingRecurrence autorenewEvent,
PollMessage.Autorenew autorenewPollMessage,
DateTime now,
Instant now,
String registrarId) {
return existingDomain
.asBuilder()
@@ -256,28 +256,28 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
// Clear the autorenew end time so if it had expired but is now explicitly being restored,
// it won't immediately be deleted again.
.setAutorenewEndTime(Optional.empty())
.setLastEppUpdateTime(toInstant(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(registrarId)
.build();
}
private BillingEvent createRenewBillingEvent(
HistoryEntryId domainHistoryId, Money renewCost, DateTime now) {
HistoryEntryId domainHistoryId, Money renewCost, Instant now) {
return prepareBillingEvent(domainHistoryId, renewCost, now).setReason(Reason.RENEW).build();
}
private BillingEvent createRestoreBillingEvent(
HistoryEntryId domainHistoryId, Money restoreCost, DateTime now) {
HistoryEntryId domainHistoryId, Money restoreCost, Instant now) {
return prepareBillingEvent(domainHistoryId, restoreCost, now).setReason(Reason.RESTORE).build();
}
private BillingEvent.Builder prepareBillingEvent(
HistoryEntryId domainHistoryId, Money cost, DateTime now) {
HistoryEntryId domainHistoryId, Money cost, Instant now) {
return new BillingEvent.Builder()
.setTargetId(targetId)
.setRegistrarId(registrarId)
.setEventTime(toInstant(now))
.setBillingTime(toInstant(now))
.setEventTime(now)
.setBillingTime(now)
.setPeriodYears(1)
.setCost(cost)
.setDomainHistoryId(domainHistoryId);
@@ -33,8 +33,6 @@ import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_TRANSFER_
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.CollectionUtils.union;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -70,9 +68,9 @@ import google.registry.model.tld.Tld;
import google.registry.model.transfer.DomainTransferData;
import google.registry.model.transfer.TransferStatus;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* An EPP flow that approves a pending transfer on a domain.
@@ -127,7 +125,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
extensionManager.register(MetadataExtension.class, AllocationTokenExtension.class);
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
AllocationTokenFlowUtils.loadAllocationTokenFromExtension(
registrarId, targetId, now, eppInput.getSingleExtension(AllocationTokenExtension.class));
@@ -169,9 +167,9 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
// billing event should not be passed in.
hasBulkToken ? null : existingBillingRecurrence)
.getRenewCost())
.setEventTime(toInstant(now))
.setEventTime(now)
.setBillingTime(
toInstant(now.plus(Tld.get(tldStr).getTransferGracePeriodLength())))
now.plusMillis(Tld.get(tldStr).getTransferGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build());
@@ -188,18 +186,15 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
// still needs to be charged for the auto-renew.
if (billingEvent.isPresent()) {
entitiesToInsert.add(
BillingCancellation.forGracePeriod(
autorenewGrace, toInstant(now), domainHistoryId, targetId));
BillingCancellation.forGracePeriod(autorenewGrace, now, domainHistoryId, targetId));
}
}
// Close the old autorenew event and poll message at the transfer time (aka now). This may end
// up deleting the poll message.
updateAutorenewRecurrenceEndTime(
existingDomain, existingBillingRecurrence, now, domainHistoryId);
DateTime newExpirationTime =
toDateTime(
computeExDateForApprovalTime(
existingDomain, toInstant(now), transferData.getTransferPeriod()));
Instant newExpirationTime =
computeExDateForApprovalTime(existingDomain, now, transferData.getTransferPeriod());
// Create a new autorenew event starting at the expiration time.
BillingRecurrence autorenewEvent =
new BillingRecurrence.Builder()
@@ -207,7 +202,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(targetId)
.setRegistrarId(gainingRegistrarId)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setRenewalPriceBehavior(
hasBulkToken
? RenewalPriceBehavior.DEFAULT
@@ -221,7 +216,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
new PollMessage.Autorenew.Builder()
.setTargetId(targetId)
.setRegistrarId(gainingRegistrarId)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setAutorenewEndTime(END_INSTANT)
.setMsg("Domain was auto-renewed.")
.setDomainHistoryId(domainHistoryId)
@@ -238,7 +233,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
partiallyApprovedDomain
.getTransferData()
.asBuilder()
.setTransferredRegistrationExpirationTime(toInstant(newExpirationTime))
.setTransferredRegistrationExpirationTime(newExpirationTime)
.build())
.setRegistrationExpirationTime(newExpirationTime)
.setAutorenewBillingEvent(autorenewEvent.createVKey())
@@ -252,7 +247,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
GracePeriod.forBillingEvent(
GracePeriodStatus.TRANSFER, existingDomain.getRepoId(), event)))
.orElseGet(ImmutableSet::of))
.setLastEppUpdateTime(toInstant(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(registrarId)
// Even if the existing domain had a bulk token, that bulk token should be removed
// on transfer
@@ -276,14 +271,12 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
return responseBuilder
.setResData(
createTransferResponse(
targetId,
newDomain.getTransferData(),
newDomain.getRegistrationExpirationDateTime()))
targetId, newDomain.getTransferData(), newDomain.getRegistrationExpirationTime()))
.build();
}
private DomainHistory buildDomainHistory(
Domain newDomain, Tld tld, DateTime now, String gainingRegistrarId) {
Domain newDomain, Tld tld, Instant now, String gainingRegistrarId) {
ImmutableSet<DomainTransactionRecord> cancelingRecords =
createCancelingRecords(
newDomain,
@@ -299,7 +292,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
cancelingRecords,
DomainTransactionRecord.create(
newDomain.getTld(),
toInstant(now.plus(tld.getTransferGracePeriodLength())),
now.plusMillis(tld.getTransferGracePeriodLength().getMillis()),
TRANSFER_SUCCESSFUL,
1)))
.build();
@@ -29,7 +29,7 @@ import static google.registry.model.ResourceTransferUtils.denyPendingTransfer;
import static google.registry.model.reporting.DomainTransactionRecord.TransactionReportField.TRANSFER_SUCCESSFUL;
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_TRANSFER_CANCEL;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import com.google.common.collect.ImmutableSet;
import google.registry.flows.EppException;
@@ -51,8 +51,8 @@ import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.model.tld.Tld;
import google.registry.model.transfer.TransferStatus;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that cancels a pending transfer on a domain.
@@ -92,7 +92,7 @@ public final class DomainTransferCancelFlow implements MutatingFlow {
extensionManager.register(MetadataExtension.class);
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
verifyOptionalAuthInfo(authInfo, existingDomain);
verifyHasPendingTransfer(existingDomain);
@@ -120,7 +120,7 @@ public final class DomainTransferCancelFlow implements MutatingFlow {
BillingRecurrence existingBillingRecurrence =
tm().loadByKey(existingDomain.getAutorenewBillingEvent());
updateAutorenewRecurrenceEndTime(
existingDomain, existingBillingRecurrence, END_OF_TIME, domainHistory.getHistoryEntryId());
existingDomain, existingBillingRecurrence, END_INSTANT, domainHistory.getHistoryEntryId());
// Delete the billing event and poll messages that were written in case the transfer would have
// been implicitly server approved.
tm().delete(existingDomain.getTransferData().getServerApproveEntities());
@@ -129,7 +129,7 @@ public final class DomainTransferCancelFlow implements MutatingFlow {
.build();
}
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, DateTime now) {
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, Instant now) {
ImmutableSet<DomainTransactionRecord> cancelingRecords =
createCancelingRecords(
newDomain,
@@ -19,8 +19,6 @@ import static google.registry.flows.ResourceFlowUtils.computeExDateForApprovalTi
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
import static google.registry.flows.domain.DomainTransferUtils.createTransferResponse;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.flows.EppException;
import google.registry.flows.ExtensionManager;
@@ -38,8 +36,8 @@ import google.registry.model.transfer.DomainTransferData;
import google.registry.model.transfer.TransferStatus;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that queries a pending transfer on a domain.
@@ -72,7 +70,7 @@ public final class DomainTransferQueryFlow implements TransactionalFlow {
public EppResponse run() throws EppException {
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate(); // There are no legal extensions for this flow.
DateTime now = clock.nowUtc();
Instant now = clock.now();
Domain domain = loadAndVerifyExistence(Domain.class, targetId, now);
verifyOptionalAuthInfo(authInfo, domain);
// Most of the fields on the transfer response are required, so there's no way to return valid
@@ -88,14 +86,12 @@ public final class DomainTransferQueryFlow implements TransactionalFlow {
&& !registrarId.equals(transferData.getLosingRegistrarId())) {
throw new NotAuthorizedToViewTransferException();
}
DateTime newExpirationTime = null;
Instant newExpirationTime = null;
if (transferData.getTransferStatus().isApproved()) {
newExpirationTime = toDateTime(transferData.getTransferredRegistrationExpirationTime());
newExpirationTime = transferData.getTransferredRegistrationExpirationTime();
} else if (transferData.getTransferStatus().equals(TransferStatus.PENDING)) {
newExpirationTime =
toDateTime(
computeExDateForApprovalTime(
domain, toInstant(now), domain.getTransferData().getTransferPeriod()));
computeExDateForApprovalTime(domain, now, domain.getTransferData().getTransferPeriod());
}
return responseBuilder
.setResData(createTransferResponse(targetId, transferData, newExpirationTime))
@@ -31,9 +31,8 @@ import static google.registry.model.reporting.DomainTransactionRecord.Transactio
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_TRANSFER_REJECT;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.CollectionUtils.union;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableSet;
import google.registry.flows.EppException;
@@ -57,7 +56,6 @@ import google.registry.model.transfer.TransferStatus;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that rejects a pending transfer on a domain.
@@ -112,18 +110,18 @@ public final class DomainTransferRejectFlow implements MutatingFlow {
Domain newDomain =
denyPendingTransfer(
existingDomain, TransferStatus.CLIENT_REJECTED, toDateTime(now), registrarId);
DomainHistory domainHistory = buildDomainHistory(newDomain, tld, toDateTime(now));
DomainHistory domainHistory = buildDomainHistory(newDomain, tld, now);
tm().update(newDomain);
tm().insertAll(
domainHistory,
createGainingTransferPollMessage(
targetId, newDomain.getTransferData(), null, toDateTime(now), domainHistoryId));
targetId, newDomain.getTransferData(), null, now, domainHistoryId));
// Reopen the autorenew event and poll message that we closed for the implicit transfer. This
// may end up recreating the poll message if it was deleted upon the transfer request.
BillingRecurrence existingBillingRecurrence =
tm().loadByKey(existingDomain.getAutorenewBillingEvent());
updateAutorenewRecurrenceEndTime(
existingDomain, existingBillingRecurrence, END_OF_TIME, domainHistory.getHistoryEntryId());
existingDomain, existingBillingRecurrence, END_INSTANT, domainHistory.getHistoryEntryId());
// Delete the billing event and poll messages that were written in case the transfer would have
// been implicitly server approved.
tm().delete(existingDomain.getTransferData().getServerApproveEntities());
@@ -132,7 +130,7 @@ public final class DomainTransferRejectFlow implements MutatingFlow {
.build();
}
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, DateTime now) {
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, Instant now) {
ImmutableSet<DomainTransactionRecord> cancelingRecords =
createCancelingRecords(
newDomain,
@@ -144,8 +142,7 @@ public final class DomainTransferRejectFlow implements MutatingFlow {
.setDomainTransactionRecords(
union(
cancelingRecords,
DomainTransactionRecord.create(
newDomain.getTld(), toInstant(now), TRANSFER_NACKED, 1)))
DomainTransactionRecord.create(newDomain.getTld(), now, TRANSFER_NACKED, 1)))
.setDomain(newDomain)
.build();
}
@@ -36,7 +36,6 @@ import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PE
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_TRANSFER_REQUEST;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -83,8 +82,8 @@ import google.registry.model.transfer.TransferResponse.DomainTransferResponse;
import google.registry.model.transfer.TransferStatus;
import jakarta.inject.Inject;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that requests a transfer on a domain.
@@ -165,7 +164,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
validateRegistrarIsLoggedIn(gainingClientId);
verifyRegistrarIsActive(gainingClientId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
AllocationTokenFlowUtils.loadAllocationTokenFromExtension(
gainingClientId,
@@ -198,9 +197,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
feesAndCredits = Optional.empty();
} else if (existingDomain.getCurrentBulkToken().isEmpty()) {
feesAndCredits =
Optional.of(
pricingLogic.getTransferPrice(
tld, targetId, toInstant(now), existingBillingRecurrence));
Optional.of(pricingLogic.getTransferPrice(tld, targetId, now, existingBillingRecurrence));
} else {
// If existing domain is in a bulk pricing package, calculate the transfer price with default
// renewal price
@@ -208,7 +205,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
feesAndCredits =
period.getValue() == 0
? Optional.empty()
: Optional.of(pricingLogic.getTransferPrice(tld, targetId, toInstant(now), null));
: Optional.of(pricingLogic.getTransferPrice(tld, targetId, now, null));
}
if (feesAndCredits.isPresent()) {
@@ -218,13 +215,14 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
historyBuilder
.setRevisionId(domainHistoryId.getRevisionId())
.setOtherRegistrarId(existingDomain.getCurrentSponsorRegistrarId());
DateTime automaticTransferTime =
Instant automaticTransferTime =
superuserExtension
.map(
domainTransferRequestSuperuserExtension ->
now.plusDays(
domainTransferRequestSuperuserExtension.getAutomaticTransferLength()))
.orElseGet(() -> now.plus(tld.getAutomaticTransferLength()));
now.plus(
domainTransferRequestSuperuserExtension.getAutomaticTransferLength(),
ChronoUnit.DAYS))
.orElseGet(() -> now.plusMillis(tld.getAutomaticTransferLength().getMillis()));
// If the domain will be in the auto-renew grace period at the moment of transfer, the transfer
// will subsume the autorenew, so we don't add the normal extra year from the transfer.
// The gaining registrar is still billed for the extra year; the losing registrar will get a
@@ -234,10 +232,8 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
// policy documentation for transfers subsuming autorenews within the autorenew grace period.
Domain domainAtTransferTime = existingDomain.cloneProjectedAtTime(automaticTransferTime);
// The new expiration time if there is a server approval.
DateTime serverApproveNewExpirationTime =
toDateTime(
computeExDateForApprovalTime(
domainAtTransferTime, toInstant(automaticTransferTime), period));
Instant serverApproveNewExpirationTime =
computeExDateForApprovalTime(domainAtTransferTime, automaticTransferTime, period);
// Create speculative entities in anticipation of an automatic server approval.
ImmutableSet<TransferServerApproveEntity> serverApproveEntities =
createTransferServerApproveEntities(
@@ -257,12 +253,11 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
domainHistoryId.getRevisionId(),
new DomainTransferData.Builder()
.setTransferRequestTrid(trid)
.setTransferRequestTime(toInstant(now))
.setTransferRequestTime(now)
.setGainingRegistrarId(gainingClientId)
.setLosingRegistrarId(existingDomain.getCurrentSponsorRegistrarId())
.setPendingTransferExpirationTime(toInstant(automaticTransferTime))
.setTransferredRegistrationExpirationTime(
toInstant(serverApproveNewExpirationTime)),
.setPendingTransferExpirationTime(automaticTransferTime)
.setTransferredRegistrationExpirationTime(serverApproveNewExpirationTime),
serverApproveEntities,
period);
// Create a poll message to notify the losing registrar that a transfer was requested.
@@ -270,7 +265,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
createLosingTransferPollMessage(
targetId, pendingTransferData, serverApproveNewExpirationTime, domainHistoryId)
.asBuilder()
.setEventTime(toInstant(now))
.setEventTime(now)
.build();
// End the old autorenew event and poll message at the implicit transfer time. This may delete
// the poll message if it has no events left. Note that if the automatic transfer succeeds, then
@@ -283,19 +278,21 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
.asBuilder()
.setTransferData(pendingTransferData)
.addStatusValue(StatusValue.PENDING_TRANSFER)
.setLastEppUpdateTime(toInstant(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(gainingClientId)
.build();
DomainHistory domainHistory = buildDomainHistory(newDomain, tld, now, period);
asyncTaskEnqueuer.enqueueAsyncResave(
newDomain.createVKey(), now, ImmutableSortedSet.of(automaticTransferTime));
newDomain.createVKey(),
toDateTime(now),
ImmutableSortedSet.of(toDateTime(automaticTransferTime)));
tm().put(newDomain);
tm().putAll(serverApproveEntities);
tm().insertAll(domainHistory, requestPollMessage);
return responseBuilder
.setResultFromCode(SUCCESS_WITH_ACTION_PENDING)
.setResData(createResponse(period, existingDomain, newDomain, toInstant(now)))
.setResData(createResponse(period, existingDomain, newDomain, now))
.setExtensions(createResponseExtensions(feesAndCredits, feeTransfer))
.build();
}
@@ -303,7 +300,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
private void verifyTransferAllowed(
Domain existingDomain,
Period period,
DateTime now,
Instant now,
Optional<DomainTransferRequestSuperuserExtension> superuserExtension)
throws EppException {
verifyNoDisallowedStatuses(existingDomain, ImmutableSet.of(StatusValue.PENDING_DELETE));
@@ -366,7 +363,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
}
}
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, DateTime now, Period period) {
private DomainHistory buildDomainHistory(Domain newDomain, Tld tld, Instant now, Period period) {
return historyBuilder
.setType(DOMAIN_TRANSFER_REQUEST)
.setPeriod(period)
@@ -375,9 +372,8 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
ImmutableSet.of(
DomainTransactionRecord.create(
tld.getTldStr(),
toInstant(
now.plus(tld.getAutomaticTransferLength())
.plus(tld.getTransferGracePeriodLength())),
now.plusMillis(tld.getAutomaticTransferLength().getMillis())
.plusMillis(tld.getTransferGracePeriodLength().getMillis()),
TransactionReportField.TRANSFER_SUCCESSFUL,
1)))
.build();
@@ -391,7 +387,7 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
Instant approveNowExtendedRegistrationTime =
computeExDateForApprovalTime(existingDomain, now, period);
return createTransferResponse(
targetId, newDomain.getTransferData(), toDateTime(approveNowExtendedRegistrationTime));
targetId, newDomain.getTransferData(), approveNowExtendedRegistrationTime);
}
private static ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
@@ -17,7 +17,6 @@ package google.registry.flows.domain;
import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.common.collect.MoreCollectors.onlyElement;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -41,10 +40,10 @@ import google.registry.model.transfer.DomainTransferData.TransferServerApproveEn
import google.registry.model.transfer.TransferResponse.DomainTransferResponse;
import google.registry.model.transfer.TransferStatus;
import google.registry.persistence.VKey;
import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* Utility logic for facilitating domain transfers.
@@ -107,25 +106,25 @@ public final class DomainTransferUtils {
* </ul>
*/
public static ImmutableSet<TransferServerApproveEntity> createTransferServerApproveEntities(
DateTime automaticTransferTime,
DateTime serverApproveNewExpirationTime,
Instant automaticTransferTime,
Instant serverApproveNewExpirationTime,
HistoryEntryId domainHistoryId,
Domain existingDomain,
BillingRecurrence existingBillingRecurrence,
Trid trid,
String gainingRegistrarId,
Optional<Money> transferCost,
DateTime now) {
Instant now) {
String targetId = existingDomain.getDomainName();
// Create a TransferData for the server-approve case to use for the speculative poll messages.
DomainTransferData serverApproveTransferData =
new DomainTransferData.Builder()
.setTransferRequestTrid(trid)
.setTransferRequestTime(toInstant(now))
.setTransferRequestTime(now)
.setGainingRegistrarId(gainingRegistrarId)
.setLosingRegistrarId(existingDomain.getCurrentSponsorRegistrarId())
.setPendingTransferExpirationTime(toInstant(automaticTransferTime))
.setTransferredRegistrationExpirationTime(toInstant(serverApproveNewExpirationTime))
.setPendingTransferExpirationTime(automaticTransferTime)
.setTransferredRegistrationExpirationTime(serverApproveNewExpirationTime)
.setTransferStatus(TransferStatus.SERVER_APPROVED)
.build();
Tld tld = Tld.get(existingDomain.getTld());
@@ -180,8 +179,8 @@ public final class DomainTransferUtils {
public static PollMessage createGainingTransferPollMessage(
String targetId,
DomainTransferData transferData,
@Nullable DateTime extendedRegistrationExpirationTime,
DateTime now,
@Nullable Instant extendedRegistrationExpirationTime,
Instant now,
HistoryEntryId domainHistoryId) {
return new PollMessage.OneTime.Builder()
.setRegistrarId(transferData.getGainingRegistrarId())
@@ -203,7 +202,7 @@ public final class DomainTransferUtils {
public static PollMessage createLosingTransferPollMessage(
String targetId,
DomainTransferData transferData,
@Nullable DateTime extendedRegistrationExpirationTime,
@Nullable Instant extendedRegistrationExpirationTime,
HistoryEntryId domainHistoryId) {
return new PollMessage.OneTime.Builder()
.setRegistrarId(transferData.getLosingRegistrarId())
@@ -220,7 +219,7 @@ public final class DomainTransferUtils {
static DomainTransferResponse createTransferResponse(
String targetId,
DomainTransferData transferData,
@Nullable DateTime extendedRegistrationExpirationTime) {
@Nullable Instant extendedRegistrationExpirationTime) {
return new DomainTransferResponse.Builder()
.setDomainName(targetId)
.setGainingRegistrarId(transferData.getGainingRegistrarId())
@@ -228,19 +227,19 @@ public final class DomainTransferUtils {
.setPendingTransferExpirationTime(transferData.getPendingTransferExpirationTime())
.setTransferRequestTime(transferData.getTransferRequestTime())
.setTransferStatus(transferData.getTransferStatus())
.setExtendedRegistrationExpirationTime(toInstant(extendedRegistrationExpirationTime))
.setExtendedRegistrationExpirationTime(extendedRegistrationExpirationTime)
.build();
}
private static PollMessage.Autorenew createGainingClientAutorenewPollMessage(
DateTime serverApproveNewExpirationTime,
Instant serverApproveNewExpirationTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId) {
return new PollMessage.Autorenew.Builder()
.setTargetId(targetId)
.setRegistrarId(gainingRegistrarId)
.setEventTime(toInstant(serverApproveNewExpirationTime))
.setEventTime(serverApproveNewExpirationTime)
.setAutorenewEndTime(END_INSTANT)
.setMsg("Domain was auto-renewed.")
.setDomainHistoryId(domainHistoryId)
@@ -249,7 +248,7 @@ public final class DomainTransferUtils {
private static BillingRecurrence createGainingClientAutorenewEvent(
BillingRecurrence existingBillingRecurrence,
DateTime serverApproveNewExpirationTime,
Instant serverApproveNewExpirationTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId) {
@@ -258,7 +257,7 @@ public final class DomainTransferUtils {
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(targetId)
.setRegistrarId(gainingRegistrarId)
.setEventTime(toInstant(serverApproveNewExpirationTime))
.setEventTime(serverApproveNewExpirationTime)
.setRecurrenceEndTime(END_INSTANT)
.setRenewalPriceBehavior(existingBillingRecurrence.getRenewalPriceBehavior())
.setRenewalPrice(existingBillingRecurrence.getRenewalPrice().orElse(null))
@@ -283,8 +282,8 @@ public final class DomainTransferUtils {
* href="https://www.icann.org/news/advisory-2002-06-06-en">this ICANN advisory</a>.
*/
private static Optional<BillingCancellation> createOptionalAutorenewCancellation(
DateTime automaticTransferTime,
DateTime now,
Instant automaticTransferTime,
Instant now,
HistoryEntryId domainHistoryId,
String targetId,
Domain existingDomain,
@@ -295,17 +294,16 @@ public final class DomainTransferUtils {
domainAtTransferTime.getGracePeriodsOfType(GracePeriodStatus.AUTO_RENEW), null);
if (autorenewGracePeriod != null && transferCost.isPresent()) {
return Optional.of(
BillingCancellation.forGracePeriod(
autorenewGracePeriod, toInstant(now), domainHistoryId, targetId)
BillingCancellation.forGracePeriod(autorenewGracePeriod, now, domainHistoryId, targetId)
.asBuilder()
.setEventTime(toInstant(automaticTransferTime))
.setEventTime(automaticTransferTime)
.build());
}
return Optional.empty();
}
private static BillingEvent createTransferBillingEvent(
DateTime automaticTransferTime,
Instant automaticTransferTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId,
@@ -317,9 +315,9 @@ public final class DomainTransferUtils {
.setRegistrarId(gainingRegistrarId)
.setCost(transferCost)
.setPeriodYears(1)
.setEventTime(toInstant(automaticTransferTime))
.setEventTime(automaticTransferTime)
.setBillingTime(
toInstant(automaticTransferTime.plus(registry.getTransferGracePeriodLength())))
automaticTransferTime.plusMillis(registry.getTransferGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build();
}
@@ -38,7 +38,6 @@ import static google.registry.flows.domain.DomainFlowUtils.verifyClientUpdateNot
import static google.registry.flows.domain.DomainFlowUtils.verifyNotInPendingDelete;
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_UPDATE;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -85,9 +84,9 @@ import google.registry.model.poll.PollMessage;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.model.tld.Tld;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Objects;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that updates a domain.
@@ -165,7 +164,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
flowCustomLogic.beforeValidation();
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
Update command = cloneAndLinkReferences((Update) resourceCommand, now);
Domain existingDomain = loadAndVerifyExistence(Domain.class, targetId, now);
verifyUpdateAllowed(command, existingDomain, now);
@@ -212,7 +211,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
}
/** Fail if the object doesn't exist or was deleted. */
private void verifyUpdateAllowed(Update command, Domain existingDomain, DateTime now)
private void verifyUpdateAllowed(Update command, Domain existingDomain, Instant now)
throws EppException {
verifyOptionalAuthInfo(authInfo, existingDomain);
AddRemove add = command.getInnerAdd();
@@ -228,13 +227,13 @@ public final class DomainUpdateFlow implements MutatingFlow {
Tld tld = Tld.get(tldStr);
Optional<FeeUpdateCommandExtension> feeUpdate =
eppInput.getSingleExtension(FeeUpdateCommandExtension.class);
FeesAndCredits feesAndCredits = pricingLogic.getUpdatePrice(tld, targetId, toInstant(now));
FeesAndCredits feesAndCredits = pricingLogic.getUpdatePrice(tld, targetId, now);
validateFeesAckedIfPresent(feeUpdate, feesAndCredits, false);
verifyNotInPendingDelete(add.getNameservers());
validateNameserversAllowedOnTld(tldStr, add.getNameserverHostNames());
}
private Domain performUpdate(Update command, Domain domain, DateTime now) throws EppException {
private Domain performUpdate(Update command, Domain domain, Instant now) throws EppException {
AddRemove add = command.getInnerAdd();
AddRemove remove = command.getInnerRemove();
Optional<SecDnsUpdateExtension> secDnsUpdate =
@@ -263,7 +262,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
.collect(toImmutableSet()),
secDnsUpdate.get())
: domain.getDsData())
.setLastEppUpdateTime(toInstant(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(registrarId)
.addStatusValues(add.getStatusValues())
.removeStatusValues(remove.getStatusValues())
@@ -282,7 +281,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
if (superuserExt.get().getAutorenews().isPresent()) {
boolean autorenews = superuserExt.get().getAutorenews().get();
domainBuilder.setAutorenewEndTime(
Optional.ofNullable(autorenews ? null : domain.getRegistrationExpirationDateTime()));
Optional.ofNullable(autorenews ? null : domain.getRegistrationExpirationTime()));
}
}
return domainBuilder.build();
@@ -305,7 +304,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
/** Some status updates cost money. Bill only once no matter how many of them are changed. */
private Optional<BillingEvent> createBillingEventForStatusUpdates(
Domain existingDomain, Domain newDomain, DomainHistory historyEntry, DateTime now) {
Domain existingDomain, Domain newDomain, DomainHistory historyEntry, Instant now) {
Optional<MetadataExtension> metadataExtension =
eppInput.getSingleExtension(MetadataExtension.class);
if (metadataExtension.isPresent() && metadataExtension.get().getRequestedByRegistrar()) {
@@ -319,8 +318,8 @@ public final class DomainUpdateFlow implements MutatingFlow {
.setTargetId(targetId)
.setRegistrarId(registrarId)
.setCost(Tld.get(existingDomain.getTld()).getServerStatusChangeBillingCost())
.setEventTime(toInstant(now))
.setBillingTime(toInstant(now))
.setEventTime(now)
.setBillingTime(now)
.setDomainHistory(historyEntry)
.build());
}
@@ -331,7 +330,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
/** Enqueues a poll message iff a superuser is adding/removing server statuses. */
private Optional<PollMessage.OneTime> createPollMessageForServerStatusUpdates(
Domain existingDomain, Domain newDomain, DomainHistory historyEntry, DateTime now) {
Domain existingDomain, Domain newDomain, DomainHistory historyEntry, Instant now) {
if (registrarId.equals(existingDomain.getPersistedCurrentSponsorRegistrarId())) {
// Don't send a poll message when a superuser registrar is updating its own domain.
return Optional.empty();
@@ -369,7 +368,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
return Optional.ofNullable(
new PollMessage.OneTime.Builder()
.setHistoryEntry(historyEntry)
.setEventTime(toInstant(now))
.setEventTime(now)
.setRegistrarId(existingDomain.getCurrentSponsorRegistrarId())
.setMsg(msg)
.setResponseData(
@@ -19,7 +19,6 @@ import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
import static google.registry.util.CollectionUtils.isNullOrEmpty;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
@@ -43,9 +42,9 @@ import google.registry.model.reporting.HistoryEntry.HistoryEntryId;
import google.registry.model.tld.Tld;
import google.registry.persistence.VKey;
import java.math.BigDecimal;
import java.time.Instant;
import java.util.Map;
import java.util.Optional;
import org.joda.time.DateTime;
/** Utility functions for dealing with {@link AllocationToken}s in domain flows. */
public class AllocationTokenFlowUtils {
@@ -72,7 +71,7 @@ public class AllocationTokenFlowUtils {
public static Optional<AllocationToken> loadAllocationTokenFromExtension(
String registrarId,
String domainName,
DateTime now,
Instant now,
Optional<AllocationTokenExtension> extension)
throws NonexistentAllocationTokenException, AllocationTokenInvalidException {
if (extension.isEmpty()) {
@@ -91,7 +90,7 @@ public class AllocationTokenFlowUtils {
*/
public static Optional<AllocationToken> loadTokenFromExtensionOrGetDefault(
String registrarId,
DateTime now,
Instant now,
Optional<AllocationTokenExtension> extension,
Tld tld,
String domainName,
@@ -166,9 +165,8 @@ public class AllocationTokenFlowUtils {
*/
@VisibleForTesting
static boolean tokenIsValidAgainstDomain(
InternetDomainName domainName, AllocationToken token, CommandName commandName, DateTime now) {
if (discountTokenInvalidForPremiumName(
token, isDomainPremium(domainName.toString(), toInstant(now)))) {
InternetDomainName domainName, AllocationToken token, CommandName commandName, Instant now) {
if (discountTokenInvalidForPremiumName(token, isDomainPremium(domainName.toString(), now))) {
return false;
}
if (!token.getAllowedEppActions().isEmpty()
@@ -194,7 +192,7 @@ public class AllocationTokenFlowUtils {
String domainName,
CommandName commandName,
String registrarId,
DateTime now,
Instant now,
Optional<Integer> years,
DomainPricingLogic pricingLogic)
throws EppException {
@@ -234,7 +232,7 @@ public class AllocationTokenFlowUtils {
String domainName,
AllocationToken token,
CommandName commandName,
DateTime now,
Instant now,
Optional<Integer> years,
DomainPricingLogic pricingLogic)
throws EppException {
@@ -244,13 +242,12 @@ public class AllocationTokenFlowUtils {
case CREATE ->
pricingLogic
.getCreatePrice(
tld, domainName, toInstant(now), yearsForAction, false, false, Optional.of(token))
tld, domainName, now, yearsForAction, false, false, Optional.of(token))
.getTotalCost()
.getAmount();
case RENEW ->
pricingLogic
.getRenewPrice(
tld, domainName, toInstant(now), yearsForAction, null, Optional.of(token))
.getRenewPrice(tld, domainName, now, yearsForAction, null, Optional.of(token))
.getTotalCost()
.getAmount();
default -> BigDecimal.ZERO;
@@ -259,7 +256,7 @@ public class AllocationTokenFlowUtils {
/** Loads a given token and validates it against the registrar, time, etc */
private static AllocationToken loadAndValidateToken(
String token, String registrarId, String domainName, DateTime now)
String token, String registrarId, String domainName, Instant now)
throws NonexistentAllocationTokenException, AllocationTokenInvalidException {
if (Strings.isNullOrEmpty(token)) {
// We load the token directly from the input XML. If it's null or empty we should throw
@@ -283,7 +280,7 @@ public class AllocationTokenFlowUtils {
}
private static void validateTokenEntity(
AllocationToken token, String registrarId, String domainName, DateTime now)
AllocationToken token, String registrarId, String domainName, Instant now)
throws AllocationTokenInvalidException {
if (token.isRedeemed()) {
throw new AlreadyRedeemedAllocationTokenException();
@@ -62,7 +62,7 @@ public final class HostCheckFlow implements TransactionalFlow {
ImmutableList<String> hostnames = ((Check) resourceCommand).getTargetIds();
verifyTargetIdCount(hostnames, maxChecks);
ImmutableSet<String> existingIds =
ForeignKeyUtils.loadKeys(Host.class, hostnames, clock.nowUtc()).keySet();
ForeignKeyUtils.loadKeys(Host.class, hostnames, clock.now()).keySet();
ImmutableList.Builder<HostCheck> checks = new ImmutableList.Builder<>();
for (String hostname : hostnames) {
HostFlowUtils.validateHostName(hostname);
@@ -25,7 +25,6 @@ import static google.registry.model.EppResourceUtils.createRepoId;
import static google.registry.model.reporting.HistoryEntry.Type.HOST_CREATE;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.CollectionUtils.isNullOrEmpty;
import static google.registry.util.DateTimeUtils.toDateTime;
import com.google.common.collect.ImmutableSet;
import google.registry.config.RegistryConfig.Config;
@@ -101,7 +100,7 @@ public final class HostCreateFlow implements MutatingFlow {
extensionManager.validate();
Create command = (Create) resourceCommand;
Instant now = tm().getTxTime();
verifyResourceDoesNotExist(Host.class, targetId, toDateTime(now), registrarId);
verifyResourceDoesNotExist(Host.class, targetId, now, registrarId);
// The superordinate domain of the host object if creating an in-bailiwick host, or null if
// creating an external host. This is looked up before we actually create the Host object, so
// we can detect error conditions earlier.
@@ -24,7 +24,6 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
import static google.registry.flows.host.HostFlowUtils.validateHostName;
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toDateTime;
import com.google.common.collect.ImmutableSet;
import google.registry.flows.EppException;
@@ -85,7 +84,7 @@ public final class HostDeleteFlow implements MutatingFlow {
extensionManager.validate();
Instant now = tm().getTxTime();
validateHostName(targetId);
checkLinkedDomains(targetId, toDateTime(now));
checkLinkedDomains(targetId, now);
Host existingHost = loadAndVerifyExistence(Host.class, targetId, now);
verifyNoDisallowedStatuses(existingHost, ImmutableSet.of(StatusValue.PENDING_DELETE));
if (!isSuperuser) {
@@ -94,7 +93,7 @@ public final class HostDeleteFlow implements MutatingFlow {
// the client id, needs to be read off of it.
EppResource owningResource =
existingHost.isSubordinate()
? tm().loadByKey(existingHost.getSuperordinateDomain()).cloneProjectedAtInstant(now)
? tm().loadByKey(existingHost.getSuperordinateDomain()).cloneProjectedAtTime(now)
: existingHost;
verifyResourceOwnership(registrarId, owningResource);
}
@@ -77,7 +77,7 @@ public final class HostInfoFlow implements TransactionalFlow {
// there is no superordinate domain, the host's own values for these fields will be correct.
if (host.isSubordinate()) {
Domain superordinateDomain =
tm().loadByKey(host.getSuperordinateDomain()).cloneProjectedAtInstant(now);
tm().loadByKey(host.getSuperordinateDomain()).cloneProjectedAtTime(now);
hostInfoDataBuilder
.setCurrentSponsorRegistrarId(superordinateDomain.getCurrentSponsorRegistrarId())
.setLastTransferTime(host.computeLastTransferTime(superordinateDomain));
@@ -145,7 +145,7 @@ public final class HostUpdateFlow implements MutatingFlow {
String newHostName = firstNonNull(suppliedNewHostName, oldHostName);
Domain oldSuperordinateDomain =
existingHost.isSubordinate()
? tm().loadByKey(existingHost.getSuperordinateDomain()).cloneProjectedAtInstant(now)
? tm().loadByKey(existingHost.getSuperordinateDomain()).cloneProjectedAtTime(now)
: null;
// Note that lookupSuperordinateDomain calls cloneProjectedAtTime on the domain for us.
Optional<Domain> newSuperordinateDomain =
@@ -63,7 +63,7 @@ public final class PollFlowUtils {
// If the next event falls within the bounds of the end time, then just update the eventTime
// and re-save it for future autorenew poll messages to be delivered. Otherwise, this
// autorenew poll message has no more events to deliver and should be deleted.
if (nextEventTime.isBefore(autorenewPollMessage.getAutorenewEndTimeInstant())) {
if (nextEventTime.isBefore(autorenewPollMessage.getAutorenewEndTime())) {
tm().put(autorenewPollMessage.asBuilder().setEventTime(nextEventTime).build());
} else {
tm().delete(autorenewPollMessage.createVKey());
@@ -16,12 +16,14 @@ package google.registry.model;
import static com.google.common.collect.ImmutableSortedMap.toImmutableSortedMap;
import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet;
import static com.google.common.collect.Ordering.natural;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import static google.registry.util.DateTimeUtils.parseInstant;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.KeyDeserializer;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
@@ -64,6 +66,8 @@ public class EntityYamlUtils {
module.addSerializer(CreateAutoTimestamp.class, new CreateAutoTimestampSerializer());
module.addDeserializer(CreateAutoTimestamp.class, new CreateAutoTimestampDeserializer());
module.addSerializer(Duration.class, new DurationSerializer());
module.addKeySerializer(Instant.class, new InstantKeySerializer());
module.addKeyDeserializer(Instant.class, new InstantKeyDeserializer());
module.addSerializer(Instant.class, new InstantSerializer());
module.addDeserializer(Instant.class, new InstantDeserializer());
ObjectMapper mapper =
@@ -416,7 +420,7 @@ public class EntityYamlUtils {
if (value.getTimestamp() == null) {
gen.writeNull();
} else {
gen.writeString(ISO_8601_FORMATTER.format(value.getTimestamp()));
gen.writeString(formatInstant(value.getTimestamp()));
}
}
}
@@ -441,6 +445,24 @@ public class EntityYamlUtils {
}
/** A custom JSON serializer for {@link Instant}. */
/** A custom JSON key serializer for {@link Instant}. */
public static class InstantKeySerializer extends JsonSerializer<Instant> {
@Override
public void serialize(Instant value, JsonGenerator gen, SerializerProvider provider)
throws IOException {
gen.writeFieldName(formatInstant(value));
}
}
/** A custom JSON key deserializer for {@link Instant}. */
public static class InstantKeyDeserializer extends KeyDeserializer {
@Override
public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
return parseInstant(key);
}
}
public static class InstantSerializer extends StdSerializer<Instant> {
public InstantSerializer() {
@@ -450,7 +472,7 @@ public class EntityYamlUtils {
@Override
public void serialize(Instant value, JsonGenerator gen, SerializerProvider provider)
throws IOException {
gen.writeString(ISO_8601_FORMATTER.format(value));
gen.writeString(formatInstant(value));
}
}
@@ -49,7 +49,6 @@ import java.time.Instant;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.joda.time.DateTime;
/** An EPP entity object (i.e. a domain, contact, or host). */
@MappedSuperclass
@@ -191,11 +190,7 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
}
/** Return a clone of the resource with timed status values modified using the given time. */
@Deprecated
public abstract EppResource cloneProjectedAtTime(DateTime now);
/** Return a clone of the resource with timed status values modified using the given time. */
public abstract EppResource cloneProjectedAtInstant(Instant now);
public abstract EppResource cloneProjectedAtTime(Instant now);
/** Get the foreign key string for this resource. */
public abstract String getForeignKey();
@@ -20,7 +20,6 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.isAtOrAfter;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableSet;
@@ -69,7 +68,7 @@ public final class EppResourceUtils {
/** Helper to call {@link EppResource#cloneProjectedAtTime} without warnings. */
@SuppressWarnings("unchecked")
private static <T extends EppResource> T cloneProjectedAtTime(T resource, DateTime now) {
return (T) resource.cloneProjectedAtTime(now);
return (T) resource.cloneProjectedAtTime(toInstant(now));
}
/**
@@ -121,7 +120,7 @@ public final class EppResourceUtils {
builder
.removeStatusValue(StatusValue.PENDING_TRANSFER)
.setTransferData(transferDataBuilder.build())
.setLastTransferTime(toDateTime(transferData.getPendingTransferExpirationTime()))
.setLastTransferTime(transferData.getPendingTransferExpirationTime())
.setPersistedCurrentSponsorRegistrarId(transferData.getGainingRegistrarId());
}
@@ -155,8 +154,7 @@ public final class EppResourceUtils {
* @return the resource at {@code timestamp} or {@code null} if resource is deleted or not yet
* created.
*/
public static <T extends EppResource> T loadAtPointInTime(
final T resource, final Instant timestamp) {
public static <T extends EppResource> T loadAtPointInTime(final T resource, Instant timestamp) {
// If we're before the resource creation time, don't try to find a "most recent revision".
if (timestamp.isBefore(resource.getCreationTime())) {
return null;
@@ -171,7 +169,7 @@ public final class EppResourceUtils {
return (loadedResource == null)
? null
: (isActive(loadedResource, timestamp)
? (T) loadedResource.cloneProjectedAtInstant(timestamp)
? (T) loadedResource.cloneProjectedAtTime(timestamp)
: null);
}
@@ -190,7 +188,7 @@ public final class EppResourceUtils {
* falling back to using the resource as-is if there are no revisions.
*/
private static <T extends EppResource> T loadMostRecentRevisionAtTime(
final T resource, final Instant timestamp) {
final T resource, Instant timestamp) {
@SuppressWarnings("unchecked")
T resourceAtPointInTime =
(T)
@@ -185,7 +185,7 @@ public final class ForeignKeyUtils {
Class<E> clazz, Collection<String> foreignKeys, Instant now) {
return loadMostRecentResourceObjects(clazz, foreignKeys, false).entrySet().stream()
.filter(e -> now.isBefore(e.getValue().getDeletionTime()))
.collect(toImmutableMap(Entry::getKey, e -> (E) e.getValue().cloneProjectedAtInstant(now)));
.collect(toImmutableMap(Entry::getKey, e -> (E) e.getValue().cloneProjectedAtTime(now)));
}
/**
@@ -543,6 +543,6 @@ public final class ForeignKeyUtils {
foreignKeyToResourceCache
.get(VKey.create(clazz, foreignKey))
.filter(e -> now.isBefore(e.getDeletionTime()))
.map(e -> e.cloneProjectedAtInstant(now));
.map(e -> e.cloneProjectedAtTime(now));
}
}
@@ -16,7 +16,7 @@ package google.registry.model;
import static com.google.common.collect.Iterables.transform;
import static com.google.common.collect.Maps.transformValues;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.util.stream.Collectors.toCollection;
@@ -143,7 +143,7 @@ public abstract class ImmutableObject implements Cloneable {
for (Entry<Field, Object> entry : getSignificantFields().entrySet()) {
Object value = entry.getValue();
if (value instanceof Instant instant) {
value = ISO_8601_FORMATTER.format(instant);
value = formatInstant(instant);
}
sortedFields.put(entry.getKey().getName(), value);
}
@@ -161,7 +161,7 @@ public abstract class ImmutableObject implements Cloneable {
? entry.getValue()
: hydrate(entry.getValue());
if (value instanceof Instant instant) {
value = ISO_8601_FORMATTER.format(instant);
value = formatInstant(instant);
}
sortedFields.put(field.getName(), value);
}
@@ -187,7 +187,7 @@ public abstract class ImmutableObject implements Cloneable {
return immutableObject.toHydratedString();
}
if (value instanceof Instant instant) {
return ISO_8601_FORMATTER.format(instant);
return formatInstant(instant);
}
return value;
}
@@ -225,7 +225,7 @@ public abstract class ImmutableObject implements Cloneable {
// original ImmutableObject might have been the result of a cloneEmptyToNull call).
.collect(toList());
} else if (o instanceof Instant instant) {
return ISO_8601_FORMATTER.format(instant);
return formatInstant(instant);
} else if (o instanceof Number || o instanceof Boolean) {
return o;
} else {
@@ -21,7 +21,8 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -45,6 +46,7 @@ import google.registry.persistence.VKey;
import google.registry.tools.IamClient;
import google.registry.util.CidrAddressBlock;
import google.registry.util.RegistryEnvironment;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -107,13 +109,13 @@ public final class OteAccountBuilder {
.setZip("55555")
.build();
private static final ImmutableSortedMap<DateTime, Money> EAP_FEE_SCHEDULE =
private static final ImmutableSortedMap<Instant, Money> EAP_FEE_SCHEDULE =
ImmutableSortedMap.of(
new DateTime(0),
Instant.EPOCH,
Money.of(CurrencyUnit.USD, 0),
DateTime.parse("2018-03-01T00:00:00Z"),
Instant.parse("2018-03-01T00:00:00Z"),
Money.of(CurrencyUnit.USD, 100),
DateTime.parse("2030-03-01T00:00:00Z"),
Instant.parse("2030-03-01T00:00:00Z"),
Money.of(CurrencyUnit.USD, 0));
/**
@@ -233,7 +235,7 @@ public final class OteAccountBuilder {
/** Sets the client certificate to all the OT&amp;E Registrars. */
public OteAccountBuilder setCertificate(String asciiCert, DateTime now) {
return transformRegistrars(builder -> builder.setClientCertificate(asciiCert, now));
return transformRegistrars(builder -> builder.setClientCertificate(asciiCert, toInstant(now)));
}
/** Sets the IP allowlist to all the OT&amp;E Registrars. */
@@ -329,7 +331,7 @@ public final class OteAccountBuilder {
new Tld.Builder()
.setTldStr(tldName)
.setPremiumPricingEngine(StaticPremiumListPricingEngine.NAME)
.setTldStateTransitions(ImmutableSortedMap.of(START_OF_TIME, initialTldState))
.setTldStateTransitions(ImmutableSortedMap.of(START_INSTANT, initialTldState))
.setDnsWriters(ImmutableSet.of("VoidDnsWriter"))
.setPremiumList(premiumList.get())
.setTldType(TldType.TEST)
@@ -16,7 +16,6 @@ package google.registry.model;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
@@ -161,7 +160,7 @@ public final class ResourceTransferUtils {
checkArgument(transferStatus.isApproved(), "Not an approval transfer status");
Domain.Builder builder = resolvePendingTransfer(domain, transferStatus, now);
return builder
.setLastTransferTime(toDateTime(now))
.setLastTransferTime(now)
.setPersistedCurrentSponsorRegistrarId(domain.getTransferData().getGainingRegistrarId())
.build();
}
@@ -22,7 +22,6 @@ import static google.registry.util.DateTimeUtils.isAtOrAfter;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.minusYears;
import static google.registry.util.DateTimeUtils.plusYears;
import static java.time.ZoneOffset.UTC;
import com.google.common.base.Splitter;
import com.google.common.collect.ContiguousSet;
@@ -33,6 +32,7 @@ import jakarta.persistence.Embeddable;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.List;
@@ -63,7 +63,7 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
* February 28. It is impossible to construct a {@link TimeOfYear} for February 29th.
*/
public static TimeOfYear fromInstant(Instant instant) {
ZonedDateTime zdt = ZonedDateTime.ofInstant(instant, UTC);
ZonedDateTime zdt = ZonedDateTime.ofInstant(instant, ZoneOffset.UTC);
int month = zdt.getMonthValue();
int day = zdt.getDayOfMonth();
if (month == 2 && day == 29) {
@@ -88,8 +88,8 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
Range<Instant> normalizedRange = range.intersection(Range.closed(START_INSTANT, END_INSTANT));
Range<Integer> yearRange =
Range.closed(
ZonedDateTime.ofInstant(normalizedRange.lowerEndpoint(), UTC).getYear(),
ZonedDateTime.ofInstant(normalizedRange.upperEndpoint(), UTC).getYear());
ZonedDateTime.ofInstant(normalizedRange.lowerEndpoint(), ZoneOffset.UTC).getYear(),
ZonedDateTime.ofInstant(normalizedRange.upperEndpoint(), ZoneOffset.UTC).getYear());
return ContiguousSet.create(yearRange, integers()).stream()
.map(this::toInstantWithYear)
.filter(normalizedRange)
@@ -107,18 +107,20 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
int millis = Integer.parseInt(monthDayMillis.get(2));
return LocalDate.of(year, month, day)
.atTime(LocalTime.ofNanoOfDay(millis * 1000000L))
.toInstant(UTC);
.toInstant(ZoneOffset.UTC);
}
/** Get the first {@link Instant} with this month/day/millis that is at or after the start. */
public Instant getNextInstanceAtOrAfter(Instant start) {
Instant withSameYear = toInstantWithYear(ZonedDateTime.ofInstant(start, UTC).getYear());
Instant withSameYear =
toInstantWithYear(ZonedDateTime.ofInstant(start, ZoneOffset.UTC).getYear());
return isAtOrAfter(withSameYear, start) ? withSameYear : plusYears(withSameYear, 1);
}
/** Get the first {@link Instant} with this month/day/millis that is at or before the end. */
public Instant getLastInstanceBeforeOrAt(Instant end) {
Instant withSameYear = toInstantWithYear(ZonedDateTime.ofInstant(end, UTC).getYear());
Instant withSameYear =
toInstantWithYear(ZonedDateTime.ofInstant(end, ZoneOffset.UTC).getYear());
return isBeforeOrAt(withSameYear, end) ? withSameYear : minusYears(withSameYear, 1);
}
@@ -17,8 +17,8 @@ package google.registry.model.common;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableSortedMap.toImmutableSortedMap;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.formatInstant;
import static google.registry.util.DateTimeUtils.latestOf;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
@@ -63,9 +63,7 @@ public class TimedTransitionProperty<V extends Serializable> implements UnsafeSe
return backingMap.entrySet().stream()
.collect(
toImmutableSortedMap(
Ordering.natural(),
e -> ISO_8601_FORMATTER.format(e.getKey()),
Map.Entry::getValue));
Ordering.natural(), e -> formatInstant(e.getKey()), Map.Entry::getValue));
}
private TimedTransitionProperty(ImmutableSortedMap<Instant, V> backingMap) {
@@ -281,7 +279,7 @@ public class TimedTransitionProperty<V extends Serializable> implements UnsafeSe
@Override
public String toString() {
return backingMap.entrySet().stream()
.map(e -> ISO_8601_FORMATTER.format(e.getKey()) + "=" + e.getValue())
.map(e -> formatInstant(e.getKey()) + "=" + e.getValue())
.collect(Collectors.joining(", ", "{", "}"));
}
}
@@ -18,12 +18,11 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.contact;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -14,7 +14,6 @@
package google.registry.model.domain;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.model.EppResource;
import google.registry.model.EppResource.ForeignKeyedEppResource;
@@ -42,7 +41,6 @@ import jakarta.persistence.Table;
import java.time.Instant;
import java.util.Set;
import org.hibernate.Hibernate;
import org.joda.time.DateTime;
/**
* A persistable domain resource including mutable and non-mutable fields.
@@ -155,12 +153,7 @@ public class Domain extends DomainBase implements ForeignKeyedEppResource {
}
@Override
public Domain cloneProjectedAtTime(final DateTime now) {
return cloneDomainProjectedAtTime(this, toInstant(now));
}
@Override
public Domain cloneProjectedAtInstant(final Instant now) {
public Domain cloneProjectedAtTime(Instant now) {
return cloneDomainProjectedAtTime(this, now);
}
@@ -32,8 +32,6 @@ import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.earliestOf;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DomainNameUtils.canonicalizeHostname;
import static google.registry.util.DomainNameUtils.getTldFromDomainName;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
@@ -90,7 +88,6 @@ import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import org.hibernate.collection.spi.PersistentSet;
import org.joda.time.DateTime;
/**
* A persistable domain resource including mutable and non-mutable fields.
@@ -290,15 +287,6 @@ public class DomainBase extends EppResource {
return nullToEmptyImmutableCopy(subordinateHosts);
}
/**
* @deprecated Use {@link #getRegistrationExpirationTime()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getRegistrationExpirationDateTime() {
return toDateTime(registrationExpirationTime);
}
public Instant getRegistrationExpirationTime() {
return registrationExpirationTime;
}
@@ -333,17 +321,8 @@ public class DomainBase extends EppResource {
* <p>Note that {@link DateTimeUtils#END_INSTANT} is used as a sentinel value in the database
* representation to signify that autorenew doesn't end, and is mapped to empty here for the
* purposes of more legible business logic.
*
* @deprecated Use {@link #getAutorenewEndTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Optional<DateTime> getAutorenewEndTime() {
return getAutorenewEndTimeInstant().map(DateTimeUtils::toDateTime);
}
/** Returns the autorenew end time if there is one, otherwise empty. */
public Optional<Instant> getAutorenewEndTimeInstant() {
public Optional<Instant> getAutorenewEndTime() {
return Optional.ofNullable(autorenewEndTime.equals(END_INSTANT) ? null : autorenewEndTime);
}
@@ -351,16 +330,7 @@ public class DomainBase extends EppResource {
return Optional.ofNullable(transferData).orElse(DomainTransferData.EMPTY);
}
/**
* @deprecated Use {@link #getLastTransferTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastTransferTime() {
return toDateTime(lastTransferTime);
}
public Instant getLastTransferTimeInstant() {
public Instant getLastTransferTime() {
return lastTransferTime;
}
@@ -467,12 +437,7 @@ public class DomainBase extends EppResource {
}
@Override
public DomainBase cloneProjectedAtTime(final DateTime now) {
return cloneDomainProjectedAtTime(this, toInstant(now));
}
@Override
public DomainBase cloneProjectedAtInstant(final Instant now) {
public DomainBase cloneProjectedAtTime(Instant now) {
return cloneDomainProjectedAtTime(this, now);
}
@@ -515,7 +480,7 @@ public class DomainBase extends EppResource {
Builder builder =
domainAtTransferTime
.asBuilder()
.setRegistrationExpirationTime(toDateTime(expirationDate))
.setRegistrationExpirationTime(expirationDate)
// Set the speculatively-written new autorenew events as the domain's autorenew
// events.
.setAutorenewBillingEvent(transferData.getServerApproveAutorenewEvent())
@@ -544,7 +509,7 @@ public class DomainBase extends EppResource {
.setLastEppUpdateTime(transferExpirationTime)
.setLastEppUpdateRegistrarId(transferData.getGainingRegistrarId());
// Finish projecting to now.
return (T) builder.build().cloneProjectedAtInstant(now);
return (T) builder.build().cloneProjectedAtTime(now);
}
Optional<Instant> newLastEppUpdateTime = Optional.empty();
@@ -558,18 +523,18 @@ public class DomainBase extends EppResource {
Instant lastAutorenewTime =
plusYears(
domain.getRegistrationExpirationTime(),
ChronoUnit.YEARS.between(
domain.getRegistrationExpirationTime().atZone(UTC), now.atZone(UTC)));
(int)
ChronoUnit.YEARS.between(
domain.getRegistrationExpirationTime().atZone(UTC), now.atZone(UTC)));
Instant newExpirationTime = plusYears(lastAutorenewTime, 1);
builder
.setRegistrationExpirationTime(toDateTime(newExpirationTime))
.setRegistrationExpirationTime(newExpirationTime)
.addGracePeriod(
GracePeriod.createForRecurrence(
GracePeriodStatus.AUTO_RENEW,
domain.getRepoId(),
lastAutorenewTime.plus(
Duration.ofMillis(
Tld.get(domain.getTld()).getAutoRenewGracePeriodLength().getMillis())),
lastAutorenewTime.plusMillis(
Tld.get(domain.getTld()).getAutoRenewGracePeriodLength().getMillis()),
domain.getCurrentSponsorRegistrarId(),
domain.getAutorenewBillingEvent()));
newLastEppUpdateTime = Optional.of(lastAutorenewTime);
@@ -770,15 +735,6 @@ public class DomainBase extends EppResource {
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setRegistrationExpirationTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setRegistrationExpirationTime(DateTime registrationExpirationTime) {
return setRegistrationExpirationTime(toInstant(registrationExpirationTime));
}
public B setDeletePollMessage(VKey<OneTime> deletePollMessage) {
getInstance().deletePollMessage = deletePollMessage;
return thisCastToDerived();
@@ -830,16 +786,7 @@ public class DomainBase extends EppResource {
* representation to signify that autorenew doesn't end, and is mapped to empty here for the
* purposes of more legible business logic.
*/
/**
* @deprecated Use {@link #setAutorenewEndTimeInstant(Optional)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setAutorenewEndTime(Optional<DateTime> autorenewEndTime) {
return setAutorenewEndTimeInstant(autorenewEndTime.map(DateTimeUtils::toInstant));
}
public B setAutorenewEndTimeInstant(Optional<Instant> autorenewEndTime) {
public B setAutorenewEndTime(Optional<Instant> autorenewEndTime) {
getInstance().autorenewEndTime = autorenewEndTime.orElse(END_INSTANT);
return thisCastToDerived();
}
@@ -854,15 +801,6 @@ public class DomainBase extends EppResource {
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setLastTransferTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setLastTransferTime(DateTime lastTransferTime) {
return setLastTransferTime(toInstant(lastTransferTime));
}
public B setCurrentBulkToken(@Nullable VKey<AllocationToken> currentBulkToken) {
if (currentBulkToken == null) {
getInstance().currentBulkToken = currentBulkToken;
@@ -902,7 +840,7 @@ public class DomainBase extends EppResource {
.setLastEppUpdateTime(domainBase.getLastEppUpdateTime())
.setNameservers(domainBase.getNameservers())
.setPersistedCurrentSponsorRegistrarId(domainBase.getPersistedCurrentSponsorRegistrarId())
.setRegistrationExpirationTime(domainBase.getRegistrationExpirationDateTime())
.setRegistrationExpirationTime(domainBase.getRegistrationExpirationTime())
.setRepoId(domainBase.getRepoId())
.setSmdId(domainBase.getSmdId())
.setSubordinateHosts(domainBase.getSubordinateHosts())
@@ -45,10 +45,10 @@ import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlValue;
import java.time.Instant;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
/** A collection of {@link Domain} commands. */
@@ -64,7 +64,7 @@ public class DomainCommand {
*/
public interface CreateOrUpdate<T extends CreateOrUpdate<T>> extends SingleResourceCommand {
/** Creates a copy of this command with hard links to hosts and contacts. */
T cloneAndLinkReferences(DateTime now)
T cloneAndLinkReferences(Instant now)
throws InvalidReferencesException, ParameterValuePolicyErrorException;
}
@@ -154,7 +154,7 @@ public class DomainCommand {
/** Creates a copy of this {@link Create} with hard links to hosts and contacts. */
@Override
public Create cloneAndLinkReferences(DateTime now)
public Create cloneAndLinkReferences(Instant now)
throws InvalidReferencesException, ParameterValuePolicyErrorException {
Create clone = clone(this);
clone.nameservers = linkHosts(clone.nameserverHostNames, now);
@@ -333,7 +333,7 @@ public class DomainCommand {
}
/** Creates a copy of this {@link AddRemove} with hard links to hosts and contacts. */
private AddRemove cloneAndLinkReferences(DateTime now)
private AddRemove cloneAndLinkReferences(Instant now)
throws InvalidReferencesException, ContactsProhibitedException {
AddRemove clone = clone(this);
clone.nameservers = linkHosts(clone.nameserverHostNames, now);
@@ -363,7 +363,7 @@ public class DomainCommand {
* of those classes, which is harmless because the getters do that anyways.
*/
@Override
public Update cloneAndLinkReferences(DateTime now)
public Update cloneAndLinkReferences(Instant now)
throws InvalidReferencesException, ParameterValuePolicyErrorException {
Update clone = clone(this);
clone.innerAdd = clone.getInnerAdd().cloneAndLinkReferences(now);
@@ -373,7 +373,7 @@ public class DomainCommand {
}
}
private static Set<VKey<Host>> linkHosts(Set<String> hostNames, DateTime now)
private static Set<VKey<Host>> linkHosts(Set<String> hostNames, Instant now)
throws InvalidReferencesException {
if (hostNames == null) {
return null;
@@ -383,7 +383,7 @@ public class DomainCommand {
/** Loads host keys to cached EPP resources by their foreign keys. */
private static ImmutableMap<String, VKey<Host>> loadByForeignKeysCached(
final Set<String> foreignKeys, final DateTime now) throws InvalidReferencesException {
Set<String> foreignKeys, Instant now) throws InvalidReferencesException {
ImmutableMap<String, VKey<Host>> fks =
ForeignKeyUtils.loadKeysByCacheIfEnabled(Host.class, foreignKeys, now);
if (!fks.keySet().equals(foreignKeys)) {
@@ -14,8 +14,6 @@
package google.registry.model.domain;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.model.eppoutput.EppResponse.ResponseData;
import google.registry.xml.UtcInstantAdapter;
@@ -24,7 +22,6 @@ import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
import org.joda.time.DateTime;
/** The {@link ResponseData} returned when renewing a domain. */
@XmlRootElement(name = "renData")
@@ -44,26 +41,9 @@ public class DomainRenewData implements ResponseData {
return instance;
}
/**
* @deprecated Use {@link #create(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static DomainRenewData create(String name, DateTime expirationDate) {
return create(name, toInstant(expirationDate));
}
/** Returns the expiration date. */
public Instant getExpirationDate() {
return expirationDate;
}
/**
* @deprecated Use {@link #getExpirationDate()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getExpirationDateTime() {
return toDateTime(expirationDate);
}
}
@@ -16,6 +16,7 @@ package google.registry.model.domain;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.minusHours;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.google.gson.annotations.Expose;
@@ -36,10 +37,10 @@ import jakarta.persistence.Index;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import java.time.Duration;
import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.time.Duration;
/**
* Represents a registry lock/unlock object, meaning that the domain is locked on the registry
@@ -155,7 +156,7 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
/** The duration after which we will re-lock this domain after it is unlocked. */
@Column(columnDefinition = "interval")
private org.joda.time.Duration relockDuration;
private Duration relockDuration;
public String getRepoId() {
return repoId;
@@ -221,7 +222,7 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
}
/** The duration after which we will re-lock this domain after it is unlocked. */
public Optional<org.joda.time.Duration> getRelockDuration() {
public Optional<Duration> getRelockDuration() {
return Optional.ofNullable(relockDuration);
}
@@ -232,7 +233,7 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
/** Returns true iff the lock was requested &gt;= 1 hour ago and has not been verified. */
public boolean isLockRequestExpired(Instant now) {
return getLockCompletionTime().isEmpty()
&& isBeforeOrAt(getLockRequestTime(), now.minus(Duration.ofHours(1)));
&& isBeforeOrAt(getLockRequestTime(), minusHours(now, 1));
}
/** Returns true iff the unlock was requested &gt;= 1 hour ago and has not been verified. */
@@ -240,7 +241,7 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
Optional<Instant> unlockRequestTimestamp = getUnlockRequestTime();
return unlockRequestTimestamp.isPresent()
&& getUnlockCompletionTime().isEmpty()
&& isBeforeOrAt(unlockRequestTimestamp.get(), now.minus(Duration.ofHours(1)));
&& isBeforeOrAt(unlockRequestTimestamp.get(), minusHours(now, 1));
}
@Override
@@ -318,7 +319,7 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
return this;
}
public Builder setRelockDuration(@Nullable org.joda.time.Duration relockDuration) {
public Builder setRelockDuration(@Nullable Duration relockDuration) {
getInstance().relockDuration = relockDuration;
return this;
}
@@ -17,8 +17,6 @@ package google.registry.model.domain.launch;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.hash.Hashing.crc32;
import static com.google.common.io.BaseEncoding.base16;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.common.base.Ascii;
@@ -34,7 +32,6 @@ import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlValue;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/** The claims notice id from the claims phase. */
@XmlType(propOrder = {"noticeId", "expirationTime", "acceptedTime"})
@@ -82,29 +79,11 @@ public class LaunchNotice extends ImmutableObject implements UnsafeSerializable
return Optional.ofNullable(noticeId).orElse(EMPTY_NOTICE_ID);
}
/**
* @deprecated Use {@link #getExpirationTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getExpirationTime() {
return toDateTime(expirationTime);
}
public Instant getExpirationTimeInstant() {
public Instant getExpirationTime() {
return expirationTime;
}
/**
* @deprecated Use {@link #getAcceptedTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getAcceptedTime() {
return toDateTime(acceptedTime);
}
public Instant getAcceptedTimeInstant() {
public Instant getAcceptedTime() {
return acceptedTime;
}
@@ -123,7 +102,7 @@ public class LaunchNotice extends ImmutableObject implements UnsafeSerializable
checkArgument(CharMatcher.inRange('0', '9').matchesAllOf(noticeId));
// The checksum in the first 8 chars must match the crc32 of label + expiration + notice id.
String stringToHash = domainLabel + getExpirationTimeInstant().getEpochSecond() + noticeId;
String stringToHash = domainLabel + getExpirationTime().getEpochSecond() + noticeId;
int computedChecksum = crc32().hashString(stringToHash, UTF_8).asInt();
if (checksum != computedChecksum) {
throw new InvalidChecksumException();
@@ -144,13 +123,4 @@ public class LaunchNotice extends ImmutableObject implements UnsafeSerializable
return instance;
}
/**
* @deprecated Use {@link #create(String, String, Instant, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static LaunchNotice create(
String tcnId, String validatorId, DateTime expirationTime, DateTime acceptedTime) {
return create(tcnId, validatorId, toInstant(expirationTime), toInstant(acceptedTime));
}
}
@@ -18,12 +18,10 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.domain.launch;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -18,14 +18,13 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(DateAdapter.class)
})
package google.registry.model.domain;
import google.registry.xml.DateAdapter;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -26,8 +26,6 @@ import static google.registry.model.domain.token.AllocationToken.TokenType.REGIS
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.CollectionUtils.forceEmptyToNull;
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -40,7 +38,6 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Ordering;
import com.google.common.collect.Range;
import google.registry.flows.EppException;
import google.registry.flows.domain.DomainFlowUtils;
@@ -71,7 +68,6 @@ import java.util.Set;
import javax.annotation.Nullable;
import org.hibernate.annotations.Type;
import org.joda.money.Money;
import org.joda.time.DateTime;
/** An entity representing an allocation token. */
@Entity
@@ -339,25 +335,13 @@ public class AllocationToken extends UpdateAutoTimestampEntity implements Builda
return tokenType;
}
/**
* @deprecated Use {@link #getCreationTime()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@JsonIgnore
public Optional<DateTime> getCreationDateTime() {
return Optional.ofNullable(toDateTime(creationTime.getTimestamp()));
}
@JsonIgnore
public TimedTransitionProperty<TokenStatus> getTokenStatusTransitions() {
return tokenStatusTransitions;
}
public ImmutableSortedMap<DateTime, TokenStatus> getTokenStatusTransitionsMap() {
return tokenStatusTransitions.toValueMap();
}
@JsonIgnore
public ImmutableSortedMap<Instant, TokenStatus> getTokenStatusTransitionsMapInstant() {
return tokenStatusTransitions.toValueMapInstant();
@@ -537,11 +521,6 @@ public class AllocationToken extends UpdateAutoTimestampEntity implements Builda
return this;
}
@VisibleForTesting
public Builder setCreationTimeForTest(DateTime creationTime) {
return setCreationTimeForTest(toInstant(creationTime));
}
@VisibleForTesting
public Builder setCreationTimeForTest(Instant creationTime) {
checkState(
@@ -587,17 +566,7 @@ public class AllocationToken extends UpdateAutoTimestampEntity implements Builda
return this;
}
public Builder setTokenStatusTransitions(
ImmutableSortedMap<DateTime, TokenStatus> transitions) {
return setTokenStatusTransitionsInstant(
transitions.entrySet().stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
Ordering.natural(), e -> toInstant(e.getKey()), Map.Entry::getValue)));
}
public Builder setTokenStatusTransitionsInstant(
ImmutableSortedMap<Instant, TokenStatus> transitions) {
public Builder setTokenStatusTransitions(ImmutableSortedMap<Instant, TokenStatus> transitions) {
getInstance().tokenStatusTransitions =
TimedTransitionProperty.makeInstant(
transitions,
@@ -17,8 +17,6 @@ package google.registry.model.domain.token;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import google.registry.model.Buildable;
@@ -38,7 +36,6 @@ import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* An entity representing a bulk pricing promotion. Note that this table is still called
@@ -107,29 +104,11 @@ public class BulkPricingPackage extends ImmutableObject implements Buildable {
return bulkPrice;
}
/**
* @deprecated Use {@link #getNextBillingDateInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getNextBillingDate() {
return toDateTime(nextBillingDate);
}
public Instant getNextBillingDateInstant() {
public Instant getNextBillingDate() {
return nextBillingDate;
}
/**
* @deprecated Use {@link #getLastNotificationSentInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Optional<DateTime> getLastNotificationSent() {
return Optional.ofNullable(toDateTime(lastNotificationSent));
}
public Optional<Instant> getLastNotificationSentInstant() {
public Optional<Instant> getLastNotificationSent() {
return Optional.ofNullable(lastNotificationSent);
}
@@ -197,30 +176,12 @@ public class BulkPricingPackage extends ImmutableObject implements Buildable {
return this;
}
/**
* @deprecated Use {@link #setNextBillingDate(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setNextBillingDate(DateTime nextBillingDate) {
return setNextBillingDate(toInstant(nextBillingDate));
}
public Builder setNextBillingDate(Instant nextBillingDate) {
checkArgumentNotNull(nextBillingDate, "Next billing date must not be null");
getInstance().nextBillingDate = nextBillingDate;
return this;
}
/**
* @deprecated Use {@link #setLastNotificationSent(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setLastNotificationSent(@Nullable DateTime lastNotificationSent) {
return setLastNotificationSent(toInstant(lastNotificationSent));
}
public Builder setLastNotificationSent(@Nullable Instant lastNotificationSent) {
getInstance().lastNotificationSent = lastNotificationSent;
return this;
@@ -18,12 +18,11 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.eppinput;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -18,12 +18,11 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.eppoutput;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -27,7 +27,6 @@ import google.registry.model.domain.Domain;
import google.registry.model.domain.VKeyConverter_Domain;
import google.registry.persistence.VKey;
import google.registry.persistence.converter.InetAddressSetUserType;
import google.registry.util.DateTimeUtils;
import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.Column;
@@ -39,7 +38,6 @@ import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
/**
* A persistable Host resource including mutable and non-mutable fields.
@@ -127,15 +125,8 @@ public class HostBase extends EppResource {
"HostBase is not an actual persisted entity you can create a key to; use Host instead");
}
@Deprecated
@Override
@SuppressWarnings("InlineMeSuggester")
public HostBase cloneProjectedAtTime(DateTime now) {
return this;
}
@Override
public EppResource cloneProjectedAtInstant(Instant now) {
public HostBase cloneProjectedAtTime(Instant now) {
return this;
}
@@ -170,9 +161,8 @@ public class HostBase extends EppResource {
Instant lastSuperordinateChange =
Optional.ofNullable(getLastSuperordinateChange()).orElse(getCreationTime());
Instant lastTransferOfCurrentSuperordinate =
Optional.ofNullable(superordinateDomain.getLastTransferTime())
.map(DateTimeUtils::toInstant)
.orElse(START_INSTANT);
Optional.ofNullable(superordinateDomain.getLastTransferTime()).orElse(START_INSTANT);
return lastSuperordinateChange.isBefore(lastTransferOfCurrentSuperordinate)
? lastTransferOfCurrentSuperordinate
: lastTransferTime;
@@ -18,13 +18,12 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(InetAddressAdapter.class)
})
package google.registry.model.host;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -17,10 +17,10 @@
xmlns = @XmlNs(namespaceURI = "urn:ietf:params:xml:ns:epp-1.0", prefix = ""),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class)
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
package google.registry.model;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlNs;
@@ -549,16 +549,7 @@ public abstract class PollMessage extends ImmutableObject
return targetId;
}
/**
* @deprecated Use {@link #getAutorenewEndTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getAutorenewEndTime() {
return toDateTime(autorenewEndTime);
}
public Instant getAutorenewEndTimeInstant() {
public Instant getAutorenewEndTime() {
return autorenewEndTime;
}
@@ -18,12 +18,11 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.poll;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -32,8 +32,6 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
import static google.registry.util.CollectionUtils.nullToEmptyImmutableSortedCopy;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PasswordUtils.SALT_SUPPLIER;
import static google.registry.util.PasswordUtils.hashPassword;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
@@ -94,7 +92,6 @@ import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nullable;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/** Information about a registrar. */
@Entity
@@ -441,15 +438,6 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return creationTime.getTimestamp();
}
/**
* @deprecated Use {@link #getCreationTime()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getCreationDateTime() {
return toDateTime(creationTime.getTimestamp());
}
@Nullable
public Long getIanaIdentifier() {
return ianaIdentifier;
@@ -465,55 +453,19 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
: ImmutableSortedMap.copyOf(billingAccountMap);
}
/**
* @deprecated Use {@link #getLastUpdateTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastUpdateTime() {
return toDateTime(getUpdateTimestamp().getTimestamp());
}
public Instant getLastUpdateTimeInstant() {
public Instant getLastUpdateTime() {
return getUpdateTimestamp().getTimestamp();
}
/**
* @deprecated Use {@link #getLastCertificateUpdateTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastCertificateUpdateTime() {
return toDateTime(lastCertificateUpdateTime);
}
public Instant getLastCertificateUpdateTimeInstant() {
public Instant getLastCertificateUpdateTime() {
return lastCertificateUpdateTime;
}
/**
* @deprecated Use {@link #getLastExpiringCertNotificationSentDateInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastExpiringCertNotificationSentDate() {
return toDateTime(lastExpiringCertNotificationSentDate);
}
public Instant getLastExpiringCertNotificationSentDateInstant() {
public Instant getLastExpiringCertNotificationSentDate() {
return lastExpiringCertNotificationSentDate;
}
/**
* @deprecated Use {@link #getLastExpiringFailoverCertNotificationSentDateInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastExpiringFailoverCertNotificationSentDate() {
return toDateTime(lastExpiringFailoverCertNotificationSentDate);
}
public Instant getLastExpiringFailoverCertNotificationSentDateInstant() {
public Instant getLastExpiringFailoverCertNotificationSentDate() {
return lastExpiringFailoverCertNotificationSentDate;
}
@@ -521,16 +473,7 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return registrarName;
}
/**
* @deprecated Use {@link #getLastPocVerificationDateInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastPocVerificationDate() {
return toDateTime(lastPocVerificationDate);
}
public Instant getLastPocVerificationDateInstant() {
public Instant getLastPocVerificationDate() {
return lastPocVerificationDate;
}
@@ -862,30 +805,12 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return this;
}
/**
* @deprecated Use {@link #setClientCertificate(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setClientCertificate(String clientCertificate, DateTime now) {
return setClientCertificate(clientCertificate, toInstant(now));
}
public Builder setLastExpiringCertNotificationSentDate(Instant now) {
checkArgumentNotNull(now, "Registrar lastExpiringCertNotificationSentDate cannot be null");
getInstance().lastExpiringCertNotificationSentDate = now;
return this;
}
/**
* @deprecated Use {@link #setLastExpiringCertNotificationSentDate(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setLastExpiringCertNotificationSentDate(DateTime now) {
return setLastExpiringCertNotificationSentDate(toInstant(now));
}
public Builder setLastExpiringFailoverCertNotificationSentDate(Instant now) {
checkArgumentNotNull(
now, "Registrar lastExpiringFailoverCertNotificationSentDate cannot be null");
@@ -893,15 +818,6 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return this;
}
/**
* @deprecated Use {@link #setLastExpiringFailoverCertNotificationSentDate(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setLastExpiringFailoverCertNotificationSentDate(DateTime now) {
return setLastExpiringFailoverCertNotificationSentDate(toInstant(now));
}
public Builder setFailoverClientCertificate(String clientCertificate, Instant now) {
clientCertificate = emptyToNull(clientCertificate);
String clientCertificateHash = calculateHash(clientCertificate);
@@ -914,30 +830,12 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return this;
}
/**
* @deprecated Use {@link #setFailoverClientCertificate(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setFailoverClientCertificate(String clientCertificate, DateTime now) {
return setFailoverClientCertificate(clientCertificate, toInstant(now));
}
public Builder setLastPocVerificationDate(Instant now) {
checkArgumentNotNull(now, "Registrar lastPocVerificationDate cannot be null");
getInstance().lastPocVerificationDate = now;
return this;
}
/**
* @deprecated Use {@link #setLastPocVerificationDate(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setLastPocVerificationDate(DateTime now) {
return setLastPocVerificationDate(toInstant(now));
}
private static String calculateHash(String clientCertificate) {
if (clientCertificate == null) {
return null;
@@ -1075,16 +973,6 @@ public class Registrar extends UpdateAutoTimestampEntity implements Buildable, J
return this;
}
/**
* @deprecated Use {@link #setLastUpdateTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@VisibleForTesting
public Builder setLastUpdateTime(DateTime timestamp) {
return setLastUpdateTime(toInstant(timestamp));
}
/** Build the registrar, nullifying empty fields. */
@Override
public Registrar build() {
@@ -616,15 +616,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return invoicingEnabled;
}
/**
* Retrieve the TLD state at the given time. Defaults to {@link TldState#PREDELEGATION}.
*
* <p>Note that {@link TldState#PDT} TLDs pretend to be in {@link TldState#GENERAL_AVAILABILITY}.
*/
public TldState getTldState(DateTime now) {
return getTldState(toInstant(now));
}
/**
* Retrieve the TLD state at the given time. Defaults to {@link TldState#PREDELEGATION}.
*
@@ -635,11 +626,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return TldState.PDT.equals(state) ? TldState.GENERAL_AVAILABILITY : state;
}
/** Retrieve whether this TLD is in predelegation testing. */
public boolean isPdt(DateTime now) {
return isPdt(toInstant(now));
}
/** Retrieve whether this TLD is in predelegation testing. */
public boolean isPdt(Instant now) {
return TldState.PDT.equals(tldStateTransitions.getValueAtTime(now));
@@ -649,16 +635,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return creationTime.getTimestamp();
}
/**
* @deprecated Use {@link #getCreationTime()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@JsonIgnore
public DateTime getCreationDateTime() {
return toDateTime(creationTime.getTimestamp());
}
public boolean getEscrowEnabled() {
return escrowEnabled;
}
@@ -712,14 +688,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return currency;
}
/**
* Use {@code PricingEngineProxy.getDomainCreateCost} instead of this to find the cost for a
* domain create.
*/
public Money getCreateBillingCost(DateTime now) {
return getCreateBillingCost(toInstant(now));
}
/**
* Use {@code PricingEngineProxy.getDomainCreateCost} instead of this to find the cost for a
* domain create.
@@ -728,12 +696,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return createBillingCostTransitions.getValueAtTime(now);
}
public ImmutableSortedMap<DateTime, Money> getCreateBillingCostTransitions() {
return createBillingCostTransitions.toValueMap();
}
@JsonIgnore
public ImmutableSortedMap<Instant, Money> getCreateBillingCostTransitionsInstant() {
public ImmutableSortedMap<Instant, Money> getCreateBillingCostTransitions() {
return createBillingCostTransitions.toValueMapInstant();
}
@@ -745,15 +708,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return restoreBillingCost;
}
/**
* Use {@code PricingEngineProxy.getDomainRenewCost} instead of this to find the cost for a domain
* renewal, and all derived costs (i.e. autorenews, transfers, and the per-domain part of a
* restore cost).
*/
public Money getStandardRenewCost(DateTime now) {
return getStandardRenewCost(toInstant(now));
}
/**
* Use {@code PricingEngineProxy.getDomainRenewCost} instead of this to find the cost for a domain
* renewal, and all derived costs (i.e. autorenews, transfers, and the per-domain part of a
@@ -773,32 +727,17 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return registryLockOrUnlockBillingCost;
}
public ImmutableSortedMap<DateTime, TldState> getTldStateTransitions() {
return tldStateTransitions.toValueMap();
}
@JsonIgnore
public ImmutableSortedMap<Instant, TldState> getTldStateTransitionsInstant() {
public ImmutableSortedMap<Instant, TldState> getTldStateTransitions() {
return tldStateTransitions.toValueMapInstant();
}
public ImmutableSortedMap<DateTime, Money> getRenewBillingCostTransitions() {
return renewBillingCostTransitions.toValueMap();
}
@JsonIgnore
public ImmutableSortedMap<Instant, Money> getRenewBillingCostTransitionsInstant() {
public ImmutableSortedMap<Instant, Money> getRenewBillingCostTransitions() {
return renewBillingCostTransitions.toValueMapInstant();
}
/** Returns the EAP fee for the tld at the given time. */
public Fee getEapFeeFor(DateTime now) {
return getEapFeeFor(toInstant(now));
}
/** Returns the EAP fee for the tld at the given time. */
public Fee getEapFeeFor(Instant now) {
ImmutableSortedMap<Instant, Money> valueMap = getEapFeeScheduleAsMapInstant();
ImmutableSortedMap<Instant, Money> valueMap = getEapFeeScheduleAsMap();
Instant periodStart = valueMap.floorKey(now);
Instant periodEnd = valueMap.ceilingKey(now);
// NOTE: assuming END_INSTANT would never be reached...
@@ -818,13 +757,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
@VisibleForTesting
@JsonProperty("eapFeeSchedule")
public ImmutableSortedMap<DateTime, Money> getEapFeeScheduleAsMap() {
return eapFeeSchedule.toValueMap();
}
@JsonIgnore
@VisibleForTesting
public ImmutableSortedMap<Instant, Money> getEapFeeScheduleAsMapInstant() {
public ImmutableSortedMap<Instant, Money> getEapFeeScheduleAsMap() {
return eapFeeSchedule.toValueMapInstant();
}
@@ -832,12 +765,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return lordnUsername;
}
public DateTime getClaimsPeriodEnd() {
return toDateTime(claimsPeriodEnd);
}
@JsonIgnore
public Instant getClaimsPeriodEndInstant() {
public Instant getClaimsPeriodEnd() {
return claimsPeriodEnd;
}
@@ -914,17 +842,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
}
/** Sets the TLD state to transition to the specified states at the specified times. */
public Builder setTldStateTransitions(ImmutableSortedMap<DateTime, TldState> tldStatesMap) {
return setTldStateTransitionsInstant(
tldStatesMap.entrySet().stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
Ordering.natural(), e -> toInstant(e.getKey()), Map.Entry::getValue)));
}
/** Sets the TLD state to transition to the specified states at the specified times. */
public Builder setTldStateTransitionsInstant(
ImmutableSortedMap<Instant, TldState> tldStatesMap) {
public Builder setTldStateTransitions(ImmutableSortedMap<Instant, TldState> tldStatesMap) {
checkNotNull(tldStatesMap, "TLD states map cannot be null");
// Filter out any entries with QUIET_PERIOD as the value before checking for ordering, since
// that phase is allowed to appear anywhere.
@@ -1056,15 +974,6 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
}
public Builder setCreateBillingCostTransitions(
ImmutableSortedMap<DateTime, Money> createCostsMap) {
return setCreateBillingCostTransitionsInstant(
createCostsMap.entrySet().stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
Ordering.natural(), e -> toInstant(e.getKey()), Map.Entry::getValue)));
}
public Builder setCreateBillingCostTransitionsInstant(
ImmutableSortedMap<Instant, Money> createCostsMap) {
checkArgumentNotNull(createCostsMap, "Create billing costs map cannot be null");
checkArgument(
@@ -1117,24 +1026,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return this;
}
/**
* Sets the renew billing cost to transition to the specified values at the specified times.
*
* <p>Renew billing costs transitions should only be added at least 5 days (the length of an
* automatic transfer) in advance, to avoid discrepancies between the cost stored with the
* billing event (created when the transfer is requested) and the cost at the time when the
* transfer actually occurs (5 days later).
*/
public Builder setRenewBillingCostTransitions(
ImmutableSortedMap<DateTime, Money> renewCostsMap) {
return setRenewBillingCostTransitionsInstant(
renewCostsMap.entrySet().stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
Ordering.natural(), e -> toInstant(e.getKey()), Map.Entry::getValue)));
}
public Builder setRenewBillingCostTransitionsInstant(
ImmutableSortedMap<Instant, Money> renewCostsMap) {
checkArgumentNotNull(renewCostsMap, "Renew billing costs map cannot be null");
checkArgument(
@@ -1146,16 +1038,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
}
/** Sets the EAP fee schedule for the TLD. */
public Builder setEapFeeSchedule(ImmutableSortedMap<DateTime, Money> eapFeeSchedule) {
return setEapFeeScheduleInstant(
eapFeeSchedule.entrySet().stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
Ordering.natural(), e -> toInstant(e.getKey()), Map.Entry::getValue)));
}
/** Sets the EAP fee schedule for the TLD. */
public Builder setEapFeeScheduleInstant(ImmutableSortedMap<Instant, Money> eapFeeSchedule) {
public Builder setEapFeeSchedule(ImmutableSortedMap<Instant, Money> eapFeeSchedule) {
checkArgumentNotNull(eapFeeSchedule, "EAP fee schedule cannot be null");
checkArgument(
eapFeeSchedule.values().stream().allMatch(Money::isPositiveOrZero),
@@ -1194,11 +1077,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
return this;
}
public Builder setClaimsPeriodEnd(DateTime claimsPeriodEnd) {
return setClaimsPeriodEndInstant(toInstant(claimsPeriodEnd));
}
public Builder setClaimsPeriodEndInstant(Instant claimsPeriodEnd) {
public Builder setClaimsPeriodEnd(Instant claimsPeriodEnd) {
getInstance().claimsPeriodEnd = checkArgumentNotNull(claimsPeriodEnd);
return this;
}
@@ -1287,12 +1166,10 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl
Predicate<Money> currencyCheck =
(Money money) -> money.getCurrencyUnit().equals(instance.currency);
checkArgument(
instance.getRenewBillingCostTransitionsInstant().values().stream()
.allMatch(currencyCheck),
instance.getRenewBillingCostTransitions().values().stream().allMatch(currencyCheck),
"Renew cost must be in the TLD's currency");
checkArgument(
instance.getCreateBillingCostTransitionsInstant().values().stream()
.allMatch(currencyCheck),
instance.getCreateBillingCostTransitions().values().stream().allMatch(currencyCheck),
"Create cost must be in the TLD's currency");
checkArgument(
instance.eapFeeSchedule.toValueMapInstant().values().stream().allMatch(currencyCheck),
@@ -18,12 +18,11 @@
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapters({
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class),
@XmlJavaTypeAdapter(UtcInstantAdapter.class)
})
package google.registry.model.transfer;
import google.registry.xml.UtcDateTimeAdapter;
import google.registry.xml.UtcInstantAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
@@ -16,7 +16,7 @@ package google.registry.persistence.converter;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.collect.ImmutableSortedMap.toImmutableSortedMap;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import static google.registry.util.DateTimeUtils.parseInstant;
import com.google.common.collect.ImmutableSortedMap;
@@ -47,9 +47,7 @@ public abstract class TimedTransitionBaseUserType<V extends Serializable>
@Override
Map<String, String> toStringMap(TimedTransitionProperty<V> map) {
return map.toValueMapInstant().entrySet().stream()
.collect(
toImmutableMap(
e -> ISO_8601_FORMATTER.format(e.getKey()), e -> valueToString(e.getValue())));
.collect(toImmutableMap(e -> formatInstant(e.getKey()), e -> valueToString(e.getValue())));
}
@Override
@@ -16,7 +16,7 @@ package google.registry.rdap;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import com.google.common.base.Joiner;
@@ -343,8 +343,8 @@ abstract class AbstractJsonableObject implements Jsonable {
if (object instanceof Instant instant) {
// According to RFC 9083 section 3, the syntax of dates and times is defined in RFC3339.
//
// According to RFC3339, we should use ISO8601, so we use ISO_8601_FORMATTER.
return new JsonPrimitive(ISO_8601_FORMATTER.format(instant));
// According to RFC3339, we should use ISO8601, so we use formatInstant.
return new JsonPrimitive(formatInstant(instant));
}
if (object == null) {
return JsonNull.INSTANCE;
@@ -85,7 +85,7 @@ public class RdapDomainAction extends RdapActionBase {
private void handlePossibleBsaBlock(InternetDomainName domainName) {
Tld tld = Tld.get(domainName.parent().toString());
if (DomainFlowUtils.isBlockedByBsa(domainName.parts().getFirst(), tld, clock.nowUtc())) {
if (DomainFlowUtils.isBlockedByBsa(domainName.parts().getFirst(), tld, clock.now())) {
throw new DomainBlockedByBsaException(domainName + " blocked by BSA");
}
}
@@ -95,7 +95,7 @@ final class DomainToXjcConverter {
// identifying the end (expiration) of the domain name object's
// registration period. This element MUST be present if the domain
// name has been allocated.
bean.setExDate(model.getRegistrationExpirationDateTime());
bean.setExDate(toDateTime(model.getRegistrationExpirationTime()));
// o An OPTIONAL <upDate> element that contains the date and time of
// the most recent domain-name-object modification. This element
@@ -114,7 +114,7 @@ final class DomainToXjcConverter {
// the most recent domain object successful transfer. This element
// MUST NOT be present if the domain name object has never been
// transferred.
bean.setTrDate(model.getLastTransferTime());
bean.setTrDate(toDateTime(model.getLastTransferTime()));
// o One or more <status> elements that contain the current status
// descriptors associated with the domain name.
@@ -146,7 +146,7 @@ final class RegistrarToXjcConverter {
// the most recent RDE registrar-object modification. This element
// MUST NOT be present if the rdeRegistrar object has never been
// modified.
bean.setUpDate(model.getLastUpdateTime());
bean.setUpDate(toDateTime(model.getLastUpdateTime()));
return bean;
}
@@ -15,8 +15,7 @@
package google.registry.tmch;
import static com.google.common.base.Preconditions.checkState;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DateTimeUtils.formatInstant;
import com.google.common.base.Joiner;
import google.registry.model.domain.Domain;
@@ -46,7 +45,7 @@ public final class LordnTaskUtils {
domain.getDomainName(),
domain.getSmdId(),
getIanaIdentifier(domain.getCreationRegistrarId()),
ISO_8601_FORMATTER.format(domain.getCreationTime())); // Used as creation time.
formatInstant(domain.getCreationTime())); // Used as creation time.
}
/** Returns the corresponding CSV LORDN line for a claims domain. */
@@ -57,8 +56,8 @@ public final class LordnTaskUtils {
domain.getDomainName(),
domain.getLaunchNotice().getNoticeId().getTcnId(),
getIanaIdentifier(domain.getCreationRegistrarId()),
ISO_8601_FORMATTER.format(domain.getCreationTime()), // Used as creation time.
ISO_8601_FORMATTER.format(toInstant(domain.getLaunchNotice().getAcceptedTime())));
formatInstant(domain.getCreationTime()), // Used as creation time.
formatInstant(domain.getLaunchNotice().getAcceptedTime()));
}
/** Retrieves the IANA identifier for a registrar by its ID. */
@@ -24,7 +24,7 @@ import static google.registry.tmch.LordnTaskUtils.COLUMNS_CLAIMS;
import static google.registry.tmch.LordnTaskUtils.COLUMNS_SUNRISE;
import static google.registry.tmch.LordnTaskUtils.getCsvLineForClaimsDomain;
import static google.registry.tmch.LordnTaskUtils.getCsvLineForSunriseDomain;
import static google.registry.util.DateTimeUtils.ISO_8601_FORMATTER;
import static google.registry.util.DateTimeUtils.formatInstant;
import static jakarta.servlet.http.HttpServletResponse.SC_ACCEPTED;
import static java.nio.charset.StandardCharsets.US_ASCII;
@@ -172,8 +172,7 @@ public final class NordnUploadAction implements Runnable {
phase.equals(PARAM_LORDN_PHASE_SUNRISE) ? COLUMNS_SUNRISE : COLUMNS_CLAIMS;
String header =
String.format(
"1,%s,%d\n%s\n",
ISO_8601_FORMATTER.format(clock.now()), domains.size(), columns);
"1,%s,%d\n%s\n", formatInstant(clock.now()), domains.size(), columns);
try {
URL url =
uploadCsvToLordn(String.format("/LORDN/%s/%s", tld, phase), header + csv);
@@ -16,6 +16,7 @@ package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toInstant;
import com.beust.jcommander.Parameter;
import google.registry.model.domain.token.AllocationToken;
@@ -107,7 +108,8 @@ abstract class CreateOrUpdateBulkPricingPackageCommand extends MutatingCommand {
Optional.ofNullable(maxCreates).ifPresent(builder::setMaxCreates);
Optional.ofNullable(price).ifPresent(builder::setBulkPrice);
Optional.ofNullable(nextBillingDate)
.ifPresent(nextBillingDate -> builder.setNextBillingDate(nextBillingDate));
.ifPresent(
nextBillingDate -> builder.setNextBillingDate(toInstant(nextBillingDate)));
if (clearLastNotificationSent()) {
builder.setLastNotificationSent((Instant) null);
}
@@ -19,6 +19,7 @@ import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.common.base.Verify.verify;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.RegistrarUtils.normalizeRegistrarName;
import static java.nio.charset.StandardCharsets.US_ASCII;
@@ -338,9 +339,10 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
verify(
oldRegistrar.getClientCertificate().isPresent(),
"Primary cert is absent. Rotation may remove a failover certificate still in use.");
builder.setFailoverClientCertificate(oldRegistrar.getClientCertificate().get(), now);
builder.setFailoverClientCertificate(
oldRegistrar.getClientCertificate().get(), toInstant(now));
}
builder.setClientCertificate(asciiCert, now);
builder.setClientCertificate(asciiCert, toInstant(now));
}
if (rotatePrimaryCert && clientCertificateFilename == null) {
throw new IllegalArgumentException("--rotate_primary_cert must be used with --cert_file.");
@@ -351,7 +353,7 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
if (!asciiCert.equals("")) {
certificateChecker.validateCertificate(asciiCert);
}
builder.setFailoverClientCertificate(asciiCert, now);
builder.setFailoverClientCertificate(asciiCert, toInstant(now));
}
Optional.ofNullable(ianaId).ifPresent(i -> builder.setIanaIdentifier(i.orElse(null)));
Optional.ofNullable(poNumber).ifPresent(builder::setPoNumber);
@@ -86,7 +86,7 @@ class EnqueuePollMessageCommand extends MutatingCommand {
() -> {
Domain domain =
ResourceFlowUtils.loadAndVerifyExistence(
Domain.class, domainName, tm().getTransactionTime());
Domain.class, domainName, tm().getTxTime());
ImmutableList<String> registrarIds;
if (sendToAll) {
registrarIds =
@@ -116,7 +116,7 @@ class EnqueuePollMessageCommand extends MutatingCommand {
new PollMessage.OneTime.Builder()
.setRegistrarId(registrarId)
.setHistoryEntry(historyEntry)
.setEventTime(tm().getTransactionTime())
.setEventTime(tm().getTxTime())
.setMsg(message)
.build());
}
@@ -252,7 +252,7 @@ class GenerateAllocationTokensCommand implements Command {
Optional.ofNullable(discountPrice).ifPresent(token::setDiscountPrice);
Optional.ofNullable(discountYears).ifPresent(token::setDiscountYears);
Optional.ofNullable(tokenStatusTransitions)
.ifPresent(token::setTokenStatusTransitionsInstant);
.ifPresent(token::setTokenStatusTransitions);
Optional.ofNullable(renewalPrice).ifPresent(token::setRenewalPrice);
Optional.ofNullable(domainNames)
.ifPresent(d -> token.setDomainName(d.removeFirst()));
@@ -17,6 +17,8 @@ package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
import static google.registry.util.CollectionUtils.findDuplicates;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.beust.jcommander.Parameter;
@@ -71,12 +73,14 @@ final class RenewDomainCommand extends MutatingEppToolCommand {
checkArgument(period < 10, "Cannot renew domains for 10 or more years");
DateTime now = clock.nowUtc();
for (String domainName : mainParameters) {
Domain domain = ResourceFlowUtils.loadAndVerifyExistence(Domain.class, domainName, now);
Domain domain =
ResourceFlowUtils.loadAndVerifyExistence(Domain.class, domainName, toInstant(now));
setSoyTemplate(DomainRenewSoyInfo.getInstance(), DomainRenewSoyInfo.RENEWDOMAIN);
SoyMapData soyMapData =
new SoyMapData(
"domainName", domain.getDomainName(),
"expirationDate", domain.getRegistrationExpirationDateTime().toString(DATE_FORMATTER),
"expirationDate",
DATE_FORMATTER.print(toDateTime(domain.getRegistrationExpirationTime())),
"period", String.valueOf(period));
if (requestedByRegistrar != null) {
@@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.Sets.difference;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toInstant;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
@@ -38,12 +39,13 @@ import google.registry.tools.params.NameserversParameter;
import google.registry.tools.soy.DomainRenewSoyInfo;
import google.registry.tools.soy.UniformRapidSuspensionSoyInfo;
import jakarta.xml.bind.annotation.adapters.HexBinaryAdapter;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
/** A command to suspend a domain for the Uniform Rapid Suspension process. */
@Parameters(separators = " =",
@@ -125,7 +127,8 @@ final class UniformRapidSuspensionCommand extends MutatingEppToolCommand {
throws ResourceFlowUtils.ResourceDoesNotExistException {
superuser = true;
DateTime now = clock.nowUtc();
Domain domain = ResourceFlowUtils.loadAndVerifyExistence(Domain.class, domainName, now);
Domain domain =
ResourceFlowUtils.loadAndVerifyExistence(Domain.class, domainName, toInstant(now));
Set<String> missingHosts =
difference(newHosts, ForeignKeyUtils.loadKeys(Host.class, newHosts, now).keySet());
checkArgument(missingHosts.isEmpty(), "Hosts do not exist: %s", missingHosts);
@@ -158,9 +161,9 @@ final class UniformRapidSuspensionCommand extends MutatingEppToolCommand {
"domainName",
domain.getDomainName(),
"expirationDate",
domain
.getRegistrationExpirationDateTime()
.toString(DateTimeFormat.forPattern("YYYY-MM-dd")),
DateTimeFormatter.ofPattern("yyyy-MM-dd")
.withZone(ZoneOffset.UTC)
.format(domain.getRegistrationExpirationTime()),
// period is the number of years to renew the registration for
"period",
String.valueOf(1),
@@ -21,8 +21,10 @@ import static google.registry.flows.domain.DomainFlowUtils.newAutorenewPollMessa
import static google.registry.flows.domain.DomainFlowUtils.updateAutorenewRecurrenceEndTime;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static google.registry.util.DateTimeUtils.formatInstant;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.minusYears;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.beust.jcommander.Parameter;
@@ -44,6 +46,7 @@ import google.registry.util.Clock;
import google.registry.util.NonFinalForTesting;
import jakarta.inject.Inject;
import java.io.UnsupportedEncodingException;
import java.time.Instant;
import java.util.List;
import java.util.Optional;
import org.joda.time.DateTime;
@@ -99,9 +102,10 @@ class UnrenewDomainCommand extends ConfirmingCommand {
}
domainsWithDisallowedStatusesBuilder.putAll(
domainName, Sets.intersection(domain.get().getStatusValues(), DISALLOWED_STATUSES));
if (isBeforeOrAt(minusYears(domain.get().getRegistrationExpirationDateTime(), period), now)) {
if (isBeforeOrAt(
toDateTime(minusYears(domain.get().getRegistrationExpirationTime(), period)), now)) {
domainsExpiringTooSoonBuilder.put(
domainName, domain.get().getRegistrationExpirationDateTime());
domainName, toDateTime(domain.get().getRegistrationExpirationTime()));
}
}
@@ -144,8 +148,8 @@ class UnrenewDomainCommand extends ConfirmingCommand {
DateTime now = clock.nowUtc();
for (String domainName : mainParameters) {
Domain domain = ForeignKeyUtils.loadResource(Domain.class, domainName, now).get();
DateTime previousTime = domain.getRegistrationExpirationDateTime();
DateTime newTime = minusYears(previousTime, period);
Instant previousTime = domain.getRegistrationExpirationTime();
Instant newTime = minusYears(previousTime, period);
resultBuilder.append(
String.format(
"%s expiration time changed from %s to %s\n", domainName, previousTime, newTime));
@@ -180,11 +184,11 @@ class UnrenewDomainCommand extends ConfirmingCommand {
"Domain %s has prohibited status values",
domainName);
checkState(
minusYears(domain.getRegistrationExpirationDateTime(), period).isAfter(now),
minusYears(domain.getRegistrationExpirationTime(), period).isAfter(toInstant(now)),
"Domain %s expires too soon",
domainName);
DateTime newExpirationTime = minusYears(domain.getRegistrationExpirationDateTime(), period);
Instant newExpirationTime = minusYears(domain.getRegistrationExpirationTime(), period);
DomainHistory domainHistory =
new DomainHistory.Builder()
.setDomain(domain)
@@ -202,25 +206,25 @@ class UnrenewDomainCommand extends ConfirmingCommand {
.setMsg(
String.format(
"Domain %s was unrenewed by %d years; now expires at %s.",
domainName, period, newExpirationTime))
domainName, period, formatInstant(newExpirationTime)))
.setHistoryEntry(domainHistory)
.setEventTime(now)
.build();
// Create a new autorenew billing event and poll message starting at the new expiration time.
BillingRecurrence newAutorenewEvent =
newAutorenewBillingEvent(domain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setDomainHistory(domainHistory)
.build();
PollMessage.Autorenew newAutorenewPollMessage =
newAutorenewPollMessage(domain)
.setEventTime(toInstant(newExpirationTime))
.setEventTime(newExpirationTime)
.setHistoryEntry(domainHistory)
.build();
// End the old autorenew billing event and poll message now.
BillingRecurrence existingBillingRecurrence = tm().loadByKey(domain.getAutorenewBillingEvent());
updateAutorenewRecurrenceEndTime(
domain, existingBillingRecurrence, now, domainHistory.getHistoryEntryId());
domain, existingBillingRecurrence, toInstant(now), domainHistory.getHistoryEntryId());
Domain newDomain =
domain
.asBuilder()
@@ -220,8 +220,7 @@ final class UpdateAllocationTokensCommand extends UpdateOrDeleteAllocationTokens
Optional.ofNullable(discountPremiums).ifPresent(builder::setDiscountPremiums);
Optional.ofNullable(discountPrice).ifPresent(builder::setDiscountPrice);
Optional.ofNullable(discountYears).ifPresent(builder::setDiscountYears);
Optional.ofNullable(tokenStatusTransitions)
.ifPresent(builder::setTokenStatusTransitionsInstant);
Optional.ofNullable(tokenStatusTransitions).ifPresent(builder::setTokenStatusTransitions);
if (renewalPriceBehavior != null
&& renewalPriceBehavior != original.getRenewalPriceBehavior()) {
@@ -180,7 +180,7 @@ public class UpdateRecurrenceCommand extends ConfirmingCommand {
"Domain %s has a pending transfer: %s",
domainName,
domain.getTransferData());
Optional<Instant> domainAutorenewEndTime = domain.getAutorenewEndTimeInstant();
Optional<Instant> domainAutorenewEndTime = domain.getAutorenewEndTime();
domainAutorenewEndTime.ifPresent(
endTime ->
checkArgument(
@@ -28,7 +28,7 @@ import google.registry.request.Action;
import google.registry.request.auth.Auth;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import org.joda.time.DateTime;
import java.time.Instant;
/** An action that lists hosts, for use by the {@code nomulus list_hosts} command. */
@Action(
@@ -50,7 +50,7 @@ public final class ListHostsAction extends ListObjectsAction<Host> {
@Override
public ImmutableSet<Host> loadObjects() {
final DateTime now = clock.nowUtc();
Instant now = clock.now();
return loadAllOf(Host.class)
.flatMap(ImmutableList::stream)
.filter(host -> EppResourceUtils.isActive(host, now))
@@ -27,7 +27,7 @@ import google.registry.request.Action;
import google.registry.request.auth.Auth;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import org.joda.time.DateTime;
import java.time.Instant;
/** An action that lists top-level domains, for use by the {@code nomulus list_tlds} command. */
@Action(
@@ -62,7 +62,7 @@ public final class ListTldsAction extends ListObjectsAction<Tld> {
@Override
public ImmutableMap<String, String> getFieldOverrides(Tld tld) {
final DateTime now = clock.nowUtc();
Instant now = clock.now();
return new ImmutableMap.Builder<String, String>()
.put("dnsPaused", tld.getDnsPaused() ? "paused" : "-")
.put("escrowEnabled", tld.getEscrowEnabled() ? "enabled" : "-")
@@ -17,7 +17,7 @@ package google.registry.ui.server.console;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.request.Action.Method.POST;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.PreconditionsUtils.checkArgumentPresent;
import static org.apache.http.HttpStatus.SC_OK;
@@ -36,9 +36,9 @@ import google.registry.request.auth.Auth;
import google.registry.util.DomainNameUtils;
import google.registry.util.RegistryEnvironment;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import java.util.stream.Collectors;
import org.joda.time.DateTime;
@Action(
service = Service.CONSOLE,
@@ -91,10 +91,10 @@ public class ConsoleUpdateRegistrarAction extends ConsoleApiAction {
}
}
DateTime now = tm().getTransactionTime();
DateTime newLastPocVerificationDate =
Instant now = tm().getTxTime();
Instant newLastPocVerificationDate =
registrarParam.getLastPocVerificationDate() == null
? START_OF_TIME
? START_INSTANT
: registrarParam.getLastPocVerificationDate();
checkArgument(
@@ -19,6 +19,7 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
import static google.registry.request.Action.Method.GET;
import static google.registry.request.Action.Method.POST;
import static google.registry.ui.server.console.PasswordResetRequestAction.checkUserExistsWithRegistryLockEmail;
import static google.registry.util.DateTimeUtils.plusHours;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
@@ -33,7 +34,6 @@ import google.registry.request.Parameter;
import google.registry.request.auth.Auth;
import jakarta.inject.Inject;
import jakarta.servlet.http.HttpServletResponse;
import java.time.Duration;
import java.util.Optional;
@Action(
@@ -122,7 +122,7 @@ public class PasswordResetVerifyAction extends ConsoleApiAction {
case REGISTRY_LOCK -> ConsolePermission.REGISTRY_LOCK;
};
checkPermission(user, request.getRegistrarId(), requiredVerifyPermission);
if (request.getRequestTime().plus(Duration.ofHours(1)).isBefore(tm().getTxTime())) {
if (plusHours(request.getRequestTime(), 1).isBefore(tm().getTxTime())) {
throw createVerificationCodeException();
}
return request;
@@ -102,7 +102,7 @@ public class SecurityAction extends ConsoleApiAction {
if (registrarParameter.getClientCertificate().isPresent()) {
String newClientCert = registrarParameter.getClientCertificate().get();
certificateChecker.validateCertificate(newClientCert);
updatedRegistrarBuilder.setClientCertificate(newClientCert, tm().getTransactionTime());
updatedRegistrarBuilder.setClientCertificate(newClientCert, tm().getTxTime());
updates.add("PRIMARY_SSL_CERT_CHANGE");
}
}
@@ -112,8 +112,7 @@ public class SecurityAction extends ConsoleApiAction {
if (registrarParameter.getFailoverClientCertificate().isPresent()) {
String newFailoverCert = registrarParameter.getFailoverClientCertificate().get();
certificateChecker.validateCertificate(newFailoverCert);
updatedRegistrarBuilder.setFailoverClientCertificate(
newFailoverCert, tm().getTransactionTime());
updatedRegistrarBuilder.setFailoverClientCertificate(newFailoverCert, tm().getTxTime());
updates.add("FAILOVER_SSL_CERT_CHANGE");
}
}
@@ -106,23 +106,23 @@ public class BulkDomainTransferActionTest {
// The cloneProjectedAtTime calls are necessary to resolve the transfers, even though the
// transfers have a time period of 0
activeDomain = loadByEntity(activeDomain);
assertThat(activeDomain.cloneProjectedAtInstant(now).getCurrentSponsorRegistrarId())
assertThat(activeDomain.cloneProjectedAtTime(now).getCurrentSponsorRegistrarId())
.isEqualTo("NewRegistrar");
assertThat(activeDomain.getUpdateTimestamp().getTimestamp()).isEqualTo(runTime);
// The other three domains shouldn't change
alreadyTransferredDomain = loadByEntity(alreadyTransferredDomain);
assertThat(alreadyTransferredDomain.cloneProjectedAtInstant(now).getCurrentSponsorRegistrarId())
assertThat(alreadyTransferredDomain.cloneProjectedAtTime(now).getCurrentSponsorRegistrarId())
.isEqualTo("NewRegistrar");
assertThat(alreadyTransferredDomain.getUpdateTimestamp().getTimestamp()).isEqualTo(preRunTime);
pendingDeleteDomain = loadByEntity(pendingDeleteDomain);
assertThat(pendingDeleteDomain.cloneProjectedAtInstant(now).getCurrentSponsorRegistrarId())
assertThat(pendingDeleteDomain.cloneProjectedAtTime(now).getCurrentSponsorRegistrarId())
.isEqualTo("TheRegistrar");
assertThat(pendingDeleteDomain.getUpdateTimestamp().getTimestamp()).isEqualTo(preRunTime);
deletedDomain = loadByEntity(deletedDomain);
assertThat(deletedDomain.cloneProjectedAtInstant(now).getCurrentSponsorRegistrarId())
assertThat(deletedDomain.cloneProjectedAtTime(now).getCurrentSponsorRegistrarId())
.isEqualTo("TheRegistrar");
assertThat(deletedDomain.getUpdateTimestamp().getTimestamp()).isEqualTo(preRunTime);
}
@@ -19,6 +19,7 @@ import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistEppResource;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.testing.LogsSubject.assertAboutLogs;
import static google.registry.util.DateTimeUtils.minusDays;
import static org.joda.money.CurrencyUnit.USD;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
@@ -376,7 +377,7 @@ public class CheckBulkComplianceActionTest {
String.format(DOMAIN_LIMIT_WARNING_EMAIL_BODY, 1, "abc123", "The Registrar", 1, 2));
BulkPricingPackage packageAfterCheck =
tm().transact(() -> BulkPricingPackage.loadByTokenString(token.getToken()).get());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.nowUtc());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.now());
}
@Test
@@ -458,7 +459,7 @@ public class CheckBulkComplianceActionTest {
.asBuilder()
.setMaxCreates(4)
.setMaxDomains(1)
.setLastNotificationSent(clock.nowUtc().minusDays(5))
.setLastNotificationSent(minusDays(clock.now(), 5))
.build();
tm().transact(() -> tm().put(bulkPricingPackage));
// Domains limit is 1, creating 2 domains to go over the limit
@@ -488,7 +489,7 @@ public class CheckBulkComplianceActionTest {
BulkPricingPackage packageAfterCheck =
tm().transact(() -> BulkPricingPackage.loadByTokenString(token.getToken()).get());
assertThat(packageAfterCheck.getLastNotificationSent().get())
.isEqualTo(clock.nowUtc().minusDays(5));
.isEqualTo(minusDays(clock.now(), 5));
}
@Test
@@ -499,7 +500,7 @@ public class CheckBulkComplianceActionTest {
.asBuilder()
.setMaxCreates(4)
.setMaxDomains(1)
.setLastNotificationSent(clock.nowUtc().minusDays(45))
.setLastNotificationSent(minusDays(clock.now(), 45))
.build();
tm().transact(() -> tm().put(bulkPricingPackage));
// Domains limit is 1, creating 2 domains to go over the limit
@@ -533,7 +534,7 @@ public class CheckBulkComplianceActionTest {
String.format(DOMAIN_LIMIT_WARNING_EMAIL_BODY, 1, "abc123", "The Registrar", 1, 2));
BulkPricingPackage packageAfterCheck =
tm().transact(() -> BulkPricingPackage.loadByTokenString(token.getToken()).get());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.nowUtc());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.now());
}
@Test
@@ -544,7 +545,7 @@ public class CheckBulkComplianceActionTest {
.asBuilder()
.setMaxCreates(4)
.setMaxDomains(1)
.setLastNotificationSent(clock.nowUtc().minusDays(31))
.setLastNotificationSent(minusDays(clock.now(), 31))
.build();
tm().transact(() -> tm().put(bulkPricingPackage));
// Domains limit is 1, creating 2 domains to go over the limit
@@ -578,6 +579,6 @@ public class CheckBulkComplianceActionTest {
String.format(DOMAIN_LIMIT_UPGRADE_EMAIL_BODY, 1, "abc123", "The Registrar", 1, 2));
BulkPricingPackage packageAfterCheck =
tm().transact(() -> BulkPricingPackage.loadByTokenString(token.getToken()).get());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.nowUtc());
assertThat(packageAfterCheck.getLastNotificationSent().get()).isEqualTo(clock.now());
}
}

Some files were not shown because too many files have changed in this diff Show More