Package org.rhq.core.util.file

Examples of org.rhq.core.util.file.FileReverter.revert()


            // If any failures occur during upgrade, we know we need to reset rhq-server.properties
            final FileReverter serverPropFileReverter = new FileReverter(getServerPropertiesFile());
            addUndoTask(new ControlCommand.UndoTask("Reverting server properties file") {
                public void performUndoWork() throws Exception {
                    try {
                        serverPropFileReverter.revert();
                    } catch (Exception e) {
                        throw new Exception("Cannot reset rhq-server.properties - revert settings manually", e);
                    }
                }
            });
View Full Code Here


                    // If any failures occur during upgrade reset the env file to the default
                    final FileReverter serverEnvFileReverter = new FileReverter(newServerEnvFile);
                    addUndoTask(new ControlCommand.UndoTask("Reverting server environment file") {
                        public void performUndoWork() throws Exception {
                            try {
                                serverEnvFileReverter.revert();
                            } catch (Exception e) {
                                throw new Exception("Cannot reset rhq-server-env.sh|bat - revert manually", e);
                            }
                        }
                    });
View Full Code Here

            addUndoTask(new ControlCommand.UndoTask(
                "Removing server-installed marker file and management user and reverting to original standalone-full.xml") {
                public void performUndoWork() throws Exception {
                    getServerInstalledMarkerFile(getBaseDir()).delete();
                    mgmtUserPropertiesReverter.revert();
                    standaloneXmlFileReverter.revert();
                }
            });

            org.apache.commons.exec.CommandLine commandLine = getCommandLine("rhq-installer");
            if (ServerInstallerAction.UPGRADE == serverInstallerAction) {
View Full Code Here

            // If any failures occur, we know we need to reset rhq-server.properties.
            final FileReverter serverPropFileReverter = new FileReverter(getServerPropertiesFile());
            addUndoTask(new ControlCommand.UndoTask("Reverting server properties file") {
                public void performUndoWork() throws Exception {
                    try {
                        serverPropFileReverter.revert();
                    } catch (Exception e) {
                        throw new Exception("Cannot reset rhq-server.properties - revert settings manually", e);
                    }
                }
            });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.