svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureRule.java @ 28782
History | View | Annotate | Download (1.35 KB)
1 | 24496 | jmvivo | package org.gvsig.fmap.dal.feature; |
---|---|---|---|
2 | 19399 | vcaballero | |
3 | 24505 | jmvivo | import org.gvsig.fmap.dal.exception.DataException; |
4 | 23772 | jjdelcerro | |
5 | 24789 | jiyarza | /**
|
6 | * Represents a Feature validation rule. These rules are used to
|
||
7 | 25481 | jiyarza | * check Feature state integrity in editing mode.
|
8 | 24789 | jiyarza | *
|
9 | */
|
||
10 | 21045 | jmvivo | public interface FeatureRule { |
11 | 24789 | jiyarza | |
12 | /**
|
||
13 | * Returns the rule name
|
||
14 | *
|
||
15 | * @return
|
||
16 | * the rule name
|
||
17 | */
|
||
18 | 19399 | vcaballero | public String getName(); |
19 | 24789 | jiyarza | |
20 | /**
|
||
21 | * Returns the rule description
|
||
22 | *
|
||
23 | * @return
|
||
24 | * the rule description
|
||
25 | */
|
||
26 | 19399 | vcaballero | public String getDescription(); |
27 | 24789 | jiyarza | |
28 | /**
|
||
29 | * This is the method that applies this rule to the {@link Feature}, given also its associated {@link FeatureStore}.
|
||
30 | * @param feature
|
||
31 | * Feature to which apply the rule
|
||
32 | * @param featureStore
|
||
33 | * FeatureStore to which the Feature belongs
|
||
34 | * @throws DataException
|
||
35 | * if an error occurs during validation
|
||
36 | */
|
||
37 | 23772 | jjdelcerro | public void validate(Feature feature, FeatureStore featureStore) |
38 | throws DataException;
|
||
39 | 24789 | jiyarza | |
40 | /**
|
||
41 | * Indicates whether this rule should be checked at update.
|
||
42 | *
|
||
43 | * @return
|
||
44 | * true if this rule should be checked at update, otherwise false.
|
||
45 | */
|
||
46 | 23754 | jjdelcerro | public boolean checkAtUpdate(); |
47 | 24789 | jiyarza | |
48 | /**
|
||
49 | 25481 | jiyarza | * Returns true if this rule should be applied just when editing is being finished.
|
50 | 24789 | jiyarza | *
|
51 | * @return
|
||
52 | 25481 | jiyarza | * true if this rule should be applied when editing is being finished, otherwise false.
|
53 | 24789 | jiyarza | */
|
54 | 25481 | jiyarza | public boolean checkAtFinishEditing(); |
55 | 19399 | vcaballero | } |