Package org.rioproject.deploy.StagedSoftware

Examples of org.rioproject.deploy.StagedSoftware.PostInstallAttributes


    public DownloadRecord postInstall() throws IOException {
        if(downloadRecord == null)
            throw new IllegalStateException("software has not been downloaded");
        if(!(stagedData instanceof StagedSoftware))
            return null;
        PostInstallAttributes postInstall =
            ((StagedSoftware) stagedData).getPostInstallAttributes();
        if(postInstall == null)
            return (null);
        String path = downloadRecord.getPath();
        try {
            StagedData dAttrs = postInstall.getStagedData();
            if(dAttrs != null) {
                postInstallRecord = doDownload(dAttrs, true);
                path = postInstallRecord.getPath();
            }
            ExecDescriptor execDesc = postInstall.getExecDescriptor();
            if(execDesc != null) {
                if(!execDesc.getCommandLine().startsWith(File.separator))
                    execDesc = Util.extendCommandLine(path, execDesc);
                ServiceExecutor svcExecutor = new ServiceExecutor();
                ProcessManager manager = svcExecutor.exec(execDesc);
                manager.manage();
                //manager.waitFor();
                manager.destroy(false);
            }
            if(postInstall.getStagedData()!=null &&
               postInstall.getStagedData().removeOnDestroy()) {
                if(postInstallRecord != null) {
                    FileUtils.remove(new File(FileUtils.makeFileName(postInstallRecord.getPath(),
                                                 postInstallRecord.getName())));
                }
                if(postInstallExtractList != null) {
View Full Code Here

TOP

Related Classes of org.rioproject.deploy.StagedSoftware.PostInstallAttributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.