KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > properties > IPropertyManager


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.properties;
12
13 import java.util.Map JavaDoc;
14 import org.eclipse.core.internal.resources.IManager;
15 import org.eclipse.core.resources.IResource;
16 import org.eclipse.core.runtime.CoreException;
17 import org.eclipse.core.runtime.QualifiedName;
18
19 public interface IPropertyManager extends IManager {
20     /**
21      * Closes the property store for a resource
22      *
23      * @param target The resource to close the property store for
24      * @exception CoreException
25      */

26     public void closePropertyStore(IResource target) throws CoreException;
27
28     /**
29      * Copy all the properties of one resource to another. Both resources
30      * must have a property store available.
31      */

32     public void copy(IResource source, IResource destination, int depth) throws CoreException;
33
34     /**
35      * Deletes all properties for the given resource and its children.
36      * <p>
37      * The subtree under the given resource is traversed to the supplied depth.
38      * </p>
39      * @param target
40      * @param depth
41      * @exception CoreException
42      */

43     public void deleteProperties(IResource target, int depth) throws CoreException;
44
45     /**
46      * The resource is being deleted so permanently erase its properties.
47      */

48     public void deleteResource(IResource target) throws CoreException;
49
50     /**
51      * Returns the value of the identified property on the given resource as
52      * maintained by this store.
53      * <p>
54      * The qualifier part of the property name must be the unique identifier
55      * of the declaring plug-in (e.g. <code>"com.example.plugin"</code>).
56      * </p>
57      */

58     public String JavaDoc getProperty(IResource target, QualifiedName name) throws CoreException;
59
60     /**
61      * Sets the value of the identified property on the given resource.
62      * <p>
63      * The qualifier part of the property name must be the unique identifier
64      * of the declaring plug-in (e.g. <code>"com.example.plugin"</code>).
65      * </p>
66      */

67     public void setProperty(IResource target, QualifiedName name, String JavaDoc value) throws CoreException;
68
69     /**
70      * Returns a map (<propertyKey: QualifiedName -> value: String>) containing
71      * all properties defined for the given resource. In case no properties can
72      * be found, returns an empty map.
73      */

74     public Map JavaDoc getProperties(IResource resource) throws CoreException;
75 }
76
Popular Tags