mirror of
https://github.com/google/nomulus
synced 2026-07-17 13:32:21 +00:00
192a7e6c4e
This commit implements the second stage (Java ORM mappings and EPP flow enforcement) of the Expiry Access Period (XAP) launch and opt-in mechanism, completing the Two-PR deployment split mandated by db/README.md after the Stage 1 database migrations (PR #3134) are live. During XAP, a TLD charges a fee for domain registration during a timed period after deletion. To prevent accidental charges, registrars must explicitly opt in to participate in XAP registrations. Specifically, this commit: - Adds expiryAccessPeriodTransitions (a TimedTransitionProperty of ExpiryAccessPeriodMode) to Tld.java and ExpiryAccessPeriodModeTransitionUserType for mapping XAP mode schedules to PostgreSQL hstore columns. - Adds expiryAccessPeriodEnabled to Registrar.java with getter, builder setter, and JSON map serialization, and regenerates db-schema.sql.generated. - Enforces registrar opt-in in DomainCheckFlow: when an unallocated domain is in XAP and the querying registrar has not opted in, domain:check returns avail="0" with reason "Reserved". - Enforces registrar opt-in in DomainCreateFlow: when attempting to register a domain in XAP without registrar opt-in, throws DomainReservedException (EPP error 2304 "Object status prohibits operation"). - Enforces explicit fee acknowledgment during XAP domain creation when the XAP fee is non-zero, throwing FeesRequiredDuringExpiryAccessPeriodException in DomainFlowUtils if omitted. - Creates a one-time BillingEvent with Reason.FEE_EXPIRY_ACCESS when a domain is created during XAP with a non-zero fee, and adds getXapCost() to FeesAndCredits. - Updates all test TLD YAML configurations and adds comprehensive unit and integration tests across DomainCheckFlowTest, DomainCreateFlowTest, DomainPricingLogicTest, and RegistrarTest. TAG=agy CONV=f2488c74-8b4a-43f1-9c22-d1dddbdbb4e0 BUG=http://b/437398822