Class AllocationToken
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.UpdateAutoTimestampEntity
-
- google.registry.model.domain.token.AllocationToken
-
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
@Entity public class AllocationToken extends UpdateAutoTimestampEntity implements Buildable
An entity representing an allocation token.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AllocationToken.Builder
A builder for constructingAllocationToken
objects, since they are immutable.static class
AllocationToken.RegistrationBehavior
Any special behavior that should be used when registering domains using this token.static class
AllocationToken.TokenBehavior
System behaves differently based on a token it gets inside a command.static class
AllocationToken.TokenStatus
The status of this token with regard to any potential promotion.static class
AllocationToken.TokenType
Type of the token that indicates how and where it should be used.-
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
Constructors Constructor Description AllocationToken()
-
Method Summary
-
Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
maybeGetStaticTokenInstance
public static java.util.Optional<AllocationToken> maybeGetStaticTokenInstance(java.lang.String name)
-
getToken
public java.lang.String getToken()
-
getRedemptionHistoryId
public java.util.Optional<HistoryEntry.HistoryEntryId> getRedemptionHistoryId()
-
isRedeemed
public boolean isRedeemed()
-
getDomainName
public java.util.Optional<java.lang.String> getDomainName()
-
getCreationTime
public java.util.Optional<org.joda.time.DateTime> getCreationTime()
-
getAllowedRegistrarIds
public com.google.common.collect.ImmutableSet<java.lang.String> getAllowedRegistrarIds()
-
getAllowedTlds
public com.google.common.collect.ImmutableSet<java.lang.String> getAllowedTlds()
-
getDiscountFraction
public double getDiscountFraction()
-
shouldDiscountPremiums
public boolean shouldDiscountPremiums()
-
getDiscountYears
public int getDiscountYears()
-
getTokenType
public AllocationToken.TokenType getTokenType()
-
getTokenStatusTransitions
public TimedTransitionProperty<AllocationToken.TokenStatus> getTokenStatusTransitions()
-
getAllowedEppActions
public com.google.common.collect.ImmutableSet<FeeQueryCommandExtensionItem.CommandName> getAllowedEppActions()
-
getRenewalPriceBehavior
public BillingBase.RenewalPriceBehavior getRenewalPriceBehavior()
-
getRegistrationBehavior
public AllocationToken.RegistrationBehavior getRegistrationBehavior()
-
getTokenBehavior
public AllocationToken.TokenBehavior getTokenBehavior()
-
get
public static java.util.Optional<AllocationToken> get(VKey<AllocationToken> key)
-
getAll
public static java.util.Map<VKey<AllocationToken>,java.util.Optional<AllocationToken>> getAll(com.google.common.collect.ImmutableList<VKey<AllocationToken>> keys)
-
createVKey
public VKey<AllocationToken> createVKey()
- Overrides:
createVKey
in classImmutableObject
-
asBuilder
public AllocationToken.Builder asBuilder()
-
-