1
0
mirror of https://github.com/google/nomulus synced 2026-05-16 21:01:44 +00:00

Compare commits

..

12 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
Ben McIlwain
6be0a32741 Migrate core, billing, and history to java.time (#3020)
Migrated core entity primitives (GracePeriod, RegistryLock, TimeOfYear), transfer objects (BaseTransferObject, DomainTransferData, TransferResponse), and HostBase from Joda-Time DateTime to java.time.Instant as Phases 5 and 7.
Migrated the Billing Ecosystem (BillingBase, BillingEvent, BillingRecurrence, BillingCancellation) and associated Beam pipelines (ExpandBillingRecurrencesPipeline, InvoicingPipeline) to java.time.Instant as Phase 6.
Migrated PollMessage event times and all associated Poll flow utilities (PollAckFlow, PollRequestFlow) to use Instant natively.
Migrated core timestamp tracking on EppResource (creationTime, lastEppUpdateTime, deletionTime) as well as CreateAutoTimestamp and UpdateAutoTimestamp to Instant, shedding deprecated DateTime accessors.
Migrated the entire HistoryEntry reporting ecosystem (HistoryEntry, DomainTransactionRecord, HistoryEntryDao) completely to java.time.Instant.
Updated all associated EPP flows, tools, and testing helpers to handle Instants directly where supported.
2026-04-24 19:50:55 +00:00
gbrodman
8cf222d1c9 Add Jedis (for Valkey) caches for domains and hosts (#3013)
We add optional Valkey caching of hosts and domains for future use. Eventually, this will allow us to pre-warm large amounts of data in Valkey for quick retrieval during actions like RDAP.

Note: this doesn't actually use the caches yet.

We use Jedis instead of Redisson for speed purposes
(https://www.instaclustr.com/blog/redis-java-clients-and-client-side-caching/)
which means that we have to implement our own multilayer cache but
that's not the worst thing in the world.

Tested on crash with logging and RDAP code that's not included in this
PR -- it behaves as you'd expect, where the local cache works for
immediate re-lookups and the remote cache works after a restart.
2026-04-24 19:50:01 +00:00
gbrodman
903414c76b Add Errorprone plugin for removing FQCNs (#3021)
These annoy me and AI loves to add them. Let's automatically remove them.
2026-04-23 20:17:19 +00:00
Ben McIlwain
925482ea58 Migrate TMCH, SMD, and Fee models to java.time (#3019)
Continues the project-wide migration from Joda-Time's DateTime to java.time.Instant, focusing on Trademark Clearinghouse (TMCH), Signed Mark Data (SMD), and Fee extension models.

Key updates:
- TMCH & SMD: Updated SmdRevocationList and domain check/create flows to use Instant for sunrise validations and revocation checks.
- Fee Extension Ecosystem: Refactored FeeCheckRequest, FeeCreateCommandExtension, and BaseFee to use Instant for effective dates and period calculations.
- EPP Objects: Updated DomainInfoData, TransferResponse, and PollMessage objects to use Instant for event timestamps.
- Pricing Logic: DomainPricingLogic methods now accept Instant for cost calculations.

Additionally, DateTimeUtils was enhanced with Instant compatibility methods for plusMonths and minusMonths to safely handle leap years.

Redundant conversions between DateTime and Instant were eliminated throughout the flows and tests. DomainFlowUtils leverages Instant natively to avoid inline casting, and test assertions now utilize Truth's Instant subjects for cleaner validation.
2026-04-22 16:44:47 +00:00
Juan Celhay
653704811b Add RDAP latency metrics (#3015)
* RDAP latency metrics

* refactor code

* refactors

* refactor

* record latency in RdapMetricInformation object

* lint

* fix tests

* add for tests

* formatter
2026-04-21 19:00:25 +00:00
359 changed files with 5093 additions and 4830 deletions

View File

@@ -15,7 +15,13 @@ 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.
- **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 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:**
- Avoid direct calls to `Instant.now()`, `DateTime.now()`, `ZonedDateTime.now()`, or `System.currentTimeMillis()`.
@@ -53,9 +59,14 @@ This document outlines foundational mandates, architectural patterns, and projec
### 6. Project Dependencies
- **Common Module:** When using `Clock` or other core utilities in a new or separate module (like `load-testing`), ensure `implementation project(':common')` is added to the module's `build.gradle`.
### 7. Search and Discovery
- **No CodeSearch:** This project is hosted on GitHub, not Google3. Do NOT use `mcp_Coding_search_for_files_codesearch` or other internal Google3 search tools.
- **Local Grep:** Use local shell commands like `git grep` or `grep` via `run_shell_command` to search the codebase.
## Performance and Efficiency
- **Turn Minimization:** Aim for "perfect" code in the first iteration. Iterative fixes for checkstyle or compilation errors consume significant context and time.
- **Context Management:** Use sub-agents for batch refactoring or high-volume output tasks to keep the main session history lean and efficient.
- **Code Formatting:** Do not write custom Python scripts or manual regex replacements to fix code formatting issues (e.g., unused imports, import ordering, line length). Instead, use the project's built-in formatting tools: run `./gradlew spotlessApply` to fix unused/unordered imports and `./gradlew javaIncrementalFormatApply` (or `google-java-format --replace <files>`) to automatically fix Java formatting and indentation errors.
## General Code Review Lessons & Avoidable Mistakes
Based on historical PR reviews, avoid the following common mistakes:
@@ -89,11 +100,28 @@ This document captures high-level architectural patterns, lessons learned from l
- **Committing:** Always create a new commit on the branch if one hasn't been created yet for the branch's specific work. Only perform amending (`git commit --amend --no-edit`) for subsequent changes once the initial commit has been successfully created.
- **One Commit Per PR:** All changes for a single PR must be squashed into a single commit before merging.
- **Default to Amend:** Once an initial commit is created for a PR, all subsequent functional changes should be amended into that same commit by default (`git commit --amend --no-edit`). This ensures the PR remains a single, clean unit of work throughout the development lifecycle.
- **Commit Message Style:** Follow standard Git commit best practices. The subject line (first line) should be concise, capitalized, and **must not end with punctuation** (e.g., a period).
- **Final Validation:** Always run `git status` as the final step before declaring a task complete to ensure all changes are committed and the working directory is clean.
- **Commit Verification:** After any commit or amendment, explicitly verify the success of the operation (e.g., using `git status` and reviewing the diff). Never report a Git operation as "done" without having first successfully executed the command and confirmed the repository state.
- **Commit Message Style:** Follow standard Git commit best practices. The subject line (first line) MUST be a maximum of 50 characters, concise, capitalized, and **must not end with punctuation** (e.g., a period). The body MUST explicitly encapsulate and summarize all changes made across the entire diff, detailing the "what" and "why" comprehensively.
- **Strict Completion Verification:** You MUST NEVER declare a task, commit, or amendment as complete until you have explicitly verified that the workspace is clean. You MUST follow this exact sequence of actions across multiple conversational turns if necessary:
1. Execute the `git commit` or `git commit --amend` command.
2. Wait for the tool to return successfully.
3. Execute `git status`.
4. Wait for the tool to return and explicitly verify the output contains `nothing to commit, working tree clean` (or similar indication that no unstaged changes remain). If changes remain, stage them and amend the commit, then repeat this verification loop.
5. **Only after** step 4 has successfully returned a clean working directory may you generate a text response to the user declaring that the task is complete.
- **Diff Review:** Before finalizing a task, review the full diff (e.g., `git diff HEAD^`) to ensure all changes are functional and relevant. Identify and revert any formatting-only changes in files that do not contain functional updates to keep the commit focused.
## Self-Review Guidelines
Before finalizing any PR or declaring a task complete, you MUST perform a thorough, rigorous self-review of your entire diff. Run `git diff HEAD^` (or review the staged changes) and actively verify the following against every modified line:
1. **Imports & FQNs:** Did I leave any fully-qualified class names or static variables inline? Did I add the necessary imports for them? *Crucial Exception:* If the file already imports a class with the identical name (e.g., it uses both `java.time.Duration` and `org.joda.time.Duration`), one MUST remain fully qualified to avoid a compilation conflict.
2. **Redundant Conversions:** Did I use `toDateTime(clock.now())` where `clock.nowUtc()` would suffice? Did I use `toDateTime(END_INSTANT)` instead of `END_OF_TIME`? Did I use `.toInstant()` or `.toDateTime()` on something that could be avoided by using a different method overload (e.g., `tm().getTxTime()`)?
3. **Verbose Math:** Did I write any verbose time conversions inline? Are there `DateTimeUtils` methods I should be using instead? If not, should I abstract this math into `DateTimeUtils`?
4. **Assertion Cleanliness:** Am I polluting test assertions with `toDateTime(...)` wraps? If so, I need to add overloaded assertions to the Truth Subjects instead.
5. **Diff Scope:** Are there any formatting-only changes in files that I did not functionally modify? If so, revert them. Does the total line count of the diff align with the approved scope (e.g., ~1,000 lines for migrations)?
6. **Commit Message:** Does the commit message title fit within 50 characters? Does the body encapsulate the entirety of the changes across the diff cleanly and professionally?
7. **Missing Tests & Coverage:** *Perform a structured check for any new methods or modified behavior.* Did I add a new utility method (like `plusMonths(Instant, int)`) or change core logic? If so, I MUST open the corresponding test file and write tests to cover the new functionality (including edge cases, negative values, and leap years) before considering the task complete. A code review is not thorough if it only checks for compilation. I must actively ensure every new branch of logic has a test.
Only after actively confirming these checks against your diff are you permitted to finalize the task.
## Refactoring & Migration Guardrails
@@ -111,11 +139,18 @@ 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
- **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.
- **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. 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.
@@ -137,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.

View File

@@ -27,6 +27,7 @@ import java.time.format.DateTimeFormatterBuilder;
import java.time.format.DateTimeParseException;
import java.time.format.SignStyle;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -68,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}.
*
@@ -169,13 +175,25 @@ 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
: now.atZone(ZoneOffset.UTC).plusYears(1).plusYears(years - 1).toInstant();
}
/** Adds months to a date. */
public static Instant plusMonths(Instant now, int months) {
checkArgument(months >= 0);
return now.atZone(ZoneOffset.UTC).plusMonths(months).toInstant();
}
/** Subtracts months from a date. */
public static Instant minusMonths(Instant now, int months) {
checkArgument(months >= 0);
return now.atZone(ZoneOffset.UTC).minusMonths(months).toInstant();
}
/**
* Subtracts years from a date, in the {@code Duration} sense of semantic years. Use this instead
* of {@link DateTime#minusYears} to ensure that we never end up on February 29.
@@ -240,6 +258,22 @@ public abstract class DateTimeUtils {
return (instant == null) ? null : org.joda.time.Instant.ofEpochMilli(instant.toEpochMilli());
}
public static Instant plusHours(Instant instant, long hours) {
return instant.plus(hours, ChronoUnit.HOURS);
}
public static Instant minusHours(Instant instant, long hours) {
return instant.minus(hours, ChronoUnit.HOURS);
}
public static Instant plusMinutes(Instant instant, long minutes) {
return instant.plus(minutes, ChronoUnit.MINUTES);
}
public static Instant minusMinutes(Instant instant, long minutes) {
return instant.minus(minutes, ChronoUnit.MINUTES);
}
public static Instant plusDays(Instant instant, int days) {
return instant.atZone(ZoneOffset.UTC).plusDays(days).toInstant();
}

View File

@@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.util.concurrent.Uninterruptibles;
import jakarta.inject.Inject;
import java.io.Serializable;
import java.time.Duration;
import javax.annotation.concurrent.ThreadSafe;
import org.joda.time.ReadableDuration;
@@ -40,6 +41,6 @@ public final class SystemSleeper implements Sleeper, Serializable {
@Override
public void sleepUninterruptibly(ReadableDuration duration) {
checkArgument(duration.getMillis() >= 0);
Uninterruptibles.sleepUninterruptibly(java.time.Duration.ofMillis(duration.getMillis()));
Uninterruptibles.sleepUninterruptibly(Duration.ofMillis(duration.getMillis()));
}
}

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

View File

@@ -628,18 +628,6 @@
}
}
},
"node_modules/@angular/build/node_modules/@types/node": {
"version": "25.5.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/@types/node/-/node-25.5.0.tgz",
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"undici-types": "~7.18.0"
}
},
"node_modules/@angular/build/node_modules/@vitejs/plugin-basic-ssl": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.1.0.tgz",
@@ -653,24 +641,6 @@
"vite": "^6.0.0 || ^7.0.0"
}
},
"node_modules/@angular/build/node_modules/chokidar": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/chokidar/-/chokidar-5.0.0.tgz",
"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"readdirp": "^5.0.0"
},
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular/build/node_modules/magic-string": {
"version": "0.30.21",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
@@ -694,22 +664,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/@angular/build/node_modules/readdirp": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/readdirp/-/readdirp-5.0.0.tgz",
"integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular/build/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
@@ -743,15 +697,6 @@
"node": ">= 12"
}
},
"node_modules/@angular/build/node_modules/undici-types": {
"version": "7.18.2",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true
},
"node_modules/@angular/build/node_modules/vite": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz",
@@ -971,24 +916,6 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@angular/cli/node_modules/chokidar": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/chokidar/-/chokidar-5.0.0.tgz",
"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"readdirp": "^5.0.0"
},
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular/cli/node_modules/cli-spinners": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-3.4.0.tgz",
@@ -1092,22 +1019,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/@angular/cli/node_modules/readdirp": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/readdirp/-/readdirp-5.0.0.tgz",
"integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@angular/cli/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
@@ -4695,24 +4606,6 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@schematics/angular/node_modules/chokidar": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/chokidar/-/chokidar-5.0.0.tgz",
"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"readdirp": "^5.0.0"
},
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@schematics/angular/node_modules/cli-spinners": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-3.4.0.tgz",
@@ -4816,22 +4709,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/@schematics/angular/node_modules/readdirp": {
"version": "5.0.0",
"resolved": "https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/readdirp/-/readdirp-5.0.0.tgz",
"integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
"dev": true,
"license": "MIT",
"optional": true,
"peer": true,
"engines": {
"node": ">= 20.19.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@schematics/angular/node_modules/rxjs": {
"version": "7.8.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",

View File

@@ -190,6 +190,9 @@ dependencies {
testRuntimeOnly deps['guru.nidi:graphviz-java-all-j2v8']
testImplementation deps['io.github.classgraph:classgraph']
testRuntimeOnly deps['io.github.java-diff-utils:java-diff-utils']
testImplementation deps['io.github.ss-bhatt:testcontainers-valkey']
implementation deps['io.protostuff:protostuff-core']
implementation deps['io.protostuff:protostuff-runtime']
implementation deps['jakarta.inject:jakarta.inject-api']
implementation deps['jakarta.mail:jakarta.mail-api']
implementation deps['jakarta.persistence:jakarta.persistence-api']
@@ -243,6 +246,7 @@ dependencies {
implementation deps['org.testcontainers:postgresql']
testImplementation deps['org.testcontainers:selenium']
testImplementation deps['org.testcontainers:testcontainers']
implementation deps['redis.clients:jedis']
implementation deps['us.fatehi:schemacrawler']
implementation deps['us.fatehi:schemacrawler-api']
implementation deps['us.fatehi:schemacrawler-diagram']

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,61 +96,50 @@ 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.12.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.13.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.google.common.html.types:types:1.0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
com.google.dagger:dagger-compiler:2.59.2=annotationProcessor,testAnnotationProcessor
com.google.dagger:dagger-spi:2.59.2=annotationProcessor,testAnnotationProcessor
@@ -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
@@ -290,70 +252,56 @@ io.github.classgraph:classgraph:4.8.162=compileClasspath,deploy_jar,nonprodCompi
io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,nonprodAnnotationProcessor,testAnnotationProcessor
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.grpc:grpc-alts:1.70.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
io.github.ss-bhatt:testcontainers-valkey:1.0.0=testCompileClasspath,testRuntimeClasspath
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
@@ -371,31 +319,33 @@ 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
io.protostuff:protostuff-collectionschema:1.8.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.protostuff:protostuff-core:1.8.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.protostuff:protostuff-runtime:1.8.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
jakarta-regexp:jakarta-regexp:1.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
jakarta.activation:jakarta.activation-api:2.1.4=jaxb
jakarta.activation:jakarta.activation-api:2.2.0-M1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -411,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
@@ -426,36 +376,38 @@ 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
org.apache.commons:commons-lang3:3.20.0=testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.8.1=checkstyle
org.apache.commons:commons-pool2:2.12.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-text:1.15.0=testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-text:1.3=checkstyle
org.apache.ftpserver:ftplet-api:1.2.1=testCompileClasspath,testRuntimeClasspath
@@ -501,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
@@ -513,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
@@ -563,21 +513,21 @@ org.jetbrains:annotations:17.0.0=compileClasspath,deploy_jar,nonprodCompileClass
org.jline:jline:3.30.5=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.joda:joda-money:2.0.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.json:json:20230618=soy
org.json:json:20240303=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jsoup:jsoup:1.22.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.json:json:20251224=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
@@ -635,16 +585,18 @@ org.webjars.npm:viz.js-graphviz-java:2.1.3=testRuntimeClasspath
org.xerial.snappy:snappy-java:1.1.10.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.xmlresolver:xmlresolver:5.2.2=checkstyle
org.yaml:snakeyaml:2.4=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
redis.clients.authentication:redis-authx-core:0.1.1-beta2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
redis.clients:jedis:7.4.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
tools.jackson.core:jackson-core:3.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
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

View File

@@ -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));

View File

@@ -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());

View File

@@ -20,7 +20,7 @@ import static google.registry.persistence.PersistenceModule.TransactionIsolation
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.request.Action.Method.POST;
import static google.registry.request.RequestParameters.PARAM_DRY_RUN;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.RegistryEnvironment.PRODUCTION;
import com.google.common.collect.ImmutableList;
@@ -99,7 +99,7 @@ public class DeleteLoadTestDataAction implements Runnable {
private void deletePollMessages(String registrarId) {
ImmutableList<PollMessage> pollMessages =
PollFlowUtils.createPollMessageQuery(registrarId, END_OF_TIME).list();
PollFlowUtils.createPollMessageQuery(registrarId, END_INSTANT).list();
if (isDryRun) {
logger.atInfo().log(
"Would delete %d poll messages for registrar %s.", pollMessages.size(), registrarId);

View File

@@ -188,7 +188,8 @@ public class DeleteProberDataAction implements Runnable {
tm().query(DOMAIN_QUERY_STRING, Domain.class)
.setParameter("tlds", deletableTlds)
.setParameter(
"creationTimeCutoff", CreateAutoTimestamp.create(now.minus(DOMAIN_USED_DURATION)))
"creationTimeCutoff",
CreateAutoTimestamp.create(toInstant(now.minus(DOMAIN_USED_DURATION))))
.setParameter("nowMinusSoftDeleteDelay", toInstant(now.minus(SOFT_DELETE_DELAY)))
.setParameter("now", toInstant(now));
ImmutableList<Domain> domainList =
@@ -304,12 +305,12 @@ public class DeleteProberDataAction implements Runnable {
// Take a DNS queue + admin registrar id as input so that it can be called from the mapper as well
private void softDeleteDomain(Domain domain) {
Domain deletedDomain =
domain.asBuilder().setDeletionTime(tm().getTransactionTime()).setStatusValues(null).build();
domain.asBuilder().setDeletionTime(tm().getTxTime()).setStatusValues(null).build();
DomainHistory historyEntry =
new DomainHistory.Builder()
.setDomain(domain)
.setType(DOMAIN_DELETE)
.setModificationTime(tm().getTransactionTime())
.setModificationTime(tm().getTxTime())
.setBySuperuser(true)
.setReason("Deletion of prober data")
.setRegistrarId(registryAdminRegistrarId)

View File

@@ -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;

View File

@@ -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);

View File

@@ -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++;

View File

@@ -14,12 +14,17 @@
package google.registry.beam.billing;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import google.registry.reporting.billing.BillingModule;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.regex.Pattern;
import org.apache.beam.sdk.coders.AtomicCoder;
import org.apache.beam.sdk.coders.Coder;
@@ -29,9 +34,6 @@ import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.coders.VarIntCoder;
import org.apache.beam.sdk.coders.VarLongCoder;
import org.jetbrains.annotations.NotNull;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
/**
* A record representing a single billable event, parsed from a {@code SchemaAndRecord}.
@@ -53,8 +55,8 @@ import org.joda.time.format.DateTimeFormatter;
*/
public record BillingEvent(
long id,
DateTime billingTime,
DateTime eventTime,
Instant billingTime,
Instant eventTime,
String registrarId,
String billingId,
String poNumber,
@@ -68,7 +70,7 @@ public record BillingEvent(
String flags) {
private static final DateTimeFormatter DATE_TIME_FORMATTER =
DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss zzz");
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss 'UTC'").withZone(ZoneOffset.UTC);
private static final Pattern SYNTHETIC_REGEX = Pattern.compile("SYNTHETIC", Pattern.LITERAL);
@@ -92,8 +94,8 @@ public record BillingEvent(
/** Creates a concrete {@link BillingEvent}. */
static BillingEvent create(
long id,
DateTime billingTime,
DateTime eventTime,
Instant billingTime,
Instant eventTime,
String registrarId,
String billingId,
String poNumber,
@@ -143,8 +145,8 @@ public record BillingEvent(
.join(
ImmutableList.of(
id(),
DATE_TIME_FORMATTER.print(billingTime()),
DATE_TIME_FORMATTER.print(eventTime()),
DATE_TIME_FORMATTER.format(billingTime()),
DATE_TIME_FORMATTER.format(eventTime()),
registrarId(),
billingId(),
poNumber(),
@@ -162,10 +164,13 @@ public record BillingEvent(
/** Returns the grouping key for this {@code BillingEvent}, to generate the overall invoice. */
InvoiceGroupingKey getInvoiceGroupingKey() {
return new InvoiceGroupingKey(
billingTime().toLocalDate().withDayOfMonth(1).toString(),
ZonedDateTime.ofInstant(billingTime(), ZoneOffset.UTC)
.toLocalDate()
.withDayOfMonth(1)
.toString(),
years() == 0
? ""
: billingTime()
: ZonedDateTime.ofInstant(billingTime(), ZoneOffset.UTC)
.toLocalDate()
.withDayOfMonth(1)
.plusYears(years())
@@ -308,8 +313,8 @@ public record BillingEvent(
@Override
public void encode(BillingEvent value, OutputStream outStream) throws IOException {
longCoder.encode(value.id(), outStream);
stringCoder.encode(DATE_TIME_FORMATTER.print(value.billingTime()), outStream);
stringCoder.encode(DATE_TIME_FORMATTER.print(value.eventTime()), outStream);
stringCoder.encode(DATE_TIME_FORMATTER.format(value.billingTime()), outStream);
stringCoder.encode(DATE_TIME_FORMATTER.format(value.eventTime()), outStream);
stringCoder.encode(value.registrarId(), outStream);
stringCoder.encode(value.billingId(), outStream);
stringCoder.encode(value.poNumber(), outStream);
@@ -327,8 +332,8 @@ public record BillingEvent(
public BillingEvent decode(InputStream inStream) throws IOException {
return new BillingEvent(
longCoder.decode(inStream),
DATE_TIME_FORMATTER.parseDateTime(stringCoder.decode(inStream)),
DATE_TIME_FORMATTER.parseDateTime(stringCoder.decode(inStream)),
Instant.from(DATE_TIME_FORMATTER.parse(stringCoder.decode(inStream))),
Instant.from(DATE_TIME_FORMATTER.parse(stringCoder.decode(inStream))),
stringCoder.decode(inStream),
stringCoder.decode(inStream),
stringCoder.decode(inStream),

View File

@@ -26,7 +26,6 @@ import static google.registry.util.DateTimeUtils.earliestOf;
import static google.registry.util.DateTimeUtils.latestOf;
import static google.registry.util.DateTimeUtils.minusYears;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toDateTime;
import static org.apache.beam.sdk.values.TypeDescriptors.voids;
import com.google.common.collect.ImmutableMap;
@@ -56,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;
@@ -277,12 +275,12 @@ public class ExpandBillingRecurrencesPipeline implements Serializable {
ImmutableSet.copyOf(
billingRecurrence
.getRecurrenceTimeOfYear()
.getInstancesInRangeInstant(
.getInstancesInRange(
Range.closedOpen(
latestOf(
plusYears(billingRecurrence.getRecurrenceLastExpansionInstant(), 1),
plusYears(billingRecurrence.getRecurrenceLastExpansion(), 1),
startTime),
earliestOf(billingRecurrence.getRecurrenceEndTimeInstant(), endTime))));
earliestOf(billingRecurrence.getRecurrenceEndTime(), endTime))));
} catch (IllegalArgumentException e) {
return;
}
@@ -307,14 +305,13 @@ public class ExpandBillingRecurrencesPipeline implements Serializable {
return;
}
Instant recurrenceLastExpansionTime = billingRecurrence.getRecurrenceLastExpansionInstant();
Instant recurrenceLastExpansionTime = billingRecurrence.getRecurrenceLastExpansion();
// Create new OneTime and DomainHistory for EventTimes that needs to be expanded.
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
@@ -402,7 +399,7 @@ public class ExpandBillingRecurrencesPipeline implements Serializable {
.getRenewPrice(
tld,
billingRecurrence.getTargetId(),
toDateTime(eventTime),
eventTime,
1,
billingRecurrence,
Optional.empty())

View File

@@ -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();
}

View File

@@ -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);
});

View File

@@ -228,7 +228,7 @@ public class BsaValidateAction implements Runnable {
}
boolean isStalenessAllowed(Domain domain) {
return domain.getCreationTimeInstant().plus(maxStaleness).isAfter(clock.now());
return domain.getCreationTime().plus(maxStaleness).isAfter(clock.now());
}
/** Returns unique labels across all block lists in the download specified by {@code jobName}. */

View File

@@ -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() {

View File

@@ -45,6 +45,7 @@ import google.registry.model.domain.Domain;
import google.registry.model.tld.Tld;
import google.registry.model.tld.Tld.TldType;
import google.registry.util.BatchedStreams;
import java.time.Duration;
import java.time.Instant;
import java.util.HashSet;
import java.util.List;
@@ -95,7 +96,7 @@ public final class DomainsRefresher {
public DomainsRefresher(
Instant prevRefreshStartTime,
Instant now,
java.time.Duration domainTxnMaxDuration,
Duration domainTxnMaxDuration,
int transactionBatchSize) {
this.prevRefreshStartTime = prevRefreshStartTime.minus(domainTxnMaxDuration);
this.now = now;

View File

@@ -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());
}

View File

@@ -0,0 +1,163 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import dagger.Module;
import dagger.Provides;
import google.registry.config.CredentialModule.ApplicationDefaultCredential;
import google.registry.config.RegistryConfig.Config;
import google.registry.model.EppResource;
import google.registry.model.ForeignKeyUtils;
import google.registry.model.domain.Domain;
import google.registry.model.host.Host;
import google.registry.persistence.VKey;
import google.registry.util.Clock;
import google.registry.util.GoogleCredentialsBundle;
import jakarta.inject.Singleton;
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Optional;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisClientConfig;
import redis.clients.jedis.RedisClient;
import redis.clients.jedis.RedisClusterClient;
import redis.clients.jedis.UnifiedJedis;
/** Dagger module to provide the {@link Jedis}-based cache for Valkey. */
@Module
public final class CacheModule {
@Provides
@Singleton
public static Optional<UnifiedJedis> provideJedis(
@ApplicationDefaultCredential GoogleCredentialsBundle credentialsBundle,
@Config("valkeyHostsAndPorts") Optional<ImmutableList<String>> valkeyHostsAndPorts,
@Config("valkeySslSocketFactory") SSLSocketFactory valkeySslSocketFactory) {
if (valkeyHostsAndPorts.map(ImmutableList::isEmpty).orElse(true)) {
return Optional.empty();
}
ImmutableSet<HostAndPort> hostsAndPorts =
valkeyHostsAndPorts.get().stream().map(HostAndPort::from).collect(toImmutableSet());
JedisClientConfig clientConfig =
DefaultJedisClientConfig.builder()
.ssl(true)
.sslSocketFactory(valkeySslSocketFactory)
.credentialsProvider(new ValkeyCredentialsProvider(credentialsBundle))
.build();
if (hostsAndPorts.size() > 1) {
return Optional.of(
RedisClusterClient.builder().clientConfig(clientConfig).nodes(hostsAndPorts).build());
}
return Optional.of(
RedisClient.builder()
.clientConfig(clientConfig)
.hostAndPort(Iterables.getOnlyElement(hostsAndPorts))
.build());
}
@Provides
@Singleton
public static DomainCache provideDomainCache(Optional<UnifiedJedis> jedis, Clock clock) {
if (jedis.isEmpty()) {
return domainName ->
ForeignKeyUtils.loadResourceByCache(Domain.class, domainName, clock.now());
}
SimplifiedJedisClient<Domain> jedisClient =
SimplifiedJedisClient.create(Domain.class, jedis.get());
return new MultilayerDomainCache(jedisClient, clock);
}
@Provides
@Singleton
public static HostCache provideHostCache(Optional<UnifiedJedis> jedis) {
if (jedis.isEmpty()) {
return repoId ->
Optional.ofNullable(EppResource.loadByCache(VKey.create(Host.class, repoId)));
}
SimplifiedJedisClient<Host> jedisClient = SimplifiedJedisClient.create(Host.class, jedis.get());
return new MultilayerHostCache(jedisClient);
}
@Provides
@Singleton
@Config("valkeySslSocketFactory")
static SSLSocketFactory provideValkeySslSocketFactory(
@Config("valkeyCertificateAuthority") String valkeyCertificateAuthority) {
try {
ImmutableList<X509Certificate> trustedCerts =
CertificateFactory.getInstance("X.509")
.generateCertificates(
new ByteArrayInputStream(
valkeyCertificateAuthority.getBytes(StandardCharsets.UTF_8)))
.stream()
.map(X509Certificate.class::cast)
.collect(toImmutableList());
// This is a roundabout way to trust the Cloud Memorystore-issued certificate authority even
// though it's not a root cert (it's an intermediate cert).
TrustManager x509TrustManager =
new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return trustedCerts.toArray(new X509Certificate[0]);
}
@Override
public void checkClientTrusted(X509Certificate[] certs, String authType) {}
@Override
public void checkServerTrusted(X509Certificate[] certs, String authType)
throws CertificateException {
Exception lastException = null;
for (X509Certificate cert : certs) {
for (X509Certificate trustedCert : trustedCerts) {
try {
cert.verify(trustedCert.getPublicKey());
return;
} catch (Exception e) {
// Verification failed, try the next one
lastException = e;
}
}
}
throw new CertificateException(
"None of the server certificates were signed by the provided CA", lastException);
}
};
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[] {x509TrustManager}, null);
return sslContext.getSocketFactory();
} catch (GeneralSecurityException e) {
throw new RuntimeException("Could not create X.509 certificate from provided PEM", e);
}
}
}

View File

@@ -0,0 +1,23 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import google.registry.model.domain.Domain;
import java.util.Optional;
/** Interface for some type of cache that loads {@link Domain}s by domain name. */
public interface DomainCache {
Optional<Domain> loadByDomainName(String domainName);
}

View File

@@ -0,0 +1,23 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import google.registry.model.host.Host;
import java.util.Optional;
/** Interface for some type of cache that loads {@link Host}s by repo ID. */
public interface HostCache {
Optional<Host> loadByRepoId(String repoId);
}

View File

@@ -0,0 +1,68 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
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;
/**
* A multi-layer cache for {@link Domain} objects.
*
* <p>It uses a local Caffeine cache, a remote Jedis cache, and finally the database.
*/
public class MultilayerDomainCache extends MultilayerEppResourceCache<Domain>
implements DomainCache {
private final Clock clock;
public MultilayerDomainCache(SimplifiedJedisClient<Domain> jedisClient, Clock clock) {
super(jedisClient);
this.clock = clock;
}
@Override
public Optional<Domain> loadByDomainName(String domainName) {
return loadFromCaches(domainName);
}
@Override
protected Optional<Domain> loadFromDatabase(String domainName) {
// Don't use the cache (avoid caching the same domain twice). Do use the replica SQL instance.
Optional<Domain> possibleDomain =
Optional.ofNullable(
ForeignKeyUtils.loadMostRecentResourceObjects(
Domain.class, ImmutableList.of(domainName), true)
.get(domainName));
Instant now = clock.now();
return possibleDomain
.filter(domain -> now.isBefore(domain.getDeletionTime()))
.map(domain -> domain.cloneProjectedAtTime(now));
}
@Override
protected String getJedisPrefix() {
return "d_";
}
@Override
protected boolean shouldPersistToRemoteCache(Domain domain) {
return Tld.get(domain.getTld()).getTldType().equals(Tld.TldType.REAL);
}
}

View File

@@ -0,0 +1,79 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import google.registry.config.RegistryConfig;
import google.registry.model.EppResource;
import java.time.Duration;
import java.util.Optional;
/**
* A multi-layer cache for {@link EppResource}s.
*
* <p>It uses a local Caffeine cache, a remote Jedis cache, and finally the database.
*/
public abstract class MultilayerEppResourceCache<V extends EppResource> {
// Don't use a loading cache; it'd complicate the nesting
private final Cache<String, V> localCache =
Caffeine.newBuilder()
.expireAfterWrite(Duration.ofHours(1))
.maximumSize(RegistryConfig.getEppResourceMaxCachedEntries())
.build();
private final SimplifiedJedisClient<V> jedisClient;
protected MultilayerEppResourceCache(SimplifiedJedisClient<V> jedisClient) {
this.jedisClient = jedisClient;
}
protected abstract Optional<V> loadFromDatabase(String key);
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));
if (possibleValue.isPresent()) {
return possibleValue;
}
// if not, try the remote cache
String jedisKey = getJedisPrefix() + key;
possibleValue = jedisClient.get(jedisKey);
if (possibleValue.isPresent()) {
localCache.put(key, possibleValue.get());
return possibleValue;
}
// lastly, try the DB
return loadFromDatabase(key)
.map(
v -> {
// Optional has no direct "peek" functionality to fill the caches
if (shouldPersistToRemoteCache(v)) {
jedisClient.set(new SimplifiedJedisClient.JedisResource<>(jedisKey, v));
}
localCache.put(key, v);
return v;
});
}
}

View File

@@ -0,0 +1,49 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import static google.registry.persistence.transaction.TransactionManagerFactory.replicaTm;
import google.registry.model.host.Host;
import google.registry.persistence.VKey;
import java.util.Optional;
/**
* A multi-layer cache for {@link Host} objects.
*
* <p>It uses a local Caffeine cache, a remote Jedis cache, and finally the database.
*/
public class MultilayerHostCache extends MultilayerEppResourceCache<Host> implements HostCache {
public MultilayerHostCache(SimplifiedJedisClient<Host> jedisClient) {
super(jedisClient);
}
@Override
public Optional<Host> loadByRepoId(String repoId) {
return loadFromCaches(repoId);
}
@Override
protected Optional<Host> loadFromDatabase(String repoId) {
return replicaTm()
.transact(() -> replicaTm().loadByKeyIfPresent(VKey.create(Host.class, repoId)));
}
@Override
protected String getJedisPrefix() {
return "h_";
}
}

View File

@@ -0,0 +1,130 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
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;
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.
*
* <p>We use protobufs for serialization to handle the immutable collections that our objects use.
*
* <p>{@link UnifiedJedis} pairs key-value types, so we need the key to be serialized to a byte
* array as well.
*/
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;
public static <V extends EppResource> SimplifiedJedisClient<V> create(
Class<V> valueClass, UnifiedJedis jedis) {
Schema<V> valueSchema = RuntimeSchema.getSchema(valueClass);
return new SimplifiedJedisClient<>(valueSchema, jedis);
}
private SimplifiedJedisClient(Schema<V> valueSchema, UnifiedJedis jedis) {
this.valueSchema = valueSchema;
this.jedis = jedis;
}
/** Gets the value from the remote cache. Returns null if it does not exist. */
public Optional<V> get(String key) {
checkNotNull(key, "Key cannot be null");
byte[] data = jedis.get(key.getBytes(StandardCharsets.UTF_8));
return Optional.ofNullable(data).map(this::deserialize);
}
/** Sets the value in the remote cache. */
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) {
LinkedBuffer buffer = LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE);
try {
return ProtostuffIOUtil.toByteArray(value, valueSchema, buffer);
} finally {
buffer.clear();
}
}
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;
}
}

View File

@@ -0,0 +1,46 @@
// Copyright 2026 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.cache;
import com.google.auth.oauth2.GoogleCredentials;
import google.registry.util.GoogleCredentialsBundle;
import java.io.IOException;
import java.util.function.Supplier;
import redis.clients.jedis.DefaultRedisCredentials;
import redis.clients.jedis.RedisCredentials;
public class ValkeyCredentialsProvider implements Supplier<RedisCredentials> {
private static final String MEMORYSTORE_AUTH_SCOPE =
"https://www.googleapis.com/auth/cloud-platform";
private final GoogleCredentials credentials;
public ValkeyCredentialsProvider(GoogleCredentialsBundle credentialsBundle) {
this.credentials =
credentialsBundle.getGoogleCredentials().createScoped(MEMORYSTORE_AUTH_SCOPE);
}
@Override
public RedisCredentials get() {
try {
credentials.refreshIfExpired();
} catch (IOException e) {
throw new RuntimeException("Unable to refresh IAM token for Memorystore", e);
}
String token = credentials.getAccessToken().getTokenValue();
return new DefaultRedisCredentials(null, token);
}
}

View File

@@ -1463,6 +1463,14 @@ public final class RegistryConfig {
return config.mosapi.tldThreadCount;
}
@Provides
@Config("valkeyHostsAndPorts")
public static Optional<ImmutableList<String>> provideValkeyHostsAndPorts(
RegistryConfigSettings config) {
return Optional.ofNullable(config.valkey)
.map(valkey -> ImmutableList.copyOf(valkey.hostsAndPorts));
}
private static String formatComments(String text) {
return Splitter.on('\n').omitEmptyStrings().trimResults().splitToList(text).stream()
.map(s -> "# " + s)

View File

@@ -43,6 +43,7 @@ public class RegistryConfigSettings {
public BulkPricingPackageMonitoring bulkPricingPackageMonitoring;
public Bsa bsa;
public MosApi mosapi;
public Valkey valkey;
/** Configuration options that apply to the entire GCP project. */
public static class GcpProject {
@@ -267,4 +268,9 @@ public class RegistryConfigSettings {
public List<String> services;
public int tldThreadCount;
}
/** Configuration for Valkey caching. */
public static class Valkey {
public List<String> hostsAndPorts;
}
}

View File

@@ -639,3 +639,7 @@ mosapi:
# ICANN MoSAPI Specification, Section 12.3</a>
tldThreadCount: 4
valkey:
# Optional: hosts and ports for remote Valkey caching, e.g.
# - "127.0.0.1:6379"
hostsAndPorts: []

View File

@@ -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>() {

View File

@@ -60,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.
@@ -130,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);
@@ -182,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();
}

View File

@@ -251,7 +251,7 @@ public class FlowModule {
String registrarId,
EppInput eppInput) {
builder
.setModificationTime(tm().getTransactionTime())
.setModificationTime(tm().getTxTime())
.setTrid(trid)
.setXmlBytes(inputXmlBytes)
.setBySuperuser(isSuperuser)

View File

@@ -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.

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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(

View File

@@ -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);
}

View File

@@ -53,6 +53,7 @@ import static google.registry.model.tld.label.ReservationType.NAME_COLLISION;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -120,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;
@@ -235,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);
@@ -331,7 +333,7 @@ public final class DomainCreateFlow implements MutatingFlow {
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);
@@ -492,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,
@@ -556,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(),
now.plus(addGracePeriod),
now.plusMillis(addGracePeriod.getMillis()),
TransactionReportField.netAddsFieldFromYears(period.getValue()),
1)));
}
@@ -579,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) {
@@ -601,10 +603,11 @@ public final class DomainCreateFlow implements MutatingFlow {
.setEventTime(now)
.setAllocationToken(allocationToken.map(AllocationToken::createVKey).orElse(null))
.setBillingTime(
now.plus(
isAnchorTenant
? tld.getAnchorTenantAddGracePeriodLength()
: tld.getAddGracePeriodLength()))
now.plusMillis(
(isAnchorTenant
? tld.getAnchorTenantAddGracePeriodLength()
: tld.getAddGracePeriodLength())
.getMillis()))
.setFlags(flagsBuilder.build())
.setDomainHistoryId(domainHistoryId)
.build();
@@ -612,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
@@ -638,7 +641,7 @@ 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)
@@ -652,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);
}
}
@@ -673,7 +676,7 @@ 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(now)

