KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ifeature > IFeatureURLElement


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.internal.core.ifeature;
12
13 import java.net.URL JavaDoc;
14
15 import org.eclipse.core.runtime.CoreException;
16 /**
17  * A URL element is a model object that represents
18  * a single URL reference. The reference has a type
19  * (UPDATE, DISCOVERY or INFO), and an optional
20  * label that should be used to represent the URL
21  * in the UI.
22  */

23 public interface IFeatureURLElement extends IFeatureObject {
24     /**
25      * Indicates that this is an update URL.
26      */

27     public static final int UPDATE = 1;
28     /**
29      * Indicates that this is a discovery URL.
30      */

31     public static final int DISCOVERY = 2;
32     /**
33      * Indicates that the site is a regular update site.
34      */

35     public static final int UPDATE_SITE = 0;
36     /**
37      * Indicates that the site is a Web site.
38      */

39     public static final int WEB_SITE = 1;
40     /**
41      * This property name will be used to notify
42      * about changes in the "URL" field.
43      */

44     public static final String JavaDoc P_URL = "url"; //$NON-NLS-1$
45
/**
46      * This property name will be used to notify
47      * about changes in the 'siteType' field.
48      */

49     public static final String JavaDoc P_SITE_TYPE = "siteType"; //$NON-NLS-1$
50
/**
51      * Returns the type of this URL element (UPDATE or DISCOVERY)
52      */

53     public int getElementType();
54
55     /**
56      * Returns the type of the site with the specified URL.
57      * @return UPDATE_SITE or WEB_SITE
58      */

59     public int getSiteType();
60     /**
61      * Returns the URL of this element.
62      *
63      * @return the URL
64      */

65     public URL JavaDoc getURL();
66     /**
67      * Sets the URL of this element.
68      * This method will throw a CoreException
69      * if the model is not editable.
70      *
71      * @param url the new URL
72      */

73     public void setURL(URL JavaDoc url) throws CoreException;
74     /**
75      * Sets the type of the site with the specified URL.
76      * @param UPDATE_SITE or WEB_SITE
77      */

78     public void setSiteType(int siteType) throws CoreException;
79 }
80
Popular Tags