KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > registry > ConfigurationProperty


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.registry;
12
13 import org.eclipse.core.internal.runtime.InternalPlatform;
14
15 /**
16  * An object which represents the user-defined properties in a configuration
17  * element of a plug-in manifest. Properties are <code>String</code>-based
18  * key/value pairs.
19  * <p>
20  * This class may be instantiated, or further subclassed.
21  * </p>
22  */

23 public class ConfigurationProperty extends RegistryModelObject {
24
25     // DTD properties (included in plug-in manifest)
26
private String JavaDoc value = null;
27
28     /**
29      * Creates a new configuration property model in which all fields
30      * are <code>null</code>.
31      */

32     public ConfigurationProperty() {
33         super();
34     }
35
36     /**
37      * Returns the value of this property.
38      *
39      * @return the value of this property
40      * or <code>null</code>
41      */

42     public String JavaDoc getValue() {
43         return value;
44     }
45
46     /**
47      * Sets the value of this property.
48      *
49      * @param value the new value of this property. May be <code>null</code>.
50      */

51     public void setValue(String JavaDoc value) {
52         this.value = value;
53     }
54
55     /**
56      * Optimization to replace a non-localized key with its localized value. Avoids having
57      * to access resource bundles for further lookups.
58      */

59     public void setLocalizedValue(String JavaDoc value) {
60         this.value = value;
61         ((ExtensionRegistry) InternalPlatform.getDefault().getRegistry()).setDirty(true);
62     }
63 }
Popular Tags