View File

@@ -40,6 +40,7 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost;
import static google.registry.util.CollectionUtils.nullToEmpty;
import static google.registry.util.CollectionUtils.union;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.google.common.collect.ImmutableList;
@@ -99,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;
@@ -146,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());
@@ -185,13 +188,15 @@ 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(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(deletionTime)
.setStatusValues(ImmutableSet.of(StatusValue.PENDING_DELETE))
@@ -202,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
@@ -237,7 +242,7 @@ 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()) {
@@ -247,11 +252,15 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
// 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();
}
}
}
@@ -290,7 +299,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
flowCustomLogic.beforeResponse(
BeforeResponseParameters.newBuilder()
.setResultCode(
newDomain.getDeletionDateTime().isAfter(now)
newDomain.getDeletionTime().isAfter(now)
? SUCCESS_WITH_ACTION_PENDING
: SUCCESS)
.setResponseExtensions(
@@ -303,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));
@@ -319,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 =
@@ -343,7 +348,7 @@ public final class DomainDeleteFlow implements MutatingFlow, SqlStatementLogging
cancelledRecords,
DomainTransactionRecord.create(
domain.getTld(),
now.plus(durationUntilDelete),
now.plusMillis(durationUntilDelete.getMillis()),
inAddGracePeriod
? TransactionReportField.DELETED_DOMAINS_GRACE
: TransactionReportField.DELETED_DOMAINS_NOGRACE,
@@ -353,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 =
@@ -377,7 +382,7 @@ 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(now)
@@ -395,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();
@@ -417,12 +422,12 @@ 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 =
billingRecurrence.getRecurrenceTimeOfYear().getLastInstanceBeforeOrAt(now);
return getDomainRenewCost(targetId, autoRenewTime, 1);
toDateTime(billingRecurrence.getRecurrenceTimeOfYear().getLastInstanceBeforeOrAt(now));
return getDomainRenewCost(targetId, toInstant(autoRenewTime), 1);
}
return tm().loadByKey(checkNotNull(gracePeriod.getBillingEvent())).getCost();
}

