1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.web;
9
10 import java.util.List;
11
12 import com.buckosoft.BSAccount.web.BSAccountUserWebSession;
13 import com.buckosoft.PicMan.domain.Chain;
14 import com.buckosoft.PicMan.domain.DataStrings;
15
16
17
18
19
20
21 public class ChainManForm implements DataStrings {
22
23 private List<Chain> chains;
24 private BSAccountUserWebSession userWebSession;
25 private boolean flipFlop = false;
26 private String chainToDelete;
27 private String newChainName;
28 private Chain activeChain = null;
29 private String setSizeWebTable;
30
31 private String contactEngineName;
32 private List<String> engines;
33
34 public BSAccountUserWebSession getUserWebSession() { return(userWebSession); }
35 public void setUserWebSession(BSAccountUserWebSession us) { userWebSession = us; }
36
37 public List<Chain> getChains() { return(chains); }
38 public void setChains(List<Chain> chains) { this.chains = chains; }
39
40 public int getChainCount() { return(this.chains.size()); }
41
42 public boolean getFlipFlop() { flipFlop = !flipFlop; return(flipFlop); }
43
44 public String getNewChainName() { return(newChainName); }
45 public void setNewChainName(String s) { newChainName = s; }
46 public String getChainToDelete() { return(chainToDelete); }
47 public void setChainToDelete(String s) { chainToDelete = s; }
48
49 public Chain getActiveChain() {
50 return activeChain;
51 }
52 public void setActiveChain(Chain activeChain) {
53 this.activeChain = activeChain;
54 }
55
56
57
58 public String getSetSizeWebTable() {
59 return setSizeWebTable;
60 }
61
62
63
64 public void setSetSizeWebTable(String setSizeWebTable) {
65 this.setSizeWebTable = setSizeWebTable;
66 }
67
68 public class Selector {
69 Selector(int i, String s) { index = i; name = s; }
70 private int index;
71 private String name;
72
73
74
75 public int getIndex() {
76 return index;
77 }
78
79
80
81 public String getName() {
82 return name;
83 }
84
85 }
86 private Selector[] picSelectors = {
87 new Selector(PICSELECTOR_MIX, "Mix"),
88 new Selector(PICSELECTOR_SORT, "Sort")
89 };
90
91
92
93
94 public Selector[] getPicSelectors() {
95 return picSelectors;
96 }
97
98 private Integer[] rateSelectors = {
99 9,8,7,6,5,4,3,2,1
100 };
101
102
103
104
105 public Integer[] getRateSelectors() {
106 return rateSelectors;
107 }
108
109
110
111
112 public String getContactEngineName() {
113 if ((contactEngineName == null || contactEngineName.isEmpty() )
114 && (engines != null && !engines.isEmpty())) {
115 return(engines.get(0));
116 }
117 return contactEngineName;
118 }
119
120
121
122 public void setContactEngineName(String contactEngineName) {
123 this.contactEngineName = contactEngineName;
124 }
125
126
127
128 public List<String> getEngines() {
129 return engines;
130 }
131
132
133
134 public void setEngines(List<String> engines) {
135 this.engines = engines;
136 }
137
138 }