01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.core;
11:
12: import org.eclipse.core.runtime.CoreException;
13:
14: /**
15: * Classes implement this interface if
16: * their instances need to be uniquely identified
17: * using an id.
18: *
19: * @since 2.0
20: */
21: public interface IIdentifiable {
22: /**
23: * A property that will be carried by the change event
24: * if 'id' field of this object is changed.
25: */
26: public static final String P_ID = "id"; //$NON-NLS-1$
27:
28: /**
29: * Returns a unique id of this object.
30: * @return the id of this object
31: */
32: public String getId();
33:
34: /**
35: * Sets the id of this IIdentifiable to the provided value.
36: * This method will throw CoreException if
37: * object is not editable.
38: *
39: *@param id a new id of this object
40: */
41: void setId(String id) throws CoreException;
42: }
|