01: /*******************************************************************************
02: * Copyright (c) 2004, 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.ui.intro.config;
11:
12: /**
13: * An Intro url. An intro URL is a valid http url, with org.eclipse.ui.intro as
14: * a host name. It is intended to only be used in conjunction with the
15: * pre-supplied CustomizableIntroPart. See the
16: * <code>org.eclipse.ui.intro.config</code> extension point for more details.
17: * <p>
18: * An intro url instance is created by parsing the url and retrieving the
19: * embedded "command" and parametrs. For example, the following urls are valid
20: * intro urls:
21: * <pre>
22: * http://org.eclipse.ui.intro/close
23: * http://org.eclipse.ui.intro/runAction?pluginId=x.y.z&class=x.y.z.someClass
24: * </pre>
25: * </p>
26: * <p>
27: * When parsed, the first url has "close" as a command, and no parameters. While
28: * the second "runAction" as a command and "pluginId" and "class" as parameters.
29: * </p>
30: * <p>
31: * There is a number of supported Intro commands. Check docs for more details.
32: * Calling execute runs the command if it is one of the supported commands.
33: * </p>
34: * <p>
35: * This interface is not intended to be implemented by clients.
36: * </p>
37: *
38: * @see IntroURLFactory
39: * @see IIntroAction
40: * @since 3.0
41: */
42: public interface IIntroURL {
43:
44: /**
45: * Executes whatever valid Intro command is embedded in this Intro URL.
46: * Returns true if action succeeded, and false otherwise.
47: *
48: */
49: public boolean execute();
50:
51: /**
52: * @return Returns the command imbedded in this URL.
53: */
54: public String getAction();
55:
56: /**
57: * Return a parameter defined in the Intro URL. Returns null if the
58: * parameter is not defined.
59: *
60: * @param parameterId
61: * the id of the parameter being requested
62: * @return the value of the parameter, or <code>null</code> if the
63: * parameter is not defined
64: */
65: public String getParameter(String parameterId);
66: }
|