diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/util/UpgradeStatus.java')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/util/UpgradeStatus.java | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/util/UpgradeStatus.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/util/UpgradeStatus.java deleted file mode 100644 index 30a42e1f2..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/util/UpgradeStatus.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.core.internal.jsflibraryregistry.util; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; - -/** - * Communicates the status of the JSF Library Registry - * @deprecated - */ -public class UpgradeStatus extends Status -{ - private final boolean upgradeOccurred; - private UpgradeOperation upgradeOperation; - - /** - * All-is-well UpgradeStatus constructor - */ - public UpgradeStatus(){ - super(IStatus.OK, JSFCorePlugin.getDefault().getPluginID(), Messages.UpgradeStatus_OK); - this.upgradeOccurred = false; - } - - /** - * Constructor when registry upgrade has occured or there is a problem during upgrade - * @param severity - * @param upgradeOccurred flag - * @param message - * - */ - public UpgradeStatus(int severity, boolean upgradeOccurred, String message){ - super(severity, JSFCorePlugin.getDefault().getPluginID(), message); - this.upgradeOccurred = upgradeOccurred; - } - - /** - * @return true if a registry upgrade occurred - */ - public boolean isUpgradeOccurred() { - return upgradeOccurred; - } - - /** - * @return the operation used to do the upgrade. - */ - protected UpgradeOperation getUpgradeOperation() { - return upgradeOperation; - } - - void setUpgradeOperation(UpgradeOperation upgradeOperation) - { - this.upgradeOperation = upgradeOperation; - } - - /** - * Commits any upgrade that has occurred - * @return the result of the commit - */ - public IStatus commit() - { - if (upgradeOperation != null) - { - try - { - return upgradeOperation.commit(); - } - catch (ExecutionException e) - { - return new Status(IStatus.ERROR, JSFCorePlugin.getDefault().getPluginID(), Messages.UpgradeStatus_Error, e); - } - } - return Status.OK_STATUS; - } - - /** - * @return the result of rolling back any changes - */ - public IStatus rollback() - { - if (upgradeOperation != null) - { - try - { - return upgradeOperation.undo(new NullProgressMonitor(), null); - } - catch (ExecutionException e) - { - return new Status(IStatus.ERROR, JSFCorePlugin.getDefault().getPluginID(), Messages.UpgradeStatus_Error, e); - } - } - return Status.OK_STATUS; - } -} |