Package google.registry.model
Class EppResource.Builder<T extends EppResource,B extends EppResource.Builder<T,B>>
- java.lang.Object
-
- google.registry.model.Buildable.Builder<S>
-
- google.registry.model.Buildable.GenericBuilder<T,B>
-
- google.registry.model.EppResource.Builder<T,B>
-
- Direct Known Subclasses:
ContactBase.Builder
,DomainBase.Builder
,HostBase.Builder
- Enclosing class:
- EppResource
public abstract static class EppResource.Builder<T extends EppResource,B extends EppResource.Builder<T,B>> extends Buildable.GenericBuilder<T,B>
Abstract builder forEppResource
types.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Create aEppResource.Builder
wrapping a new instance.protected
Builder(T instance)
Create aEppResource.Builder
wrapping the given instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
addStatusValue(StatusValue statusValue)
Add to this resource's status values.B
addStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Add to this resource's status values.T
build()
Build the resource, nullifying empty strings and sets and setting defaults.B
removeStatusValue(StatusValue statusValue)
Remove from this resource's status values.B
removeStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Remove from this resource's status values.B
setCreationRegistrarId(java.lang.String creationRegistrarId)
Set the registrar that created this resource.B
setCreationTime(org.joda.time.DateTime creationTime)
Set the time this resource was created.B
setCreationTimeForTest(org.joda.time.DateTime creationTime)
Set the time this resource was created.B
setDeletionTime(org.joda.time.DateTime deletionTime)
Set the time after which this resource should be considered deleted.B
setLastEppUpdateRegistrarId(java.lang.String lastEppUpdateRegistrarId)
Set the registrar who last performed a <update> on this resource.B
setLastEppUpdateTime(org.joda.time.DateTime lastEppUpdateTime)
Set the time when a <update> was performed on this resource.B
setPersistedCurrentSponsorRegistrarId(java.lang.String currentSponsorRegistrarId)
Set the current sponsoring registrar.B
setRepoId(java.lang.String repoId)
Set this resource's repoId.B
setStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Set this resource's status values.B
setUpdateTimestamp(UpdateAutoTimestamp updateTimestamp)
Set the update timestamp.-
Methods inherited from class google.registry.model.Buildable.GenericBuilder
thisCastToDerived
-
Methods inherited from class google.registry.model.Buildable.Builder
getInstance
-
-
-
-
Constructor Detail
-
Builder
protected Builder()
Create aEppResource.Builder
wrapping a new instance.
-
Builder
protected Builder(T instance)
Create aEppResource.Builder
wrapping the given instance.
-
-
Method Detail
-
setCreationTime
public B setCreationTime(org.joda.time.DateTime creationTime)
Set the time this resource was created.Note: This can only be used if the creation time hasn't already been set, which it is in normal EPP flows.
-
setCreationTimeForTest
public B setCreationTimeForTest(org.joda.time.DateTime creationTime)
Set the time this resource was created. Should only be used in tests.
-
setDeletionTime
public B setDeletionTime(org.joda.time.DateTime deletionTime)
Set the time after which this resource should be considered deleted.
-
setPersistedCurrentSponsorRegistrarId
public B setPersistedCurrentSponsorRegistrarId(java.lang.String currentSponsorRegistrarId)
Set the current sponsoring registrar.
-
setCreationRegistrarId
public B setCreationRegistrarId(java.lang.String creationRegistrarId)
Set the registrar that created this resource.
-
setLastEppUpdateTime
public B setLastEppUpdateTime(org.joda.time.DateTime lastEppUpdateTime)
Set the time when a <update> was performed on this resource.
-
setLastEppUpdateRegistrarId
public B setLastEppUpdateRegistrarId(java.lang.String lastEppUpdateRegistrarId)
Set the registrar who last performed a <update> on this resource.
-
setStatusValues
public B setStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Set this resource's status values.
-
addStatusValue
public B addStatusValue(StatusValue statusValue)
Add to this resource's status values.
-
removeStatusValue
public B removeStatusValue(StatusValue statusValue)
Remove from this resource's status values.
-
addStatusValues
public B addStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Add to this resource's status values.
-
removeStatusValues
public B removeStatusValues(com.google.common.collect.ImmutableSet<StatusValue> statusValues)
Remove from this resource's status values.
-
setRepoId
public B setRepoId(java.lang.String repoId)
Set this resource's repoId.
-
setUpdateTimestamp
public B setUpdateTimestamp(UpdateAutoTimestamp updateTimestamp)
Set the update timestamp.This is provided at EppResource since UpdateAutoTimestampEntity doesn't have a Builder.
-
build
public T build()
Build the resource, nullifying empty strings and sets and setting defaults.- Overrides:
build
in classBuildable.Builder<T extends EppResource>
-
-