Revision 10627 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/IWriter.java

View differences:

IWriter.java
3 3
import java.util.Properties;
4 4

  
5 5
import com.hardcode.driverManager.Driver;
6
import com.hardcode.gdbms.driver.exceptions.InitializeWriterException;
7
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
8
import com.iver.cit.gvsig.exceptions.visitors.ProcessWriterVisitorException;
9
import com.iver.cit.gvsig.exceptions.visitors.StartWriterVisitorException;
10
import com.iver.cit.gvsig.exceptions.visitors.StopWriterVisitorException;
11
import com.iver.cit.gvsig.exceptions.visitors.VisitorException;
6 12
import com.iver.cit.gvsig.fmap.drivers.ITableDefinition;
7 13

  
8 14
public interface IWriter extends Driver{
9
	void preProcess() throws EditionException;
15
	void preProcess() throws StartWriterVisitorException;
10 16

  
11 17
	/**
12 18
	 * Aqu? dentro se puede hacer el chequeo de las reglas asignadas para que
13 19
	 * antes de guardar algo, se compruebe que es correcto. Aunque lo ideal
14 20
	 * ser?a haberlo hecho antes, para que lo que se guarde est? corregido al
15 21
	 * m?ximo.
22
	 * @throws ProcessWriterVisitorException TODO
23
	 * @throws VisitorException
16 24
	 */
17
	void process(IRowEdited row) throws EditionException;
25
	void process(IRowEdited row) throws VisitorException;
18 26

  
19
	void postProcess() throws EditionException;
20
	
27
	void postProcess() throws StopWriterVisitorException;
28

  
21 29
	/**
22 30
	 * A developer can use this Properties for his own purposes. For example, to
23
	 * let his extension know something about one writer. 
31
	 * let his extension know something about one writer.
24 32
	 * <br>
25 33
	 * We can found for example:
26 34
	 * <br>
27 35
	 * <b>FieldNameMaxLength<b>: Maximum length of field name (Null or 0 --> unlimited).
28
	 * 
36
	 *
29 37
	 * @param capability
30 38
	 * @return A message describing the capability. Null if not supported.
31 39
	 */
32 40
	public String getCapability(String capability);
33
	
41

  
34 42
	/**
35 43
	 * @param capabilities The capabilities to set.
36 44
	 */
......
39 47

  
40 48
	public abstract boolean canWriteAttribute(int sqlType);
41 49
	public abstract boolean canAlterTable();
42
	public abstract boolean canSaveEdits();
50
	public abstract boolean canSaveEdits() throws VisitorException;
43 51

  
44
	public void initialize(ITableDefinition tableDefinition) throws EditionException ;
52
	public void initialize(ITableDefinition tableDefinition) throws InitializeWriterException;
45 53

  
46
	public ITableDefinition getTableDefinition();
54
	public ITableDefinition getTableDefinition() throws ReadDriverException;
47 55

  
48 56
	/**
49 57
	 * @return true if the driver needs to iterate trhu all records.

Also available in: Unified diff