svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / DataParameterDescriptor.java @ 40435
History | View | Annotate | Download (1.83 KB)
1 | 40435 | jjdelcerro | package org.gvsig.fmap.dal; |
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * This interface describes the properties of a parameter. It is useful
|
||
5 | * for any component that needs to know how to edit or visualize it.
|
||
6 | *
|
||
7 | */
|
||
8 | public interface DataParameterDescriptor { |
||
9 | |||
10 | /** Accepts a single value */
|
||
11 | public static final int SINGLE = 1; |
||
12 | /** Accepts a single value from a value set */
|
||
13 | public static final int CHOICE = 2; |
||
14 | /** Accepts a range of values defined with a minimum and a maximum value */
|
||
15 | public static final int RANGE = 3; |
||
16 | |||
17 | /**
|
||
18 | * Returns the parameter's name
|
||
19 | *
|
||
20 | * @return String containing the parameter's name
|
||
21 | */
|
||
22 | public String getName(); |
||
23 | |||
24 | /**
|
||
25 | * Returns the parameter's description
|
||
26 | *
|
||
27 | * @return String containing the parameter's description.
|
||
28 | */
|
||
29 | public String getDescription(); |
||
30 | |||
31 | /**
|
||
32 | * Returns the parameter's data type.
|
||
33 | *
|
||
34 | * @return parameter's data type.
|
||
35 | *
|
||
36 | * @see DataTypes
|
||
37 | */
|
||
38 | public int getDataType(); |
||
39 | |||
40 | /**
|
||
41 | * Returns the parameter's default value.
|
||
42 | *
|
||
43 | * @return an Object containing the default value. Use the data type to cast.
|
||
44 | */
|
||
45 | public Object getDefaultValue(); |
||
46 | |||
47 | /**
|
||
48 | * Returns one of the available values type.
|
||
49 | *
|
||
50 | * @return an <code>int</code> with one of the available values type.
|
||
51 | *
|
||
52 | * @see #SINGLE
|
||
53 | * @see #CHOICE
|
||
54 | * @see #RANGE
|
||
55 | */
|
||
56 | public int getAvailableValuesType(); |
||
57 | |||
58 | /**
|
||
59 | * Returns an array containing the available values accepted by the parameter.
|
||
60 | *
|
||
61 | * @return array of Object containing the available values accepted by the parameter. Use the data type to cast.
|
||
62 | */
|
||
63 | public Object[] getAvailableValues(); |
||
64 | |||
65 | /**
|
||
66 | * Returns the minimum value when the parameter accepts a range of values.
|
||
67 | *
|
||
68 | * @return range's minimum value
|
||
69 | */
|
||
70 | public Object getMinValue(); |
||
71 | |||
72 | /**
|
||
73 | * Returns the maximum value when the parameter accepts a range of values.
|
||
74 | *
|
||
75 | * @return range's maximum value.
|
||
76 | */
|
||
77 | public Object getMaxValue(); |
||
78 | } |