mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add registration type response extension to info commands
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123323993
This commit is contained in:
parent
041b2c4116
commit
6355ef5922
4 changed files with 52 additions and 2 deletions
|
@ -24,10 +24,13 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.domain.DomainResource.Builder;
|
||||
import google.registry.model.domain.fee.FeeInfoExtension;
|
||||
import google.registry.model.domain.fee.FeeInfoResponseExtension;
|
||||
import google.registry.model.domain.regtype.RegTypeInfoResponseExtension;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.rgp.RgpInfoExtension;
|
||||
import google.registry.model.eppoutput.Response.ResponseExtension;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An EPP flow that reads a domain.
|
||||
*
|
||||
|
@ -40,9 +43,12 @@ import google.registry.model.eppoutput.Response.ResponseExtension;
|
|||
*/
|
||||
public class DomainInfoFlow extends BaseDomainInfoFlow<DomainResource, Builder> {
|
||||
|
||||
protected List<String> registrationTypes;
|
||||
|
||||
@Override
|
||||
protected void initSingleResourceFlow() throws EppException {
|
||||
registerExtensions(FeeInfoExtension.class);
|
||||
registrationTypes = ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -92,6 +98,9 @@ public class DomainInfoFlow extends BaseDomainInfoFlow<DomainResource, Builder>
|
|||
feeInfo, builder, getTargetId(), existingResource.getTld(), getClientId(), now);
|
||||
extensions.add(builder.build());
|
||||
}
|
||||
if (!registrationTypes.isEmpty()) {
|
||||
extensions.add(RegTypeInfoResponseExtension.create(registrationTypes));
|
||||
}
|
||||
return extensions.build();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue