mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 07:13:34 +02:00
Refactor CreateDomainCommand and add UpdateDomainCommand
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160282921
This commit is contained in:
parent
30d5d05fdf
commit
bbdf9bfc38
18 changed files with 944 additions and 80 deletions
98
java/google/registry/tools/soy/DomainUpdate.soy
Normal file
98
java/google/registry/tools/soy/DomainUpdate.soy
Normal file
|
@ -0,0 +1,98 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace domain.registry.tools autoescape="strict"}
|
||||
/**
|
||||
* Update domain
|
||||
*/
|
||||
{template .domainupdate}
|
||||
{@param domain: string}
|
||||
{@param add: bool}
|
||||
{@param addNameservers: list<string>}
|
||||
{@param addAdmins: list<string>}
|
||||
{@param addTechs: list<string>}
|
||||
{@param addStatuses: list<string>}
|
||||
{@param remove: bool}
|
||||
{@param removeNameservers: list<string>}
|
||||
{@param removeAdmins: list<string>}
|
||||
{@param removeTechs: list<string>}
|
||||
{@param removeStatuses: list<string>}
|
||||
{@param change: bool}
|
||||
{@param? registrant: string}
|
||||
{@param? password: string}
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>{$domain}</domain:name>
|
||||
{if $add}
|
||||
<domain:add>
|
||||
{if length($addNameservers) > 0}
|
||||
<domain:ns>
|
||||
{foreach $s in $addNameservers}
|
||||
<domain:hostObj>{$s}</domain:hostObj>
|
||||
{/foreach}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{foreach $admin in $addAdmins}
|
||||
<domain:contact type="admin">{$admin}</domain:contact>
|
||||
{/foreach}
|
||||
{foreach $tech in $addTechs}
|
||||
<domain:contact type="tech">{$tech}</domain:contact>
|
||||
{/foreach}
|
||||
{foreach $status in $addStatuses}
|
||||
<domain:status s="{$status}"/>
|
||||
{/foreach}
|
||||
</domain:add>
|
||||
{/if}
|
||||
{if $remove}
|
||||
<domain:rem>
|
||||
{if length($removeNameservers) > 0}
|
||||
<domain:ns>
|
||||
{foreach $s in $removeNameservers}
|
||||
<domain:hostObj>{$s}</domain:hostObj>
|
||||
{/foreach}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{foreach $admin in $removeAdmins}
|
||||
<domain:contact type="admin">{$admin}</domain:contact>
|
||||
{/foreach}
|
||||
{foreach $tech in $removeTechs}
|
||||
<domain:contact type="tech">{$tech}</domain:contact>
|
||||
{/foreach}
|
||||
{foreach $status in $removeStatuses}
|
||||
<domain:status s="{$status}"/>
|
||||
{/foreach}
|
||||
</domain:rem>
|
||||
{/if}
|
||||
{if $change}
|
||||
<domain:chg>
|
||||
{if $registrant}
|
||||
<domain:registrant>{$registrant}</domain:registrant>
|
||||
{/if}
|
||||
{if $password}
|
||||
<domain:authInfo>
|
||||
<domain:pw>{$password}</domain:pw>
|
||||
</domain:authInfo>
|
||||
{/if}
|
||||
</domain:chg>
|
||||
{/if}
|
||||
</domain:update>
|
||||
</update>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
{/template}
|
Loading…
Add table
Add a link
Reference in a new issue