FileDocCategorySizeDatePackage
AddonControl.javaAPI DocGlassfish v2 API4709Fri May 04 22:25:08 BST 2007com.sun.enterprise.cli.commands

AddonControl

public final class AddonControl extends Object
This is a control class that invoke AddonFacade using reflection.
author
binod@dev.java.net

Fields Summary
private final String
PACKAGE
private final String
ADDONFACADE
private File
installRoot
private Logger
logger
private Class
addonFacade
Constructors Summary
AddonControl()


       
        String installDir =
        System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
        this.installRoot = new File(installDir);
        this.logger = Logger.getLogger(PACKAGE, null);
        this.addonFacade = Class.forName(ADDONFACADE);
    
Methods Summary
voidconfigureDAS(java.io.File domainRoot)
Invoke configureDAS method.

        try {
            Class[] args = new Class[] {File.class, File.class, Logger.class};
            Method m = addonFacade.getMethod("configureDAS", args);
            m.invoke(null, new Object[] {installRoot, domainRoot, logger});
        } catch (InvocationTargetException ite) {
            throw ite.getTargetException();
        }
    
voidinstall(java.io.File jarFile)
Invoke the install method.

        try {
            Class[] args = new Class[] {File.class, File.class, Logger.class};
            Method m = addonFacade.getMethod("install", args);
            m.invoke(null, new Object[] {installRoot, jarFile, logger});
        } catch (InvocationTargetException ite) {
            throw ite.getTargetException();
        }
    
voidunconfigureDAS(java.io.File domainRoot)
Invoke unconfigureDAS method.

        try {
            Class[] args = new Class[] {File.class, File.class, Logger.class};
            Method m = addonFacade.getMethod("unconfigureDAS", args);
            m.invoke(null, new Object[] {installRoot, domainRoot, logger});
        } catch (InvocationTargetException ite) {
            throw ite.getTargetException();
        }
    
voiduninstall(java.lang.String addon)
Invoke the uninstall method.

        try {
            Class[] args = new Class[] {File.class, String.class, Logger.class};
            Method m = addonFacade.getMethod("uninstall", args);
            m.invoke(null, new Object[] {installRoot, addon, logger});
        } catch (InvocationTargetException ite) {
            throw ite.getTargetException();
        }