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
17 IConfigurationWorkingCopy {
18 protected Configuration configuration;
21 public ConfigurationWorkingCopy() {
25 public ConfigurationWorkingCopy(Configuration configuration) {
26 this.configuration = configuration;
27 setInternal(configuration);
30 public void setId(String newId) {
34 public void setName(String name) {
38 public void setURL(String url) {
42 public void setPassword(String password) {
46 public void setUser(String user) {
50 public void setType(String t) {
54 public boolean isWorkingCopy() {
58 public IConfigurationWorkingCopy getWorkingCopy() {
62 public IConfiguration save() {
63 ConfigurationManager mm = ConfigurationManager.getInstance();
64 if (configuration != null) {
65 configuration.setInternal(this);
66 mm.configurationChanged(configuration);
68 configuration = new Configuration();
69 configuration.setInternal(this);
70 mm.addConfiguration(configuration);