KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > core > IIdentifiable


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.pde.core;
12
13 import org.eclipse.core.runtime.CoreException;
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 JavaDoc P_ID = "id"; //$NON-NLS-1$
27
/**
28      * Returns a unique id of this object.
29      * @return the id of this object
30      */

31     public String JavaDoc getId();
32     /**
33      * Sets the id of this IIdentifiable to the provided value.
34      * This method will throw CoreException if
35      * object is not editable.
36      *
37      *@param id a new id of this object
38      */

39     void setId(String JavaDoc id) throws CoreException;
40 }
41
Popular Tags