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.internal.core.isite;
11:
12: import java.io.Serializable;
13:
14: import org.eclipse.core.runtime.CoreException;
15: import org.eclipse.core.runtime.IAdaptable;
16: import org.eclipse.pde.core.IWritable;
17:
18: /**
19: * A base of all site model objects.
20: */
21: public interface ISiteObject extends IWritable, IAdaptable,
22: Serializable {
23: /**
24: * A property name that will be used to notify about changes in the "label"
25: * field.
26: */
27: String P_LABEL = "label"; //$NON-NLS-1$
28:
29: /**
30: * Returns the top-level site model object.
31: *
32: * @return root feature object
33: */
34: public ISite getSite();
35:
36: /**
37: * Returns the label of this feature model object'
38: *
39: * @return feature object label
40: */
41: String getLabel();
42:
43: /**
44: * Returns the site model that owns this model object.
45: *
46: * @return the site model
47: */
48: ISiteModel getModel();
49:
50: boolean isInTheModel();
51:
52: /**
53: * Returns the parent of this model object.
54: *
55: * @return the model object parent
56: */
57: public ISiteObject getParent();
58:
59: /**
60: * Sets the new label of this model object. This method may throw a
61: * CoreException if the model is not editable.
62: *
63: * @param label
64: * the new label
65: */
66: void setLabel(String label) throws CoreException;
67:
68: /**
69: * Returns true if this object as all the required attributes set, false
70: * otherwise.
71: */
72: boolean isValid();
73: }
|