Changeset 1022 for trunk/autoquest-htmlmonitor
- Timestamp:
- 12/14/12 16:16:16 (12 years ago)
- Location:
- trunk/autoquest-htmlmonitor/src/main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorMessageListener.java
r1019 r1022 31 31 * </p> 32 32 * 33 * @param clientInfos infos about the client that send the events34 * @param TODO comment35 * @param events the received events33 * @param clientInfos infos about the client that send the events 34 * @param guiStructure infos about the structure of the web page that was observed 35 * @param events the received events 36 36 */ 37 37 void handleMessage(HtmlClientInfos clientInfos, -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java
r1019 r1022 208 208 /** 209 209 * <p> 210 * TODO: comment 211 * </p> 212 * 213 * @param guiStructure 210 * dumps the GUI structure provided by the parameter into the log file. Calls itself 211 * recursively to traverse the GUI structure. 212 * </p> 213 * 214 * @param guiStructure the GUI structure to be logged 214 215 */ 215 216 private void dumpGuiStructure(HtmlPageElement guiStructure) { … … 267 268 /** 268 269 * <p> 269 * TODO: comment 270 * </p> 271 * 272 * @param string 273 * @param integer 270 * dumps a parameter with the given name and value to the log file. The result is a 271 * tag named param with a name attribute and a value attribute. The value is transformed 272 * to a String if it is no String already. Furthermore, an XML entity replacement is performed 273 * if required. 274 * </p> 275 * 276 * @param name the name of the parameter to be dumped 277 * @param value the value of the parameter to be dumped 274 278 */ 275 279 private void dumpParam(String name, Object value) { -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServlet.java
r1019 r1022 333 333 /** 334 334 * <p> 335 * TODO: comment 336 * </p> 337 * 338 * @param message 339 * @param clientInfos 340 * @return 335 * extracts the GUI structure from the provided JSON object. 336 * </p> 337 * 338 * @param object the JSON object to extract the GUI structure from 339 * @param clientInfos infos about the client who send the data 340 * 341 * @return the GUI structure extracted from the JSON object of which the root node is a 342 * representation of the server of the HTML page that was observed 341 343 */ 342 344 private HtmlPageElement extractHtmlPageElements(JSONObject object, … … 354 356 /** 355 357 * <p> 356 * TODO: comment 357 * </p> 358 * 359 * @param clientInfos 360 * @return 358 * instantiates an element of the GUI structure representing the server of the observed 359 * web page 360 * </p> 361 * 362 * @param clientInfos infos about the client who send the data 363 * 364 * @return as described 361 365 */ 362 366 private HtmlPageElement getServerElement(HtmlClientInfos clientInfos) { … … 371 375 /** 372 376 * <p> 373 * TODO: comment 374 * </p> 375 * 376 * @param clientInfos 377 * instantiates an element of the GUI structure representing the observed web page. Adds 378 * this element to the provided server as child. 379 * </p> 380 * 381 * @param clientInfos infos about the client who send the data 382 * @param server the server on which the page represented by the return value resists 383 * 384 * @return as described 377 385 */ 378 386 private HtmlPageElement getPageElementRepresentingWebPage(HtmlClientInfos clientInfos, … … 395 403 /** 396 404 * <p> 397 * TODO: comment 398 * </p> 399 * 400 * @param jsonPageElement 401 * @return 405 * converts a JSON object representing an HTML page element to an HTML page element. Calls 406 * itself recursively to also convert the children of the element, if any. 407 * </p> 408 * 409 * @param jsonPageElement the JSON object to be converted 410 * @param parentPath the path through the DOM of the parent HTML page element of the 411 * converted one 412 * 413 * @return as described. 402 414 */ 403 415 private HtmlPageElement convert(JSONObject jsonPageElement, String parentPath) { -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlPageElement.java
r1019 r1022 20 20 /** 21 21 * <p> 22 * TODO comment 22 * represents an element of an HTML GUI. This can be a server, which is usually the root of a 23 * GUI structure, a web page, or a tag within a web page. 23 24 * </p> 24 25 * … … 28 29 29 30 /** 30 * 31 * path to the parent of this page element or null, if this is the root element 31 32 */ 32 33 private String parentPath; 33 34 34 35 /** 35 * 36 * the name of the tag represented by this page element. May also be the name of the server 37 * or the page. 36 38 */ 37 39 private String tagName; 38 40 39 41 /** 40 * 42 * the id of the page element. May also be the name of the server including port number or the 43 * URL of the page 41 44 */ 42 45 private String id; 43 46 44 47 /** 45 * 48 * the title of the page if a page is represented through this element 46 49 */ 47 50 private String title; 48 51 49 52 /** 50 * 53 * the index of this element regarding all elements with the same tag name in the list of 54 * children of the parent element 51 55 */ 52 56 private Integer index; 53 57 54 58 /** 55 * 59 * the children of this element 56 60 */ 57 61 private List<HtmlPageElement> children; … … 59 63 /** 60 64 * <p> 61 * TODO: comment 62 * </p> 63 * 64 * @param tagName 65 * @param index 66 * @param id 67 * @param children 65 * instantiates a new element representing a tag in an HTML page 66 * </p> 67 * 68 * @param parentPath the path through the DOM to the parent node of the represented tag 69 * @param tagName the name of the represented tag 70 * @param id the id of the tag in the DOM 71 * @param index the index of the represented tag regarding all tags with the same tag name 72 * in the list of children of the parent tag 68 73 */ 69 74 HtmlPageElement(String parentPath, String tagName, String id, Integer index) { … … 76 81 /** 77 82 * <p> 78 * TODO: comment 79 * </p> 80 * 81 * @param tagName 82 * @param index 83 * @param id 84 * @param children 83 * instantiates a new element representing an HTML page 84 * </p> 85 * 86 * @param parentPath the path through the DOM to the parent node of the represented tag which is 87 * usually a server 88 * @param tagName the name of the represented tag which is the path of the web page 89 * @param title the title of the web page 90 * @param id the id of the web page which is its path 91 * @param index usually 0 85 92 */ 86 93 HtmlPageElement(String parentPath, String tagName, String id, String title, Integer index) { … … 90 97 91 98 /** 99 * <p> 100 * returns the name of the tag represented by this page element. May also be the name of the 101 * server or the page. 102 * </p> 103 * 92 104 * @return the tagName 93 105 */ … … 97 109 98 110 /** 111 * <p> 112 * returns the id of the page element. May also be the name of the server including port 113 * number or the URL of the page 114 * </p> 115 * 99 116 * @return the id 100 117 */ … … 104 121 105 122 /** 123 * <p> 124 * returns the title of the page if a page is represented through this element 125 * </p> 126 * 106 127 * @return the title 107 128 */ … … 111 132 112 133 /** 134 * <p> 135 * returns the index of this element regarding all elements with the same tag name in the list 136 * of children of the parent element 137 * </p> 138 * 113 139 * @return the index 114 140 */ … … 118 144 119 145 /** 146 * <p> 147 * returns the children of this element if any, null else 148 * </p> 149 * 120 150 * @return the children 121 151 */ … … 126 156 127 157 /** 128 * 158 * adds a child to this element 159 * 160 * @param child the child to be added 129 161 */ 130 162 void addChild(HtmlPageElement child) { … … 140 172 /** 141 173 * <p> 142 * TODO: comment143 * </p> 144 * 145 * @return 174 * returns the path to the parent of this page element or null, if this is the root element 175 * </p> 176 * 177 * @return as described 146 178 */ 147 179 String getParentPath() { … … 151 183 /** 152 184 * <p> 153 * TODO: comment 154 * </p> 155 * 156 * @return 185 * calculates and returns the path to the represented page element through the DOM. Includes 186 * the parent path if any. The represented element is included in the path with its tag name 187 * and its id if it has one, or its index. 188 * </p> 189 * 190 * @return as described 157 191 */ 158 192 String getPath() { -
trunk/autoquest-htmlmonitor/src/main/js/autoquest-htmlmonitor.js
r1021 r1022 342 342 343 343 /** 344 * TODO comment 344 * adds event handling functionality to the provided node. Calls 345 * {@link #addEventHandlingWithJQuery(node,parentPath)} or 346 * {@link #addEventHandlingWithoutJQuery(node,parentPath)} depending on the fact if jQuery is 347 * available and must therefore be used, or not. 348 * 349 * @param node the node of the DOM structure that shall be equipped with event handling 350 * @param parentPath the path to the parent node of the provided node within the DOM-structure of 351 * the HTML-site 345 352 */ 346 353 function addEventHandling(node, parentPath) { … … 354 361 355 362 /** 356 * TODO comment 363 * adds event handling functionality to the provided node using onxxx attributes 364 * 365 * @param node the node of the DOM structure that shall be equipped with event handling 366 * @param parentPath the path to the parent node of the provided node within the DOM-structure of 367 * the HTML-site 357 368 */ 358 369 function addEventHandlingWithoutJQuery(node, parentPath) { … … 372 383 373 384 /** 374 * TODO comment 385 * adds event handling functionality to the provided node using jQuery attributes. If the node 386 * already used onxxx attributes, these are extended instead of using jQuery. 387 * 388 * @param node the node of the DOM structure that shall be equipped with event handling 389 * @param parentPath the path to the parent node of the provided node within the DOM-structure of 390 * the HTML-site 375 391 */ 376 392 function addEventHandlingWithJQuery(node, parentPath) { … … 406 422 407 423 /** 408 * TODO comment 424 * adapts the event handling attributed provided by the action parameter so that it calls 425 * the {@link #handleEvent(node, action, path, even)} function in the case the event occurs. 426 * Either the method creates an appropriate onxxx attribute on the node if there is none, or it 427 * adds a call to the function as first thing called by the onxxx attribute. 428 * 429 * @param node the node of the DOM structure that shall be equipped with event handling 430 * @param nodePath the path to node within the DOM-structure of the HTML-site 431 * @param action the event for which event handling shall be enabled 409 432 */ 410 433 function adaptEventHandlingAttribute(node, nodePath, action) {
Note: See TracChangeset
for help on using the changeset viewer.