Package google.registry.model
Class EppResource.Builder<T extends EppResource,B extends EppResource.Builder<T,B>>
java.lang.Object
google.registry.model.Buildable.Builder<T>
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 for
EppResource
types.-
Constructor Summary
ModifierConstructorDescriptionprotected
Builder()
Create aEppResource.Builder
wrapping a new instance.protected
Create aEppResource.Builder
wrapping the given instance. -
Method Summary
Modifier and TypeMethodDescriptionaddStatusValue
(StatusValue statusValue) Add to this resource's status values.addStatusValues
(com.google.common.collect.ImmutableSet<StatusValue> statusValues) Add to this resource's status values.build()
Build the resource, nullifying empty strings and sets and setting defaults.removeStatusValue
(StatusValue statusValue) Remove from this resource's status values.removeStatusValues
(com.google.common.collect.ImmutableSet<StatusValue> statusValues) Remove from this resource's status values.setCreationRegistrarId
(String creationRegistrarId) Set the registrar that created this resource.setCreationTime
(org.joda.time.DateTime creationTime) Set the time this resource was created.setCreationTimeForTest
(org.joda.time.DateTime creationTime) Set the time this resource was created.setDeletionTime
(org.joda.time.DateTime deletionTime) Set the time after which this resource should be considered deleted.setLastEppUpdateRegistrarId
(String lastEppUpdateRegistrarId) Set the registrar who last performed a <update> on this resource.setLastEppUpdateTime
(org.joda.time.DateTime lastEppUpdateTime) Set the time when a <update> was performed on this resource.setPersistedCurrentSponsorRegistrarId
(String currentSponsorRegistrarId) Set the current sponsoring registrar.Set this resource's repoId.setStatusValues
(com.google.common.collect.ImmutableSet<StatusValue> statusValues) Set this resource's status values.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 Details
-
Builder
protected Builder()Create aEppResource.Builder
wrapping a new instance. -
Builder
Create aEppResource.Builder
wrapping the given instance.
-
-
Method Details
-
setCreationTime
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
Set the time this resource was created. Should only be used in tests. -
setDeletionTime
Set the time after which this resource should be considered deleted. -
setPersistedCurrentSponsorRegistrarId
Set the current sponsoring registrar. -
setCreationRegistrarId
Set the registrar that created this resource. -
setLastEppUpdateTime
Set the time when a <update> was performed on this resource. -
setLastEppUpdateRegistrarId
Set the registrar who last performed a <update> on this resource. -
setStatusValues
Set this resource's status values. -
addStatusValue
Add to this resource's status values. -
removeStatusValue
Remove from this resource's status values. -
addStatusValues
Add to this resource's status values. -
removeStatusValues
Remove from this resource's status values. -
setRepoId
Set this resource's repoId. -
setUpdateTimestamp
Set the update timestamp.This is provided at EppResource since UpdateAutoTimestampEntity doesn't have a Builder.
-
build
Build the resource, nullifying empty strings and sets and setting defaults.- Overrides:
build
in classBuildable.Builder<T extends EppResource>
-