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.phpdt.httpquery.config;
16 public class ConfigurationWorkingCopy extends Configuration implements IConfigurationWorkingCopy {
17 protected Configuration configuration;
20 public ConfigurationWorkingCopy() { }
23 public ConfigurationWorkingCopy(Configuration configuration) {
24 this.configuration = configuration;
25 setInternal(configuration);
28 public void setId(String newId) {
32 public void setName(String name) {
37 public void setURL(String url) {
42 public void setPassword(String password) {
47 public void setUser(String user) {
52 public void setType(String t) {
56 public boolean isWorkingCopy() {
60 public IConfigurationWorkingCopy getWorkingCopy() {
64 public IConfiguration save() {
65 ConfigurationManager mm = ConfigurationManager.getInstance();
66 if (configuration != null) {
67 configuration.setInternal(this);
68 mm.configurationChanged(configuration);
70 configuration = new Configuration();
71 configuration.setInternal(this);
72 mm.addConfiguration(configuration);