mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Delete all Limited Release Program (LRP) code
We never used it and don't have any plans to use it going forward. All conceivable parts of its functionality that we might use going forward have already been subsumed into allocation tokens, which are a simpler way of handling the same use case that are also standards-compliant. Also gets rid of the hideous ANCHOR_ prefix on anchor tenant EPP authcodes that was only ever necessary because of overloading the authcode for anchor tenant creation. Going forward it'll be based on allocation tokens, so there's no risk of conflicts. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209418194
This commit is contained in:
parent
f7bc17fbe8
commit
7b87ba41c7
34 changed files with 12 additions and 1601 deletions
|
@ -23,7 +23,6 @@ import google.registry.model.contact.ContactResource;
|
|||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.LrpTokenEntity;
|
||||
import google.registry.model.domain.token.AllocationToken;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.DomainApplicationIndex;
|
||||
|
@ -91,7 +90,6 @@ public final class EntityClasses {
|
|||
KmsSecret.class,
|
||||
KmsSecretRevision.class,
|
||||
Lock.class,
|
||||
LrpTokenEntity.class,
|
||||
PollMessage.class,
|
||||
PollMessage.Autorenew.class,
|
||||
PollMessage.OneTime.class,
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
// Copyright 2017 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.model.domain;
|
||||
|
||||
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
|
||||
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.annotation.EmbedMap;
|
||||
import com.googlecode.objectify.annotation.Entity;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
import com.googlecode.objectify.annotation.Index;
|
||||
import google.registry.model.BackupGroupRoot;
|
||||
import google.registry.model.Buildable;
|
||||
import google.registry.model.annotations.ReportedOn;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/** An entity representing a token distributed to eligible LRP registrants. */
|
||||
@ReportedOn
|
||||
@Entity
|
||||
public class LrpTokenEntity extends BackupGroupRoot implements Buildable {
|
||||
|
||||
/**
|
||||
* The secret token assigned to a registrant for the purposes of LRP registration.
|
||||
*/
|
||||
@Id
|
||||
String token;
|
||||
|
||||
/**
|
||||
* The token's assignee (additional metadata for identifying the owner of the token, the details
|
||||
* of which might differ from TLD to TLD).
|
||||
*/
|
||||
@Index
|
||||
String assignee;
|
||||
|
||||
/**
|
||||
* A list of TLDs for which this LRP token is valid.
|
||||
*/
|
||||
Set<String> validTlds;
|
||||
|
||||
/**
|
||||
* The key of the history entry for which the token was used.
|
||||
*/
|
||||
Key<HistoryEntry> redemptionHistoryEntry;
|
||||
|
||||
/**
|
||||
* A set of key-value properties associated with the LRP token. This map can be used to store
|
||||
* additional metadata about the assignee or space of domain names for which this token can be
|
||||
* valid.
|
||||
*/
|
||||
@EmbedMap
|
||||
Map<String, String> metadata;
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public String getAssignee() {
|
||||
return assignee;
|
||||
}
|
||||
|
||||
public Key<HistoryEntry> getRedemptionHistoryEntry() {
|
||||
return redemptionHistoryEntry;
|
||||
}
|
||||
|
||||
public boolean isRedeemed() {
|
||||
return redemptionHistoryEntry != null;
|
||||
}
|
||||
|
||||
public Set<String> getValidTlds() {
|
||||
return nullToEmptyImmutableCopy(validTlds);
|
||||
}
|
||||
|
||||
public Map<String, String> getMetadata() {
|
||||
return nullToEmptyImmutableCopy(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder asBuilder() {
|
||||
return new Builder(clone(this));
|
||||
}
|
||||
|
||||
/** A builder for constructing {@link LrpTokenEntity} objects, since they are immutable. */
|
||||
public static class Builder extends Buildable.Builder<LrpTokenEntity> {
|
||||
public Builder() {}
|
||||
|
||||
private Builder(LrpTokenEntity instance) {
|
||||
super(instance);
|
||||
}
|
||||
|
||||
public Builder setAssignee(String assignee) {
|
||||
getInstance().assignee = assignee;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setToken(String token) {
|
||||
getInstance().token = checkArgumentNotNull(token);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRedemptionHistoryEntry(Key<HistoryEntry> redemptionHistoryEntry) {
|
||||
getInstance().redemptionHistoryEntry = checkArgumentNotNull(redemptionHistoryEntry);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setValidTlds(Set<String> validTlds) {
|
||||
getInstance().validTlds = validTlds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setMetadata(Map<String, String> metadata) {
|
||||
getInstance().metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -68,7 +68,6 @@ import org.joda.money.CurrencyUnit;
|
|||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Duration;
|
||||
import org.joda.time.Interval;
|
||||
|
||||
/** Persisted per-TLD configuration data. */
|
||||
@ReportedOn
|
||||
|
@ -430,20 +429,6 @@ public class Registry extends ImmutableObject implements Buildable {
|
|||
/** The end of the claims period (at or after this time, claims no longer applies). */
|
||||
DateTime claimsPeriodEnd = END_OF_TIME;
|
||||
|
||||
/**
|
||||
* The (inclusive) start {@link DateTime} of LRP. This (and lrpPeriodEnd) exist for serialization
|
||||
* purposes, though everything else that interacts with the LRP period should use getLrpPeriod()
|
||||
* and setLrpPeriod(), which uses an {@link Interval}.
|
||||
*/
|
||||
DateTime lrpPeriodStart;
|
||||
|
||||
/**
|
||||
* The (exclusive) end {@link DateTime} of LRP. This (and lrpPeriodStart) exist for serialization
|
||||
* purposes, though everything else that interacts with the LRP period should use getLrpPeriod()
|
||||
* and setLrpPeriod(), which uses an {@link Interval}.
|
||||
*/
|
||||
DateTime lrpPeriodEnd;
|
||||
|
||||
/** A whitelist of clients allowed to be used on domains on this TLD (ignored if empty). */
|
||||
Set<String> allowedRegistrantContactIds;
|
||||
|
||||
|
@ -646,12 +631,6 @@ public class Registry extends ImmutableObject implements Buildable {
|
|||
return nullToEmptyImmutableCopy(allowedFullyQualifiedHostNames);
|
||||
}
|
||||
|
||||
public Interval getLrpPeriod() {
|
||||
return (lrpPeriodStart == null && lrpPeriodEnd == null)
|
||||
? new Interval(START_OF_TIME, Duration.ZERO) // An empty duration.
|
||||
: new Interval(lrpPeriodStart, lrpPeriodEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder asBuilder() {
|
||||
return new Builder(clone(this));
|
||||
|
@ -920,12 +899,6 @@ public class Registry extends ImmutableObject implements Buildable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setLrpPeriod(@Nullable Interval lrpPeriod) {
|
||||
getInstance().lrpPeriodStart = (lrpPeriod == null ? null : lrpPeriod.getStart());
|
||||
getInstance().lrpPeriodEnd = (lrpPeriod == null ? null : lrpPeriod.getEnd());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Registry build() {
|
||||
final Registry instance = getInstance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue