FileDocCategorySizeDatePackage
UninstallAddonCommand.javaAPI DocGlassfish v2 API3439Fri May 04 22:25:12 BST 2007com.sun.enterprise.cli.commands

UninstallAddonCommand

public class UninstallAddonCommand extends BaseLifeCycleCommand
Uninstall an Addon from the appserver.

Fields Summary
Constructors Summary
public UninstallAddonCommand()
Creates new UninstallDomainCommand

    
Methods Summary
public voidrunCommand()
Executes the command

throws
CommandException

        validateOptions();
	
	String addon = null;
        try
        {            
	    addon = (String)operands.firstElement();
            AddonControl ac = new AddonControl();
            ac.uninstall(addon);
        }
        catch (Throwable t)
        {
	    CLILogger.getInstance().printDetailMessage(t.getLocalizedMessage());
	    throw new CommandException(getLocalizedString("UninstallAddonFailed",
							  new Object[] {addon}));
        }

	CLILogger.getInstance().printDetailMessage(getLocalizedString(
                             "UninstallAddonCompleted", new Object[] {addon}));
    
public booleanvalidateOptions()
Validates the Options for correctness

return
boolean returns true if validation is succesful else false

        return super.validateOptions();