1 /**********************************************************************
2 * Copyright (c) 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM - Initial API and implementation
10 **********************************************************************/
11 package net.sourceforge.phpeclipse.wiki.internal;
16 public class ConfigurationWorkingCopy extends Configuration implements IConfigurationWorkingCopy {
17 protected Configuration monitor;
20 public ConfigurationWorkingCopy() { }
23 public ConfigurationWorkingCopy(Configuration monitor) {
24 this.monitor = monitor;
28 public void setId(String newId) {
33 public void setURL(String url) {
38 public void setPassword(String password) {
43 public void setUser(String user) {
48 public void setType(String t) {
52 public boolean isWorkingCopy() {
56 public IConfigurationWorkingCopy getWorkingCopy() {
60 public IConfiguration save() {
61 ConfigurationManager mm = ConfigurationManager.getInstance();
62 if (monitor != null) {
63 //boolean restart = false;
64 // if (monitor.isRunning()) {
66 // mm.stopMonitor(monitor);
68 monitor.setInternal(this);
69 mm.configurationChanged(monitor);
71 // mm.startMonitor(monitor);
73 monitor = new Configuration();
74 monitor.setInternal(this);
75 mm.addConfiguration(monitor);