Progress.xml revision ada1678a4262b208a7b87391f520a7767d25287c
609N/A or packager/legal/LICENSE.txt. See the License for the specific
609N/A file and include the License file at packager/legal/LICENSE.txt.
xsi:schemaLocation="http://www.sun.com/jds/apoc/2004/template /consumables/schemas/config/apoc/policytemplate.xsd">
import org.openinstaller.bus.*;
import org.openinstaller.core.*;
import org.openinstaller.provider.sims.*;
import org.openinstaller.provider.task.*;
import org.openinstaller.util.*;
import javax.swing.*;
if (aName.equals(theComp.getName())) {
new EngineConfigCommand(EngineConfigCommand.COMMAND.GET_CONFIG,
= ControlBus.getInstance().publishRequest(theModeReq,
"svc://general/EngineConfig");
gDryRun = (theModeResp.getResult() != null);
wizard.enableCancel(true);
wizard.enableHelp(true);
wizard.setNextButtonText(Msg.get("next", null));
List activeModes = (List)ConfigHelper.getValue("PageFlow.Mode.ACTIVE_MODES_LIST");
activeModes.add("DRY_RUN_MODE");
BusResponse theTaskResp = Scripting.getInterpreter().get("gSharedResponse");
Thread.sleep(250);
while (theTaskResp.isMore()) {
theObject = theTaskResp.getResult();
Thread.sleep(250);
String progressStr = theProgReporter.totalPercent + "%";
if (theProgReporter.getEstimatedCompletionTime() >= 0) {
int hours = theProgReporter.getEstimatedCompletionTime() / 3600;
int mins = (theProgReporter.getEstimatedCompletionTime() % 3600) / 60;
int secs = (theProgReporter.getEstimatedCompletionTime() % 3600) % 60;
progressStr += String.format(Msg.get("PROGRESS_TIME_REMAINING",null) + " %02d:%02d:%02d", new Integer[] {hours, mins, secs});
if (!theOldProgressStr.equals(progressStr)) {
theProgressBar.setString(theOldProgressStr);
theOldTopMsgStr = theProgReporter.totalString;
if (theOldTopMsgStr == null || theOldTopMsgStr.equals("")) {
theTopMsg.setText("...");
theTopMsg.setText(theOldTopMsgStr);
LOGGER.fine("Progress information not available yet");
Thread.sleep(250);
if (theTaskResp.getException() != null) {
String theMsg = Msg.get("INTERNAL_FATAL_ERROR",
new String[]{EnhancedException.getLastCause(theTaskResp.getException()).getLocalizedMessage()});
JOptionPane.showMessageDialog(frame, theMsg, Msg.get("ERROR", new String[] {}), JOptionPane.ERROR_MESSAGE);
bus.publishEvent(new BusEvent("shutdown"));
wizard.enableNext(true);
Thread.sleep(250);