mirror of
https://github.com/google/nomulus.git
synced 2025-08-03 16:32:11 +02:00
Fix Result.Code enum values to use UPPER_CAMEL naming
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133324460
This commit is contained in:
parent
823bdc721f
commit
c6e9779af1
38 changed files with 126 additions and 125 deletions
|
@ -15,7 +15,7 @@
|
|||
package google.registry.flows.contact;
|
||||
|
||||
import static google.registry.model.EppResourceUtils.checkResourcesExist;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import google.registry.config.ConfigModule.Config;
|
||||
|
@ -55,6 +55,6 @@ public class ContactCheckFlow extends LoggedInFlow {
|
|||
boolean unused = !existingIds.contains(id);
|
||||
checks.add(ContactCheck.create(unused, id, unused ? null : "In use"));
|
||||
}
|
||||
return createOutput(Success, ContactCheckData.create(checks.build()));
|
||||
return createOutput(SUCCESS, ContactCheckData.create(checks.build()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import static google.registry.flows.contact.ContactFlowUtils.validateAsciiPostal
|
|||
import static google.registry.flows.contact.ContactFlowUtils.validateContactAgainstPolicy;
|
||||
import static google.registry.model.EppResourceUtils.createContactHostRoid;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -86,6 +86,6 @@ public class ContactCreateFlow extends LoggedInFlow implements TransactionalFlow
|
|||
historyBuilder.build(),
|
||||
ForeignKeyIndex.create(newResource, newResource.getDeletionTime()),
|
||||
EppResourceIndex.create(Key.create(newResource)));
|
||||
return createOutput(Success, ContactCreateData.create(newResource.getContactId(), now));
|
||||
return createOutput(SUCCESS, ContactCreateData.create(newResource.getContactId(), now));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyNoDisallowedStatuses
|
|||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForResource;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.SuccessWithActionPending;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -115,6 +115,6 @@ public class ContactDeleteFlow extends LoggedInFlow implements TransactionalFlow
|
|||
.setModificationTime(now)
|
||||
.setParent(Key.create(existingResource));
|
||||
ofy().save().<Object>entities(newResource, historyBuilder.build());
|
||||
return createOutput(SuccessWithActionPending);
|
||||
return createOutput(SUCCESS_WITH_ACTION_PENDING);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ package google.registry.flows.contact;
|
|||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForResource;
|
||||
import static google.registry.model.EppResourceUtils.cloneResourceWithLinkedStatus;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import google.registry.flows.EppException;
|
||||
|
@ -47,6 +47,6 @@ public class ContactInfoFlow extends LoggedInFlow {
|
|||
throw new ResourceToQueryDoesNotExistException(ContactResource.class, targetId);
|
||||
}
|
||||
verifyOptionalAuthInfoForResource(authInfo, existingResource);
|
||||
return createOutput(Success, cloneResourceWithLinkedStatus(existingResource, now));
|
||||
return createOutput(SUCCESS, cloneResourceWithLinkedStatus(existingResource, now));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
|
|||
import static google.registry.flows.contact.ContactFlowUtils.createGainingTransferPollMessage;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -91,6 +91,6 @@ public class ContactTransferApproveFlow extends LoggedInFlow implements Transact
|
|||
// Delete the billing event and poll messages that were written in case the transfer would have
|
||||
// been implicitly server approved.
|
||||
ofy().delete().keys(existingResource.getTransferData().getServerApproveEntities());
|
||||
return createOutput(Success, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
return createOutput(SUCCESS, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForR
|
|||
import static google.registry.flows.contact.ContactFlowUtils.createLosingTransferPollMessage;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -92,6 +92,6 @@ public class ContactTransferCancelFlow extends LoggedInFlow implements Transacti
|
|||
// Delete the billing event and poll messages that were written in case the transfer would have
|
||||
// been implicitly server approved.
|
||||
ofy().delete().keys(existingResource.getTransferData().getServerApproveEntities());
|
||||
return createOutput(Success, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
return createOutput(SUCCESS, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ package google.registry.flows.contact;
|
|||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForResource;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import google.registry.flows.EppException;
|
||||
|
@ -67,6 +67,6 @@ public class ContactTransferQueryFlow extends LoggedInFlow {
|
|||
throw new NotAuthorizedToViewTransferException();
|
||||
}
|
||||
return createOutput(
|
||||
Success, createTransferResponse(targetId, existingResource.getTransferData()));
|
||||
SUCCESS, createTransferResponse(targetId, existingResource.getTransferData()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
|
|||
import static google.registry.flows.contact.ContactFlowUtils.createGainingTransferPollMessage;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -86,6 +86,6 @@ public class ContactTransferRejectFlow extends LoggedInFlow implements Transacti
|
|||
// Delete the billing event and poll messages that were written in case the transfer would have
|
||||
// been implicitly server approved.
|
||||
ofy().delete().keys(existingResource.getTransferData().getServerApproveEntities());
|
||||
return createOutput(Success, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
return createOutput(SUCCESS, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import static google.registry.flows.contact.ContactFlowUtils.createGainingTransf
|
|||
import static google.registry.flows.contact.ContactFlowUtils.createLosingTransferPollMessage;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.createTransferResponse;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.SuccessWithActionPending;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS_WITH_ACTION_PENDING;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -140,7 +140,8 @@ public class ContactTransferRequestFlow extends LoggedInFlow implements Transact
|
|||
serverApproveGainingPollMessage,
|
||||
serverApproveLosingPollMessage);
|
||||
return createOutput(
|
||||
SuccessWithActionPending, createTransferResponse(targetId, newResource.getTransferData()));
|
||||
SUCCESS_WITH_ACTION_PENDING,
|
||||
createTransferResponse(targetId, newResource.getTransferData()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
|
|||
import static google.registry.flows.contact.ContactFlowUtils.validateAsciiPostalInfo;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.validateContactAgainstPolicy;
|
||||
import static google.registry.model.EppResourceUtils.loadByUniqueId;
|
||||
import static google.registry.model.eppoutput.Result.Code.Success;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -127,6 +127,6 @@ public class ContactUpdateFlow extends LoggedInFlow implements TransactionalFlow
|
|||
validateAsciiPostalInfo(newResource.getInternationalizedPostalInfo());
|
||||
validateContactAgainstPolicy(newResource);
|
||||
ofy().save().<Object>entities(newResource, historyBuilder.build());
|
||||
return createOutput(Success);
|
||||
return createOutput(SUCCESS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue