| 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 | 0 | public class ChainManForm implements DataStrings { |
| 22 | |
|
| 23 | |
private List<Chain> chains; |
| 24 | |
private BSAccountUserWebSession userWebSession; |
| 25 | 0 | private boolean flipFlop = false; |
| 26 | |
private String chainToDelete; |
| 27 | |
private String newChainName; |
| 28 | 0 | private Chain activeChain = null; |
| 29 | |
private String setSizeWebTable; |
| 30 | |
|
| 31 | |
private String contactEngineName; |
| 32 | |
private List<String> engines; |
| 33 | |
|
| 34 | 0 | public BSAccountUserWebSession getUserWebSession() { return(userWebSession); } |
| 35 | 0 | public void setUserWebSession(BSAccountUserWebSession us) { userWebSession = us; } |
| 36 | |
|
| 37 | 0 | public List<Chain> getChains() { return(chains); } |
| 38 | 0 | public void setChains(List<Chain> chains) { this.chains = chains; } |
| 39 | |
|
| 40 | 0 | public int getChainCount() { return(this.chains.size()); } |
| 41 | |
|
| 42 | 0 | public boolean getFlipFlop() { flipFlop = !flipFlop; return(flipFlop); } |
| 43 | |
|
| 44 | 0 | public String getNewChainName() { return(newChainName); } |
| 45 | 0 | public void setNewChainName(String s) { newChainName = s; } |
| 46 | 0 | public String getChainToDelete() { return(chainToDelete); } |
| 47 | 0 | public void setChainToDelete(String s) { chainToDelete = s; } |
| 48 | |
|
| 49 | |
public Chain getActiveChain() { |
| 50 | 0 | return activeChain; |
| 51 | |
} |
| 52 | |
public void setActiveChain(Chain activeChain) { |
| 53 | 0 | this.activeChain = activeChain; |
| 54 | 0 | } |
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
public String getSetSizeWebTable() { |
| 59 | 0 | return setSizeWebTable; |
| 60 | |
} |
| 61 | |
|
| 62 | |
|
| 63 | |
|
| 64 | |
public void setSetSizeWebTable(String setSizeWebTable) { |
| 65 | 0 | this.setSizeWebTable = setSizeWebTable; |
| 66 | 0 | } |
| 67 | |
|
| 68 | |
public class Selector { |
| 69 | 0 | 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 | 0 | return index; |
| 77 | |
} |
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
public String getName() { |
| 82 | 0 | return name; |
| 83 | |
} |
| 84 | |
|
| 85 | |
} |
| 86 | 0 | 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 | 0 | return picSelectors; |
| 96 | |
} |
| 97 | |
|
| 98 | 0 | private Integer[] rateSelectors = { |
| 99 | 0 | 9,8,7,6,5,4,3,2,1 |
| 100 | |
}; |
| 101 | |
|
| 102 | |
|
| 103 | |
|
| 104 | |
|
| 105 | |
public Integer[] getRateSelectors() { |
| 106 | 0 | return rateSelectors; |
| 107 | |
} |
| 108 | |
|
| 109 | |
|
| 110 | |
|
| 111 | |
|
| 112 | |
public String getContactEngineName() { |
| 113 | 0 | if ((contactEngineName == null || contactEngineName.isEmpty() ) |
| 114 | 0 | && (engines != null && !engines.isEmpty())) { |
| 115 | 0 | return(engines.get(0)); |
| 116 | |
} |
| 117 | 0 | return contactEngineName; |
| 118 | |
} |
| 119 | |
|
| 120 | |
|
| 121 | |
|
| 122 | |
public void setContactEngineName(String contactEngineName) { |
| 123 | 0 | this.contactEngineName = contactEngineName; |
| 124 | 0 | } |
| 125 | |
|
| 126 | |
|
| 127 | |
|
| 128 | |
public List<String> getEngines() { |
| 129 | 0 | return engines; |
| 130 | |
} |
| 131 | |
|
| 132 | |
|
| 133 | |
|
| 134 | |
public void setEngines(List<String> engines) { |
| 135 | 0 | this.engines = engines; |
| 136 | 0 | } |
| 137 | |
|
| 138 | |
} |