KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > ISiteFactory


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.update.core;
12
13 import java.net.*;
14
15 import org.eclipse.core.runtime.*;
16 import org.eclipse.update.core.model.*;
17
18 /**
19  * Site factory interface.
20  * A site factory is used to construct new instances of concrete
21  * sites.
22  * <p>
23  * Clients may implement this interface. However, in most cases clients should
24  * directly instantiate or subclass the provided implementation of this
25  * interface.
26  * </p>
27  * <p>
28  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
29  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
30  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
31  * (repeatedly) as the API evolves.
32  * </p>
33  * @see org.eclipse.update.core.BaseSiteFactory
34  * @since 2.0
35  */

36
37 public interface ISiteFactory {
38
39     /**
40      * Returns a site defined by the supplied URL.
41      * <p>
42      * The actual interpretation of the URL is site-type specific.
43      * In most cases the URL will point to some site-specific
44      * file that can be used (directly or indirectly) to construct
45      * the site object.
46      * </p>
47      * @param url URL interpreted by the site
48      * @return site object
49      * @exception CoreException
50      * @exception InvalidSiteTypeException the referenced site type is
51      * not a supported type for this factory
52      * @since 2.0
53      */

54     public ISite createSite(URL url)
55         throws CoreException, InvalidSiteTypeException;
56 }
57
Popular Tags