mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Remove ServerSideCommand
ServerSideCommand now just aggregates CommandWithConnection and CommandWithRemoteApi, so it's arguably clearer for commands to just implement both of these. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211670031
This commit is contained in:
parent
8a2388f5b6
commit
4c3207647f
9 changed files with 10 additions and 27 deletions
|
@ -41,7 +41,7 @@ import org.json.simple.JSONValue;
|
||||||
* lists.
|
* lists.
|
||||||
*/
|
*/
|
||||||
abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
|
abstract class CreateOrUpdatePremiumListCommand extends ConfirmingCommand
|
||||||
implements ServerSideCommand {
|
implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Parameter(
|
@Parameter(
|
||||||
|
|
|
@ -39,7 +39,7 @@ import javax.annotation.Nullable;
|
||||||
/** Command to create a Registrar. */
|
/** Command to create a Registrar. */
|
||||||
@Parameters(separators = " =", commandDescription = "Create new registrar account(s)")
|
@Parameters(separators = " =", commandDescription = "Create new registrar account(s)")
|
||||||
final class CreateRegistrarCommand extends CreateOrUpdateRegistrarCommand
|
final class CreateRegistrarCommand extends CreateOrUpdateRegistrarCommand
|
||||||
implements ServerSideCommand {
|
implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
private static final ImmutableSet<RegistryToolEnvironment> ENVIRONMENTS_ALLOWING_GROUP_CREATION =
|
private static final ImmutableSet<RegistryToolEnvironment> ENVIRONMENTS_ALLOWING_GROUP_CREATION =
|
||||||
ImmutableSet.of(PRODUCTION, SANDBOX, UNITTEST);
|
ImmutableSet.of(PRODUCTION, SANDBOX, UNITTEST);
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Parameters(separators = " =", commandDescription = "Create groups for a registrar.")
|
@Parameters(separators = " =", commandDescription = "Create groups for a registrar.")
|
||||||
public class CreateRegistrarGroupsCommand extends ConfirmingCommand
|
public class CreateRegistrarGroupsCommand extends ConfirmingCommand
|
||||||
implements ServerSideCommand {
|
implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
description = "Client identifier(s) of the registrar(s) to create groups for",
|
description = "Client identifier(s) of the registrar(s) to create groups for",
|
||||||
|
|
|
@ -46,7 +46,8 @@ import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/** A command to execute an epp command. */
|
/** A command to execute an epp command. */
|
||||||
abstract class EppToolCommand extends ConfirmingCommand implements ServerSideCommand {
|
abstract class EppToolCommand extends ConfirmingCommand
|
||||||
|
implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
names = {"-u", "--superuser"},
|
names = {"-u", "--superuser"},
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.joda.time.DateTime;
|
||||||
|
|
||||||
/** Command to generate zone files. */
|
/** Command to generate zone files. */
|
||||||
@Parameters(separators = " =", commandDescription = "Generate zone files")
|
@Parameters(separators = " =", commandDescription = "Generate zone files")
|
||||||
final class GenerateZoneFilesCommand implements ServerSideCommand {
|
final class GenerateZoneFilesCommand implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
description = "One or more TLDs to generate zone files for",
|
description = "One or more TLDs to generate zone files for",
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.json.simple.JSONValue;
|
||||||
*
|
*
|
||||||
* <p>The formatting is done on the server side; this class just dumps the results to the screen.
|
* <p>The formatting is done on the server side; this class just dumps the results to the screen.
|
||||||
*/
|
*/
|
||||||
abstract class ListObjectsCommand implements ServerSideCommand {
|
abstract class ListObjectsCommand implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Parameter(
|
@Parameter(
|
||||||
|
|
|
@ -24,7 +24,8 @@ import google.registry.model.registry.Registries;
|
||||||
|
|
||||||
/** Command to initiate a load-test. */
|
/** Command to initiate a load-test. */
|
||||||
@Parameters(separators = " =", commandDescription = "Run a load test.")
|
@Parameters(separators = " =", commandDescription = "Run a load test.")
|
||||||
class LoadTestCommand extends ConfirmingCommand implements ServerSideCommand {
|
class LoadTestCommand extends ConfirmingCommand
|
||||||
|
implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
// This is a mostly arbitrary value, roughly an hour and a quarter. It served as a generous
|
// This is a mostly arbitrary value, roughly an hour and a quarter. It served as a generous
|
||||||
// timespan for initial backup/restore testing, but has no other special significance.
|
// timespan for initial backup/restore testing, but has no other special significance.
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
// 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.
|
|
||||||
|
|
||||||
package google.registry.tools;
|
|
||||||
|
|
||||||
/** A command that executes on the server. */
|
|
||||||
interface ServerSideCommand extends CommandWithConnection, CommandWithRemoteApi {
|
|
||||||
}
|
|
|
@ -40,7 +40,7 @@ import java.util.Objects;
|
||||||
@Parameters(
|
@Parameters(
|
||||||
separators = " =",
|
separators = " =",
|
||||||
commandDescription = "Verify passage of OT&E for specified (or all) registrars")
|
commandDescription = "Verify passage of OT&E for specified (or all) registrars")
|
||||||
final class VerifyOteCommand implements ServerSideCommand {
|
final class VerifyOteCommand implements CommandWithConnection, CommandWithRemoteApi {
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
description = "List of registrar names to check; must be the same names as the ones used "
|
description = "List of registrar names to check; must be the same names as the ones used "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue