Add Javadocs for RemovePluginCommand#execute
This commit adds Javadocs for RemovePluginCommand#execute, the actual
implementation of the remove plugin command.
Relates
package org.elasticsearch.plugins;
+import java.io.IOException;
import java.nio.file.AtomicMoveNotSupportedException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -56,8 +57,18 @@ class RemovePluginCommand extends EnvironmentAwareCommand {
execute(terminal, arg, env);
}
- // pkg private for testing
- void execute(Terminal terminal, String pluginName, Environment env) throws Exception {
+ /**
+ * Remove the plugin specified by {@code pluginName}.
+ *
+ * @param terminal the terminal to use for input/output
+ * @param pluginName the name of the plugin to remove
+ * @param env the environment for the local node
+ * @throws IOException if any I/O exception occurs while performing a file operation
+ * @throws UserException if plugin name is null
+ * @throws UserException if plugin directory does not exist
+ * @throws UserException if the plugin bin directory is not a directory
+ */
+ void execute(Terminal terminal, String pluginName, Environment env) throws IOException, UserException {
if (pluginName == null) {
throw new UserException(ExitCodes.USAGE, "plugin name is required");
}
