Package google.registry.model
Class ResourceTransferUtils
java.lang.Object
google.registry.model.ResourceTransferUtils
Static utility functions for resource transfers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R extends EppResource & EppResource.ResourceWithTransferData,
B extends EppResource.Builder<R, B> & EppResource.BuilderWithTransferData<TransferData, B>>
RapprovePendingTransfer
(R resource, TransferStatus transferStatus, org.joda.time.DateTime now) Resolve a pending transfer by awarding it to the gaining client.createPendingTransferNotificationResponse
(EppResource eppResource, Trid transferRequestTrid, boolean actionResult, org.joda.time.DateTime processedDate) Create a pending action notification response indicating the resolution of a transfer.static TransferResponse
createTransferResponse
(EppResource eppResource, TransferData transferData) Create a transfer response using the id and type of this resource and the specifiedTransferData
.static <R extends EppResource & EppResource.ResourceWithTransferData>
RdenyPendingTransfer
(R resource, TransferStatus transferStatus, org.joda.time.DateTime now, String lastEppUpdateRegistrarId) Resolve a pending transfer by denying it.static <R extends EppResource & EppResource.ResourceWithTransferData>
voidhandlePendingTransferOnDelete
(R resource, R newResource, org.joda.time.DateTime now, HistoryEntry historyEntry) If there is a transfer out, delete the server-approve entities and enqueue a poll message.
-
Method Details
-
createTransferResponse
public static TransferResponse createTransferResponse(EppResource eppResource, TransferData transferData) Create a transfer response using the id and type of this resource and the specifiedTransferData
. -
createPendingTransferNotificationResponse
public static PendingActionNotificationResponse createPendingTransferNotificationResponse(EppResource eppResource, Trid transferRequestTrid, boolean actionResult, org.joda.time.DateTime processedDate) Create a pending action notification response indicating the resolution of a transfer.The returned object will use the id and type of this resource, the trid of the resource's last transfer request, and the specified status and date.
-
handlePendingTransferOnDelete
public static <R extends EppResource & EppResource.ResourceWithTransferData> void handlePendingTransferOnDelete(R resource, R newResource, org.joda.time.DateTime now, HistoryEntry historyEntry) If there is a transfer out, delete the server-approve entities and enqueue a poll message. -
approvePendingTransfer
public static <R extends EppResource & EppResource.ResourceWithTransferData,B extends EppResource.Builder<R, R approvePendingTransferB> & EppResource.BuilderWithTransferData<TransferData, B>> (R resource, TransferStatus transferStatus, org.joda.time.DateTime now) Resolve a pending transfer by awarding it to the gaining client.This removes the
StatusValue.PENDING_TRANSFER
status, sets theTransferStatus
, clears all the server-approve fields on theTransferData
, sets the new client id, and sets the last transfer time and the expiration time of the last pending transfer to now. -
denyPendingTransfer
public static <R extends EppResource & EppResource.ResourceWithTransferData> R denyPendingTransfer(R resource, TransferStatus transferStatus, org.joda.time.DateTime now, String lastEppUpdateRegistrarId) Resolve a pending transfer by denying it.This removes the
StatusValue.PENDING_TRANSFER
status, sets theTransferStatus
, clears all the server-approve fields on theTransferData
, sets the expiration time of the last pending transfer to now, sets the last EPP update time to now, and sets the last EPP update client id to the given client id.
-