Package google.registry.model.tld.label
Class BaseDomainLabelList<T extends java.lang.Comparable<?>,R extends DomainLabelEntry<T,?>>
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.tld.label.BaseDomainLabelList<T,R>
-
- Type Parameters:
T
- The type of the root value being listed, e.g.ReservationType
.R
- The type of domain label entry being listed, e.g.ReservedList.ReservedListEntry
(note, must subclassDomainLabelEntry
.
- All Implemented Interfaces:
Buildable
,java.lang.Cloneable
- Direct Known Subclasses:
PremiumList
,ReservedList
@MappedSuperclass public abstract class BaseDomainLabelList<T extends java.lang.Comparable<?>,R extends DomainLabelEntry<T,?>> extends ImmutableObject implements Buildable
Base class forReservedList
andPremiumList
objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseDomainLabelList.Builder<T extends BaseDomainLabelList<?,?>,B extends BaseDomainLabelList.Builder<T,?>>
Base builder for derived classes ofBaseDomainLabelList
.-
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 BaseDomainLabelList()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.joda.time.DateTime
getCreationTimestamp()
Returns the creation time of this revision of the reserved list.java.lang.String
getName()
Returns the name of the reserved list.com.google.common.collect.ImmutableSet<java.lang.String>
getReferencingTlds()
Gets the names of the tlds that reference this list.long
getRevisionId()
Returns the ID of this revision, or throws if null.com.google.common.collect.ImmutableMap<java.lang.String,R>
parse(java.lang.Iterable<java.lang.String> lines)
Turns the list CSV data into a map of labels to parsed data of type R.protected abstract boolean
refersToList(Registry registry, java.lang.String name)
static java.util.List<java.lang.String>
splitOnComment(java.lang.String line)
Helper function to extract the comment from an input line.-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
getRevisionId
public long getRevisionId()
Returns the ID of this revision, or throws if null.
-
getName
public java.lang.String getName()
Returns the name of the reserved list.
-
getCreationTimestamp
public org.joda.time.DateTime getCreationTimestamp()
Returns the creation time of this revision of the reserved list.
-
parse
public com.google.common.collect.ImmutableMap<java.lang.String,R> parse(java.lang.Iterable<java.lang.String> lines)
Turns the list CSV data into a map of labels to parsed data of type R.- Parameters:
lines
- the CSV file, line by line
-
splitOnComment
public static java.util.List<java.lang.String> splitOnComment(java.lang.String line)
Helper function to extract the comment from an input line. Returns a list containing the line (sans comment) and the comment (in that order). If the line was blank or empty, then this method returns an empty list.
-
getReferencingTlds
public final com.google.common.collect.ImmutableSet<java.lang.String> getReferencingTlds()
Gets the names of the tlds that reference this list.
-
refersToList
protected abstract boolean refersToList(Registry registry, java.lang.String name)
-
-