1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package tools.gsf.facade.cm;
18
19 import COM.FutureTense.Interfaces.ICS;
20 import tools.gsf.facade.FTValListFacade;
21
22 public abstract class FTCmdTemplate extends FTValListFacade {
23
24 public static final String FTCMD = "ftcmd";
25
26 private final String ftcmd;
27
28 protected FTCmdTemplate(final String ftcmd, final String table) {
29 super();
30 list.setValString(FTCMD, ftcmd);
31 list.setValString("tablename", table);
32 this.ftcmd = ftcmd;
33 }
34
35
36
37
38
39
40
41
42 protected boolean preExcecuteAssert(final ICS ics) {
43 return true;
44 }
45
46 protected void postExcecuteCheck(final ICS ics) {
47
48 }
49
50 final public void execute(final ICS ics) {
51 if (this.preExcecuteAssert(ics)) {
52 ics.ClearErrno();
53 if (!ics.CatalogManager(list)) {
54 throw new RuntimeException("CatalogManager said no to " + ftcmd + "with errno: " + ics.GetErrno());
55 }
56 this.postExcecuteCheck(ics);
57 }
58 }
59
60 }