1437N/A/*
1437N/A * CDDL HEADER START
1437N/A *
1437N/A * The contents of this file are subject to the terms of the
1437N/A * Common Development and Distribution License, Version 1.0 only
1437N/A * (the "License"). You may not use this file except in compliance
1437N/A * with the License.
1437N/A *
1437N/A * You can obtain a copy of the license at
1437N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
1437N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1437N/A * See the License for the specific language governing permissions
1437N/A * and limitations under the License.
1437N/A *
1437N/A * When distributing Covered Code, include this CDDL HEADER in each
1437N/A * file and include the License file at
1437N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1437N/A * add the following below this CDDL HEADER, with the fields enclosed
1437N/A * by brackets "[]" replaced with your own identifying information:
1437N/A * Portions Copyright [yyyy] [name of copyright owner]
1437N/A *
1437N/A * CDDL HEADER END
1437N/A *
1437N/A *
3231N/A * Copyright 2006-2008 Sun Microsystems, Inc.
1437N/A */
1527N/A package org.opends.server.admin.client.cli;
1437N/A
1437N/Aimport java.io.OutputStream;
1899N/Aimport java.util.Set;
1437N/A
1527N/Aimport org.opends.admin.ads.ADSContextException;
1437N/Aimport org.opends.server.util.args.ArgumentException;
1437N/Aimport org.opends.server.util.args.BooleanArgument;
1437N/Aimport org.opends.server.util.args.SubCommand;
1437N/A
1437N/A/**
1437N/A * This Interface defines method that a group of subcommand shoud implement.
1437N/A */
1644N/Apublic interface DsFrameworkCliSubCommandGroup
1437N/A{
1437N/A
1437N/A /**
1437N/A * Initialize subcommand related to server group management.
1437N/A *
1437N/A * @param argParser
1437N/A * The parser in which we should be registered.
1437N/A * @param verboseArg
1437N/A * The verbose Argument.
1437N/A * @throws ArgumentException
1437N/A * If there is a problem with any of the parameters used
1437N/A * to create this argument.
1437N/A */
1899N/A public void initializeCliGroup(DsFrameworkCliParser argParser,
1437N/A BooleanArgument verboseArg) throws ArgumentException;
1437N/A
1437N/A /**
1437N/A * Indicates if the provided suncommand is part of this group.
1437N/A *
1437N/A * @param subCmd
1437N/A * The actual subcommand with input parameter.
1437N/A * @return True if the provided suncommand is part of this group.
1437N/A */
1461N/A public boolean isSubCommand(SubCommand subCmd);
1437N/A
1437N/A /**
1437N/A * Handle the subcommand.
1437N/A * @param subCmd
1437N/A * The actual subcommand with input parameter
1437N/A * @param outStream The output stream to use for standard output.
1437N/A * @param errStream The output stream to use for standard error.
1437N/A * @return the return code
1437N/A * @throws ADSContextException
1437N/A * If there is a problem with when trying to perform the
1437N/A * operation.
1899N/A * @throws ArgumentException
1899N/A * If there is a problem with any of the parameters used
1899N/A * to execute this subcommand.
1437N/A */
1990N/A public DsFrameworkCliReturnCode performSubCommand(SubCommand subCmd,
1899N/A OutputStream outStream, OutputStream errStream)
1899N/A throws ADSContextException, ArgumentException;
1899N/A
1899N/A /**
1899N/A * Get the subcommands list.
1899N/A * @return the subcommand list.
1899N/A */
1899N/A public Set<SubCommand> getSubCommands();
1899N/A
1899N/A /**
1899N/A * Indicates whether this subcommand group should be hidden from the usage
1899N/A * information.
1899N/A *
1899N/A * @return <CODE>true</CODE> if this subcommand group should be hidden
1899N/A * from the usage information, or <CODE>false</CODE> if
1899N/A * not.
1899N/A */
1899N/A public boolean isHidden();
1899N/A
1899N/A /**
1899N/A * Indicates subcommand group name.
1899N/A *
1899N/A * @return the subcommand group name
1899N/A */
1899N/A public String getGroupName();
1899N/A
1527N/A}