Class GracePeriod
- All Implemented Interfaces:
UnsafeSerializable
,Serializable
,Cloneable
When a grace period expires, it is lazily removed from the Domain
the next time the
resource is loaded from the database.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GracePeriod
create
(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingEvent> billingEventOneTime) Creates a GracePeriod for an (optional) OneTime billing event.static GracePeriod
create
(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingEvent> billingEventOneTime, Long gracePeriodId) Creates a GracePeriod for an (optional) OneTime billing event and a givenGracePeriodBase.gracePeriodId
.static GracePeriod
createForRecurrence
(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingRecurrence> billingEventRecurrence) Creates a GracePeriod for a Recurrence billing event.static GracePeriod
createForRecurrence
(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingRecurrence> billingEventRecurrence, Long gracePeriodId) Creates a GracePeriod for a Recurrence billing event and a givenGracePeriodBase.gracePeriodId
.static GracePeriod
static GracePeriod
createWithoutBillingEvent
(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId) Creates a GracePeriod with no billing event.static GracePeriod
forBillingEvent
(GracePeriodStatus type, String domainRepoId, BillingEvent billingEvent) Constructs a GracePeriod of the given type from the provided one-time BillingEvent.long
Methods inherited from class google.registry.model.domain.GracePeriodBase
getBillingEvent, getBillingRecurrence, getDomainRepoId, getExpirationTime, getRegistrarId, getType, hasBillingEvent
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
GracePeriod
public GracePeriod()
-
-
Method Details
-
getGracePeriodId
public long getGracePeriodId()- Overrides:
getGracePeriodId
in classGracePeriodBase
-
create
public static GracePeriod create(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, @Nullable VKey<BillingEvent> billingEventOneTime) Creates a GracePeriod for an (optional) OneTime billing event.Normal callers should always use
forBillingEvent(google.registry.model.domain.rgp.GracePeriodStatus, java.lang.String, google.registry.model.billing.BillingEvent)
instead, assuming they do not need to avoid loading the BillingEvent from the database. This method should typically be called only from test code to explicitly construct GracePeriods. -
create
public static GracePeriod create(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, @Nullable VKey<BillingEvent> billingEventOneTime, @Nullable Long gracePeriodId) Creates a GracePeriod for an (optional) OneTime billing event and a givenGracePeriodBase.gracePeriodId
.Normal callers should always use
forBillingEvent(google.registry.model.domain.rgp.GracePeriodStatus, java.lang.String, google.registry.model.billing.BillingEvent)
instead, assuming they do not need to avoid loading the BillingEvent from the database. This method should typically be called only from test code to explicitly construct GracePeriods. -
createFromHistory
-
createForRecurrence
public static GracePeriod createForRecurrence(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingRecurrence> billingEventRecurrence) Creates a GracePeriod for a Recurrence billing event. -
createForRecurrence
public static GracePeriod createForRecurrence(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId, VKey<BillingRecurrence> billingEventRecurrence, @Nullable Long gracePeriodId) Creates a GracePeriod for a Recurrence billing event and a givenGracePeriodBase.gracePeriodId
. -
createWithoutBillingEvent
public static GracePeriod createWithoutBillingEvent(GracePeriodStatus type, String domainRepoId, org.joda.time.DateTime expirationTime, String registrarId) Creates a GracePeriod with no billing event. -
forBillingEvent
public static GracePeriod forBillingEvent(GracePeriodStatus type, String domainRepoId, BillingEvent billingEvent) Constructs a GracePeriod of the given type from the provided one-time BillingEvent.
-