View File

@@ -38,10 +38,10 @@ import java.security.SignatureException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.CertificateRevokedException;
import java.time.Instant;
import javax.xml.crypto.MarshalException;
import javax.xml.crypto.dsig.XMLSignatureException;
import javax.xml.parsers.ParserConfigurationException;
import org.joda.time.DateTime;
import org.xml.sax.SAXException;
/** TMCH utility functions for domain flows. */
@@ -55,7 +55,7 @@ public final class DomainFlowTmchUtils {
}
public SignedMark verifySignedMarks(
ImmutableList<AbstractSignedMark> signedMarks, String domainLabel, DateTime now)
ImmutableList<AbstractSignedMark> signedMarks, String domainLabel, Instant now)
throws EppException {
if (signedMarks.size() > 1) {
throw new TooManySignedMarksException();
@@ -75,7 +75,7 @@ public final class DomainFlowTmchUtils {
return signedMark;
}
public SignedMark verifyEncodedSignedMark(EncodedSignedMark encodedSignedMark, DateTime now)
public SignedMark verifyEncodedSignedMark(EncodedSignedMark encodedSignedMark, Instant now)
throws EppException {
if (!encodedSignedMark.getEncoding().equals("base64")) {
throw new Base64RequiredForEncodedSignedMarksException();

View File

@@ -40,10 +40,9 @@ import static google.registry.model.tld.label.ReservationType.RESERVED_FOR_SPECI
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
import static google.registry.util.CollectionUtils.nullToEmpty;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
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;
@@ -124,6 +123,8 @@ import google.registry.tldconfig.idn.IdnLabelValidator;
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;
@@ -132,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;
@@ -252,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)
@@ -261,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);
}
@@ -457,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())
@@ -473,7 +473,7 @@ public class DomainFlowUtils {
* this registrar.
*/
static void verifyPremiumNameIsNotBlocked(
String domainName, DateTime priceTime, String registrarId) throws EppException {
String domainName, Instant priceTime, String registrarId) throws EppException {
if (isDomainPremium(domainName, priceTime)) {
if (Registrar.loadByRegistrarIdCached(registrarId).get().getBlockPremiumNames()) {
throw new PremiumNameBlockedException();
@@ -485,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);
@@ -504,7 +504,7 @@ public class DomainFlowUtils {
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
.setTargetId(domain.getDomainName())
.setRegistrarId(domain.getCurrentSponsorRegistrarId())
.setEventTime(domain.getRegistrationExpirationDateTime());
.setEventTime(domain.getRegistrationExpirationTime());
}
/**
@@ -515,7 +515,7 @@ public class DomainFlowUtils {
return new Autorenew.Builder()
.setTargetId(domain.getDomainName())
.setRegistrarId(domain.getCurrentSponsorRegistrarId())
.setEventTime(domain.getRegistrationExpirationDateTime())
.setEventTime(domain.getRegistrationExpirationTime())
.setMsg("Domain was auto-renewed.");
}
@@ -531,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());
@@ -566,7 +566,7 @@ public class DomainFlowUtils {
}
BillingRecurrence newBillingRecurrence =
existingBillingRecurrence.asBuilder().setRecurrenceEndTime(toInstant(newEndTime)).build();
existingBillingRecurrence.asBuilder().setRecurrenceEndTime(newEndTime).build();
tm().update(newBillingRecurrence);
return newBillingRecurrence;
}
@@ -581,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 {
DateTime now = 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();
@@ -659,7 +659,7 @@ public class DomainFlowUtils {
// process, don't count as expired for the purposes of requiring an added year of renewal on
// restore because they can't be restored in the first place.
boolean isExpired =
domain.isPresent() && domain.get().getRegistrationExpirationDateTime().isBefore(now);
domain.isPresent() && domain.get().getRegistrationExpirationTime().isBefore(now);
fees = pricingLogic.getRestorePrice(tld, domainNameString, now, isExpired).getFees();
}
case TRANSFER -> {
@@ -700,16 +700,16 @@ public class DomainFlowUtils {
// Set the fees, and based on the validDateRange of the fees, set the notAfterDate.
if (!fees.isEmpty()) {
builder.setFees(fees);
DateTime notAfterDate = null;
Instant notAfterDate = null;
for (Fee fee : fees) {
if (fee.hasValidDateRange()) {
DateTime endDate = fee.getValidDateRange().upperEndpoint();
Instant endDate = fee.getValidDateRange().upperEndpoint();
if (notAfterDate == null || notAfterDate.isAfter(endDate)) {
notAfterDate = endDate;
}
}
}
if (notAfterDate != null && !notAfterDate.equals(END_OF_TIME)) {
if (notAfterDate != null && !notAfterDate.equals(END_INSTANT)) {
builder.setNotAfterDateIfSupported(notAfterDate);
}
}
@@ -846,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();
}
}
@@ -934,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();
@@ -969,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;
@@ -983,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();
}
}
@@ -997,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());
}
}
@@ -1065,7 +1068,7 @@ public class DomainFlowUtils {
*/
public static ImmutableSet<DomainTransactionRecord> createCancelingRecords(
Domain domain,
final DateTime now,
Instant now,
Duration maxSearchPeriod,
final ImmutableSet<TransactionReportField> cancelableFields) {
@@ -1109,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();
}

View File

@@ -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(
@@ -122,8 +122,8 @@ public final class DomainInfoFlow implements MutatingFlow {
.setNameservers(
hostsRequest.requestDelegated() ? domain.loadNameserverHostNames() : null)
.setCreationTime(domain.getCreationTime())
.setLastEppUpdateTime(domain.getLastEppUpdateDateTime())
.setRegistrationExpirationTime(domain.getRegistrationExpirationDateTime())
.setLastEppUpdateTime(domain.getLastEppUpdateTime())
.setRegistrationExpirationTime(domain.getRegistrationExpirationTime())
.setLastTransferTime(domain.getLastTransferTime());
// If authInfo is non-null, then the caller is authorized to see the full information since we
@@ -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());

View File

@@ -41,11 +41,11 @@ import google.registry.model.pricing.PremiumPricingEngine.DomainPrices;
import google.registry.model.tld.Tld;
import jakarta.inject.Inject;
import java.math.RoundingMode;
import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.money.CurrencyUnit;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* Provides pricing for create, renew, etc, operations, with call-outs that can be customized by
@@ -70,7 +70,7 @@ public final class DomainPricingLogic {
public FeesAndCredits getCreatePrice(
Tld tld,
String domainName,
DateTime dateTime,
Instant dateTime,
int years,
boolean isAnchorTenant,
boolean isSunriseCreate,
@@ -125,7 +125,7 @@ public final class DomainPricingLogic {
public FeesAndCredits getRenewPrice(
Tld tld,
String domainName,
DateTime dateTime,
Instant dateTime,
int years,
@Nullable BillingRecurrence billingRecurrence,
Optional<AllocationToken> allocationToken) {
@@ -194,7 +194,7 @@ public final class DomainPricingLogic {
/** Returns a new restore price for the pricer. */
public FeesAndCredits getRestorePrice(
Tld tld, String domainName, DateTime dateTime, boolean isExpired) throws EppException {
Tld tld, String domainName, Instant dateTime, boolean isExpired) throws EppException {
DomainPrices domainPrices = getPricesForDomainName(domainName, dateTime);
FeesAndCredits.Builder feesAndCredits =
new FeesAndCredits.Builder()
@@ -217,7 +217,7 @@ public final class DomainPricingLogic {
/** Returns a new transfer price for the pricer. */
public FeesAndCredits getTransferPrice(
Tld tld, String domainName, DateTime dateTime, @Nullable BillingRecurrence billingRecurrence)
Tld tld, String domainName, Instant dateTime, @Nullable BillingRecurrence billingRecurrence)
throws EppException {
FeesAndCredits renewPrice =
getRenewPrice(tld, domainName, dateTime, 1, billingRecurrence, Optional.empty());
@@ -239,7 +239,7 @@ public final class DomainPricingLogic {
}
/** Returns a new update price for the pricer. */
public FeesAndCredits getUpdatePrice(Tld tld, String domainName, DateTime dateTime)
public FeesAndCredits getUpdatePrice(Tld tld, String domainName, Instant dateTime)
throws EppException {
CurrencyUnit currency = tld.getCurrency();
BaseFee feeOrCredit = Fee.create(zeroInCurrency(currency), FeeType.UPDATE, false);
@@ -272,7 +272,7 @@ public final class DomainPricingLogic {
private Money getDomainRenewCostWithDiscount(
Tld tld,
DomainPrices domainPrices,
DateTime dateTime,
Instant dateTime,
int years,
Optional<AllocationToken> allocationToken) {
// Short-circuit if the user sent an anchor-tenant or otherwise NONPREMIUM-renewal token
@@ -349,7 +349,7 @@ public final class DomainPricingLogic {
}
private DomainPrices applyTokenToDomainPrices(
DomainPrices domainPrices, Tld tld, DateTime dateTime, int years, AllocationToken token) {
DomainPrices domainPrices, Tld tld, Instant dateTime, int years, AllocationToken token) {
// Convert to nonpremium iff no premium charges are included (either in create or any renewal)
boolean convertToNonPremium =
token.getRegistrationBehavior().equals(RegistrationBehavior.NONPREMIUM_CREATE)

View File

@@ -34,7 +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.toDateTime;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -86,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;
/**
@@ -163,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);
@@ -190,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);
@@ -287,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()) {
@@ -305,7 +310,7 @@ public final class DomainRenewFlow implements MutatingFlow {
ImmutableSet.of(
DomainTransactionRecord.create(
newDomain.getTld(),
now.plus(renewGracePeriod),
now.plusMillis(renewGracePeriod.getMillis()),
TransactionReportField.netRenewsFieldFromYears(period.getValue()),
1)))
.build();
@@ -330,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();
}
}
@@ -341,7 +346,7 @@ 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)
@@ -354,7 +359,7 @@ public final class DomainRenewFlow implements MutatingFlow {
.filter(t -> AllocationToken.TokenBehavior.DEFAULT.equals(t.getTokenBehavior()))
.map(AllocationToken::createVKey)
.orElse(null))
.setBillingTime(now.plus(Tld.get(tld).getRenewGracePeriodLength()))
.setBillingTime(now.plusMillis(Tld.get(tld).getRenewGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build();
}

View File

@@ -69,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.
@@ -136,9 +137,9 @@ 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, now, isExpired);
Optional<FeeUpdateCommandExtension> feeUpdate =
@@ -148,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) {
@@ -195,7 +200,7 @@ 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)
@@ -211,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) {
@@ -234,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()
@@ -257,17 +262,17 @@ public final class DomainRestoreRequestFlow implements MutatingFlow {
}
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)

View File

@@ -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));
@@ -170,7 +168,8 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
hasBulkToken ? null : existingBillingRecurrence)
.getRenewCost())
.setEventTime(now)
.setBillingTime(now.plus(Tld.get(tldStr).getTransferGracePeriodLength()))
.setBillingTime(
now.plusMillis(Tld.get(tldStr).getTransferGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build());
@@ -194,10 +193,8 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
// 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()
@@ -274,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,
@@ -297,7 +292,7 @@ public final class DomainTransferApproveFlow implements MutatingFlow {
cancelingRecords,
DomainTransactionRecord.create(
newDomain.getTld(),
now.plus(tld.getTransferGracePeriodLength()),
now.plusMillis(tld.getTransferGracePeriodLength().getMillis()),
TRANSFER_SUCCESSFUL,
1)))
.build();

View File

@@ -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,

View File

@@ -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 = transferData.getTransferredRegistrationExpirationDateTime();
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))

View File

@@ -31,7 +31,7 @@ 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 com.google.common.collect.ImmutableSet;
@@ -56,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.
@@ -111,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());
@@ -131,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,

View File

@@ -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,
@@ -216,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
@@ -232,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(
@@ -286,13 +284,15 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
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();
}
@@ -300,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));
@@ -363,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)
@@ -372,8 +372,8 @@ public final class DomainTransferRequestFlow implements MutatingFlow {
ImmutableSet.of(
DomainTransactionRecord.create(
tld.getTldStr(),
now.plus(tld.getAutomaticTransferLength())
.plus(tld.getTransferGracePeriodLength()),
now.plusMillis(tld.getAutomaticTransferLength().getMillis())
.plusMillis(tld.getTransferGracePeriodLength().getMillis()),
TransactionReportField.TRANSFER_SUCCESSFUL,
1)))
.build();
@@ -387,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(

View File

@@ -40,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.
@@ -106,15 +106,15 @@ 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 =
@@ -179,12 +179,12 @@ 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())
.setEventTime(transferData.getPendingTransferExpirationDateTime())
.setEventTime(transferData.getPendingTransferExpirationTime())
.setMsg(transferData.getTransferStatus().getMessage())
.setResponseData(
ImmutableList.of(
@@ -202,11 +202,11 @@ 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())
.setEventTime(transferData.getPendingTransferExpirationDateTime())
.setEventTime(transferData.getPendingTransferExpirationTime())
.setMsg(transferData.getTransferStatus().getMessage())
.setResponseData(
ImmutableList.of(
@@ -219,12 +219,12 @@ 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())
.setLosingRegistrarId(transferData.getLosingRegistrarId())
.setPendingTransferExpirationTime(transferData.getPendingTransferExpirationDateTime())
.setPendingTransferExpirationTime(transferData.getPendingTransferExpirationTime())
.setTransferRequestTime(transferData.getTransferRequestTime())
.setTransferStatus(transferData.getTransferStatus())
.setExtendedRegistrationExpirationTime(extendedRegistrationExpirationTime)
@@ -232,7 +232,7 @@ public final class DomainTransferUtils {
}
private static PollMessage.Autorenew createGainingClientAutorenewPollMessage(
DateTime serverApproveNewExpirationTime,
Instant serverApproveNewExpirationTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId) {
@@ -248,7 +248,7 @@ public final class DomainTransferUtils {
private static BillingRecurrence createGainingClientAutorenewEvent(
BillingRecurrence existingBillingRecurrence,
DateTime serverApproveNewExpirationTime,
Instant serverApproveNewExpirationTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId) {
@@ -282,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,
@@ -303,7 +303,7 @@ public final class DomainTransferUtils {
}
private static BillingEvent createTransferBillingEvent(
DateTime automaticTransferTime,
Instant automaticTransferTime,
HistoryEntryId domainHistoryId,
String targetId,
String gainingRegistrarId,
@@ -316,7 +316,8 @@ public final class DomainTransferUtils {
.setCost(transferCost)
.setPeriodYears(1)
.setEventTime(automaticTransferTime)
.setBillingTime(automaticTransferTime.plus(registry.getTransferGracePeriodLength()))
.setBillingTime(
automaticTransferTime.plusMillis(registry.getTransferGracePeriodLength().getMillis()))
.setDomainHistoryId(domainHistoryId)
.build();
}

View File

@@ -84,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.
@@ -164,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);
@@ -211,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();
@@ -233,7 +233,7 @@ public final class DomainUpdateFlow implements MutatingFlow {
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 =
@@ -281,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();
@@ -304,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()) {
@@ -330,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();

View File

@@ -42,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 {
@@ -71,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()) {
@@ -90,7 +90,7 @@ public class AllocationTokenFlowUtils {
*/
public static Optional<AllocationToken> loadTokenFromExtensionOrGetDefault(
String registrarId,
DateTime now,
Instant now,
Optional<AllocationTokenExtension> extension,
Tld tld,
String domainName,
@@ -165,7 +165,7 @@ public class AllocationTokenFlowUtils {
*/
@VisibleForTesting
static boolean tokenIsValidAgainstDomain(
InternetDomainName domainName, AllocationToken token, CommandName commandName, DateTime now) {
InternetDomainName domainName, AllocationToken token, CommandName commandName, Instant now) {
if (discountTokenInvalidForPremiumName(token, isDomainPremium(domainName.toString(), now))) {
return false;
}
@@ -192,7 +192,7 @@ public class AllocationTokenFlowUtils {
String domainName,
CommandName commandName,
String registrarId,
DateTime now,
Instant now,
Optional<Integer> years,
DomainPricingLogic pricingLogic)
throws EppException {
@@ -232,7 +232,7 @@ public class AllocationTokenFlowUtils {
String domainName,
AllocationToken token,
CommandName commandName,
DateTime now,
Instant now,
Optional<Integer> years,
DomainPricingLogic pricingLogic)
throws EppException {
@@ -256,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
@@ -280,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();

View File

@@ -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);

View File

@@ -49,8 +49,8 @@ import google.registry.model.host.HostCommand.Create;
import google.registry.model.host.HostHistory;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow that creates a new host.
@@ -99,7 +99,7 @@ public final class HostCreateFlow implements MutatingFlow {
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
Create command = (Create) resourceCommand;
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
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

View File

@@ -43,7 +43,7 @@ import google.registry.model.host.HostHistory;
import google.registry.model.reporting.HistoryEntry.Type;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import jakarta.inject.Inject;
import org.joda.time.DateTime;
import java.time.Instant;
/**
* An EPP flow that deletes a host.
@@ -82,7 +82,7 @@ public final class HostDeleteFlow implements MutatingFlow {
extensionManager.register(MetadataExtension.class);
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
validateHostName(targetId);
checkLinkedDomains(targetId, now);
Host existingHost = loadAndVerifyExistence(Host.class, targetId, now);

View File

@@ -36,8 +36,8 @@ import google.registry.model.ForeignKeyUtils;
import google.registry.model.domain.Domain;
import google.registry.model.eppcommon.StatusValue;
import java.net.InetAddress;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/** Static utility functions for host flows. */
public class HostFlowUtils {
@@ -90,8 +90,8 @@ public class HostFlowUtils {
}
/** Return the {@link Domain} this host is subordinate to, or null for external hosts. */
public static Optional<Domain> lookupSuperordinateDomain(
InternetDomainName hostName, DateTime now) throws EppException {
public static Optional<Domain> lookupSuperordinateDomain(InternetDomainName hostName, Instant now)
throws EppException {
Optional<InternetDomainName> tld = findTldForName(hostName);
if (tld.isEmpty()) {
// This is an host on a TLD we don't run, therefore obviously external, so we are done.

View File

@@ -19,7 +19,6 @@ import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
import static google.registry.flows.host.HostFlowUtils.validateHostName;
import static google.registry.model.EppResourceUtils.isLinked;
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;
@@ -36,7 +35,7 @@ import google.registry.model.host.HostInfoData;
import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.util.Clock;
import jakarta.inject.Inject;
import org.joda.time.DateTime;
import java.time.Instant;
/**
* An EPP flow that returns information about a host.
@@ -65,7 +64,7 @@ public final class HostInfoFlow implements TransactionalFlow {
validateRegistrarIsLoggedIn(registrarId);
extensionManager.validate(); // There are no legal extensions for this flow.
validateHostName(targetId);
DateTime now = clock.nowUtc();
Instant now = clock.now();
Host host = loadAndVerifyExistence(Host.class, targetId, now);
ImmutableSet.Builder<StatusValue> statusValues = new ImmutableSet.Builder<>();
statusValues.addAll(host.getStatusValues());
@@ -81,7 +80,7 @@ public final class HostInfoFlow implements TransactionalFlow {
tm().loadByKey(host.getSuperordinateDomain()).cloneProjectedAtTime(now);
hostInfoDataBuilder
.setCurrentSponsorRegistrarId(superordinateDomain.getCurrentSponsorRegistrarId())
.setLastTransferTime(toDateTime(host.computeLastTransferTime(superordinateDomain)));
.setLastTransferTime(host.computeLastTransferTime(superordinateDomain));
if (superordinateDomain.getStatusValues().contains(StatusValue.PENDING_TRANSFER)) {
statusValues.add(StatusValue.PENDING_TRANSFER);
}
@@ -100,7 +99,7 @@ public final class HostInfoFlow implements TransactionalFlow {
.setCreationRegistrarId(host.getCreationRegistrarId())
.setCreationTime(host.getCreationTime())
.setLastEppUpdateRegistrarId(host.getLastEppUpdateRegistrarId())
.setLastEppUpdateTime(host.getLastEppUpdateDateTime())
.setLastEppUpdateTime(host.getLastEppUpdateTime())
.build())
.build();
}

View File

@@ -32,7 +32,6 @@ import static google.registry.flows.host.HostFlowUtils.verifySuperordinateDomain
import static google.registry.model.reporting.HistoryEntry.Type.HOST_UPDATE;
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.cloud.tasks.v2.Task;
import com.google.common.collect.ImmutableMultimap;
@@ -67,9 +66,9 @@ import google.registry.model.reporting.IcannReportingTypes.ActivityReportField;
import google.registry.persistence.VKey;
import google.registry.request.Action;
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 host.
@@ -138,7 +137,7 @@ public final class HostUpdateFlow implements MutatingFlow {
Update command = (Update) resourceCommand;
Change change = command.getInnerChange();
String suppliedNewHostName = change.getHostName();
DateTime now = tm().getTransactionTime();
Instant now = tm().getTxTime();
validateHostName(targetId);
Host existingHost = loadAndVerifyExistence(Host.class, targetId, now);
boolean isHostRename = suppliedNewHostName != null;
@@ -168,7 +167,7 @@ public final class HostUpdateFlow implements MutatingFlow {
VKey<Domain> newSuperordinateDomainKey =
newSuperordinateDomain.map(Domain::createVKey).orElse(null);
// If the superordinateDomain field is changing, set the lastSuperordinateChange to now.
DateTime lastSuperordinateChange =
Instant lastSuperordinateChange =
Objects.equals(newSuperordinateDomainKey, existingHost.getSuperordinateDomain())
? existingHost.getLastSuperordinateChange()
: now;
@@ -176,8 +175,7 @@ public final class HostUpdateFlow implements MutatingFlow {
// have just completed. This is only critical for updates that rename a host away from its
// current superordinate domain, where we must "freeze" the last transfer time, but it's easiest
// to just update it unconditionally.
DateTime lastTransferTime =
toDateTime(existingHost.computeLastTransferTime(oldSuperordinateDomain));
Instant lastTransferTime = existingHost.computeLastTransferTime(oldSuperordinateDomain);
// Copy the clientId onto the host. This is only really needed when the host will be external,
// since external hosts store their own clientId. For subordinate hosts the canonical clientId
// comes from the superordinate domain, but we might as well update the persisted value. For

View File

@@ -41,8 +41,8 @@ import google.registry.persistence.IsolationLevel;
import google.registry.persistence.PersistenceModule.TransactionIsolationLevel;
import google.registry.persistence.VKey;
import jakarta.inject.Inject;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/**
* An EPP flow for acknowledging {@link PollMessage}s.
@@ -83,7 +83,7 @@ public final class PollAckFlow implements MutatingFlow {
throw new InvalidMessageIdException(messageId);
}
final DateTime now = tm().getTransactionTime();
final Instant now = tm().getTxTime();
// Load the message to be acked. If a message is queued to be delivered in the future, we treat
// it as if it doesn't exist yet. Same for if the message ID year isn't the same as the actual

View File

@@ -20,44 +20,20 @@ import static google.registry.persistence.transaction.QueryComposer.Comparator.L
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import static google.registry.util.DateTimeUtils.plusYears;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.model.poll.PollMessage;
import google.registry.persistence.transaction.QueryComposer;
import java.time.Instant;
import java.util.Optional;
import org.joda.time.DateTime;
/** Static utility functions for poll flows. */
public final class PollFlowUtils {
/**
* Returns the number of poll messages for the given registrar that are not in the future.
*
* @deprecated Use {@link #getPollMessageCount(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static int getPollMessageCount(String registrarId, DateTime now) {
return getPollMessageCount(registrarId, toInstant(now));
}
/** Returns the number of poll messages for the given registrar that are not in the future. */
public static int getPollMessageCount(String registrarId, Instant now) {
return (int) createPollMessageQuery(registrarId, now).count();
}
/**
* Returns the first (by event time) poll message not in the future for this registrar.
*
* @deprecated Use {@link #getFirstPollMessage(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static Optional<PollMessage> getFirstPollMessage(String registrarId, DateTime now) {
return getFirstPollMessage(registrarId, toInstant(now));
}
/** Returns the first (by event time) poll message not in the future for this registrar. */
public static Optional<PollMessage> getFirstPollMessage(String registrarId, Instant now) {
return createPollMessageQuery(registrarId, now).orderBy("eventTime").first();
@@ -72,22 +48,22 @@ public final class PollFlowUtils {
*/
public static void ackPollMessage(PollMessage pollMessage) {
checkArgument(
isBeforeOrAt(pollMessage.getEventTimeInstant(), tm().getTxTime()),
isBeforeOrAt(pollMessage.getEventTime(), tm().getTxTime()),
"Cannot ACK poll message with ID %s because its event time is in the future: %s",
pollMessage.getId(),
pollMessage.getEventTimeInstant());
pollMessage.getEventTime());
if (pollMessage instanceof PollMessage.OneTime) {
// One-time poll messages are deleted once acked.
tm().delete(pollMessage.createVKey());
} else if (pollMessage instanceof PollMessage.Autorenew autorenewPollMessage) {
// Move the eventTime of this autorenew poll message forward by a year.
Instant nextEventTime = plusYears(autorenewPollMessage.getEventTimeInstant(), 1);
Instant nextEventTime = plusYears(autorenewPollMessage.getEventTime(), 1);
// 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());
@@ -97,19 +73,6 @@ public final class PollFlowUtils {
}
}
/**
* Returns the QueryComposer for poll messages from the given registrar that are not in the
* future.
*
* @deprecated Use {@link #createPollMessageQuery(String, Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static QueryComposer<PollMessage> createPollMessageQuery(
String registrarId, DateTime now) {
return createPollMessageQuery(registrarId, toInstant(now));
}
/**
* Returns the QueryComposer for poll messages from the given registrar that are not in the
* future.

View File

@@ -37,6 +37,6 @@ public final class HelloFlow implements Flow {
@Override
public Greeting run() throws EppException {
extensionManager.validate(); // There are no legal extensions for this flow.
return Greeting.create(clock.nowUtc(), greetingServerId);
return Greeting.create(clock.now(), greetingServerId);
}
}

View File

@@ -52,4 +52,10 @@ public abstract class KeyringModule {
int lastColonIndex = instanceConnectionName.lastIndexOf(':');
return instanceConnectionName.substring(lastColonIndex + 1);
}
@Provides
@Config("valkeyCertificateAuthority")
public static String provideValkeyCertificateAuthority(Keyring keyring) {
return keyring.getValkeyCertificateAuthority();
}
}

View File

@@ -163,6 +163,8 @@ public interface Keyring extends AutoCloseable {
/** Returns the Cloud SQL connection names of the replica database instances. */
ImmutableList<String> getSqlReplicaConnectionNames();
String getValkeyCertificateAuthority();
// Don't throw so try-with-resources works better.
@Override
void close();

View File

@@ -69,7 +69,8 @@ public class SecretManagerKeyring implements Keyring {
SAFE_BROWSING_API_KEY,
SQL_PRIMARY_CONN_NAME,
SQL_REPLICA_CONN_NAME,
SQL_REPLICA_CONN_NAMES;
SQL_REPLICA_CONN_NAMES,
VALKEY_CERTIFICATE_AUTHORITY;
String getLabel() {
return UPPER_UNDERSCORE.to(LOWER_HYPHEN, name());
@@ -181,6 +182,16 @@ public class SecretManagerKeyring implements Keyring {
}
}
@Override
public String getValkeyCertificateAuthority() {
try {
return getString(StringKeyLabel.VALKEY_CERTIFICATE_AUTHORITY);
} catch (KeyringException e) {
// this is optional
return null;
}
}
/** No persistent resources are maintained for this Keyring implementation. */
@Override
public void close() {}

View File

@@ -15,8 +15,6 @@
package google.registry.model;
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.gson.annotations.Expose;
import google.registry.persistence.EntityCallbacksListener.RecursivePrePersist;
@@ -25,7 +23,6 @@ import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.time.Instant;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/** A timestamp that auto-updates when first saved to the database. */
@Embeddable
@@ -49,28 +46,10 @@ public class CreateAutoTimestamp extends ImmutableObject implements UnsafeSerial
return creationTime;
}
/**
* @deprecated Use {@link #getTimestamp()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@Nullable
public DateTime getTimestampDateTime() {
return toDateTime(creationTime);
}
public static CreateAutoTimestamp create(@Nullable Instant creationTime) {
CreateAutoTimestamp instance = new CreateAutoTimestamp();
instance.creationTime = creationTime;
return instance;
}
/**
* @deprecated Use {@link #create(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static CreateAutoTimestamp create(@Nullable DateTime creationTime) {
return create(toInstant(creationTime));
}
}

View File

@@ -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));
}
}

View File

@@ -25,8 +25,6 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
import static google.registry.util.CollectionUtils.nullToEmpty;
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import com.github.benmanes.caffeine.cache.CacheLoader;
import com.github.benmanes.caffeine.cache.LoadingCache;
@@ -51,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
@@ -158,16 +155,7 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
this.repoId = repoId;
}
/**
* @deprecated Use {@link #getCreationTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public final DateTime getCreationTime() {
return creationTime.getTimestampDateTime();
}
public final Instant getCreationTimeInstant() {
public final Instant getCreationTime() {
return creationTime.getTimestamp();
}
@@ -175,12 +163,6 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
return creationRegistrarId;
}
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastEppUpdateDateTime() {
return toDateTime(lastEppUpdateTime);
}
public Instant getLastEppUpdateTime() {
return lastEppUpdateTime;
}
@@ -203,22 +185,12 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
return nullToEmptyImmutableCopy(statuses);
}
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getDeletionDateTime() {
return toDateTime(deletionTime);
}
public Instant getDeletionTime() {
return deletionTime;
}
/** 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();
@@ -260,15 +232,6 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setCreationTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setCreationTime(DateTime creationTime) {
return setCreationTime(toInstant(creationTime));
}
/** Set the time this resource was created. Should only be used in tests. */
@VisibleForTesting
public B setCreationTimeForTest(Instant creationTime) {
@@ -276,31 +239,12 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setCreationTimeForTest(Instant)}
*/
@Deprecated
@VisibleForTesting
@SuppressWarnings("InlineMeSuggester")
public B setCreationTimeForTest(DateTime creationTime) {
return setCreationTimeForTest(toInstant(creationTime));
}
/** Set the time after which this resource should be considered deleted. */
public B setDeletionTime(Instant deletionTime) {
getInstance().deletionTime = deletionTime;
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setDeletionTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setDeletionTime(DateTime deletionTime) {
return setDeletionTime(toInstant(deletionTime));
}
/** Set the current sponsoring registrar. */
public B setPersistedCurrentSponsorRegistrarId(String currentSponsorRegistrarId) {
getInstance().currentSponsorRegistrarId = currentSponsorRegistrarId;
@@ -319,15 +263,6 @@ public abstract class EppResource extends UpdateAutoTimestampEntity implements B
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setLastEppUpdateTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setLastEppUpdateTime(DateTime lastEppUpdateTime) {
return setLastEppUpdateTime(toInstant(lastEppUpdateTime));
}
/** Set the registrar who last performed a {@literal <update>} on this resource. */
public B setLastEppUpdateRegistrarId(String lastEppUpdateRegistrarId) {
getInstance().lastEppUpdateRegistrarId = lastEppUpdateRegistrarId;

View File

@@ -68,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));
}
/**
@@ -80,7 +80,7 @@ public final class EppResourceUtils {
}
public static boolean isActive(EppResource resource, Instant time) {
return isAtOrAfter(time, resource.getCreationTimeInstant())
return isAtOrAfter(time, resource.getCreationTime())
&& time.isBefore(resource.getDeletionTime());
}
@@ -120,7 +120,7 @@ public final class EppResourceUtils {
builder
.removeStatusValue(StatusValue.PENDING_TRANSFER)
.setTransferData(transferDataBuilder.build())
.setLastTransferTime(transferData.getPendingTransferExpirationDateTime())
.setLastTransferTime(transferData.getPendingTransferExpirationTime())
.setPersistedCurrentSponsorRegistrarId(transferData.getGainingRegistrarId());
}
@@ -154,10 +154,9 @@ 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.getCreationTimeInstant())) {
if (timestamp.isBefore(resource.getCreationTime())) {
return null;
}
// If the resource was not modified after the requested time, then use it as-is, otherwise find
@@ -170,7 +169,7 @@ public final class EppResourceUtils {
return (loadedResource == null)
? null
: (isActive(loadedResource, timestamp)
? (T) loadedResource.cloneProjectedAtInstant(timestamp)
? (T) loadedResource.cloneProjectedAtTime(timestamp)
: null);
}
@@ -189,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)

View File

@@ -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)));
}
/**
@@ -225,7 +225,7 @@ public final class ForeignKeyUtils {
}
/** Method to load the most recent {@link EppResource}s for the given foreign keys. */
private static <E extends EppResource> ImmutableMap<String, E> loadMostRecentResourceObjects(
public static <E extends EppResource> ImmutableMap<String, E> loadMostRecentResourceObjects(
Class<E> clazz, Collection<String> foreignKeys, boolean useReplicaTm) {
String fkProperty = RESOURCE_TYPE_TO_FK_PROPERTY.get(clazz);
JpaTransactionManager tmToUse = useReplicaTm ? replicaTm() : tm();
@@ -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));
}
}

View File

@@ -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 {

View File

@@ -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)

View File

@@ -15,9 +15,7 @@
package google.registry.model;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
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;
@@ -53,11 +51,11 @@ public final class ResourceTransferUtils {
.setDomainName(domain.getForeignKey())
.setExtendedRegistrationExpirationTime(
ADD_EXDATE_STATUSES.contains(transferData.getTransferStatus())
? transferData.getTransferredRegistrationExpirationDateTime()
? transferData.getTransferredRegistrationExpirationTime()
: null)
.setGainingRegistrarId(transferData.getGainingRegistrarId())
.setLosingRegistrarId(transferData.getLosingRegistrarId())
.setPendingTransferExpirationTime(transferData.getPendingTransferExpirationDateTime())
.setPendingTransferExpirationTime(transferData.getPendingTransferExpirationTime())
.setTransferRequestTime(transferData.getTransferRequestTime())
.setTransferStatus(transferData.getTransferStatus())
.build();
@@ -145,7 +143,7 @@ public final class ResourceTransferUtils {
.getTransferData()
.copyConstantFieldsToBuilder()
.setTransferStatus(transferStatus)
.setPendingTransferExpirationTime(toDateTime(checkNotNull(now)))
.setPendingTransferExpirationTime(now)
.build());
}
@@ -162,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();
}
@@ -191,7 +189,7 @@ public final class ResourceTransferUtils {
Domain domain, TransferStatus transferStatus, Instant now, String lastEppUpdateRegistrarId) {
checkArgument(transferStatus.isDenied(), "Not a denial transfer status");
return resolvePendingTransfer(domain, transferStatus, now)
.setLastEppUpdateTime(toDateTime(now))
.setLastEppUpdateTime(now)
.setLastEppUpdateRegistrarId(lastEppUpdateRegistrarId)
.build();
}

View File

@@ -16,8 +16,6 @@ package google.registry.model;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.persistence.EntityCallbacksListener.RecursivePrePersist;
import google.registry.persistence.EntityCallbacksListener.RecursivePreUpdate;
@@ -26,7 +24,6 @@ import jakarta.persistence.Embeddable;
import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/** A timestamp that auto-updates on each save to Cloud SQL. */
@Embeddable
@@ -49,27 +46,10 @@ public class UpdateAutoTimestamp extends ImmutableObject implements UnsafeSerial
return Optional.ofNullable(lastUpdateTime).orElse(START_INSTANT);
}
/**
* @deprecated Use {@link #getTimestamp()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getTimestampDateTime() {
return toDateTime(getTimestamp());
}
public static UpdateAutoTimestamp create(@Nullable Instant timestamp) {
UpdateAutoTimestamp instance = new UpdateAutoTimestamp();
instance.lastUpdateTime = timestamp;
return instance;
}
/**
* @deprecated Use {@link #create(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static UpdateAutoTimestamp create(@Nullable DateTime timestamp) {
return create(toInstant(timestamp));
}
}

View File

@@ -17,8 +17,6 @@ package google.registry.model.billing;
import static com.google.common.base.Preconditions.checkNotNull;
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.google.common.collect.ImmutableSet;
@@ -38,7 +36,6 @@ import jakarta.persistence.MappedSuperclass;
import java.time.Instant;
import java.util.Set;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/** A billable event in a domain's lifecycle. */
@MappedSuperclass
@@ -173,16 +170,7 @@ public abstract class BillingBase extends ImmutableObject
return domainRepoId;
}
/**
* @deprecated Use {@link #getEventTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getEventTime() {
return toDateTime(eventTime);
}
public Instant getEventTimeInstant() {
public Instant getEventTime() {
return eventTime;
}
@@ -238,15 +226,6 @@ public abstract class BillingBase extends ImmutableObject
return thisCastToDerived();
}
/**
* @deprecated Use {@link #setEventTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public B setEventTime(DateTime eventTime) {
return setEventTime(toInstant(eventTime));
}
public B setEventTime(Instant eventTime) {
getInstance().eventTime = eventTime;
return thisCastToDerived();

View File

@@ -31,7 +31,7 @@ import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import org.joda.time.DateTime;
import java.time.Instant;
/**
* An event representing a cancellation of one of the other two billable event types.
@@ -55,7 +55,7 @@ import org.joda.time.DateTime;
public class BillingCancellation extends BillingBase {
/** The billing time of the charge that is being cancelled. */
DateTime billingTime;
Instant billingTime;
/** The one-time billing event to cancel, or null for autorenew cancellations. */
@Column(name = "billing_event_id")
@@ -67,7 +67,7 @@ public class BillingCancellation extends BillingBase {
@Convert(converter = VKeyConverter_BillingRecurrence.class)
VKey<BillingRecurrence> billingRecurrence;
public DateTime getBillingTime() {
public Instant getBillingTime() {
return billingTime;
}
@@ -89,11 +89,8 @@ public class BillingCancellation extends BillingBase {
* the supplied targetId and deriving other metadata (clientId, billing time, and the cancellation
* reason) from the grace period.
*/
public static google.registry.model.billing.BillingCancellation forGracePeriod(
GracePeriod gracePeriod,
DateTime eventTime,
HistoryEntryId domainHistoryId,
String targetId) {
public static BillingCancellation forGracePeriod(
GracePeriod gracePeriod, Instant eventTime, HistoryEntryId domainHistoryId, String targetId) {
checkArgument(
gracePeriod.hasBillingEvent(),
"Cannot create cancellation for grace period without billing event");
@@ -104,7 +101,7 @@ public class BillingCancellation extends BillingBase {
.setRegistrarId(gracePeriod.getRegistrarId())
.setEventTime(eventTime)
// The charge being cancelled will take place at the grace period's expiration time.
.setBillingTime(gracePeriod.getExpirationDateTime())
.setBillingTime(gracePeriod.getExpirationTime())
.setDomainHistoryId(domainHistoryId);
// Set the grace period's billing event using the appropriate Cancellation builder method.
if (gracePeriod.getBillingEvent() != null) {
@@ -116,12 +113,12 @@ public class BillingCancellation extends BillingBase {
}
@Override
public VKey<google.registry.model.billing.BillingCancellation> createVKey() {
public VKey<BillingCancellation> createVKey() {
return createVKey(getId());
}
public static VKey<google.registry.model.billing.BillingCancellation> createVKey(long id) {
return VKey.create(google.registry.model.billing.BillingCancellation.class, id);
public static VKey<BillingCancellation> createVKey(long id) {
return VKey.create(BillingCancellation.class, id);
}
@Override
@@ -129,19 +126,16 @@ public class BillingCancellation extends BillingBase {
return new Builder(clone(this));
}
/**
* A builder for {@link google.registry.model.billing.BillingCancellation} since it is immutable.
*/
public static class Builder
extends BillingBase.Builder<google.registry.model.billing.BillingCancellation, Builder> {
/** A builder for {@link BillingCancellation} since it is immutable. */
public static class Builder extends BillingBase.Builder<BillingCancellation, Builder> {
public Builder() {}
private Builder(google.registry.model.billing.BillingCancellation instance) {
private Builder(BillingCancellation instance) {
super(instance);
}
public Builder setBillingTime(DateTime billingTime) {
public Builder setBillingTime(Instant billingTime) {
getInstance().billingTime = billingTime;
return this;
}
@@ -157,8 +151,8 @@ public class BillingCancellation extends BillingBase {
}
@Override
public google.registry.model.billing.BillingCancellation build() {
google.registry.model.billing.BillingCancellation instance = getInstance();
public BillingCancellation build() {
BillingCancellation instance = getInstance();
checkNotNull(instance.billingTime, "Must set billing time");
checkNotNull(instance.reason, "Must set reason");
checkState(

View File

@@ -17,8 +17,6 @@ package google.registry.model.billing;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.model.domain.DomainHistory;
import google.registry.model.domain.token.AllocationToken;
@@ -35,7 +33,6 @@ import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.money.Money;
import org.joda.time.DateTime;
/** A one-time billable event. */
@Entity
@@ -108,16 +105,7 @@ public class BillingEvent extends BillingBase {
return cost;
}
/**
* @deprecated Use {@link #getBillingTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getBillingTime() {
return toDateTime(billingTime);
}
public Instant getBillingTimeInstant() {
public Instant getBillingTime() {
return billingTime;
}
@@ -125,16 +113,7 @@ public class BillingEvent extends BillingBase {
return periodYears;
}
/**
* @deprecated Use {@link #getSyntheticCreationTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getSyntheticCreationTime() {
return toDateTime(syntheticCreationTime);
}
public Instant getSyntheticCreationTimeInstant() {
public Instant getSyntheticCreationTime() {
return syntheticCreationTime;
}
@@ -151,12 +130,12 @@ public class BillingEvent extends BillingBase {
}
@Override
public VKey<google.registry.model.billing.BillingEvent> createVKey() {
public VKey<BillingEvent> createVKey() {
return createVKey(getId());
}
public static VKey<google.registry.model.billing.BillingEvent> createVKey(long id) {
return VKey.create(google.registry.model.billing.BillingEvent.class, id);
public static VKey<BillingEvent> createVKey(long id) {
return VKey.create(BillingEvent.class, id);
}
@Override
@@ -164,13 +143,12 @@ public class BillingEvent extends BillingBase {
return new Builder(clone(this));
}
/** A builder for {@link google.registry.model.billing.BillingEvent} since it is immutable. */
public static class Builder
extends BillingBase.Builder<google.registry.model.billing.BillingEvent, Builder> {
/** A builder for {@link BillingEvent} since it is immutable. */
public static class Builder extends BillingBase.Builder<BillingEvent, Builder> {
public Builder() {}
private Builder(google.registry.model.billing.BillingEvent instance) {
private Builder(BillingEvent instance) {
super(instance);
}
@@ -186,29 +164,11 @@ public class BillingEvent extends BillingBase {
return this;
}
/**
* @deprecated Use {@link #setBillingTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setBillingTime(DateTime billingTime) {
return setBillingTime(toInstant(billingTime));
}
public Builder setBillingTime(Instant billingTime) {
getInstance().billingTime = billingTime;
return this;
}
/**
* @deprecated Use {@link #setSyntheticCreationTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setSyntheticCreationTime(DateTime syntheticCreationTime) {
return setSyntheticCreationTime(toInstant(syntheticCreationTime));
}
public Builder setSyntheticCreationTime(Instant syntheticCreationTime) {
getInstance().syntheticCreationTime = syntheticCreationTime;
return this;
@@ -229,8 +189,8 @@ public class BillingEvent extends BillingBase {
}
@Override
public google.registry.model.billing.BillingEvent build() {
google.registry.model.billing.BillingEvent instance = getInstance();
public BillingEvent build() {
BillingEvent instance = getInstance();
checkNotNull(instance.billingTime);
checkNotNull(instance.cost);
checkState(!instance.cost.isNegative(), "Costs should be non-negative.");

View File

@@ -18,8 +18,6 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.minusYears;
import static google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import google.registry.model.common.TimeOfYear;
import google.registry.persistence.VKey;
@@ -37,7 +35,6 @@ import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.money.Money;
import org.joda.time.DateTime;
/**
* A recurring billable event.
@@ -113,29 +110,11 @@ public class BillingRecurrence extends BillingBase {
@Column(name = "renewalPriceBehavior", nullable = false)
RenewalPriceBehavior renewalPriceBehavior = RenewalPriceBehavior.DEFAULT;
/**
* @deprecated Use {@link #getRecurrenceEndTimeInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getRecurrenceEndTime() {
return toDateTime(recurrenceEndTime);
}
public Instant getRecurrenceEndTimeInstant() {
public Instant getRecurrenceEndTime() {
return recurrenceEndTime;
}
/**
* @deprecated Use {@link #getRecurrenceLastExpansionInstant()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getRecurrenceLastExpansion() {
return toDateTime(recurrenceLastExpansion);
}
public Instant getRecurrenceLastExpansionInstant() {
public Instant getRecurrenceLastExpansion() {
return recurrenceLastExpansion;
}
@@ -152,12 +131,12 @@ public class BillingRecurrence extends BillingBase {
}
@Override
public VKey<google.registry.model.billing.BillingRecurrence> createVKey() {
public VKey<BillingRecurrence> createVKey() {
return createVKey(getId());
}
public static VKey<google.registry.model.billing.BillingRecurrence> createVKey(Long id) {
return VKey.create(google.registry.model.billing.BillingRecurrence.class, id);
public static VKey<BillingRecurrence> createVKey(Long id) {
return VKey.create(BillingRecurrence.class, id);
}
@Override
@@ -165,41 +144,20 @@ public class BillingRecurrence extends BillingBase {
return new Builder(clone(this));
}
/**
* A builder for {@link google.registry.model.billing.BillingRecurrence} since it is immutable.
*/
public static class Builder
extends BillingBase.Builder<google.registry.model.billing.BillingRecurrence, Builder> {
/** A builder for {@link BillingRecurrence} since it is immutable. */
public static class Builder extends BillingBase.Builder<BillingRecurrence, Builder> {
public Builder() {}
private Builder(google.registry.model.billing.BillingRecurrence instance) {
private Builder(BillingRecurrence instance) {
super(instance);
}
/**
* @deprecated Use {@link #setRecurrenceEndTime(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setRecurrenceEndTime(DateTime recurrenceEndTime) {
return setRecurrenceEndTime(toInstant(recurrenceEndTime));
}
public Builder setRecurrenceEndTime(Instant recurrenceEndTime) {
getInstance().recurrenceEndTime = recurrenceEndTime;
return this;
}
/**
* @deprecated Use {@link #setRecurrenceLastExpansion(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public Builder setRecurrenceLastExpansion(DateTime recurrenceLastExpansion) {
return setRecurrenceLastExpansion(toInstant(recurrenceLastExpansion));
}
public Builder setRecurrenceLastExpansion(Instant recurrenceLastExpansion) {
getInstance().recurrenceLastExpansion = recurrenceLastExpansion;
return this;
@@ -216,8 +174,8 @@ public class BillingRecurrence extends BillingBase {
}
@Override
public google.registry.model.billing.BillingRecurrence build() {
google.registry.model.billing.BillingRecurrence instance = getInstance();
public BillingRecurrence build() {
BillingRecurrence instance = getInstance();
checkNotNull(instance.eventTime);
checkNotNull(instance.reason);
// Don't require recurrenceLastExpansion to be individually set on every new Recurrence.

View File

@@ -17,16 +17,11 @@ package google.registry.model.common;
import static com.google.common.collect.DiscreteDomain.integers;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.util.DateTimeUtils.END_INSTANT;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import static google.registry.util.DateTimeUtils.START_INSTANT;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
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 google.registry.util.DateTimeUtils.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.base.Splitter;
import com.google.common.collect.ContiguousSet;
@@ -40,7 +35,6 @@ import java.time.LocalTime;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.List;
import org.joda.time.DateTime;
/**
* A time of year (month, day, millis of day) that can be stored in a sort-friendly format.
@@ -62,20 +56,6 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
*/
String timeString;
/**
* Constructs a {@link TimeOfYear} from a {@link DateTime}.
*
* <p>This handles leap years in an intentionally peculiar way by always treating February 29 as
* February 28. It is impossible to construct a {@link TimeOfYear} for February 29th.
*
* @deprecated Use {@link #fromInstant(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static TimeOfYear fromDateTime(DateTime dateTime) {
return fromInstant(toInstant(dateTime));
}
/**
* Constructs a {@link TimeOfYear} from an {@link Instant}.
*
@@ -95,30 +75,6 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
return instance;
}
/**
* Returns an {@link Iterable} of {@link DateTime}s of every recurrence of this particular time of
* year within a given {@link Range} (usually one spanning many years).
*
* <p>WARNING: This can return a potentially very large {@link Iterable} if {@code END_OF_TIME} is
* used as the upper endpoint of the range.
*
* @deprecated Use {@link #getInstancesInRangeInstant(Range)}
*/
@Deprecated
public Iterable<DateTime> getInstancesInRange(Range<DateTime> range) {
// In registry world, all dates are within START_OF_TIME and END_OF_TIME, so restrict any
// ranges without bounds to our notion of zero-to-infinity.
Range<DateTime> normalizedRange = range.intersection(Range.closed(START_OF_TIME, END_OF_TIME));
Range<Integer> yearRange = Range.closed(
normalizedRange.lowerEndpoint().getYear(),
normalizedRange.upperEndpoint().getYear());
return ContiguousSet.create(yearRange, integers())
.stream()
.map(this::getDateTimeWithYear)
.filter(normalizedRange)
.collect(toImmutableList());
}
/**
* Returns an {@link Iterable} of {@link Instant}s of every recurrence of this particular time of
* year within a given {@link Range} (usually one spanning many years).
@@ -126,16 +82,14 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
* <p>WARNING: This can return a potentially very large {@link Iterable} if {@code END_INSTANT} is
* used as the upper endpoint of the range.
*/
public Iterable<Instant> getInstancesInRangeInstant(Range<Instant> range) {
public Iterable<Instant> getInstancesInRange(Range<Instant> range) {
// In registry world, all dates are within START_INSTANT and END_INSTANT, so restrict any
// ranges without bounds to our notion of zero-to-infinity.
Range<Instant> normalizedRange = range.intersection(Range.closed(START_INSTANT, END_INSTANT));
Range<Integer> yearRange =
Range.closed(
ZonedDateTime.ofInstant(normalizedRange.lowerEndpoint(), java.time.ZoneOffset.UTC)
.getYear(),
ZonedDateTime.ofInstant(normalizedRange.upperEndpoint(), java.time.ZoneOffset.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)
@@ -156,54 +110,18 @@ public class TimeOfYear extends ImmutableObject implements UnsafeSerializable {
.toInstant(ZoneOffset.UTC);
}
/**
* Get the first {@link DateTime} with this month/day/millis that is at or after the start.
*
* @deprecated Use {@link #getNextInstanceAtOrAfterInstant(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getNextInstanceAtOrAfter(DateTime start) {
return toDateTime(getNextInstanceAtOrAfterInstant(toInstant(start)));
}
/** Get the first {@link Instant} with this month/day/millis that is at or after the start. */
public Instant getNextInstanceAtOrAfterInstant(Instant start) {
public Instant getNextInstanceAtOrAfter(Instant start) {
Instant withSameYear =
toInstantWithYear(ZonedDateTime.ofInstant(start, java.time.ZoneOffset.UTC).getYear());
toInstantWithYear(ZonedDateTime.ofInstant(start, ZoneOffset.UTC).getYear());
return isAtOrAfter(withSameYear, start) ? withSameYear : plusYears(withSameYear, 1);
}
/**
* Get the first {@link DateTime} with this month/day/millis that is at or before the end.
*
* @deprecated Use {@link #getLastInstanceBeforeOrAtInstant(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLastInstanceBeforeOrAt(DateTime end) {
return toDateTime(getLastInstanceBeforeOrAtInstant(toInstant(end)));
}
/** Get the first {@link Instant} with this month/day/millis that is at or before the end. */
public Instant getLastInstanceBeforeOrAtInstant(Instant end) {
public Instant getLastInstanceBeforeOrAt(Instant end) {
Instant withSameYear =
toInstantWithYear(ZonedDateTime.ofInstant(end, java.time.ZoneOffset.UTC).getYear());
toInstantWithYear(ZonedDateTime.ofInstant(end, ZoneOffset.UTC).getYear());
return isBeforeOrAt(withSameYear, end) ? withSameYear : minusYears(withSameYear, 1);
}
/**
* Return a new datetime with the same year as the parameter but projected to the month, day, and
* time of day of this object.
*/
private DateTime getDateTimeWithYear(int year) {
List<String> monthDayMillis = Splitter.on(' ').splitToList(timeString);
// Do not be clever and use Ints.stringConverter here. That does radix guessing, and bad things
// will happen because of the leading zeroes.
return new DateTime(0, UTC)
.withYear(year)
.withMonthOfYear(Integer.parseInt(monthDayMillis.get(0)))
.withDayOfMonth(Integer.parseInt(monthDayMillis.get(1)))
.withMillisOfDay(Integer.parseInt(monthDayMillis.get(2)));
}
}

View File

@@ -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(", ", "{", "}"));
}
}

View File

@@ -25,8 +25,8 @@ import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/** The {@link ResponseData} returned for an EPP info flow on a contact. */
@XmlRootElement(name = "infData")
@@ -84,7 +84,7 @@ public abstract class ContactInfoData implements ResponseData {
abstract String getCreationRegistrarId();
@XmlElement(name = "crDate")
abstract DateTime getCreationTime();
abstract Instant getCreationTime();
@XmlElement(name = "upID")
@Nullable
@@ -92,11 +92,11 @@ public abstract class ContactInfoData implements ResponseData {
@XmlElement(name = "upDate")
@Nullable
abstract DateTime getLastEppUpdateTime();
abstract Instant getLastEppUpdateTime();
@XmlElement(name = "trDate")
@Nullable
abstract DateTime getLastTransferTime();
abstract Instant getLastTransferTime();
@XmlElement(name = "authInfo")
@Nullable
@@ -121,12 +121,14 @@ public abstract class ContactInfoData implements ResponseData {
public abstract Builder setCreationRegistrarId(String creationRegistrarId);
public abstract Builder setCreationTime(DateTime creationTime);
public abstract Builder setCreationTime(Instant creationTime);
public abstract Builder setLastEppUpdateRegistrarId(@Nullable String lastEppUpdateRegistrarId);
public abstract Builder setLastEppUpdateTime(@Nullable DateTime lastEppUpdateTime);
public abstract Builder setLastTransferTime(@Nullable DateTime lastTransferTime);
public abstract Builder setLastEppUpdateTime(@Nullable Instant lastEppUpdateTime);
public abstract Builder setLastTransferTime(@Nullable Instant lastTransferTime);
public abstract Builder setAuthInfo(@Nullable ContactAuthInfo authInfo);
public abstract Builder setDisclose(@Nullable Disclose disclose);
public abstract ContactInfoData build();

View File

@@ -17,13 +17,17 @@
xmlns = @XmlNs(prefix = "contact", namespaceURI = "urn:ietf:params:xml:ns:contact-1.0"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlJavaTypeAdapter(UtcDateTimeAdapter.class)
@XmlJavaTypeAdapters({
@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;
import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapters;

View File

@@ -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);
}

View File

@@ -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())
@@ -541,10 +506,10 @@ public class DomainBase extends EppResource {
// Set all remaining transfer properties.
setAutomaticTransferSuccessProperties(builder, transferData);
builder
.setLastEppUpdateTime(toDateTime(transferExpirationTime))
.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);
@@ -592,10 +557,10 @@ public class DomainBase extends EppResource {
// id, so we have to do the comparison instead of having one variable just storing the most
// recent time.
if (newLastEppUpdateTime.isPresent()) {
if (domain.getLastEppUpdateDateTime() == null
if (domain.getLastEppUpdateTime() == null
|| newLastEppUpdateTime.get().isAfter(domain.getLastEppUpdateTime())) {
builder
.setLastEppUpdateTime(toDateTime(newLastEppUpdateTime.get()))
.setLastEppUpdateTime(newLastEppUpdateTime.get())
.setLastEppUpdateRegistrarId(domain.getCurrentSponsorRegistrarId());
}
}
@@ -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;
@@ -893,16 +831,16 @@ public class DomainBase extends EppResource {
.setDomainName(domainBase.getDomainName())
.setDeletePollMessage(domainBase.getDeletePollMessage())
.setDsData(domainBase.getDsData())
.setDeletionTime(domainBase.getDeletionDateTime())
.setDeletionTime(domainBase.getDeletionTime())
.setGracePeriods(domainBase.getGracePeriods())
.setIdnTableName(domainBase.getIdnTableName())
.setLastTransferTime(domainBase.getLastTransferTime())
.setLaunchNotice(domainBase.getLaunchNotice())
.setLastEppUpdateRegistrarId(domainBase.getLastEppUpdateRegistrarId())
.setLastEppUpdateTime(domainBase.getLastEppUpdateDateTime())
.setLastEppUpdateTime(domainBase.getLastEppUpdateTime())
.setNameservers(domainBase.getNameservers())
.setPersistedCurrentSponsorRegistrarId(domainBase.getPersistedCurrentSponsorRegistrarId())
.setRegistrationExpirationTime(domainBase.getRegistrationExpirationDateTime())
.setRegistrationExpirationTime(domainBase.getRegistrationExpirationTime())
.setRepoId(domainBase.getRepoId())
.setSmdId(domainBase.getSmdId())
.setSubordinateHosts(domainBase.getSubordinateHosts())

View File

@@ -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)) {

View File

@@ -25,8 +25,8 @@ import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import java.time.Instant;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/** The {@link ResponseData} returned for an EPP info flow on a domain. */
@XmlRootElement(name = "infData")
@@ -88,7 +88,7 @@ public abstract class DomainInfoData implements ResponseData {
@XmlElement(name = "crDate")
@Nullable
abstract DateTime getCreationTime();
abstract Instant getCreationTime();
@XmlElement(name = "upID")
@Nullable
@@ -96,15 +96,15 @@ public abstract class DomainInfoData implements ResponseData {
@XmlElement(name = "upDate")
@Nullable
abstract DateTime getLastEppUpdateTime();
abstract Instant getLastEppUpdateTime();
@XmlElement(name = "exDate")
@Nullable
abstract DateTime getRegistrationExpirationTime();
abstract Instant getRegistrationExpirationTime();
@XmlElement(name = "trDate")
@Nullable
abstract DateTime getLastTransferTime();
abstract Instant getLastTransferTime();
@XmlElement(name = "authInfo")
@Nullable
@@ -127,14 +127,17 @@ public abstract class DomainInfoData implements ResponseData {
public abstract Builder setCreationRegistrarId(@Nullable String creationRegistrarId);
public abstract Builder setCreationTime(@Nullable DateTime creationTime);
public abstract Builder setCreationTime(@Nullable Instant creationTime);
public abstract Builder setLastEppUpdateRegistrarId(@Nullable String lastEppUpdateRegistrarId);
public abstract Builder setLastEppUpdateTime(@Nullable DateTime lastEppUpdateTime);
public abstract Builder setLastEppUpdateTime(@Nullable Instant lastEppUpdateTime);
public abstract Builder setRegistrationExpirationTime(
@Nullable DateTime registrationExpirationTime);
public abstract Builder setLastTransferTime(@Nullable DateTime lastTransferTime);
@Nullable Instant registrationExpirationTime);
public abstract Builder setLastTransferTime(@Nullable Instant lastTransferTime);
public abstract Builder setAuthInfo(@Nullable DomainAuthInfo authInfo);
/** Internal accessor for use in {@link #build}. */

View File

@@ -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);
}
}

View File

@@ -16,7 +16,6 @@ package google.registry.model.domain;
import static com.google.common.base.Preconditions.checkArgument;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.google.common.annotations.VisibleForTesting;
@@ -33,7 +32,6 @@ import jakarta.persistence.Index;
import jakarta.persistence.Table;
import java.time.Instant;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
/**
* A domain grace period with an expiration time.
@@ -100,22 +98,6 @@ public class GracePeriod extends GracePeriodBase {
type, domainRepoId, expirationTime, registrarId, billingEventOneTime, null, null);
}
/**
* Creates a GracePeriod for an (optional) OneTime billing event.
*
* @deprecated Use {@link #create(GracePeriodStatus, String, Instant, String, VKey)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static GracePeriod create(
GracePeriodStatus type,
String domainRepoId,
DateTime expirationTime,
String registrarId,
@Nullable VKey<BillingEvent> billingEventOneTime) {
return create(type, domainRepoId, toInstant(expirationTime), registrarId, billingEventOneTime);
}
/**
* Creates a GracePeriod for an (optional) OneTime billing event and a given {@link
* #gracePeriodId}.
@@ -136,31 +118,6 @@ public class GracePeriod extends GracePeriodBase {
type, domainRepoId, expirationTime, registrarId, billingEventOneTime, null, gracePeriodId);
}
/**
* Creates a GracePeriod for an (optional) OneTime billing event and a given {@link
* #gracePeriodId}.
*
* @deprecated Use {@link #create(GracePeriodStatus, String, Instant, String, VKey, Long)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@VisibleForTesting
public static GracePeriod create(
GracePeriodStatus type,
String domainRepoId,
DateTime expirationTime,
String registrarId,
@Nullable VKey<BillingEvent> billingEventOneTime,
@Nullable Long gracePeriodId) {
return create(
type,
domainRepoId,
toInstant(expirationTime),
registrarId,
billingEventOneTime,
gracePeriodId);
}
public static GracePeriod createFromHistory(GracePeriodHistory history) {
return createInternal(
history.type,
@@ -184,23 +141,6 @@ public class GracePeriod extends GracePeriodBase {
type, domainRepoId, expirationTime, registrarId, null, billingEventRecurrence, null);
}
/**
* Creates a GracePeriod for a Recurrence billing event.
*
* @deprecated Use {@link #createForRecurrence(GracePeriodStatus, String, Instant, String, VKey)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static GracePeriod createForRecurrence(
GracePeriodStatus type,
String domainRepoId,
DateTime expirationTime,
String registrarId,
VKey<BillingRecurrence> billingEventRecurrence) {
return createForRecurrence(
type, domainRepoId, toInstant(expirationTime), registrarId, billingEventRecurrence);
}
/** Creates a GracePeriod for a Recurrence billing event and a given {@link #gracePeriodId}. */
@VisibleForTesting
public static GracePeriod createForRecurrence(
@@ -221,56 +161,19 @@ public class GracePeriod extends GracePeriodBase {
gracePeriodId);
}
/**
* Creates a GracePeriod for a Recurrence billing event and a given {@link #gracePeriodId}.
*
* @deprecated Use {@link #createForRecurrence(GracePeriodStatus, String, Instant, String, VKey,
* Long)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
@VisibleForTesting
public static GracePeriod createForRecurrence(
GracePeriodStatus type,
String domainRepoId,
DateTime expirationTime,
String registrarId,
VKey<BillingRecurrence> billingEventRecurrence,
@Nullable Long gracePeriodId) {
return createForRecurrence(
type,
domainRepoId,
toInstant(expirationTime),
registrarId,
billingEventRecurrence,
gracePeriodId);
}
/** Creates a GracePeriod with no billing event. */
public static GracePeriod createWithoutBillingEvent(
GracePeriodStatus type, String domainRepoId, Instant expirationTime, String registrarId) {
return createInternal(type, domainRepoId, expirationTime, registrarId, null, null, null);
}
/**
* Creates a GracePeriod with no billing event.
*
* @deprecated Use {@link #createWithoutBillingEvent(GracePeriodStatus, String, Instant, String)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public static GracePeriod createWithoutBillingEvent(
GracePeriodStatus type, String domainRepoId, DateTime expirationTime, String registrarId) {
return createWithoutBillingEvent(type, domainRepoId, toInstant(expirationTime), registrarId);
}
/** Constructs a GracePeriod of the given type from the provided one-time BillingEvent. */
public static GracePeriod forBillingEvent(
GracePeriodStatus type, String domainRepoId, BillingEvent billingEvent) {
return create(
type,
domainRepoId,
billingEvent.getBillingTimeInstant(),
billingEvent.getBillingTime(),
billingEvent.getRegistrarId(),
billingEvent.createVKey());
}

View File

@@ -14,7 +14,6 @@
package google.registry.model.domain;
import static google.registry.util.DateTimeUtils.toDateTime;
import google.registry.model.ImmutableObject;
import google.registry.model.UnsafeSerializable;
@@ -33,7 +32,6 @@ import jakarta.persistence.Enumerated;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.Transient;
import java.time.Instant;
import org.joda.time.DateTime;
/** Base class containing common fields and methods for {@link GracePeriod}. */
@MappedSuperclass
@@ -93,12 +91,6 @@ public class GracePeriodBase extends ImmutableObject implements UnsafeSerializab
return domainRepoId;
}
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getExpirationDateTime() {
return toDateTime(expirationTime);
}
public Instant getExpirationTime() {
return expirationTime;
}

View File

@@ -16,8 +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.toDateTime;
import static google.registry.util.DateTimeUtils.toInstant;
import static google.registry.util.DateTimeUtils.minusHours;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.google.gson.annotations.Expose;
@@ -41,7 +40,6 @@ import jakarta.persistence.Table;
import java.time.Instant;
import java.util.Optional;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
import org.joda.time.Duration;
/**
@@ -124,19 +122,19 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
private final CreateAutoTimestamp lockRequestTime = CreateAutoTimestamp.create((Instant) null);
/** When the unlock is first requested. */
@Expose private DateTime unlockRequestTime;
@Expose private Instant unlockRequestTime;
/**
* When the user has verified the lock. If this field is null, it means the lock has not been
* verified yet (and thus not been put into effect).
*/
@Expose private DateTime lockCompletionTime;
@Expose private Instant lockCompletionTime;
/**
* When the user has verified the unlock of this lock. If this field is null, it means the unlock
* action has not been verified yet (and has not been put into effect).
*/
@Expose private DateTime unlockCompletionTime;
@Expose private Instant unlockCompletionTime;
/** The user must provide the random verification code in order to complete the action. */
@Column(nullable = false)
@@ -180,29 +178,20 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
return lockRequestTime.getTimestamp();
}
/**
* @deprecated Use {@link #getLockRequestTime()}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public DateTime getLockRequestDateTime() {
return toDateTime(lockRequestTime.getTimestamp());
}
/** Returns the unlock request timestamp or null if an unlock has not been requested yet. */
public Optional<DateTime> getUnlockRequestTime() {
public Optional<Instant> getUnlockRequestTime() {
return Optional.ofNullable(unlockRequestTime);
}
/** Returns the completion timestamp, or empty if this lock has not been completed yet. */
public Optional<DateTime> getLockCompletionTime() {
public Optional<Instant> getLockCompletionTime() {
return Optional.ofNullable(lockCompletionTime);
}
/**
* Returns the unlock completion timestamp, or empty if this unlock has not been completed yet.
*/
public Optional<DateTime> getUnlockCompletionTime() {
public Optional<Instant> getUnlockCompletionTime() {
return Optional.ofNullable(unlockCompletionTime);
}
@@ -214,8 +203,8 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
return isSuperuser;
}
public DateTime getLastUpdateTime() {
return getUpdateTimestamp().getTimestampDateTime();
public Instant getLastUpdateTime() {
return getUpdateTimestamp().getTimestamp();
}
public Long getRevisionId() {
@@ -241,41 +230,18 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
return lockCompletionTime != null && unlockCompletionTime == null;
}
/**
* Returns true iff the lock was requested &gt;= 1 hour ago and has not been verified.
*
* @deprecated Use {@link #isLockRequestExpired(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public boolean isLockRequestExpired(DateTime now) {
return isLockRequestExpired(toInstant(now));
}
/** 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(java.time.Duration.ofHours(1)));
}
/**
* Returns true iff the unlock was requested &gt;= 1 hour ago and has not been verified.
*
* @deprecated Use {@link #isUnlockRequestExpired(Instant)}
*/
@Deprecated
@SuppressWarnings("InlineMeSuggester")
public boolean isUnlockRequestExpired(DateTime now) {
return isUnlockRequestExpired(toInstant(now));
&& isBeforeOrAt(getLockRequestTime(), minusHours(now, 1));
}
/** Returns true iff the unlock was requested &gt;= 1 hour ago and has not been verified. */
public boolean isUnlockRequestExpired(Instant now) {
Optional<DateTime> unlockRequestTimestamp = getUnlockRequestTime();
Optional<Instant> unlockRequestTimestamp = getUnlockRequestTime();
return unlockRequestTimestamp.isPresent()
&& getUnlockCompletionTime().isEmpty()
&& isBeforeOrAt(
toInstant(unlockRequestTimestamp.get()), now.minus(java.time.Duration.ofHours(1)));
&& isBeforeOrAt(unlockRequestTimestamp.get(), minusHours(now, 1));
}
@Override
@@ -323,17 +289,17 @@ public final class RegistryLock extends UpdateAutoTimestampEntity implements Bui
return this;
}
public Builder setUnlockRequestTime(DateTime unlockRequestTime) {
public Builder setUnlockRequestTime(Instant unlockRequestTime) {
getInstance().unlockRequestTime = unlockRequestTime;
return this;
}
public Builder setLockCompletionTime(DateTime lockCompletionTime) {
public Builder setLockCompletionTime(Instant lockCompletionTime) {
getInstance().lockCompletionTime = lockCompletionTime;
return this;
}
public Builder setUnlockCompletionTime(DateTime unlockCompletionTime) {
public Builder setUnlockCompletionTime(Instant unlockCompletionTime) {
getInstance().unlockCompletionTime = unlockCompletionTime;
return this;
}

View File

@@ -32,7 +32,6 @@ import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.math.BigDecimal;
import java.time.Instant;
import java.util.stream.Stream;
import org.joda.time.DateTime;
import org.joda.time.Period;
/** Base class for the fee and credit types. */
@@ -104,9 +103,7 @@ public abstract class BaseFee extends ImmutableObject {
@XmlTransient FeeType type;
@XmlTransient Range<DateTime> validDateRange;
@XmlTransient Range<Instant> validDateRangeInstant;
@XmlTransient Range<Instant> validDateRange;
@XmlTransient boolean isPremium;
@@ -149,42 +146,13 @@ public abstract class BaseFee extends ImmutableObject {
@JsonIgnore
public boolean hasValidDateRange() {
return validDateRange != null || validDateRangeInstant != null;
return validDateRange != null;
}
@JsonIgnore
public Range<DateTime> getValidDateRange() {
public Range<Instant> getValidDateRange() {
checkState(hasValidDateRange());
if (validDateRange != null) {
return validDateRange;
}
return convertRange(validDateRangeInstant, google.registry.util.DateTimeUtils::toDateTime);
}
@JsonIgnore
public Range<Instant> getValidDateRangeInstant() {
checkState(hasValidDateRange());
if (validDateRangeInstant != null) {
return validDateRangeInstant;
}
return convertRange(validDateRange, google.registry.util.DateTimeUtils::toInstant);
}
private static <S extends Comparable<? super S>, T extends Comparable<? super T>>
Range<T> convertRange(Range<S> range, java.util.function.Function<S, T> converter) {
if (range.hasLowerBound() && range.hasUpperBound()) {
return Range.range(
converter.apply(range.lowerEndpoint()),
range.lowerBoundType(),
converter.apply(range.upperEndpoint()),
range.upperBoundType());
} else if (range.hasLowerBound()) {
return Range.downTo(converter.apply(range.lowerEndpoint()), range.lowerBoundType());
} else if (range.hasUpperBound()) {
return Range.upTo(converter.apply(range.upperEndpoint()), range.upperBoundType());
} else {
return Range.all();
}
return validDateRange;
}
public boolean hasZeroCost() {

View File

@@ -23,7 +23,6 @@ import com.google.common.collect.Range;
import google.registry.model.eppcommon.ProtocolDefinition.ServiceExtension;
import java.math.BigDecimal;
import java.time.Instant;
import org.joda.time.DateTime;
/**
* A fee, in currency units specified elsewhere in the xml, with type of the fee an optional fee
@@ -41,25 +40,13 @@ public class Fee extends BaseFee {
/** Creates a Fee for the given cost, type, and valid date range with the default description. */
public static Fee create(
BigDecimal cost,
FeeType type,
boolean isPremium,
Range<DateTime> validDateRange,
Object... descriptionArgs) {
Fee instance = create(cost, type, isPremium, descriptionArgs);
instance.validDateRange = validDateRange;
return instance;
}
/** Creates a Fee for the given cost, type, and valid date range with the default description. */
public static Fee createInstant(
BigDecimal cost,
FeeType type,
boolean isPremium,
Range<Instant> validDateRange,
Object... descriptionArgs) {
Fee instance = create(cost, type, isPremium, descriptionArgs);
instance.validDateRangeInstant = validDateRange;
instance.validDateRange = validDateRange;
return instance;
}

View File

@@ -19,9 +19,9 @@ import static com.google.common.base.Preconditions.checkArgument;
import google.registry.model.ImmutableObject;
import google.registry.model.domain.Period;
import jakarta.xml.bind.annotation.XmlTransient;
import java.time.Instant;
import java.util.Optional;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/**
* Abstract base class for the fee request query items used in Check and Info commands. It handles
@@ -86,7 +86,7 @@ public abstract class FeeQueryCommandExtensionItem extends ImmutableObject {
public abstract CurrencyUnit getCurrency();
/** The as-of date for the fee extension to run. */
public abstract Optional<DateTime> getEffectiveDate();
public abstract Optional<Instant> getEffectiveDate();
/** The name of the command being checked. */
public abstract CommandName getCommandName();

View File

@@ -24,9 +24,9 @@ import google.registry.model.domain.Period;
import google.registry.model.domain.fee.FeeQueryCommandExtensionItem.CommandName;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlTransient;
import java.time.Instant;
import java.util.List;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/**
* Abstract base class for the fee request query items used in Check and Info responses. It handles
@@ -110,11 +110,11 @@ public class FeeQueryResponseExtensionItem extends ImmutableObject {
return thisCastToDerived(); // Default impl is a noop.
}
public B setEffectiveDateIfSupported(@SuppressWarnings("unused") DateTime effectiveDate) {
public B setEffectiveDateIfSupported(@SuppressWarnings("unused") Instant effectiveDate) {
return thisCastToDerived(); // Default impl is a noop.
}
public B setNotAfterDateIfSupported(@SuppressWarnings("unused") DateTime notAfterDate) {
public B setNotAfterDateIfSupported(@SuppressWarnings("unused") Instant notAfterDate) {
return thisCastToDerived(); // Default impl is a noop.
}

View File

@@ -17,9 +17,9 @@ package google.registry.model.domain.fee06;
import google.registry.model.domain.fee.FeeCheckCommandExtensionItem;
import google.registry.model.domain.fee.FeeExtensionCommandDescriptor;
import jakarta.xml.bind.annotation.XmlType;
import java.time.Instant;
import java.util.Optional;
import org.joda.money.CurrencyUnit;
import org.joda.time.DateTime;
/** An individual price check item in version 0.6 of the fee extension on Check commands. */
@XmlType(propOrder = {"name", "currency", "command", "period"})
@@ -78,7 +78,7 @@ public class FeeCheckCommandExtensionItemV06 extends FeeCheckCommandExtensionIte
}
@Override
public Optional<DateTime> getEffectiveDate() {
public Optional<Instant> getEffectiveDate() {
return Optional.empty();
}
}

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