Changeset 3934
- Timestamp:
- Nov 2, 2010, 9:29:39 AM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/file/SpectrumFileContactDataAdderExtension.java
-
Property
svn:keywords
changed from
Date Id
toId
r3461 r3934 1 1 /* 2 $Id$ 3 4 Copyright (C) 2009 Gregory Vincic 5 6 This file is part of Proteios. 7 Available at http://www.proteios.org/ 8 9 Proteios is free software; you can redistribute it and/or modify it 10 under the terms of the GNU General Public License as published by 11 the Free Software Foundation; either version 2 of the License, or 12 (at your option) any later version. 13 14 Proteios is distributed in the hope that it will be useful, but 15 WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 02111-1307, USA. 23 */ 2 $Id$ 3 4 Copyright (C) 2009 Olle Mansson 5 Copyright (C) 2010 Gregory Vincic 6 7 This file is part of Proteios. 8 Available at http://www.proteios.org/ 9 10 Proteios is free software; you can redistribute it and/or modify it 11 under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 2 of the License, or 13 (at your option) any later version. 14 15 Proteios is distributed in the hope that it will be useful, but 16 WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 23 02111-1307, USA. 24 */ 24 25 package org.proteios.action.file; 25 26 27 import java.util.ArrayList; 28 import java.util.Calendar; 29 import java.util.GregorianCalendar; 30 import java.util.List; 26 31 import org.proteios.ActionLink; 27 32 import org.proteios.Context; … … 35 40 import org.proteios.gui.TitledWindow; 36 41 import org.proteios.gui.Toolbar; 37 import org.proteios.gui.form.Form; 38 import org.proteios.gui.form.FormFactory; 42 import org.proteios.gui.form.*; 39 43 import org.proteios.gui.layout.RowLayout; 40 41 44 import se.lu.thep.waf.ActionException; 42 import se.lu.thep.waf.constraints.InvalidParameterValue; 43 44 import java.util.ArrayList; 45 import java.util.Calendar; 46 import java.util.GregorianCalendar; 47 import java.util.List; 45 import se.lu.thep.waf.constraints.*; 48 46 49 47 /** 50 *This action allows contact data to be added to spectrum files.51 *Contact data are selected after the spectrum files have been selected.52 *One edit job per spectrum file is created.53 *54 *@author olle55 48 This action allows contact data to be added to spectrum files. 49 Contact data are selected after the spectrum files have been selected. 50 One edit job per spectrum file is created. 51 52 @author olle 53 */ 56 54 public class SpectrumFileContactDataAdderExtension 57 58 55 extends ProteiosAction<SpectrumFileContactDataAdderExtension> 56 implements ContextEnabled 59 57 { 60 61 @Override 62 protected void runMe() 63 throws ActionException, InvalidParameterValue 64 { 65 /*********************************************************************** 66 * Check input 67 */ 68 /* 69 * Get the id's of all selected files. FormFactory.VID is the valid 70 * identifier used when rendering the list of files, thus we use it to 71 * get the valid list of item ids. 72 */ 73 List<Integer> spectrumFileIds = getValidIntegerList(FormFactory.VID); 74 log.debug("spectrumFileIds = " + spectrumFileIds); 75 /* 76 * Make sure at least one file has been selected 77 */ 78 if (spectrumFileIds == null || spectrumFileIds.size() == 0) 79 { 80 /* 81 * If we return to this action after an error in a forward action, 82 * the spectrum file id list is stored in SpectrumFileContactDataAdder.VSPECTRUMFILEID 83 * instead of FormFactory.VID. Check this to determine if the current 84 * action should set an error message, or continue to allow 85 * an error message from the forward action to be displayed. 86 */ 87 spectrumFileIds = getValidIntegerList(SpectrumFileContactDataAdder.VSPECTRUMFILEID); 88 log.debug("spectrumFileIds from SpectrumFileContactDataAdder.VSPECTRUMFILEID = " + spectrumFileIds); 89 if (spectrumFileIds == null || spectrumFileIds.size() == 0) 90 { 91 setError("Please select at least one spectrum file"); 92 return; 93 } 94 } 95 /* 96 * Create a form for selection of contact data parameters. 97 */ 98 // Default filename prefix 99 DbControl dc = newDbControl(); 100 Project project = isProjectActive(dc); 101 String outputDirPrefixDefault = new String("OutputDir_"); 102 String outputDir; 103 /* 104 * Add time stamp to output directory prefix in this class, 105 * instead of in job plugin class, as we want output files 106 * for all jobs created in the same session to share the same 107 * time stamp, even if the jobs are not executed simultaneously. 108 */ 109 // Append time stamp in YYYYMMDD_HHMM format to output directory default 110 outputDir = appendTimestampToString(outputDirPrefixDefault); 111 log.debug("outputDir = \"" + outputDir + "\""); 112 // Get logged-in user from whose profile default contact information should be taken. 113 User user = getOwner(); 114 log.debug("user = \"" + user + "\""); 115 // Get form 116 Form form = getFormFactory().getSpectrumFileContactInputForm( 117 project, outputDir, user); 118 String contactDataTitle = new String("EnterContactData"); 119 Title title = new Title(contactDataTitle); 120 // Instruction area 121 TitledWindow instructionArea = new TitledWindow(); 122 String instruction = "Enter contact data to be added to spectrum file(s)."; 123 instruction += " One spectrum file edit job is created for each peak list file in mzData or mzML format."; 124 instruction += " MzData uses name, institution, and contact info fields."; 125 instruction += " MzML uses name, address, URL, and email fields."; 126 instructionArea.setContent(instruction); 127 instructionArea.setTitle("Description"); 128 // Toolbar 129 Toolbar tb = new Toolbar(); 130 form.setToolbar(tb); 131 // Add 'Next' button to create edit jobs 132 ActionLink nextEdit = getActionFactory().getActionLink( 133 SpectrumFileContactDataAdder.class, "NextCreateSpectrumFileContactAdderJobs"); 134 for (Integer spectrumFileId : spectrumFileIds) 135 { 136 getFormFactory().addHiddenField(form, SpectrumFileContactDataAdder.VSPECTRUMFILEID, spectrumFileId); 137 } 138 tb.add(nextEdit); 139 /*********************************************************************** 140 * Layout 141 */ 142 RowLayout layout = getLayoutFactory().getRowLayout(); 143 layout.add(title); 144 layout.add(instructionArea); 145 layout.add(form); 146 setLayout(layout); 147 } 148 149 150 /** 151 * Append time stamp to string 152 * 153 * @param origStr String Original string 154 * @return String Original string with appended "YYYYMMDD_HHMM" times tamp and underscore. 155 */ 156 private String appendTimestampToString(String origStr) 157 { 158 // Append time stamp in YYYYMMDD_HHMM format to string 159 String outputStr = origStr; 160 Calendar cal = GregorianCalendar.getInstance(); 161 boolean includeDatePart = true; 162 boolean includeTimePart = true; 163 boolean includeSeconds = false; 164 String dateElementSeparator = new String(""); 165 String dateTimeSeparator = new String("_"); 166 String timeElementSeparator = new String(""); 167 String timestampStr = fetchTimestamp(cal, 0, 168 includeDatePart, includeTimePart, includeSeconds, 169 dateElementSeparator, dateTimeSeparator, timeElementSeparator); 170 log.debug("timestampStr = \"" + timestampStr + "\""); 171 if (timestampStr != null && !timestampStr.equals("")) 172 { 173 outputStr = outputStr + timestampStr; 174 } 175 // 176 return outputStr; 177 } 178 179 180 /** 181 * Fetches timestamp string. 182 * If Calendar instance is null, null will be returned. 183 * 184 * @param inputCal Calendar Timestamp to use 185 * @param secondsToAdd int Number of seconds to add (subtract if negative) to 186 * timestamp 187 * @param includeDatePart Boolean Flag indicating that date part should be included (default = true). 188 * @param includeTimePart Boolean Flag indicating that time part should be included (default = true). 189 * @param includeSeconds Boolean Flag indicating that seconds should be included in time part (default = true). 190 * @param dateElementSeparator String Separator between date elements (default = "-"). 191 * @param dateTimeSeparator String Separator between date and time parts (default = " "). 192 * @param timeElementSeparator String Separator between time elements (default = ":"). 193 * @return String Constructed timestamp string. 194 */ 195 public String fetchTimestamp(Calendar inputCal, int secondsToAdd, 196 Boolean includeDatePart, Boolean includeTimePart, Boolean includeSeconds, 197 String dateElementSeparator, String dateTimeSeparator, String timeElementSeparator) 198 { 199 if (inputCal == null) 200 { 201 return null; 202 } 203 // Set defaults if needed 204 if (includeDatePart == null) 205 { 206 includeDatePart = true; 207 } 208 if (includeTimePart == null) 209 { 210 includeTimePart = true; 211 } 212 if (includeSeconds == null) 213 { 214 includeSeconds = true; 215 } 216 if (dateElementSeparator == null) 217 { 218 dateElementSeparator = new String("-"); 219 } 220 if (dateTimeSeparator == null) 221 { 222 dateTimeSeparator = new String(" "); 223 } 224 if (timeElementSeparator == null) 225 { 226 timeElementSeparator = new String(":"); 227 } 228 // 229 StringBuilder sb = new StringBuilder(); 230 // 231 // Make a copy of the input Calendar object, as we don't want to change 232 // the value of the latter 233 Calendar cal = (Calendar) inputCal.clone(); 234 long timeInMilliSec = cal.getTimeInMillis(); 235 timeInMilliSec += secondsToAdd * 1000; 236 cal.setTimeInMillis(timeInMilliSec); 237 int year = cal.get(Calendar.YEAR); 238 int month = cal.get(Calendar.MONTH) + 1; 239 int day = cal.get(Calendar.DAY_OF_MONTH); 240 int hour = cal.get(Calendar.HOUR_OF_DAY); 241 int min = cal.get(Calendar.MINUTE); 242 int sec = cal.get(Calendar.SECOND); 243 String monthStr = leftPaddedString(Integer.toString(month), 2, '0'); 244 String dayStr = leftPaddedString(Integer.toString(day), 2, '0'); 245 String hourStr = leftPaddedString(Integer.toString(hour), 2, '0'); 246 String minStr = leftPaddedString(Integer.toString(min), 2, '0'); 247 String secStr = leftPaddedString(Integer.toString(sec), 2, '0'); 248 // Construct time stamp 249 if (includeDatePart) 250 { 251 sb.append(year); 252 sb.append(dateElementSeparator); 253 sb.append(monthStr); 254 sb.append(dateElementSeparator); 255 sb.append(dayStr); 256 } 257 if (includeDatePart && includeTimePart) 258 { 259 sb.append(dateTimeSeparator); 260 } 261 if (includeTimePart) 262 { 263 sb.append(hourStr); 264 sb.append(timeElementSeparator); 265 sb.append(minStr); 266 if (includeSeconds) 267 { 268 sb.append(timeElementSeparator); 269 sb.append(secStr); 270 } 271 } 272 String timestamp = sb.toString(); 273 // 274 return timestamp; 275 } 276 277 278 /** 279 * Returns a string padded from the left with a given character to have at 280 * least a given length. If the input string length that is equal to or 281 * larger than the minimum length, the string will be returned unchanged. If 282 * the input string length is smaller than the minimum length, the string 283 * will be padded from the left with the given character until the length is 284 * exactly the given minimum length. 285 * 286 * @param inStr String Input string 287 * @param minChars int The minimum number of characters in the resulting 288 * string 289 * @param padChar char Character to use for optional padding 290 * @return String A string optionally padded from the left to have at least 291 * 'minChars' characters. 292 */ 293 private String leftPaddedString(String inStr, int minChars, char padChar) 294 { 295 String startStr = null; 296 if (inStr != null) 297 { 298 startStr = new String(inStr); 299 } 300 else 301 { 302 startStr = new String(""); 303 } 304 int startLen = startStr.length(); 305 String resultStr = null; 306 if (startLen >= minChars) 307 { 308 resultStr = startStr; 309 } 310 else 311 { 312 resultStr = startStr; 313 for (int i = startLen; i < minChars; i++) 314 { 315 resultStr = padChar + resultStr; 316 } 317 } 318 return resultStr; 319 } 320 321 322 /** 323 * Tell the application in which context this action should be available 324 */ 325 public List<Context> listContexts() 326 { 327 List<Context> contexts = new ArrayList<Context>(1); 328 /* 329 * We want our action to appear as an extension when viewing files. Do 330 * this by adding a FileContext to the list of contexts. 331 */ 332 FileContext files = new FileContext("SpectrumFileContactDataAdder", "Add contact data to spectrum file(s)", 333 SpectrumFileContactDataAdderExtension.class); 334 files.setDescription("First select spectrum files, then contact data"); 335 contexts.add(files); 336 return contexts; 337 } 58 59 public static final VString VNONREQUIRED_FILENAME = new VString("fileName",0, 255, false); 60 public static final VString VNONREQUIRED_NAME = new VString("name", 0, 255,false); 61 public static final VString VNONREQUIRED_INSTITUTION = new VString("institution", 0, 255, false); 62 public static final VString VNONREQUIRED_ADDRESS = new VString("address",0, 255, false); 63 public static final VString VNONREQUIRED_URL = new VString("url", 0, 255,false); 64 public static final VString VNONREQUIRED_EMAIL = new VString("email", 0,255, false); 65 public static final VString VNONREQUIRED_CONTACT_INFO = new VString("contactInfo", 0, 255, false); 66 67 @Override 68 protected void runMe() 69 throws ActionException, InvalidParameterValue 70 { 71 /* 72 Get the id's of all selected files. FormFactory.VID is the valid 73 identifier used when rendering the list of files, thus we use it to 74 get the valid list of item ids. 75 */ 76 List<Integer> spectrumFileIds = getValidIntegerList(FormFactory.VID); 77 log.debug("spectrumFileIds = " + spectrumFileIds); 78 /* 79 Make sure at least one file has been selected 80 */ 81 if (spectrumFileIds == null || spectrumFileIds.size() == 0) 82 { 83 /* 84 If we return to this action after an error in a forward action, 85 the spectrum file id list is stored in SpectrumFileContactDataAdder.VSPECTRUMFILEID 86 instead of FormFactory.VID. Check this to determine if the current 87 action should set an error message, or continue to allow 88 an error message from the forward action to be displayed. 89 */ 90 spectrumFileIds = getValidIntegerList(SpectrumFileContactDataAdder.VSPECTRUMFILEID); 91 log.debug("spectrumFileIds from SpectrumFileContactDataAdder.VSPECTRUMFILEID = " + spectrumFileIds); 92 if (spectrumFileIds == null || spectrumFileIds.size() == 0) 93 { 94 setError("Please select at least one spectrum file"); 95 return; 96 } 97 } 98 /* 99 Create a form for selection of contact data parameters. 100 */ 101 // Default filename prefix 102 DbControl dc = newDbControl(); 103 Project project = isProjectActive(dc); 104 String outputDirPrefixDefault = new String("OutputDir_"); 105 String outputDir; 106 /* 107 Add time stamp to output directory prefix in this class, 108 instead of in job plugin class, as we want output files 109 for all jobs created in the same session to share the same 110 time stamp, even if the jobs are not executed simultaneously. 111 */ 112 // Append time stamp in YYYYMMDD_HHMM format to output directory default 113 outputDir = appendTimestampToString(outputDirPrefixDefault); 114 log.debug("outputDir = \"" + outputDir + "\""); 115 // Get logged-in user from whose profile default contact information should be taken. 116 User user = getOwner(); 117 log.debug("user = \"" + user + "\""); 118 // Get form 119 Form form = getSpectrumFileContactInputForm(project, outputDir, user); 120 String contactDataTitle = new String("EnterContactData"); 121 Title title = new Title(contactDataTitle); 122 // Instruction area 123 TitledWindow instructionArea = new TitledWindow(); 124 String instruction = "Enter contact data to be added to spectrum file(s)."; 125 instruction += " One spectrum file edit job is created for each peak list file in mzData or mzML format."; 126 instruction += " MzData uses name, institution, and contact info fields."; 127 instruction += " MzML uses name, address, URL, and email fields."; 128 instructionArea.setContent(instruction); 129 instructionArea.setTitle("Description"); 130 // Toolbar 131 Toolbar tb = new Toolbar(); 132 form.setToolbar(tb); 133 // Add 'Next' button to create edit jobs 134 ActionLink nextEdit = getActionFactory().getActionLink( 135 SpectrumFileContactDataAdder.class, "NextCreateSpectrumFileContactAdderJobs"); 136 for (Integer spectrumFileId : spectrumFileIds) 137 { 138 getFormFactory().addHiddenField(form, SpectrumFileContactDataAdder.VSPECTRUMFILEID, spectrumFileId); 139 } 140 tb.add(nextEdit); 141 // Layout 142 RowLayout layout = getLayoutFactory().getRowLayout(); 143 layout.add(title); 144 layout.add(instructionArea); 145 layout.add(form); 146 setLayout(layout); 147 } 148 149 /** 150 Append time stamp to string 151 152 @param origStr String Original string 153 @return String Original string with appended "YYYYMMDD_HHMM" times tamp and underscore. 154 */ 155 private String appendTimestampToString(String origStr) 156 { 157 // Append time stamp in YYYYMMDD_HHMM format to string 158 String outputStr = origStr; 159 Calendar cal = GregorianCalendar.getInstance(); 160 boolean includeDatePart = true; 161 boolean includeTimePart = true; 162 boolean includeSeconds = false; 163 String dateElementSeparator = new String(""); 164 String dateTimeSeparator = new String("_"); 165 String timeElementSeparator = new String(""); 166 String timestampStr = fetchTimestamp(cal, 0, 167 includeDatePart, includeTimePart, includeSeconds, 168 dateElementSeparator, dateTimeSeparator, timeElementSeparator); 169 log.debug("timestampStr = \"" + timestampStr + "\""); 170 if (timestampStr != null && !timestampStr.equals("")) 171 { 172 outputStr = outputStr + timestampStr; 173 } 174 // 175 return outputStr; 176 } 177 178 /** 179 Fetches timestamp string. 180 If Calendar instance is null, null will be returned. 181 182 @param inputCal Calendar Timestamp to use 183 @param secondsToAdd int Number of seconds to add (subtract if negative) to 184 timestamp 185 @param includeDatePart Boolean Flag indicating that date part should be included (default = true). 186 @param includeTimePart Boolean Flag indicating that time part should be included (default = true). 187 @param includeSeconds Boolean Flag indicating that seconds should be included in time part (default = true). 188 @param dateElementSeparator String Separator between date elements (default = "-"). 189 @param dateTimeSeparator String Separator between date and time parts (default = " "). 190 @param timeElementSeparator String Separator between time elements (default = ":"). 191 @return String Constructed timestamp string. 192 */ 193 public String fetchTimestamp(Calendar inputCal, int secondsToAdd, 194 Boolean includeDatePart, Boolean includeTimePart, Boolean includeSeconds, 195 String dateElementSeparator, String dateTimeSeparator, String timeElementSeparator) 196 { 197 if (inputCal == null) 198 { 199 return null; 200 } 201 // Set defaults if needed 202 if (includeDatePart == null) 203 { 204 includeDatePart = true; 205 } 206 if (includeTimePart == null) 207 { 208 includeTimePart = true; 209 } 210 if (includeSeconds == null) 211 { 212 includeSeconds = true; 213 } 214 if (dateElementSeparator == null) 215 { 216 dateElementSeparator = new String("-"); 217 } 218 if (dateTimeSeparator == null) 219 { 220 dateTimeSeparator = new String(" "); 221 } 222 if (timeElementSeparator == null) 223 { 224 timeElementSeparator = new String(":"); 225 } 226 // 227 StringBuilder sb = new StringBuilder(); 228 // 229 // Make a copy of the input Calendar object, as we don't want to change 230 // the value of the latter 231 Calendar cal = (Calendar) inputCal.clone(); 232 long timeInMilliSec = cal.getTimeInMillis(); 233 timeInMilliSec += secondsToAdd * 1000; 234 cal.setTimeInMillis(timeInMilliSec); 235 int year = cal.get(Calendar.YEAR); 236 int month = cal.get(Calendar.MONTH) + 1; 237 int day = cal.get(Calendar.DAY_OF_MONTH); 238 int hour = cal.get(Calendar.HOUR_OF_DAY); 239 int min = cal.get(Calendar.MINUTE); 240 int sec = cal.get(Calendar.SECOND); 241 String monthStr = leftPaddedString(Integer.toString(month), 2, '0'); 242 String dayStr = leftPaddedString(Integer.toString(day), 2, '0'); 243 String hourStr = leftPaddedString(Integer.toString(hour), 2, '0'); 244 String minStr = leftPaddedString(Integer.toString(min), 2, '0'); 245 String secStr = leftPaddedString(Integer.toString(sec), 2, '0'); 246 // Construct time stamp 247 if (includeDatePart) 248 { 249 sb.append(year); 250 sb.append(dateElementSeparator); 251 sb.append(monthStr); 252 sb.append(dateElementSeparator); 253 sb.append(dayStr); 254 } 255 if (includeDatePart && includeTimePart) 256 { 257 sb.append(dateTimeSeparator); 258 } 259 if (includeTimePart) 260 { 261 sb.append(hourStr); 262 sb.append(timeElementSeparator); 263 sb.append(minStr); 264 if (includeSeconds) 265 { 266 sb.append(timeElementSeparator); 267 sb.append(secStr); 268 } 269 } 270 String timestamp = sb.toString(); 271 // 272 return timestamp; 273 } 274 275 /** 276 Returns a string padded from the left with a given character to have at 277 least a given length. If the input string length that is equal to or 278 larger than the minimum length, the string will be returned unchanged. If 279 the input string length is smaller than the minimum length, the string 280 will be padded from the left with the given character until the length is 281 exactly the given minimum length. 282 283 @param inStr String Input string 284 @param minChars int The minimum number of characters in the resulting 285 string 286 @param padChar char Character to use for optional padding 287 @return String A string optionally padded from the left to have at least 288 'minChars' characters. 289 */ 290 private String leftPaddedString(String inStr, int minChars, char padChar) 291 { 292 String startStr = null; 293 if (inStr != null) 294 { 295 startStr = new String(inStr); 296 } 297 else 298 { 299 startStr = new String(""); 300 } 301 int startLen = startStr.length(); 302 String resultStr = null; 303 if (startLen >= minChars) 304 { 305 resultStr = startStr; 306 } 307 else 308 { 309 resultStr = startStr; 310 for (int i = startLen; i < minChars; i++) 311 { 312 resultStr = padChar + resultStr; 313 } 314 } 315 return resultStr; 316 } 317 318 /** 319 Returns a form for adding spectrum file contact data for a spectrum file. 320 321 @param project Project The project in whose directory a new output 322 directory is created. 323 @param outputDirNameDefault String The default name of the output 324 directory. 325 @param user User The user from whose profile default contact information 326 should be taken. 327 @return Form for displaying spectrum file contact data. 328 */ 329 public Form getSpectrumFileContactInputForm(Project project, 330 String outputDirNameDefault, User user) 331 { 332 Form form = new Form("spectrumFileContactInputForm"); 333 // Get potential default contact information from user profile 334 String defaultName = new String(""); 335 String defaultInstitution = new String(""); 336 String defaultAddress = new String(""); 337 String defaultEmail = new String(""); 338 String defaultContactInfo = new String(""); 339 if (user != null) 340 { 341 // Default name 342 if (user.getName() != null) 343 { 344 defaultName = user.getName(); 345 } 346 // Default institution 347 if (user.getOrganisation() != null) 348 { 349 defaultInstitution = user.getOrganisation(); 350 } 351 // Default address 352 if (user.getAddress() != null) 353 { 354 defaultAddress = user.getAddress(); 355 } 356 // Default e-mail 357 if (user.getEmail() != null) 358 { 359 defaultEmail = user.getEmail(); 360 } 361 // Default contact info 362 defaultContactInfo = addContactInfoElement(defaultContactInfo, "Name", defaultName); 363 defaultContactInfo = addContactInfoElement(defaultContactInfo, "Institution", defaultInstitution); 364 defaultContactInfo = addContactInfoElement(defaultContactInfo, "Address", defaultAddress); 365 defaultContactInfo = addContactInfoElement(defaultContactInfo, "Phone", user.getPhone()); 366 defaultContactInfo = addContactInfoElement(defaultContactInfo, "Fax", user.getFax()); 367 defaultContactInfo = addContactInfoElement(defaultContactInfo, "e-mail", defaultEmail); 368 } 369 // 370 Fieldset contactInputFS = new Fieldset(); 371 contactInputFS.setTitle("SpectrumFileContactInput"); 372 form.addFieldset(contactInputFS); 373 // 374 TextField<String> nameF = new TextField<String>(VNONREQUIRED_NAME); 375 nameF.setValue(defaultName); 376 nameF.setLabel("Name"); 377 contactInputFS.add(nameF); 378 // 379 TextField<String> institutionF = new TextField<String>(VNONREQUIRED_INSTITUTION); 380 institutionF.setValue(defaultInstitution); 381 institutionF.setLabel("Institution"); 382 contactInputFS.add(institutionF); 383 // 384 TextField<String> contactInfoF = new TextField<String>(VNONREQUIRED_CONTACT_INFO); 385 contactInfoF.setValue(defaultContactInfo); 386 contactInfoF.setLabel("ContactInfo"); 387 contactInputFS.add(contactInfoF); 388 // 389 TextField<String> addressF = new TextField<String>(VNONREQUIRED_ADDRESS); 390 addressF.setValue(defaultAddress); 391 addressF.setLabel("Address"); 392 contactInputFS.add(addressF); 393 // 394 TextField<String> urlF = new TextField<String>(VNONREQUIRED_URL); 395 urlF.setValue(""); 396 urlF.setLabel("URL"); 397 contactInputFS.add(urlF); 398 // 399 TextField<String> emailF = new TextField<String>(VNONREQUIRED_EMAIL); 400 emailF.setValue(defaultEmail); 401 emailF.setLabel("email"); 402 contactInputFS.add(emailF); 403 // 404 Fieldset contactOutputFS = new Fieldset(); 405 contactOutputFS.setTitle("SpectrumFileContactOutput"); 406 form.addFieldset(contactOutputFS); 407 // 408 TextField<String> outputDirNameF = new TextField<String>(VNONREQUIRED_FILENAME); 409 outputDirNameF.setValue(outputDirNameDefault); 410 outputDirNameF.setLabel("OutputDirectoryName"); 411 contactOutputFS.add(outputDirNameF); 412 // 413 return form; 414 } 415 416 /** 417 Adds an element of data to contact info string. 418 419 @param contactInfo String Current contact info string. 420 @param elementName String Name of contact info element. 421 @param elementValue String Contents of contact info element. 422 @return String Contact info string with the added info data. 423 */ 424 private String addContactInfoElement(String contactInfo, String elementName, String elementValue) 425 { 426 if (elementValue != null && !elementValue.equals("")) 427 { 428 if (!contactInfo.equals("")) 429 { 430 contactInfo += ", "; 431 } 432 contactInfo += elementName + ": " + elementValue; 433 } 434 return contactInfo; 435 } 436 437 /** 438 Tell the application in which context this action should be available 439 */ 440 public List<Context> listContexts() 441 { 442 List<Context> contexts = new ArrayList<Context>(1); 443 /* 444 We want our action to appear as an extension when viewing files. Do 445 this by adding a FileContext to the list of contexts. 446 */ 447 FileContext files = new FileContext("SpectrumFileContactDataAdder", "Add contact data to spectrum file(s)", 448 SpectrumFileContactDataAdderExtension.class); 449 files.setDescription("First select spectrum files, then contact data"); 450 contexts.add(files); 451 return contexts; 452 } 338 453 } -
Property
svn:keywords
changed from
-
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3932 r3934 144 144 public static final VDate VSTARTDATE = new VDate("startDate", true,Format.DATETIME, Format.DATE); 145 145 public static final VDate VENDDATE = new VDate("endDate", true,Format.DATETIME, Format.DATE); 146 147 146 public static final VInteger VBIOMATERIALID = new VInteger("bioMaterialId",1, false); 148 // TODO what are valid values for the pistart parameter149 150 147 public static final VString VSTAIN = new VString("stain", 0, 255, false); 151 148 public static final VInteger VLABELID = new VInteger("labelId", 0, true); … … 172 169 public static final VString VNONREQUIRED_SAMPLE_COMMENT = new VString("sampleComment", 0, 255, false); 173 170 /** 174 *logger to use171 logger to use 175 172 */ 176 173 private static final org.apache.log4j.Logger log = org.apache.log4j.LogManager … … 178 175 179 176 /** 180 *Default constructor. Initializes list excludedDeclMethods.177 Default constructor. Initializes list excludedDeclMethods. 181 178 */ 182 179 public FormFactory() 183 180 { 184 181 /* 185 *Initialize list excludedDeclMethods.182 Initialize list excludedDeclMethods. 186 183 */ 187 184 initExcludedDeclMethods(); … … 189 186 190 187 /** 191 *Get list of excluded getter methods declared in current class.192 *193 *@return List<String> of excluded getter methods.188 Get list of excluded getter methods declared in current class. 189 190 @return List<String> of excluded getter methods. 194 191 */ 195 192 public List<String> getExcludedDeclMethods() … … 199 196 200 197 /** 201 *Set list of excluded getter methods declared in current class.202 *203 *@param excludedDeclMethods List<String> of excluded getter methods to204 *set.198 Set list of excluded getter methods declared in current class. 199 200 @param excludedDeclMethods List<String> of excluded getter methods to 201 set. 205 202 */ 206 203 public void setExcludedDeclMethods(List<String> excludedDeclMethods) … … 210 207 211 208 /** 212 *Add list of excluded getter methods declared in current class.213 *214 *@param excludedDeclMethods List<String> of excluded getter methods to to215 *add.209 Add list of excluded getter methods declared in current class. 210 211 @param excludedDeclMethods List<String> of excluded getter methods to to 212 add. 216 213 */ 217 214 public void addExcludedDeclMethods(List<String> excludedDeclMethods) … … 220 217 { 221 218 /* 222 *Add excluded method if not already in list.219 Add excluded method if not already in list. 223 220 */ 224 221 if (!getExcludedDeclMethods().contains(exclMethod)) … … 308 305 309 306 /** 310 *Initializes list of excluded getter methods declared in current class.307 Initializes list of excluded getter methods declared in current class. 311 308 */ 312 309 public void initExcludedDeclMethods() 313 310 { 314 311 /* 315 *Initialize list of excluded declared methods.312 Initialize list of excluded declared methods. 316 313 */ 317 314 getExcludedDeclMethods().add("getType"); … … 361 358 { 362 359 /* 363 *Set valid parameter name to signature of single-argument setter364 *method, if existing, in order to separate between arguments of365 *primitive types like boolean, int, float, and double, from those366 *of wrapper class types like Boolean, Integer, Float, and Double.360 Set valid parameter name to signature of single-argument setter 361 method, if existing, in order to separate between arguments of 362 primitive types like boolean, int, float, and double, from those 363 of wrapper class types like Boolean, Integer, Float, and Double. 367 364 */ 368 365 setValueMethodSignature = setValueMethodName + ":" + valueClass … … 396 393 { 397 394 /* 398 *Set valid parameter name to signature of single-argument setter399 *method, if existing, in order to separate between arguments of400 *primitive types like boolean, int, float, and double, from those401 *of wrapper class types like Boolean, Integer, Float, and Double.395 Set valid parameter name to signature of single-argument setter 396 method, if existing, in order to separate between arguments of 397 primitive types like boolean, int, float, and double, from those 398 of wrapper class types like Boolean, Integer, Float, and Double. 402 399 */ 403 400 setValueMethodSignature = setValueMethodName + ":" + valueClass … … 570 567 571 568 /** 572 *@return Hidden573 *<code>TextField<String> using the valid parameter {@link #VTYPE}.569 @return Hidden 570 <code>TextField<String> using the valid parameter {@link #VTYPE}. 574 571 */ 575 572 private TextField<String> newTypeField() … … 585 582 586 583 /** 587 *Form for user preferences configuration settings. Arguments588 *NotificationConfiguration and TablePreferencesConfiguration are place589 *holders for current values for the notification configuration and table590 *preferences configuration form fields.591 *592 *@param nc NotificationConfiguration object (need not be stored in593 *database) with default field values.594 *@return Form A form for setting user preferences configuration values.584 Form for user preferences configuration settings. Arguments 585 NotificationConfiguration and TablePreferencesConfiguration are place 586 holders for current values for the notification configuration and table 587 preferences configuration form fields. 588 589 @param nc NotificationConfiguration object (need not be stored in 590 database) with default field values. 591 @return Form A form for setting user preferences configuration values. 595 592 */ 596 593 public Form getUserPreferencesConfigurationForm( … … 609 606 610 607 /** 611 *Fieldset for notification configuration settings. Argument612 *NotificationConfiguration is place holder for current values for the613 *notification configuration form fields.614 *615 *@param nc NotificationConfiguration object (need not be stored in616 *database) with default field values.617 *@return Fieldset A fieldset for setting NotificationConfiguration values.608 Fieldset for notification configuration settings. Argument 609 NotificationConfiguration is place holder for current values for the 610 notification configuration form fields. 611 612 @param nc NotificationConfiguration object (need not be stored in 613 database) with default field values. 614 @return Fieldset A fieldset for setting NotificationConfiguration values. 618 615 */ 619 616 public Fieldset getNotificationConfigurationFieldset( … … 666 663 667 664 /** 668 *Creates a select box for notification mode.669 *670 *@param modeValue int Mode value for default selection.671 *@return Select<VInteger> Select box for notification mode selection665 Creates a select box for notification mode. 666 667 @param modeValue int Mode value for default selection. 668 @return Select<VInteger> Select box for notification mode selection 672 669 */ 673 670 private Select<VInteger> getNotificationModeSelectBox(int modeValue) … … 694 691 695 692 /** 696 *Fieldset for table preferences configuration settings. Argument697 *TablePreferencesConfiguration is place holder for current values for the698 *table preferences configuration form fields.699 *700 *@param tpc TablePreferencesConfiguration object (need not be stored in701 *database) with default field values.702 *@return Fieldset A field set for setting TablePreferencesConfiguration703 *values.693 Fieldset for table preferences configuration settings. Argument 694 TablePreferencesConfiguration is place holder for current values for the 695 table preferences configuration form fields. 696 697 @param tpc TablePreferencesConfiguration object (need not be stored in 698 database) with default field values. 699 @return Fieldset A field set for setting TablePreferencesConfiguration 700 values. 704 701 */ 705 702 public Fieldset getTablePreferencesConfigurationFieldset( … … 729 726 730 727 /** 731 *Creates a select box for table preferences mode.732 *733 *@param modeValue int Mode value for default selection.734 *@return Select<VInteger> Select box for table preferences mode selection728 Creates a select box for table preferences mode. 729 730 @param modeValue int Mode value for default selection. 731 @return Select<VInteger> Select box for table preferences mode selection 735 732 */ 736 733 private Select<VInteger> getTablePreferencesModeSelectBox(int modeValue) … … 757 754 758 755 /** 759 *This will probably be removed when fixint #691760 *@param peaklist to edit, or null if an empty form is needed761 *@return Form for editing a peaklist756 This will probably be removed when fixint #691 757 @param peaklist to edit, or null if an empty form is needed 758 @return Form for editing a peaklist 762 759 */ 763 760 public Form getPeakListForm(PeakList peaklist) … … 767 764 Annotator anna = new Annotator(factory); 768 765 /*********************************************************************** 769 *Properties fieldset766 Properties fieldset 770 767 */ 771 768 Fieldset propertiesFS = new Fieldset(); … … 776 773 propertiesFS.add(spectrumIdF); 777 774 /*********************************************************************** 778 *Precursor775 Precursor 779 776 */ 780 777 Fieldset precursorFS = new Fieldset(); 781 778 precursorFS.setTitle("Precursor"); 782 779 /*********************************************************************** 783 *Peaklistset fieldset780 Peaklistset fieldset 784 781 */ 785 782 Fieldset peaklistsetFS = new Fieldset(); … … 800 797 } 801 798 /*********************************************************************** 802 *Init fields799 Init fields 803 800 */ 804 801 if (peaklist != null) … … 811 808 } 812 809 /******************************************************************* 813 *Precursors810 Precursors 814 811 */ 815 812 for (Precursor pc : peaklist.getPrecursorsQuery().list( … … 846 843 } 847 844 /*********************************************************************** 848 *Form845 Form 849 846 */ 850 847 Form form = new Form("Peaklist"); … … 856 853 857 854 /** 858 *@param hit Current Hit859 *@param peakListFile Core file with peakList, or null860 *@param peaklist to display, or null861 *@return Form for displaying peaklist for hit855 @param hit Current Hit 856 @param peakListFile Core file with peakList, or null 857 @param peaklist to display, or null 858 @return Form for displaying peaklist for hit 862 859 */ 863 860 public Form getHitPeakListForm(Hit hit, File peakListFile, … … 868 865 Annotator anna = new Annotator(factory); 869 866 /*********************************************************************** 870 *Properties fieldset867 Properties fieldset 871 868 */ 872 869 Fieldset propertiesFS = new Fieldset(); 873 870 propertiesFS.setTitle("Properties"); 874 871 /* 875 *Hit id field.872 Hit id field. 876 873 */ 877 874 TextField<String> hitDescription = new TextField<String>(new VString( … … 895 892 propertiesFS.add(hitId); 896 893 /* 897 *If there is a SpectrumSearch in the DB we can find modifications etc.894 If there is a SpectrumSearch in the DB we can find modifications etc. 898 895 */ 899 896 if (spectrumSearch != null) … … 916 913 } 917 914 /* 918 *File name field.915 File name field. 919 916 */ 920 917 TextField<String> fileNameF = new TextField<String>(new VString( … … 930 927 propertiesFS.add(fileNameF); 931 928 /* 932 *SpectrumId field.929 SpectrumId field. 933 930 */ 934 931 // TextField<Integer> spectrumIdF = new TextField<Integer>(new VInteger( … … 947 944 propertiesFS.add(spectrumIdF); 948 945 /* 949 *Retention time in minutes946 Retention time in minutes 950 947 */ 951 948 TextField<String> timeInMinutesF = new TextField<String>(new VString( … … 967 964 propertiesFS.add(timeInMinutesF); 968 965 /*********************************************************************** 969 *Optional PeakList fieldsets966 Optional PeakList fieldsets 970 967 */ 971 968 Fieldset precursorFS = null; … … 974 971 { 975 972 /******************************************************************* 976 *Precursor973 Precursor 977 974 */ 978 975 precursorFS = new Fieldset(); 979 976 precursorFS.setTitle("Precursor"); 980 977 /******************************************************************* 981 *Peaklistset fieldset978 Peaklistset fieldset 982 979 */ 983 980 peaklistsetFS = new Fieldset(); … … 988 985 peaklistsetFS.add(plsNameF); 989 986 /******************************************************************* 990 *Init fields987 Init fields 991 988 */ 992 989 // spectrumIdF.setValue(peaklist.getSpectrumId()); … … 1009 1006 { 1010 1007 /* 1011 *Do not display empty PeakListSet field set.1008 Do not display empty PeakListSet field set. 1012 1009 */ 1013 1010 peaklistsetFS = null; 1014 1011 } 1015 1012 /******************************************************************* 1016 *Precursors1013 Precursors 1017 1014 */ 1018 1015 for (Precursor pc : peaklist.getPrecursorList()) … … 1050 1047 { 1051 1048 /* 1052 *Do not display empty Precursor field set.1049 Do not display empty Precursor field set. 1053 1050 */ 1054 1051 precursorFS = null; … … 1056 1053 } 1057 1054 /*********************************************************************** 1058 *Form1055 Form 1059 1056 */ 1060 1057 Form form = new Form("HitPeaklist"); … … 1072 1069 1073 1070 /** 1074 *@param a annotation1075 *@return String1071 @param a annotation 1072 @return String 1076 1073 */ 1077 1074 private String joinAnnotationValues(Annotation a) … … 1085 1082 1086 1083 /** 1087 *Returns a form for selecting spectrum mass range limits.1088 *1089 *@param massCutoffLow String The lower cutoff mass value.1090 *@param massCutoffHigh String The upper cutoff mass value.1091 *@param spectrumId String The spectrum Id string.1092 *@return Form for selecting mass range limits.1084 Returns a form for selecting spectrum mass range limits. 1085 1086 @param massCutoffLow String The lower cutoff mass value. 1087 @param massCutoffHigh String The upper cutoff mass value. 1088 @param spectrumId String The spectrum Id string. 1089 @return Form for selecting mass range limits. 1093 1090 */ 1094 1091 public Form getSpectrumMassRangeSelectionForm(String massCutoffLow, … … 1096 1093 { 1097 1094 /*********************************************************************** 1098 *Mass range fieldset1095 Mass range fieldset 1099 1096 */ 1100 1097 Fieldset massRangeFS = new Fieldset(); … … 1125 1122 massRangeFS.add(spectrumIdF); 1126 1123 /*********************************************************************** 1127 *Form1124 Form 1128 1125 */ 1129 1126 Form form = new Form("MassRangeSelectionForm"); … … 1134 1131 1135 1132 /** 1136 *Returns a form with spectrum properties for a spectrum obtained from a1137 *spectrum file.1138 *1139 *@param spectrumFile File Core file with spectrum.1140 *@param spectrumId String Spectrum id string.1141 *@param spectrum SpectrumInterface spectrum data.1142 *@return Form for displaying spectrum properties1133 Returns a form with spectrum properties for a spectrum obtained from a 1134 spectrum file. 1135 1136 @param spectrumFile File Core file with spectrum. 1137 @param spectrumId String Spectrum id string. 1138 @param spectrum SpectrumInterface spectrum data. 1139 @return Form for displaying spectrum properties 1143 1140 */ 1144 1141 public Form getSpectrumPropertiesForm(File spectrumFile, String spectrumId, … … 1146 1143 { 1147 1144 /*********************************************************************** 1148 *Properties fieldset1145 Properties fieldset 1149 1146 */ 1150 1147 Fieldset propertiesFS = new Fieldset(); … … 1156 1153 propertiesFS.add(propertiesTable); 1157 1154 /* 1158 *File name1155 File name 1159 1156 */ 1160 1157 String peakListFileName = null; … … 1165 1162 addTableRow(propertiesTable, "Filename", peakListFileName, null, 0); 1166 1163 /* 1167 *File type1164 File type 1168 1165 */ 1169 1166 String spectrumFileType = null; … … 1177 1174 addTableRow(propertiesTable, "FileType", spectrumFileType, null, 0); 1178 1175 /* 1179 *SpectrumId1176 SpectrumId 1180 1177 */ 1181 1178 String spectrumIdStr = null; … … 1186 1183 addTableRow(propertiesTable, "SpectrumId", spectrumIdStr, null, 0); 1187 1184 /* 1188 *Retention time in minutes1185 Retention time in minutes 1189 1186 */ 1190 1187 String timeInMinutesStr = null; … … 1205 1202 timeInMinutesStr, null, 0); 1206 1203 /*********************************************************************** 1207 *Optional spectrum fieldset1204 Optional spectrum fieldset 1208 1205 */ 1209 1206 Table precursorTable = null; … … 1213 1210 { 1214 1211 /*************************************************************** 1215 *Precursors1212 Precursors 1216 1213 */ 1217 1214 int precursorNo = 0; … … 1273 1270 } 1274 1271 /* 1275 *Precursor extra data1272 Precursor extra data 1276 1273 */ 1277 1274 List<StringPairInterface> dataList = pc.getExtraDataList(); … … 1294 1291 } 1295 1292 /* 1296 *Precursor fragmentation type1293 Precursor fragmentation type 1297 1294 */ 1298 1295 SpectrumPrecursor.FragmentationType fragmentationType = pc … … 1310 1307 { 1311 1308 /* 1312 *Extra data.1309 Extra data. 1313 1310 */ 1314 1311 Table extraDataTable = new Table("AdditionalInformation"); … … 1339 1336 } 1340 1337 /*********************************************************************** 1341 *Form1338 Form 1342 1339 */ 1343 1340 Form form = new Form("SpectrumProperties"); … … 1347 1344 1348 1345 /** 1349 *Returns a form with spectrum file instrument data for a spectrum file.1350 *1351 *@param spectrumFileInstrumentList List<SpectrumFileInstrumentInterface>1352 *Spectrum file instrument list.1353 *@return Form for displaying spectrum file instrument data.1346 Returns a form with spectrum file instrument data for a spectrum file. 1347 1348 @param spectrumFileInstrumentList List<SpectrumFileInstrumentInterface> 1349 Spectrum file instrument list. 1350 @return Form for displaying spectrum file instrument data. 1354 1351 */ 1355 1352 public Form getSpectrumFileInstrumentForm( … … 1362 1359 } 1363 1360 /*********************************************************************** 1364 *Instrument fieldset1361 Instrument fieldset 1365 1362 */ 1366 1363 Fieldset instrumentFS = new Fieldset(); … … 1371 1368 List<StringPairInterface> dataList; 1372 1369 /* 1373 *Name field.1370 Name field. 1374 1371 */ 1375 1372 Table instrumentGeneralTable = new Table( … … 1392 1389 // instrumentFS.add(instrumentGeneralTable); 1393 1390 /* 1394 *Serial No field.1391 Serial No field. 1395 1392 */ 1396 1393 String instrumentSerialNo = null; … … 1404 1401 instrumentFS.add(instrumentGeneralTable); 1405 1402 /* 1406 *Source field.1403 Source field. 1407 1404 */ 1408 1405 Table sourceTable = new Table("SourceInformation"); … … 1430 1427 instrumentFS.add(sourceTable); 1431 1428 /* 1432 *AnalyzerList field.1429 AnalyzerList field. 1433 1430 */ 1434 1431 List<SpectrumFileAnalyzerInterface> analyzerList = spectrumFileInstrument … … 1440 1437 Table analyzerTable = new Table("AnalyzerListInformation"); 1441 1438 /* 1442 *// Only add table title header for first table if (j ==1443 *0) { analyzerTable.setTitle("AnalyzerListInformation"); }1439 // Only add table title header for first table if (j == 1440 0) { analyzerTable.setTitle("AnalyzerListInformation"); } 1444 1441 */ 1445 1442 // analyzerTable.add(new Column<String>("Property")); … … 1474 1471 } 1475 1472 /* 1476 *Detector field.1473 Detector field. 1477 1474 */ 1478 1475 Table detectorTable = new Table("DetectorInformation"); … … 1500 1497 instrumentFS.add(detectorTable); 1501 1498 /* 1502 *Additional field.1499 Additional field. 1503 1500 */ 1504 1501 Table additionalTable = new Table("AdditionalInformation"); … … 1527 1524 } 1528 1525 /*********************************************************************** 1529 *Form1526 Form 1530 1527 */ 1531 1528 Form form = new Form("InstrumentInformation"); … … 1535 1532 1536 1533 /** 1537 *Adds a table row to a table. A "value" argument that is null will be1538 *represented as an empty string, otherwise by its toString() value.1539 *1540 *@param table Table The table to add a row to.1541 *@param nameKey String Property key string.1542 *@param value Object Property value object.1543 *@param actionClass Class<E extends ProteiosAction> Optional value cell1544 *action.1545 *@param itemId int The item id to use for an optional action.1534 Adds a table row to a table. A "value" argument that is null will be 1535 represented as an empty string, otherwise by its toString() value. 1536 1537 @param table Table The table to add a row to. 1538 @param nameKey String Property key string. 1539 @param value Object Property value object. 1540 @param actionClass Class<E extends ProteiosAction> Optional value cell 1541 action. 1542 @param itemId int The item id to use for an optional action. 1546 1543 */ 1547 1544 private void addTableRow(Table table, String nameKey, Object value, … … 1576 1573 1577 1574 /** 1578 *Returns a form with spectrum file contact data for a spectrum file.1579 *1580 *@param spectrumContact Spectrum file contact1581 *data.1582 *@return Form for displaying spectrum file contact data.1575 Returns a form with spectrum file contact data for a spectrum file. 1576 1577 @param spectrumContact Spectrum file contact 1578 data. 1579 @return Form for displaying spectrum file contact data. 1583 1580 */ 1584 1581 public Form getSpectrumFileContactForm( … … 1590 1587 } 1591 1588 /*********************************************************************** 1592 *Contact fieldset1589 Contact fieldset 1593 1590 */ 1594 1591 Fieldset contactFS = new Fieldset(); … … 1600 1597 contactFS.add(contactTable); 1601 1598 /* 1602 *Name1599 Name 1603 1600 */ 1604 1601 String name = null; … … 1609 1606 addTableRow(contactTable, "Name", name, null, 0); 1610 1607 /* 1611 *Institution1608 Institution 1612 1609 */ 1613 1610 String institution = null; … … 1618 1615 addTableRow(contactTable, "Institution", institution, null, 0); 1619 1616 /* 1620 *ContactInfo1617 ContactInfo 1621 1618 */ 1622 1619 String contactInfo = null; … … 1627 1624 addTableRow(contactTable, "ContactInfo", contactInfo, null, 0); 1628 1625 /* 1629 *Address1626 Address 1630 1627 */ 1631 1628 String address = null; … … 1636 1633 addTableRow(contactTable, "Address", address, null, 0); 1637 1634 /* 1638 *URL1635 URL 1639 1636 */ 1640 1637 String url = null; … … 1645 1642 addTableRow(contactTable, "URL", url, null, 0); 1646 1643 /* 1647 *Email1644 Email 1648 1645 */ 1649 1646 String email = null; … … 1654 1651 addTableRow(contactTable, "Email", email, null, 0); 1655 1652 /*********************************************************************** 1656 *Form1653 Form 1657 1654 */ 1658 1655 Form form = new Form("ContactInformation"); … … 1660 1657 return form; 1661 1658 } 1662 1659 1663 1660 /** 1664 * Returns a form for adding spectrum file contact data for a spectrum file. 1665 * 1666 * @param project Project The project in whose directory a new output 1667 * directory is created. 1668 * @param outputDirNameDefault String The default name of the output 1669 * directory. 1670 * @param user User The user from whose profile default contact information 1671 * should be taken. 1672 * @return Form for displaying spectrum file contact data. 1673 */ 1674 public Form getSpectrumFileContactInputForm(Project project, 1675 String outputDirNameDefault, User user) 1676 { 1677 Form form = new Form("spectrumFileContactInputForm"); 1678 // Get potential default contact information from user profile 1679 String defaultName = new String(""); 1680 String defaultInstitution = new String(""); 1681 String defaultAddress = new String(""); 1682 String defaultEmail = new String(""); 1683 String defaultContactInfo = new String(""); 1684 if (user != null) 1685 { 1686 // Default name 1687 if (user.getName() != null) 1688 { 1689 defaultName = user.getName(); 1690 } 1691 // Default institution 1692 if (user.getOrganisation() != null) 1693 { 1694 defaultInstitution = user.getOrganisation(); 1695 } 1696 // Default address 1697 if (user.getAddress() != null) 1698 { 1699 defaultAddress = user.getAddress(); 1700 } 1701 // Default e-mail 1702 if (user.getEmail() != null) 1703 { 1704 defaultEmail = user.getEmail(); 1705 } 1706 // Default contact info 1707 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1708 "Name", defaultName); 1709 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1710 "Institution", defaultInstitution); 1711 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1712 "Address", defaultAddress); 1713 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1714 "Phone", user.getPhone()); 1715 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1716 "Fax", user.getFax()); 1717 defaultContactInfo = addContactInfoElement(defaultContactInfo, 1718 "e-mail", defaultEmail); 1719 } 1720 // 1721 Fieldset contactInputFS = new Fieldset(); 1722 contactInputFS.setTitle("SpectrumFileContactInput"); 1723 form.addFieldset(contactInputFS); 1724 // 1725 TextField<String> nameF = new TextField<String>(VNONREQUIRED_NAME); 1726 nameF.setValue(defaultName); 1727 nameF.setLabel("Name"); 1728 contactInputFS.add(nameF); 1729 // 1730 TextField<String> institutionF = new TextField<String>( 1731 VNONREQUIRED_INSTITUTION); 1732 institutionF.setValue(defaultInstitution); 1733 institutionF.setLabel("Institution"); 1734 contactInputFS.add(institutionF); 1735 // 1736 TextField<String> contactInfoF = new TextField<String>( 1737 VNONREQUIRED_CONTACT_INFO); 1738 contactInfoF.setValue(defaultContactInfo); 1739 contactInfoF.setLabel("ContactInfo"); 1740 contactInputFS.add(contactInfoF); 1741 // 1742 TextField<String> addressF = new TextField<String>(VNONREQUIRED_ADDRESS); 1743 addressF.setValue(defaultAddress); 1744 addressF.setLabel("Address"); 1745 contactInputFS.add(addressF); 1746 // 1747 TextField<String> urlF = new TextField<String>(VNONREQUIRED_URL); 1748 urlF.setValue(""); 1749 urlF.setLabel("URL"); 1750 contactInputFS.add(urlF); 1751 // 1752 TextField<String> emailF = new TextField<String>(VNONREQUIRED_EMAIL); 1753 emailF.setValue(defaultEmail); 1754 emailF.setLabel("email"); 1755 contactInputFS.add(emailF); 1756 // 1757 Fieldset contactOutputFS = new Fieldset(); 1758 contactOutputFS.setTitle("SpectrumFileContactOutput"); 1759 form.addFieldset(contactOutputFS); 1760 // 1761 TextField<String> outputDirNameF = new TextField<String>( 1762 VNONREQUIRED_FILENAME); 1763 outputDirNameF.setValue(outputDirNameDefault); 1764 outputDirNameF.setLabel("OutputDirectoryName"); 1765 contactOutputFS.add(outputDirNameF); 1766 // 1767 /* 1768 * Checkbox<VBoolean> overwriteExistingContactDataCB = new Checkbox<VBoolean>( 1769 * SpectrumFileContactDataAdder.VOVERWRITEEXISTINGCONTACTDATAFLAG); 1770 * overwriteExistingContactDataCB.setLabel("OverwriteExistingContactData"); 1771 * overwriteExistingContactDataCB.setValue("true"); 1772 * overwriteExistingContactDataCB.isChecked(true); 1773 * contactOutputFS.add(overwriteExistingContactDataCB); 1774 */ 1775 // 1776 return form; 1777 } 1778 1779 /** 1780 * Adds an element of data to contact info string. 1781 * 1782 * @param contactInfo String Current contact info string. 1783 * @param elementName String Name of contact info element. 1784 * @param elementValue String Contents of contact info element. 1785 * @return String Contact info string with the added info data. 1786 */ 1787 private String addContactInfoElement(String contactInfo, 1788 String elementName, String elementValue) 1789 { 1790 if (elementValue != null && !elementValue.equals("")) 1791 { 1792 if (!contactInfo.equals("")) 1793 { 1794 contactInfo += ", "; 1795 } 1796 contactInfo += elementName + ": " + elementValue; 1797 } 1798 return contactInfo; 1799 } 1800 1801 /** 1802 * Returns a form for adding spectrum file sample data for a spectrum file. 1803 * 1804 * @param project Project The project in whose directory a new output 1805 * directory is created. 1806 * @param outputDirNameDefault String The default name of the output 1807 * directory. 1808 * @return Form for displaying spectrum file contact data. 1661 Returns a form for adding spectrum file sample data for a spectrum file. 1662 1663 @param project Project The project in whose directory a new output 1664 directory is created. 1665 @param outputDirNameDefault String The default name of the output 1666 directory. 1667 @return Form for displaying spectrum file contact data. 1809 1668 */ 1810 1669 public Form getSpectrumFileSampleInputForm(Project project, … … 1830 1689 // 1831 1690 /* 1832 *TextField<String> stateF = new TextField<String>(VNONREQUIRED_SAMPLE_STATE);1833 *stateF.setValue(""); stateF.setLabel("SampleState");1834 *sampleInputFS.add(stateF);1691 TextField<String> stateF = new TextField<String>(VNONREQUIRED_SAMPLE_STATE); 1692 stateF.setValue(""); stateF.setLabel("SampleState"); 1693 sampleInputFS.add(stateF); 1835 1694 */ 1836 1695 // Sample state select box … … 1890 1749 // 1891 1750 /* 1892 *Checkbox<VBoolean> overwriteExistingSampleDataCB = new Checkbox<VBoolean>(1893 *SpectrumFileSampleDataAdder.VOVERWRITEEXISTINGSAMPLEDATAFLAG);1894 *overwriteExistingSampleDataCB.setLabel("OverwriteExistingSampleData");1895 *overwriteExistingSampleDataCB.setValue("true");1896 *overwriteExistingSampleDataCB.isChecked(true);1897 *sampleOutputFS.add(overwriteExistingSampleDataCB);1751 Checkbox<VBoolean> overwriteExistingSampleDataCB = new Checkbox<VBoolean>( 1752 SpectrumFileSampleDataAdder.VOVERWRITEEXISTINGSAMPLEDATAFLAG); 1753 overwriteExistingSampleDataCB.setLabel("OverwriteExistingSampleData"); 1754 overwriteExistingSampleDataCB.setValue("true"); 1755 overwriteExistingSampleDataCB.isChecked(true); 1756 sampleOutputFS.add(overwriteExistingSampleDataCB); 1898 1757 */ 1899 1758 // … … 1913 1772 { 1914 1773 /*********************************************************************** 1915 *Properties fieldset1774 Properties fieldset 1916 1775 */ 1917 1776 Fieldset properties = new Fieldset(); … … 1927 1786 properties.add(descrF); 1928 1787 /*********************************************************************** 1929 *Hardware configuration1788 Hardware configuration 1930 1789 */ 1931 1790 Fieldset instrumentFS = new Fieldset(); 1932 1791 instrumentFS.setTitle("Instrument"); 1933 1792 /*********************************************************************** 1934 *Analyzers1793 Analyzers 1935 1794 */ 1936 1795 Fieldset analyzersFS = new Fieldset(); 1937 1796 analyzersFS.setTitle("Analyzers"); 1938 1797 /*********************************************************************** 1939 *Set field values1798 Set field values 1940 1799 */ 1941 1800 if (pls != null) … … 1946 1805 instrumentFS.add(newTextField("Hardware", hw.getName())); 1947 1806 /******************************************************************* 1948 *Analyzer annotation values1807 Analyzer annotation values 1949 1808 */ 1950 1809 List<HardwareConfiguration> analyzerList = pls.getAnalyzers(); … … 1961 1820 } 1962 1821 /******************************************************************* 1963 *PeakListSet values1822 PeakListSet values 1964 1823 */ 1965 1824 itemIdF.setValue(pls.getId()); … … 1968 1827 } 1969 1828 /*********************************************************************** 1970 *Form1829 Form 1971 1830 */ 1972 1831 Form form = new Form("peakListSetForm"); … … 1981 1840 { 1982 1841 /*********************************************************************** 1983 *Properties1842 Properties 1984 1843 */ 1985 1844 Fieldset fs = new Fieldset(); … … 2018 1877 fs.add(nameF); 2019 1878 /*********************************************************************** 2020 *Form1879 Form 2021 1880 */ 2022 1881 Form form = new Form("exportPeakListSetForm"); … … 2125 1984 2126 1985 /** 2127 *Creates and adds a hidden field with an Integer value to the given form.2128 *Introduced to solve problem in #6231986 Creates and adds a hidden field with an Integer value to the given form. 1987 Introduced to solve problem in #623 2129 1988 */ 2130 1989 public void addHiddenField(Form form, VInteger param, Integer value) … … 2137 1996 2138 1997 /** 2139 *Creates and adds a hidden field with an Integer value to the given table.2140 *Introduced to solve problem in #6231998 Creates and adds a hidden field with an Integer value to the given table. 1999 Introduced to solve problem in #623 2141 2000 */ 2142 2001 public void addHiddenField(Table table, VInteger param, Integer value) … … 2335 2194 properties.add(filterValueF); 2336 2195 /* 2337 *The following section stores information on previous settings in2338 *hidden fields, to be retrieved when the form is verified.2196 The following section stores information on previous settings in 2197 hidden fields, to be retrieved when the form is verified. 2339 2198 */ 2340 2199 // Add forward action id … … 2372 2231 String filterVal = null; 2373 2232 /* 2374 *Note that the list and hash maps may be null here, even2375 *though filter list size > 0. This happens after the form has2376 *been displayed, and a following action verifies the form to2377 *have the form fields filled in with data stored in the2378 *request.2233 Note that the list and hash maps may be null here, even 2234 though filter list size > 0. This happens after the form has 2235 been displayed, and a following action verifies the form to 2236 have the form fields filled in with data stored in the 2237 request. 2379 2238 */ 2380 2239 if (getFilterKeyColumnList() != null) … … 2442 2301 2443 2302 /** 2444 *Get generic form for object.2445 *2446 *@param template template for generic form2447 *@return Form for editing the object2303 Get generic form for object. 2304 2305 @param template template for generic form 2306 @return Form for editing the object 2448 2307 */ 2449 2308 public Form getForm(Template template) 2450 2309 { 2451 2310 /*********************************************************************** 2452 *Analyze template2311 Analyze template 2453 2312 */ 2454 2313 Form form = null; … … 2462 2321 2463 2322 /** 2464 *Get generic form for object.2465 *2466 *@param template template for generic form2467 *@return Form for editing the object2323 Get generic form for object. 2324 2325 @param template template for generic form 2326 @return Form for editing the object 2468 2327 */ 2469 2328 private Form getFormImpl(FormTemplateInterface formTemplate) 2470 2329 { 2471 2330 /*********************************************************************** 2472 *Analyze object class2331 Analyze object class 2473 2332 */ 2474 2333 2475 2334 /* 2476 *Get class from formTemplate itemObject or itemClass.2335 Get class from formTemplate itemObject or itemClass. 2477 2336 */ 2478 2337 Object itemObject = null; … … 2488 2347 } 2489 2348 /* 2490 *Add optional extra formTemplate list of methods to be excluded.2349 Add optional extra formTemplate list of methods to be excluded. 2491 2350 */ 2492 2351 if (formTemplate != null && formTemplate.getExcludedDeclMethods() != null) … … 2501 2360 2502 2361 /*********************************************************************** 2503 *Main fieldset2362 Main fieldset 2504 2363 */ 2505 2364 Fieldset mainFS = new Fieldset(); … … 2507 2366 mainFS.setTitle(mainFsName); 2508 2367 /* 2509 *Add forward actionId field as first field, for external use.2368 Add forward actionId field as first field, for external use. 2510 2369 */ 2511 2370 TextField<String> fwdactionF = new ForwardField(); 2512 2371 mainFS.add(fwdactionF); 2513 2372 /* 2514 *Get item id, if any.2373 Get item id, if any. 2515 2374 */ 2516 2375 int itemId = 0; … … 2541 2400 } 2542 2401 /* 2543 *Add itemId field idF (hidden) if itemId value ok.2402 Add itemId field idF (hidden) if itemId value ok. 2544 2403 */ 2545 2404 if (itemId > 0) … … 2552 2411 } 2553 2412 /* 2554 *Add class name field cnF.2413 Add class name field cnF. 2555 2414 */ 2556 2415 String classNameFull = new String(""); … … 2566 2425 cnF.setDisabled(true); 2567 2426 /* 2568 *Add readOnlyForm field rofF (hidden).2427 Add readOnlyForm field rofF (hidden). 2569 2428 */ 2570 2429 TextField<Boolean> rofF = newHiddenReadOnlyFormField(); … … 2574 2433 rofF.setDisabled(true); 2575 2434 /* 2576 *Keep track on whether public setter methods exist, in order to know2577 *if a "Save" button should be added.2435 Keep track on whether public setter methods exist, in order to know 2436 if a "Save" button should be added. 2578 2437 */ 2579 2438 boolean hasSetterMethods = false; 2580 2439 /* 2581 *Methods, declared and inherited2440 Methods, declared and inherited 2582 2441 */ 2583 2442 Method[] methodArr = new Method[0]; … … 2588 2447 2589 2448 /* 2590 *Methods declared in object class (not inherited)2449 Methods declared in object class (not inherited) 2591 2450 */ 2592 2451 Method[] declaredMethodArr = new Method[0]; … … 2602 2461 String methodReturnType = method.getReturnType().getName(); 2603 2462 /* 2604 *Only process declared methods not in exclude list.2463 Only process declared methods not in exclude list. 2605 2464 */ 2606 2465 if (!getExcludedDeclMethods().contains(methodName)) … … 2612 2471 Class<?> returnTypeOfGetterMethod = null; 2613 2472 /* 2614 *Check if getter access method.2473 Check if getter access method. 2615 2474 */ 2616 2475 if (methodName.startsWith("get")) 2617 2476 { 2618 2477 /* 2619 *Assume that attribute name can optained by skipping "get"2620 *in method name.2478 Assume that attribute name can optained by skipping "get" 2479 in method name. 2621 2480 */ 2622 2481 attrName = methodName.substring(3); … … 2639 2498 { 2640 2499 /* 2641 *Assume that attribute name can optained by skipping "is"2642 *in method name.2500 Assume that attribute name can optained by skipping "is" 2501 in method name. 2643 2502 */ 2644 2503 attrName = methodName.substring(2); … … 2664 2523 { 2665 2524 /* 2666 *Return date values in "YYYY-MM-DD HH:mm:ss"2667 *24-hour format.2525 Return date values in "YYYY-MM-DD HH:mm:ss" 2526 24-hour format. 2668 2527 */ 2669 2528 if (method.getReturnType().getName().equals( … … 2695 2554 } 2696 2555 /* 2697 *Check if public accessor method for setting value exists.2556 Check if public accessor method for setting value exists. 2698 2557 */ 2699 2558 boolean isSettable = false; … … 2710 2569 .debug("FormFactory::getFormImpl(): attrName = \"" + attrName + "\" publMethodName = \"" + publMethodName + "\" isSettable = " + isSettable); 2711 2570 /* 2712 *Use TextArea for Description, else TextField2571 Use TextArea for Description, else TextField 2713 2572 */ 2714 2573 if (attrName.equals("Description")) 2715 2574 { 2716 2575 /* 2717 *Value text area2576 Value text area 2718 2577 */ 2719 2578 TextArea valueF = null; … … 2735 2594 { 2736 2595 /* 2737 *Value field2596 Value field 2738 2597 */ 2739 2598 TextField<String> valueF = null; … … 2757 2616 2758 2617 /* 2759 *Check if object supports method getAnnotationSet().2618 Check if object supports method getAnnotationSet(). 2760 2619 */ 2761 2620 Fieldset annotationFS = null; … … 2773 2632 { 2774 2633 /*************************************************************** 2775 *Annotation fieldset2634 Annotation fieldset 2776 2635 */ 2777 2636 annotationFS = new Fieldset(); 2778 2637 annotationFS.setTitle("Annotations"); 2779 2638 /* 2780 *Get DbControl2639 Get DbControl 2781 2640 */ 2782 2641 DbControl dc = getDbControlForObject(itemObject); 2783 2642 /* 2784 *Fetch annotations2643 Fetch annotations 2785 2644 */ 2786 2645 if (itemObject != null) … … 2794 2653 { 2795 2654 /* 2796 *Only add annotations that contain something.2655 Only add annotations that contain something. 2797 2656 */ 2798 2657 String value = joinAnnotationValues(a); … … 2800 2659 { 2801 2660 /* 2802 *Value (description) field - optional scroll2803 *bar2661 Value (description) field - optional scroll 2662 bar 2804 2663 */ 2805 2664 TextArea descrF = new DescriptionField(); … … 2826 2685 } 2827 2686 /*********************************************************************** 2828 *Form2687 Form 2829 2688 */ 2830 2689 String formName = new String("newForm"); … … 2837 2696 form.setTitle(clsName); 2838 2697 /*********************************************************************** 2839 *Add fieldsets to form2698 Add fieldsets to form 2840 2699 */ 2841 2700 form.addFieldset(mainFS); … … 2845 2704 } 2846 2705 /* 2847 *Return generated form.2706 Return generated form. 2848 2707 */ 2849 2708 return form; … … 2851 2710 2852 2711 /** 2853 *Get DbControl for object.2854 *2855 *@return DbControl for the object2712 Get DbControl for object. 2713 2714 @return DbControl for the object 2856 2715 */ 2857 2716 public DbControl getDbControlForObject(Object itemObject) 2858 2717 { 2859 2718 /* 2860 *Get class from itemObject.2719 Get class from itemObject. 2861 2720 */ 2862 2721 Class<? extends Object> cls = null; … … 2871 2730 String clsName = cls.getSimpleName(); 2872 2731 /* 2873 *Check if object supports method getDbControl().2732 Check if object supports method getDbControl(). 2874 2733 */ 2875 2734 DbControl dc = null; … … 2882 2741 { 2883 2742 /* 2884 *Get DbControl for object2743 Get DbControl for object 2885 2744 */ 2886 2745 try … … 2903 2762 } 2904 2763 /* 2905 *Return DbControl.2764 Return DbControl. 2906 2765 */ 2907 2766 return dc; … … 2909 2768 2910 2769 /** 2911 *Fetch public method for object, or null if not found.2912 *2913 *@param publMethodName String Name of public method to search for.2914 *@return Method public method for object with desired name, or null if not2915 *found.2770 Fetch public method for object, or null if not found. 2771 2772 @param publMethodName String Name of public method to search for. 2773 @return Method public method for object with desired name, or null if not 2774 found. 2916 2775 */ 2917 2776 private Method fetchPublicMethodForObject(String publMethodName, … … 2924 2783 String clsName = cls.getSimpleName(); 2925 2784 /* 2926 *Check if object supports public method with desired name.2785 Check if object supports public method with desired name. 2927 2786 */ 2928 2787 Method publMethod = null; … … 2935 2794 { 2936 2795 /* 2937 *Check if method is public.2796 Check if method is public. 2938 2797 */ 2939 2798 int methodMod = method.getModifiers(); … … 2948 2807 2949 2808 /** 2950 *Returns a String corresponding to the method modifier: "static",2951 *"public", "protected", or "private".2952 *2953 *@param method2954 *@return String for method modifier2809 Returns a String corresponding to the method modifier: "static", 2810 "public", "protected", or "private". 2811 2812 @param method 2813 @return String for method modifier 2955 2814 */ 2956 2815 private String methodModifierString(Method method) … … 2990 2849 2991 2850 /** 2992 *Form for new Protocol item. The difference between calling2993 *getNewProtocolForm(protocol) and getForm(Protocol.class, protocol) when2994 *protocol != null, is that getForm(Protocol.class, protocol) assumes that2995 *the protocol argument is stored in the database, i.e. that2996 *protocol.getId() is a valid item id, that can be used as value for a2997 *newIdField(), without an exception being thrown. Method2998 *getNewProtocolForm() on the other hand only uses the protocol argument as2999 *a convenient place holder for default values for the Protocol form3000 *fields.3001 *3002 *@param protocol Protocol object (need not be stored in database) with3003 *default field values.3004 *@return Form A form for setting protocol values.2851 Form for new Protocol item. The difference between calling 2852 getNewProtocolForm(protocol) and getForm(Protocol.class, protocol) when 2853 protocol != null, is that getForm(Protocol.class, protocol) assumes that 2854 the protocol argument is stored in the database, i.e. that 2855 protocol.getId() is a valid item id, that can be used as value for a 2856 newIdField(), without an exception being thrown. Method 2857 getNewProtocolForm() on the other hand only uses the protocol argument as 2858 a convenient place holder for default values for the Protocol form 2859 fields. 2860 2861 @param protocol Protocol object (need not be stored in database) with 2862 default field values. 2863 @return Form A form for setting protocol values. 3005 2864 */ 3006 2865 public Form getNewProtocolForm(Protocol protocol) … … 3267 3126 // Forward field 3268 3127 /* 3269 *This hidden forward field sets action id used by the directory3270 *selection action called by MoveFile1.3128 This hidden forward field sets action id used by the directory 3129 selection action called by MoveFile1. 3271 3130 */ 3272 3131 TextField<String> forwardF = new ForwardField(); … … 3515 3374 3516 3375 /** 3517 *Creates a select box for protocols. If the class for which the protocol3518 *is intended is supported by the method, only protocols with correct3519 *protocol type are included. If an input object with attached protocol3520 *exists, the latter protocol should appear in the list and be selected, if3521 *if the protocol is tagged to be removed. However, no other protocols3522 *tagged to be removed should be included in the list.3523 *3524 *@param cls Class Class for which a protocol should be selected.3525 *@param obj Object Optional object with attached protocol for setting3526 *default protocol.3527 *@return Select<VInteger> Select box for protocol selection3376 Creates a select box for protocols. If the class for which the protocol 3377 is intended is supported by the method, only protocols with correct 3378 protocol type are included. If an input object with attached protocol 3379 exists, the latter protocol should appear in the list and be selected, if 3380 if the protocol is tagged to be removed. However, no other protocols 3381 tagged to be removed should be included in the list. 3382 3383 @param cls Class Class for which a protocol should be selected. 3384 @param obj Object Optional object with attached protocol for setting 3385 default protocol. 3386 @return Select<VInteger> Select box for protocol selection 3528 3387 */ 3529 3388 private Select<VInteger> getProtocolSelectBox(Class cls, Object obj)
Note: See TracChangeset
for help on using the changeset viewer.