Class RegistryLock
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,Serializable
,Cloneable
Registry locks must be requested through the registrar console by a lock-enabled contact, then confirmed through email within a certain length of time. Until that confirmation is processed, the completion time will remain null and the lock will have no effect. The same applies for unlock actions.
Note that there will be at most one row per domain with a null completed time -- this means that there is at most one pending action per domain. This is enforced at the logic level.
Note as well that in the case of a retry of a write after an unexpected success, the unique
constraint on verificationCode
means that the second write will fail.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,
B extends Buildable.GenericBuilder<?, ?>>, Buildable.Overlayable<T> -
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTime
Optional
<org.joda.time.DateTime> Returns the completion timestamp, or empty if this lock has not been completed yet.org.joda.time.DateTime
The lock that undoes this lock, if this lock has been unlocked and the domain locked again.Optional
<org.joda.time.Duration> The duration after which we will re-lock this domain after it is unlocked.Optional
<org.joda.time.DateTime> Returns the unlock completion timestamp, or empty if this unlock has not been completed yet.Optional
<org.joda.time.DateTime> Returns the unlock request timestamp or null if an unlock has not been requested yet.boolean
isLocked()
boolean
isLockRequestExpired
(org.joda.time.DateTime now) Returns true iff the lock was requested >= 1 hour ago and has not been verified.boolean
boolean
isUnlockRequestExpired
(org.joda.time.DateTime now) Returns true iff the unlock was requested >= 1 hour ago and has not been verified.Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
RegistryLock
public RegistryLock()
-
-
Method Details
-
getRepoId
-
getDomainName
-
getRegistrarId
-
getRegistrarPocId
-
getLockRequestTime
public org.joda.time.DateTime getLockRequestTime() -
getUnlockRequestTime
Returns the unlock request timestamp or null if an unlock has not been requested yet. -
getLockCompletionTime
Returns the completion timestamp, or empty if this lock has not been completed yet. -
getUnlockCompletionTime
Returns the unlock completion timestamp, or empty if this unlock has not been completed yet. -
getVerificationCode
-
isSuperuser
public boolean isSuperuser() -
getLastUpdateTime
public org.joda.time.DateTime getLastUpdateTime() -
getRevisionId
-
getRelock
The lock that undoes this lock, if this lock has been unlocked and the domain locked again.Note: this is lazily loaded, so it may not be initialized if referenced outside the transaction in which this lock is loaded.
-
getRelockDuration
The duration after which we will re-lock this domain after it is unlocked. -
isLocked
public boolean isLocked() -
isLockRequestExpired
public boolean isLockRequestExpired(org.joda.time.DateTime now) Returns true iff the lock was requested >= 1 hour ago and has not been verified. -
isUnlockRequestExpired
public boolean isUnlockRequestExpired(org.joda.time.DateTime now) Returns true iff the unlock was requested >= 1 hour ago and has not been verified. -
asBuilder
-