Skip to main content
summaryrefslogtreecommitdiffstats
blob: 84d1fb917331c81d70251322508e76e74b564290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*******************************************************************************
 * Copyright (c) 2004, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.ui.intro.config;

/**
 * An Intro url. An intro URL is a valid http url, with org.eclipse.ui.intro as
 * a host name. It is intended to only be used in conjunction with the
 * pre-supplied CustomizableIntroPart. See the
 * <code>org.eclipse.ui.intro.config</code> extension point for more details.
 * <p>
 * An intro url instance is created by parsing the url and retrieving the
 * embedded "command" and parametrs. For example, the following urls are valid
 * intro urls:
 * <pre>
 *  http://org.eclipse.ui.intro/close
 *  http://org.eclipse.ui.intro/runAction?pluginId=x.y.z&amp;class=x.y.z.someClass
 * </pre>
 * </p>
 * <p>
 * When parsed, the first url has "close" as a command, and no parameters. While
 * the second "runAction" as a command and "pluginId" and "class" as parameters.
 * </p>
 * <p>
 * There is a number of supported Intro commands. Check docs for more details.
 * Calling execute runs the command if it is one of the supported commands.
 * </p>
 *
 * @see IntroURLFactory
 * @see IIntroAction
 * @since 3.0
 * @noimplement This interface is not intended to be implemented by clients.
 * @noextend This interface is not intended to be extended by clients.
 */
public interface IIntroURL {

    /**
     * Executes whatever valid Intro command is embedded in this Intro URL.
     * Returns true if action succeeded, and false otherwise.
     *
     */
    public boolean execute();

    /**
     * @return Returns the command imbedded in this URL.
     */
    public String getAction();

    /**
     * Return a parameter defined in the Intro URL. Returns null if the
     * parameter is not defined.
     *
     * @param parameterId
     *            the id of the parameter being requested
     * @return the value of the parameter, or <code>null</code> if the
     *         parameter is not defined
     */
    public String getParameter(String parameterId);
}

Back to the top