KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > IParameter


1 /*******************************************************************************
2  * Copyright (c) 2005 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.core.commands;
13
14 /**
15  * <p>
16  * A parameter for a command. A parameter identifies a type of information that
17  * the command might accept. For example, a "Show View" command might accept the
18  * id of a view for display. This parameter also identifies possible values, for
19  * display in the user interface.
20  * </p>
21  *
22  * @since 3.1
23  */

24 public interface IParameter {
25
26     /**
27      * Returns the identifier for this parameter.
28      *
29      * @return The identifier; never <code>null</code>.
30      */

31     public String JavaDoc getId();
32
33     /**
34      * Returns the human-readable name for this parameter.
35      *
36      * @return The parameter name; never <code>null</code>.
37      */

38     public String JavaDoc getName();
39
40     /**
41      * Returns the values associated with this parameter.
42      *
43      * @return The values associated with this parameter. This must not be
44      * <code>null</code>.
45      * @throws ParameterValuesException
46      * If the values can't be retrieved for some reason.
47      */

48     public IParameterValues getValues() throws ParameterValuesException;
49
50     /**
51      * Returns whether parameter is optional. Otherwise, it is required.
52      *
53      * @return <code>true</code> if the parameter is optional;
54      * <code>false</code> if it is required.
55      */

56     public boolean isOptional();
57 }
58
Popular Tags