Changeset 1076 for trunk/autoquest-htmlmonitor/src/main/java/de
- Timestamp:
- 02/15/13 15:23:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlGUIElementManager.java
r1075 r1076 25 25 /** 26 26 * <p> 27 * TODO comment 27 * This class is used to calculate unique ids for GUI elements and to reuse GUI element objects. 28 * For this it provides appropriate create methods. If there is already a GUI element for the 29 * given parameters, it is reused. Otherwise, a new one is instantiated with a unique id and 30 * returned. 28 31 * </p> 29 32 * … … 32 35 class HtmlGUIElementManager { 33 36 34 /** */ 37 /** 38 * an internal map for GUI elements and their respective ids. 39 */ 35 40 private Map<String, HtmlGUIElement> idMap = new HashMap<String, HtmlGUIElement>(); 36 41 … … 41 46 /** 42 47 * <p> 43 * TODO: comment 44 * </p> 45 * 48 * creates a new or reuses an existing GUI element representing a server 49 * </p> 50 * 51 * @param name the name of the server to represent (must not be null) 52 * @param port the port on the server via which the communication is done 53 * 54 * @return a new or reuses an existing GUI element representing a server 46 55 */ 47 56 HtmlServer createHtmlServer(String name, int port) { … … 68 77 /** 69 78 * <p> 70 * TODO: comment 71 * </p> 72 * 79 * creates a new or reuses an existing GUI element representing a document (web page) 80 * </p> 81 * 82 * @param server the server on which the document resides (must not be null) 83 * @param path the path of the document on the web server (every following the server spec 84 * in the URL, must not be null) 85 * @param query the query part of the URL pointing to the document 86 * @param title the title of the document if available 87 * 88 * @return a new or reuses an existing GUI element representing a document 73 89 */ 74 90 HtmlDocument createHtmlDocument(HtmlServer server, String path, String query, String title) { … … 98 114 /** 99 115 * <p> 100 * TODO: comment 101 * </p> 102 * 103 * @param document 104 * @param parent 105 * @param tagName 106 * @param htmlid 107 * @param index 108 * @return 116 * creates a new or reuses an existing GUI element representing an HTML tag in a document 117 * </p> 118 * 119 * @param document the document to which the HTML tag belongs (must not be null) 120 * @param parent the parent tag, if any 121 * @param tagName the name of the HTML tag (must not be null) 122 * @param htmlId the document wide unique id of the tag, if available 123 * @param index if no HTML id is present, the index of the tag regarding all children in 124 * the same parent having the same tag name. 125 * 126 * @return a new or reuses an existing GUI element representing an HTML tag 109 127 */ 110 128 HtmlPageElement createHtmlPageElement(HtmlDocument document, … … 153 171 /** 154 172 * <p> 155 * TODO: comment 156 * </p> 157 * 158 * @param document 159 * @param domPath 160 * @return 173 * determines the HTML tag belonging to the given document and residing in the document at the 174 * location denoted by the path. The path must be equal to the return value of the 175 * {@link HtmlPageElement#getDOMPath()} method. 176 * </p> 177 * 178 * @param document the document to which the searched tag belongs 179 * @param domPath the path through the DOM where the searched tag resists 180 * 181 * @return the appropriate HTML tag or null, if none is known 161 182 */ 162 183 HtmlPageElement getPageElement(HtmlDocument document, String domPath) { … … 176 197 /** 177 198 * <p> 178 * TODO: comment179 * </p> 180 * 181 * @param name182 * @param string183 * @return 199 * calculates a unique id for the given string fragments using SHA-512 and Base64 encoding. 200 * </p> 201 * 202 * @param fragments strings to be used for calculating a unique id 203 * 204 * @return a Base64 encoded unique id for the provided fragments 184 205 */ 185 206 private String calculateId(String... fragments) {
Note: See TracChangeset
for help on using the changeset viewer.