| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PosterSetupForm |
|
| 1.0;1 | ||||
| PosterSetupForm$MosaicNameAndMid |
|
| 1.0;1 |
| 1 | /****************************************************************************** | |
| 2 | * PosterSetupForm.java - The backing form to edit PicMan's Poster setup | |
| 3 | * | |
| 4 | * PicMan - The BuckoSoft Picture Manager in Java | |
| 5 | * Copyright(c) 2012 - Dick Balaska | |
| 6 | * | |
| 7 | */ | |
| 8 | package com.buckosoft.PicMan.web; | |
| 9 | ||
| 10 | import java.util.List; | |
| 11 | ||
| 12 | import org.apache.commons.logging.Log; | |
| 13 | import org.apache.commons.logging.LogFactory; | |
| 14 | ||
| 15 | import com.buckosoft.BSAccount.web.BSAccountUserWebSession; | |
| 16 | import com.buckosoft.PicMan.business.PicManFacade; | |
| 17 | import com.buckosoft.PicMan.domain.Poster; | |
| 18 | import com.buckosoft.PicMan.domain.Set; | |
| 19 | ||
| 20 | /** The backing form to edit PicMan's Poster setup | |
| 21 | * @author Dick Balaska | |
| 22 | * @since 2012/07/21 | |
| 23 | * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/web/PosterSetupForm.java">PosterSetupForm.java</a> | |
| 24 | */ | |
| 25 | 0 | public class PosterSetupForm { |
| 26 | 0 | protected final Log logger = LogFactory.getLog(getClass()); |
| 27 | ||
| 28 | private BSAccountUserWebSession userWebSession; | |
| 29 | private Poster poster; | |
| 30 | private String masterPic; | |
| 31 | private int posterHeight; | |
| 32 | private String posterOutputFile; | |
| 33 | ||
| 34 | // private String posterSetName; | |
| 35 | private int posterSid; | |
| 36 | private List<Set> sets; | |
| 37 | private boolean startBuilding; | |
| 38 | private boolean calibrationSheet; | |
| 39 | 0 | private boolean makeBackups = true; |
| 40 | 0 | private String posterName = "New Poster"; |
| 41 | private List<Poster> posters; | |
| 42 | ||
| 43 | private String posterEngineName; | |
| 44 | private List<MosaicNameAndMid> mosaics; | |
| 45 | 0 | private String posterSelectName = ""; |
| 46 | ||
| 47 | private String posterEngineConfig; | |
| 48 | private String posterConfigs; | |
| 49 | ||
| 50 | @SuppressWarnings("unused") | |
| 51 | private PicManFacade pmf; | |
| 52 | ||
| 53 | /** Set the reference to the PicMan API. | |
| 54 | * @param pmf The PicManFacade | |
| 55 | */ | |
| 56 | 0 | public void setPicMan(PicManFacade pmf) { this.pmf = pmf; } |
| 57 | ||
| 58 | 0 | public BSAccountUserWebSession getUserWebSession() { return(userWebSession); } |
| 59 | 0 | public void setUserWebSession(BSAccountUserWebSession us) { userWebSession = us; } |
| 60 | ||
| 61 | ||
| 62 | /** | |
| 63 | * @return the masterPic | |
| 64 | */ | |
| 65 | public String getMasterPic() { | |
| 66 | 0 | return masterPic; |
| 67 | } | |
| 68 | /** | |
| 69 | * @param masterPic the masterPic to set | |
| 70 | */ | |
| 71 | public void setMasterPic(String masterPic) { | |
| 72 | 0 | this.masterPic = masterPic; |
| 73 | 0 | } |
| 74 | /** | |
| 75 | * @return the poster | |
| 76 | */ | |
| 77 | public Poster getPoster() { | |
| 78 | 0 | return poster; |
| 79 | } | |
| 80 | /** | |
| 81 | * @param poster the poster to set | |
| 82 | */ | |
| 83 | public void setPoster(Poster poster) { | |
| 84 | 0 | this.poster = poster; |
| 85 | 0 | } |
| 86 | ||
| 87 | /** | |
| 88 | * @return the posterSelectName | |
| 89 | */ | |
| 90 | public String getPosterSelectName() { | |
| 91 | 0 | return posterSelectName; |
| 92 | } | |
| 93 | /** | |
| 94 | * @param posterSelectName the posterSelectName to set | |
| 95 | */ | |
| 96 | public void setPosterSelectName(String posterSelectName) { | |
| 97 | 0 | this.posterSelectName = posterSelectName; |
| 98 | 0 | } |
| 99 | /** | |
| 100 | * @return the posterName | |
| 101 | */ | |
| 102 | public String getPosterName() { | |
| 103 | 0 | return posterName; |
| 104 | } | |
| 105 | /** | |
| 106 | * @param posterName the posterName to set | |
| 107 | */ | |
| 108 | public void setPosterName(String posterName) { | |
| 109 | 0 | this.posterName = posterName; |
| 110 | 0 | } |
| 111 | ||
| 112 | /** | |
| 113 | * @return the posters | |
| 114 | */ | |
| 115 | public List<Poster> getPosters() { | |
| 116 | 0 | return posters; |
| 117 | } | |
| 118 | /** | |
| 119 | * @param posters the posters to set | |
| 120 | */ | |
| 121 | public void setPosters(List<Poster> posters) { | |
| 122 | 0 | this.posters = posters; |
| 123 | 0 | } |
| 124 | ||
| 125 | /** | |
| 126 | * @return the posterEngineName | |
| 127 | */ | |
| 128 | public String getPosterEngineName() { | |
| 129 | 0 | return posterEngineName; |
| 130 | } | |
| 131 | /** | |
| 132 | * @param posterEngineName the posterEngineName to set | |
| 133 | */ | |
| 134 | public void setPosterEngineName(String posterEngineName) { | |
| 135 | 0 | this.posterEngineName = posterEngineName; |
| 136 | 0 | } |
| 137 | /** | |
| 138 | * @return the posterHeight | |
| 139 | */ | |
| 140 | public int getPosterHeight() { | |
| 141 | 0 | return posterHeight; |
| 142 | } | |
| 143 | /** | |
| 144 | * @param posterHeight the posterHeight to set | |
| 145 | */ | |
| 146 | public void setPosterHeight(int posterHeight) { | |
| 147 | 0 | this.posterHeight = posterHeight; |
| 148 | 0 | } |
| 149 | ||
| 150 | /** Where to write the poster output | |
| 151 | * @return the posterOutputFile | |
| 152 | */ | |
| 153 | public String getPosterOutputFile() { | |
| 154 | 0 | return posterOutputFile; |
| 155 | } | |
| 156 | /** | |
| 157 | * @param posterOutputFile the posterOutputFile to set | |
| 158 | */ | |
| 159 | public void setPosterOutputFile(String posterOutputFile) { | |
| 160 | 0 | this.posterOutputFile = posterOutputFile; |
| 161 | 0 | } |
| 162 | /** | |
| 163 | * @return the startBuilding | |
| 164 | */ | |
| 165 | public boolean isStartBuilding() { | |
| 166 | 0 | return startBuilding; |
| 167 | } | |
| 168 | /** | |
| 169 | * @param startBuilding the startBuilding to set | |
| 170 | */ | |
| 171 | public void setStartBuilding(boolean startBuilding) { | |
| 172 | 0 | this.startBuilding = startBuilding; |
| 173 | 0 | } |
| 174 | /** | |
| 175 | * @return the calibrationSheet | |
| 176 | */ | |
| 177 | public boolean isCalibrationSheet() { | |
| 178 | 0 | return calibrationSheet; |
| 179 | } | |
| 180 | /** | |
| 181 | * @param calibrationSheet the calibrationSheet to set | |
| 182 | */ | |
| 183 | public void setCalibrationSheet(boolean calibrationSheet) { | |
| 184 | 0 | this.calibrationSheet = calibrationSheet; |
| 185 | 0 | } |
| 186 | ||
| 187 | /** Should we save the poster output jpeg before overwriting it with a new file? | |
| 188 | * @return the makeBackups | |
| 189 | */ | |
| 190 | public boolean isMakeBackups() { | |
| 191 | 0 | return makeBackups; |
| 192 | } | |
| 193 | ||
| 194 | /** Should we save the poster output jpeg before overwriting it with a new file? | |
| 195 | * @param makeBackups the makeBackups to set | |
| 196 | */ | |
| 197 | public void setMakeBackups(boolean makeBackups) { | |
| 198 | 0 | this.makeBackups = makeBackups; |
| 199 | 0 | } |
| 200 | /** | |
| 201 | * @return the posterPid | |
| 202 | */ | |
| 203 | public int getPosterSid() { | |
| 204 | 0 | return posterSid; |
| 205 | } | |
| 206 | /** | |
| 207 | * @param posterSid the posterSid to set | |
| 208 | */ | |
| 209 | public void setPosterSid(int posterSid) { | |
| 210 | 0 | this.posterSid = posterSid; |
| 211 | 0 | } |
| 212 | /** | |
| 213 | * @return the sets | |
| 214 | */ | |
| 215 | public List<Set> getSets() { | |
| 216 | 0 | return sets; |
| 217 | } | |
| 218 | /** | |
| 219 | * @param sets the sets to set | |
| 220 | */ | |
| 221 | public void setSets(List<Set> sets) { | |
| 222 | 0 | this.sets = sets; |
| 223 | 0 | } |
| 224 | ||
| 225 | /** | |
| 226 | * @return the posterEngineConfig | |
| 227 | */ | |
| 228 | public String getPosterEngineConfig() { | |
| 229 | 0 | return posterEngineConfig; |
| 230 | } | |
| 231 | ||
| 232 | /** | |
| 233 | * @param posterEngineConfig the posterEngineConfig to set | |
| 234 | */ | |
| 235 | public void setPosterEngineConfig(String posterEngineConfig) { | |
| 236 | 0 | this.posterEngineConfig = posterEngineConfig; |
| 237 | 0 | } |
| 238 | ||
| 239 | /** | |
| 240 | * @return the posterConfigs | |
| 241 | */ | |
| 242 | public String getPosterConfigs() { | |
| 243 | 0 | return posterConfigs; |
| 244 | } | |
| 245 | ||
| 246 | /** | |
| 247 | * @param posterConfigs the posterConfigs to set | |
| 248 | */ | |
| 249 | public void setPosterConfigs(String posterConfigs) { | |
| 250 | 0 | this.posterConfigs = posterConfigs; |
| 251 | 0 | } |
| 252 | ||
| 253 | 0 | public class MosaicNameAndMid implements Comparable<MosaicNameAndMid> { |
| 254 | private int mid; | |
| 255 | private String name; | |
| 256 | /** | |
| 257 | * @return the mid | |
| 258 | */ | |
| 259 | public int getMid() { | |
| 260 | 0 | return mid; |
| 261 | } | |
| 262 | /** | |
| 263 | * @param mid the mid to set | |
| 264 | */ | |
| 265 | public void setMid(int mid) { | |
| 266 | 0 | this.mid = mid; |
| 267 | 0 | } |
| 268 | /** | |
| 269 | * @return the name | |
| 270 | */ | |
| 271 | public String getName() { | |
| 272 | 0 | return name; |
| 273 | } | |
| 274 | /** | |
| 275 | * @param name the name to set | |
| 276 | */ | |
| 277 | public void setName(String name) { | |
| 278 | 0 | this.name = name; |
| 279 | 0 | } |
| 280 | ||
| 281 | public int compareTo(MosaicNameAndMid arg0) { | |
| 282 | 0 | return(this.name.compareToIgnoreCase(arg0.name)); |
| 283 | } | |
| 284 | } | |
| 285 | ||
| 286 | /** | |
| 287 | * @return the mosaics | |
| 288 | */ | |
| 289 | public List<MosaicNameAndMid> getMosaics() { | |
| 290 | 0 | return mosaics; |
| 291 | } | |
| 292 | ||
| 293 | /** | |
| 294 | * @param mosaics the mosaics to set | |
| 295 | */ | |
| 296 | public void setMosaics(List<MosaicNameAndMid> mosaics) { | |
| 297 | 0 | this.mosaics = mosaics; |
| 298 | 0 | } |
| 299 | } |