mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Get rid of cloneWithLinkedStatus
Now that we return an Info object rather than the resource itself, there's no reason for the cloning pattern. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145426484
This commit is contained in:
parent
2bb61b82f4
commit
d5160213e5
3 changed files with 24 additions and 17 deletions
|
@ -360,17 +360,6 @@ public final class EppResourceUtils {
|
|||
return queryForLinkedDomains(key, now).limit(1).count() > 0;
|
||||
}
|
||||
|
||||
/** Clone a contact or host with an eventually-consistent notion of LINKED. */
|
||||
public static EppResource cloneResourceWithLinkedStatus(EppResource resource, DateTime now) {
|
||||
Builder<?, ?> builder = resource.asBuilder();
|
||||
if (isLinked(Key.create(resource), now)) {
|
||||
builder.addStatusValue(StatusValue.LINKED);
|
||||
} else {
|
||||
builder.removeStatusValue(StatusValue.LINKED);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/** Exception to throw when failing to parse a repo id. */
|
||||
public static class InvalidRepoIdException extends Exception {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue