mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Add extra flow logic hook for application info
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138683307
This commit is contained in:
parent
09beacf746
commit
59c213c66f
8 changed files with 206 additions and 10 deletions
|
@ -66,13 +66,30 @@ public class TestExtraLogicManager implements RegistryExtraFlowLogic {
|
|||
*/
|
||||
@Override
|
||||
public Set<String> getExtensionFlags(
|
||||
DomainResource domainResource, String clientId, DateTime asOfDate) {
|
||||
DomainResource domain, String clientId, DateTime asOfDate) {
|
||||
// Take the part before the period, split by dashes, and treat each part after the first as
|
||||
// a flag.
|
||||
List<String> components =
|
||||
Splitter.on('-').splitToList(
|
||||
Iterables.getFirst(
|
||||
Splitter.on('.').split(domainResource.getFullyQualifiedDomainName()), ""));
|
||||
Splitter.on('.').split(domain.getFullyQualifiedDomainName()), ""));
|
||||
return ImmutableSet.copyOf(components.subList(1, components.size()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the flags to be used in the EPP flags extension for application info commands.
|
||||
*
|
||||
* <p>This method works the same way as getExtensionFlags().
|
||||
*/
|
||||
@Override
|
||||
public Set<String> getApplicationExtensionFlags(
|
||||
DomainApplication application, String clientId, DateTime asOfDate) {
|
||||
// Take the part before the period, split by dashes, and treat each part after the first as
|
||||
// a flag.
|
||||
List<String> components =
|
||||
Splitter.on('-').splitToList(
|
||||
Iterables.getFirst(
|
||||
Splitter.on('.').split(application.getFullyQualifiedDomainName()), ""));
|
||||
return ImmutableSet.copyOf(components.subList(1, components.size()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue