KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > intro > config > IIntroURL


1 /*******************************************************************************
2  * Copyright (c) 2004, 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
12 package org.eclipse.ui.intro.config;
13
14 /**
15  * An Intro url. An intro URL is a valid http url, with org.eclipse.ui.intro as
16  * a host name. It is intended to only be used in conjunction with the
17  * pre-supplied CustomizableIntroPart. See the
18  * <code>org.eclipse.ui.intro.config</code> extension point for more details.
19  * <p>
20  * An intro url instance is created by parsing the url and retrieving the
21  * embedded "command" and parametrs. For example, the following urls are valid
22  * intro urls:
23  * <pre>
24  * http://org.eclipse.ui.intro/close
25  * http://org.eclipse.ui.intro/runAction?pluginId=x.y.z&amp;class=x.y.z.someClass
26  * </pre>
27  * </p>
28  * <p>
29  * When parsed, the first url has "close" as a command, and no parameters. While
30  * the second "runAction" as a command and "pluginId" and "class" as parameters.
31  * </p>
32  * <p>
33  * There is a number of supported Intro commands. Check docs for more details.
34  * Calling execute runs the command if it is one of the supported commands.
35  * </p>
36  * <p>
37  * This interface is not intended to be implemented by clients.
38  * </p>
39  *
40  * @see IntroURLFactory
41  * @see IIntroAction
42  * @since 3.0
43  */

44 public interface IIntroURL {
45
46     /**
47      * Executes whatever valid Intro command is embedded in this Intro URL.
48      * Returns true if action succeeded, and false otherwise.
49      *
50      */

51     public boolean execute();
52
53     /**
54      * @return Returns the command imbedded in this URL.
55      */

56     public String JavaDoc getAction();
57
58     /**
59      * Return a parameter defined in the Intro URL. Returns null if the
60      * parameter is not defined.
61      *
62      * @param parameterId
63      * the id of the parameter being requested
64      * @return the value of the parameter, or <code>null</code> if the
65      * parameter is not defined
66      */

67     public String JavaDoc getParameter(String JavaDoc parameterId);
68 }
69
Popular Tags