| | |
| | | import org.opends.server.util.args.Argument; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.SubCommandArgumentParser; |
| | | import org.opends.server.util.cli.CommandBuilder; |
| | | import org.opends.server.util.cli.LDAPConnectionConsoleInteraction; |
| | | import org.opends.server.util.cli.ConsoleApplication; |
| | | |
| | |
| | | // The management context. |
| | | private ManagementContext context = null; |
| | | |
| | | // The connection parameters command builder. |
| | | private CommandBuilder contextCommandBuilder; |
| | | |
| | | /** |
| | | * Creates a new LDAP management context factory. |
| | | */ |
| | |
| | | new LDAPConnectionConsoleInteraction(app, secureArgsList); |
| | | ci.run(); |
| | | context = getManagementContext(app, ci); |
| | | contextCommandBuilder = ci.getCommandBuilder(); |
| | | } |
| | | return context; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public CommandBuilder getContextCommandBuilder() |
| | | { |
| | | return contextCommandBuilder; |
| | | } |
| | | |
| | | /** |
| | | * Gets the management context which sub-commands should use in |
| | | * order to manage the directory server. Implementations can use the |
| | | * application instance for retrieving passwords interactively. |