Changeset 1353
- Timestamp:
- 02/07/14 11:41:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogTextInputPseudomizer.java
r1277 r1353 39 39 * pseudomizes the text entered in text input events by replacing it with an MD5 hash. For this, it 40 40 * parses a given file and dumps a replacement, in which all text input events have an MD5 hash 41 * as entered text. If the events already have an MD5 hash, it stays unchanged. 41 * as entered text. If the events already have an MD5 hash, it stays unchanged. Providing the 42 * parameters to the constructor, it can be decided to pseudomize text entries into file and search 43 * input fields, as well. 42 44 * </p> 43 45 * … … 50 52 /** 51 53 * <p> 54 * Indicator if search input fields must be pseudomized, as well. 55 * </p> 56 */ 57 private boolean pseudomizeSearchInputs = false; 58 59 /** 60 * <p> 61 * Indicator if file input fields must be pseudomized, as well. 62 * </p> 63 */ 64 private boolean pseudomizeFileInputs = false; 65 66 /** 67 * <p> 52 68 * The output writer into which the pseudomized variant of the log file is written 53 69 * </p> … … 68 84 */ 69 85 private List<EventEntry> sortedEvents = new LinkedList<EventEntry>(); 86 87 /** 88 * <p> 89 * creates the input pseudomizer with the switches, if text inputs into file and search fields 90 * shall be pseudomized, as well. 91 * </p> 92 * 93 * @param pseudomizeSearchInputs true, if inputs into search fields shall be pseudomized, as 94 * well; false else 95 * @param pseudomizeFileInputs true, if inputs into file fields shall be pseudomized, as well; 96 * false else 97 */ 98 public HTMLLogTextInputPseudomizer(boolean pseudomizeSearchInputs, 99 boolean pseudomizeFileInputs) 100 { 101 this.pseudomizeSearchInputs = pseudomizeSearchInputs; 102 this.pseudomizeFileInputs = pseudomizeFileInputs; 103 } 70 104 71 105 /** … … 199 233 dumpParam(param.getKey(), param.getValue()); 200 234 201 if ("tagname".equals(param.getKey()) && "input_text".equals(param.getValue())) { 202 textInputFieldIds.add(id); 235 if ("tagname".equals(param.getKey())) { 236 if ("input_text".equals(param.getValue()) || 237 (pseudomizeSearchInputs && "input_search".equals(param.getValue())) || 238 (pseudomizeFileInputs && "input_file".equals(param.getValue()))) 239 { 240 textInputFieldIds.add(id); 241 } 203 242 } 204 243 }
Note: See TracChangeset
for help on using the changeset viewer.