From 7426e84a2b372f65e983bf900262f496a67e2980 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Sat, 4 Nov 2023 23:56:21 -0300 Subject: [PATCH 1/9] Your commit message here --- .../AbstractConfigurationCapability.java | 2 +- .../org/codehaus/cargo/container/DtdTest.java | 69 + .../container/packager/PackagerTypeTest.java | 30 + .../packager/DefaultPackagerFactory.java | 2 - .../generic/packager/PackagerFactory.java | 3 - .../container/jetty/JettyFactoryRegistry.java | 1 - .../tomcat/TomcatFactoryRegistry.java | 1 - .../container/tomee/TomeeFactoryRegistry.java | 1 - .../HasDirectoryPackagerValidator.java | 1 - .../cargo/sample/java/PackagerTest.java | 2 - .../cargo/maven3/configuration/Packager.java | 1 - htmlReport/css/coverage.css | 154 ++ htmlReport/css/idea.min.css | 118 ++ htmlReport/img/arrowDown.gif | Bin 0 -> 89 bytes htmlReport/img/arrowUp.gif | Bin 0 -> 91 bytes htmlReport/index.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_BLOCK.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_BLOCK_DESC.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_CLASS.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_CLASS_DESC.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_LINE.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_LINE_DESC.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_METHOD.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_METHOD_DESC.html | 1303 ++++++++++++++++ htmlReport/index_SORT_BY_NAME_DESC.html | 1303 ++++++++++++++++ htmlReport/js/highlight.min.js | 1388 +++++++++++++++++ htmlReport/js/highlightjs-line-numbers.min.js | 24 + htmlReport/ns-1/index.html | 197 +++ htmlReport/ns-1/index_SORT_BY_BLOCK.html | 197 +++ htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-1/index_SORT_BY_CLASS.html | 197 +++ htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-1/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-1/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-1/index_SORT_BY_METHOD.html | 197 +++ .../ns-1/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-1/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-1/sources/source-1.html | 149 ++ htmlReport/ns-1/sources/source-2.html | 250 +++ htmlReport/ns-1/sources/source-3.html | 209 +++ htmlReport/ns-1/sources/source-4.html | 104 ++ htmlReport/ns-1/sources/source-5.html | 124 ++ htmlReport/ns-1/sources/source-6.html | 127 ++ htmlReport/ns-1/sources/source-7.html | 112 ++ htmlReport/ns-1/sources/source-8.html | 114 ++ htmlReport/ns-1/sources/source-9.html | 122 ++ htmlReport/ns-1/sources/source-a.html | 117 ++ htmlReport/ns-10/index.html | 170 ++ htmlReport/ns-10/index_SORT_BY_BLOCK.html | 170 ++ .../ns-10/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-10/index_SORT_BY_CLASS.html | 170 ++ .../ns-10/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-10/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-10/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-10/index_SORT_BY_METHOD.html | 170 ++ .../ns-10/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-10/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-10/sources/source-1.html | 258 +++ htmlReport/ns-10/sources/source-2.html | 294 ++++ htmlReport/ns-11/index.html | 170 ++ htmlReport/ns-11/index_SORT_BY_BLOCK.html | 170 ++ .../ns-11/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-11/index_SORT_BY_CLASS.html | 170 ++ .../ns-11/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-11/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-11/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-11/index_SORT_BY_METHOD.html | 170 ++ .../ns-11/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-11/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-11/sources/source-1.html | 272 ++++ htmlReport/ns-11/sources/source-2.html | 183 +++ htmlReport/ns-12/index.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_BLOCK.html | 359 +++++ .../ns-12/index_SORT_BY_BLOCK_DESC.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_CLASS.html | 359 +++++ .../ns-12/index_SORT_BY_CLASS_DESC.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_LINE.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_LINE_DESC.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_METHOD.html | 359 +++++ .../ns-12/index_SORT_BY_METHOD_DESC.html | 359 +++++ htmlReport/ns-12/index_SORT_BY_NAME_DESC.html | 359 +++++ htmlReport/ns-12/sources/source-1.html | 378 +++++ htmlReport/ns-12/sources/source-2.html | 352 +++++ htmlReport/ns-12/sources/source-3.html | 151 ++ htmlReport/ns-12/sources/source-4.html | 151 ++ htmlReport/ns-12/sources/source-5.html | 590 +++++++ htmlReport/ns-12/sources/source-6.html | 173 ++ htmlReport/ns-12/sources/source-7.html | 164 ++ htmlReport/ns-12/sources/source-8.html | 211 +++ htmlReport/ns-12/sources/source-9.html | 232 +++ htmlReport/ns-13/index.html | 251 +++ htmlReport/ns-13/index_SORT_BY_BLOCK.html | 251 +++ .../ns-13/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-13/index_SORT_BY_CLASS.html | 251 +++ .../ns-13/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-13/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-13/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-13/index_SORT_BY_METHOD.html | 251 +++ .../ns-13/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-13/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-13/sources/source-1.html | 987 ++++++++++++ htmlReport/ns-13/sources/source-2.html | 171 ++ htmlReport/ns-13/sources/source-3.html | 205 +++ htmlReport/ns-13/sources/source-4.html | 151 ++ htmlReport/ns-13/sources/source-5.html | 210 +++ htmlReport/ns-13/sources/source-6.html | 104 ++ htmlReport/ns-13/sources/source-7.html | 287 ++++ htmlReport/ns-14/index.html | 143 ++ htmlReport/ns-14/index_SORT_BY_BLOCK.html | 143 ++ .../ns-14/index_SORT_BY_BLOCK_DESC.html | 143 ++ htmlReport/ns-14/index_SORT_BY_CLASS.html | 143 ++ .../ns-14/index_SORT_BY_CLASS_DESC.html | 143 ++ htmlReport/ns-14/index_SORT_BY_LINE.html | 143 ++ htmlReport/ns-14/index_SORT_BY_LINE_DESC.html | 143 ++ htmlReport/ns-14/index_SORT_BY_METHOD.html | 143 ++ .../ns-14/index_SORT_BY_METHOD_DESC.html | 143 ++ htmlReport/ns-14/index_SORT_BY_NAME_DESC.html | 143 ++ htmlReport/ns-14/sources/source-1.html | 249 +++ htmlReport/ns-15/index.html | 197 +++ htmlReport/ns-15/index_SORT_BY_BLOCK.html | 197 +++ .../ns-15/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-15/index_SORT_BY_CLASS.html | 197 +++ .../ns-15/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-15/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-15/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-15/index_SORT_BY_METHOD.html | 197 +++ .../ns-15/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-15/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-15/sources/source-1.html | 206 +++ htmlReport/ns-15/sources/source-2.html | 193 +++ htmlReport/ns-15/sources/source-3.html | 175 +++ htmlReport/ns-16/index.html | 143 ++ htmlReport/ns-16/index_SORT_BY_BLOCK.html | 143 ++ .../ns-16/index_SORT_BY_BLOCK_DESC.html | 143 ++ htmlReport/ns-16/index_SORT_BY_CLASS.html | 143 ++ .../ns-16/index_SORT_BY_CLASS_DESC.html | 143 ++ htmlReport/ns-16/index_SORT_BY_LINE.html | 143 ++ htmlReport/ns-16/index_SORT_BY_LINE_DESC.html | 143 ++ htmlReport/ns-16/index_SORT_BY_METHOD.html | 143 ++ .../ns-16/index_SORT_BY_METHOD_DESC.html | 143 ++ htmlReport/ns-16/index_SORT_BY_NAME_DESC.html | 143 ++ htmlReport/ns-16/sources/source-1.html | 199 +++ htmlReport/ns-17/index.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_BLOCK.html | 467 ++++++ .../ns-17/index_SORT_BY_BLOCK_DESC.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_CLASS.html | 467 ++++++ .../ns-17/index_SORT_BY_CLASS_DESC.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_LINE.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_LINE_DESC.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_METHOD.html | 467 ++++++ .../ns-17/index_SORT_BY_METHOD_DESC.html | 467 ++++++ htmlReport/ns-17/index_SORT_BY_NAME_DESC.html | 467 ++++++ htmlReport/ns-17/sources/source-1.html | 641 ++++++++ htmlReport/ns-17/sources/source-10.html | 168 ++ htmlReport/ns-17/sources/source-11.html | 134 ++ htmlReport/ns-17/sources/source-12.html | 108 ++ htmlReport/ns-17/sources/source-13.html | 109 ++ htmlReport/ns-17/sources/source-14.html | 135 ++ htmlReport/ns-17/sources/source-15.html | 104 ++ htmlReport/ns-17/sources/source-2.html | 354 +++++ htmlReport/ns-17/sources/source-3.html | 342 ++++ htmlReport/ns-17/sources/source-4.html | 385 +++++ htmlReport/ns-17/sources/source-5.html | 176 +++ htmlReport/ns-17/sources/source-6.html | 332 ++++ htmlReport/ns-17/sources/source-7.html | 314 ++++ htmlReport/ns-17/sources/source-8.html | 169 ++ htmlReport/ns-17/sources/source-9.html | 213 +++ htmlReport/ns-17/sources/source-a.html | 180 +++ htmlReport/ns-17/sources/source-b.html | 263 ++++ htmlReport/ns-17/sources/source-c.html | 182 +++ htmlReport/ns-17/sources/source-d.html | 153 ++ htmlReport/ns-17/sources/source-e.html | 95 ++ htmlReport/ns-17/sources/source-f.html | 145 ++ htmlReport/ns-18/index.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_BLOCK.html | 278 ++++ .../ns-18/index_SORT_BY_BLOCK_DESC.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_CLASS.html | 278 ++++ .../ns-18/index_SORT_BY_CLASS_DESC.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_LINE.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_LINE_DESC.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_METHOD.html | 278 ++++ .../ns-18/index_SORT_BY_METHOD_DESC.html | 278 ++++ htmlReport/ns-18/index_SORT_BY_NAME_DESC.html | 278 ++++ htmlReport/ns-18/sources/source-1.html | 332 ++++ htmlReport/ns-18/sources/source-2.html | 332 ++++ htmlReport/ns-18/sources/source-3.html | 205 +++ htmlReport/ns-18/sources/source-4.html | 185 +++ htmlReport/ns-18/sources/source-5.html | 267 ++++ htmlReport/ns-18/sources/source-6.html | 216 +++ htmlReport/ns-18/sources/source-7.html | 132 ++ htmlReport/ns-19/index.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_BLOCK.html | 359 +++++ .../ns-19/index_SORT_BY_BLOCK_DESC.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_CLASS.html | 359 +++++ .../ns-19/index_SORT_BY_CLASS_DESC.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_LINE.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_LINE_DESC.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_METHOD.html | 359 +++++ .../ns-19/index_SORT_BY_METHOD_DESC.html | 359 +++++ htmlReport/ns-19/index_SORT_BY_NAME_DESC.html | 359 +++++ htmlReport/ns-19/sources/source-1.html | 273 ++++ htmlReport/ns-19/sources/source-2.html | 259 +++ htmlReport/ns-19/sources/source-3.html | 277 ++++ htmlReport/ns-19/sources/source-4.html | 235 +++ htmlReport/ns-19/sources/source-5.html | 181 +++ htmlReport/ns-19/sources/source-6.html | 171 ++ htmlReport/ns-19/sources/source-7.html | 252 +++ htmlReport/ns-19/sources/source-8.html | 131 ++ htmlReport/ns-19/sources/source-9.html | 131 ++ htmlReport/ns-19/sources/source-a.html | 104 ++ htmlReport/ns-19/sources/source-b.html | 108 ++ htmlReport/ns-1a/index.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_BLOCK.html | 224 +++ .../ns-1a/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_CLASS.html | 224 +++ .../ns-1a/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_METHOD.html | 224 +++ .../ns-1a/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-1a/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-1a/sources/source-1.html | 206 +++ htmlReport/ns-1a/sources/source-2.html | 159 ++ htmlReport/ns-1a/sources/source-3.html | 172 ++ htmlReport/ns-1a/sources/source-4.html | 167 ++ htmlReport/ns-1b/index.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_BLOCK.html | 197 +++ .../ns-1b/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_CLASS.html | 197 +++ .../ns-1b/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_METHOD.html | 197 +++ .../ns-1b/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-1b/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-1b/sources/source-1.html | 245 +++ htmlReport/ns-1b/sources/source-2.html | 160 ++ htmlReport/ns-1b/sources/source-3.html | 159 ++ htmlReport/ns-1c/index.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_BLOCK.html | 224 +++ .../ns-1c/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_CLASS.html | 224 +++ .../ns-1c/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_METHOD.html | 224 +++ .../ns-1c/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-1c/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-1c/sources/source-1.html | 250 +++ htmlReport/ns-1c/sources/source-2.html | 160 ++ htmlReport/ns-1c/sources/source-3.html | 177 +++ htmlReport/ns-1c/sources/source-4.html | 171 ++ htmlReport/ns-1d/index.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_BLOCK.html | 224 +++ .../ns-1d/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_CLASS.html | 224 +++ .../ns-1d/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_METHOD.html | 224 +++ .../ns-1d/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-1d/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-1d/sources/source-1.html | 201 +++ htmlReport/ns-1d/sources/source-2.html | 147 ++ htmlReport/ns-1d/sources/source-3.html | 160 ++ htmlReport/ns-1d/sources/source-4.html | 156 ++ htmlReport/ns-1e/index.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_BLOCK.html | 251 +++ .../ns-1e/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_CLASS.html | 251 +++ .../ns-1e/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_METHOD.html | 251 +++ .../ns-1e/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-1e/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-1e/sources/source-1.html | 497 ++++++ htmlReport/ns-1e/sources/source-2.html | 216 +++ htmlReport/ns-1e/sources/source-3.html | 320 ++++ htmlReport/ns-1e/sources/source-4.html | 303 ++++ htmlReport/ns-1e/sources/source-5.html | 149 ++ htmlReport/ns-1e/sources/source-6.html | 110 ++ htmlReport/ns-1e/sources/source-7.html | 111 ++ htmlReport/ns-1f/index.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_BLOCK.html | 197 +++ .../ns-1f/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_CLASS.html | 197 +++ .../ns-1f/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_METHOD.html | 197 +++ .../ns-1f/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-1f/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-1f/sources/source-1.html | 173 ++ htmlReport/ns-1f/sources/source-2.html | 188 +++ htmlReport/ns-1f/sources/source-3.html | 318 ++++ htmlReport/ns-1f/sources/source-4.html | 124 ++ htmlReport/ns-2/index.html | 170 ++ htmlReport/ns-2/index_SORT_BY_BLOCK.html | 170 ++ htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-2/index_SORT_BY_CLASS.html | 170 ++ htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-2/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-2/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-2/index_SORT_BY_METHOD.html | 170 ++ .../ns-2/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-2/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-2/sources/source-1.html | 234 +++ htmlReport/ns-2/sources/source-2.html | 342 ++++ htmlReport/ns-2/sources/source-3.html | 170 ++ htmlReport/ns-2/sources/source-4.html | 142 ++ htmlReport/ns-2/sources/source-5.html | 97 ++ htmlReport/ns-2/sources/source-6.html | 108 ++ htmlReport/ns-2/sources/source-7.html | 99 ++ htmlReport/ns-2/sources/source-8.html | 225 +++ htmlReport/ns-20/index.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_BLOCK.html | 521 +++++++ .../ns-20/index_SORT_BY_BLOCK_DESC.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_CLASS.html | 521 +++++++ .../ns-20/index_SORT_BY_CLASS_DESC.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_LINE.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_LINE_DESC.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_METHOD.html | 521 +++++++ .../ns-20/index_SORT_BY_METHOD_DESC.html | 521 +++++++ htmlReport/ns-20/index_SORT_BY_NAME_DESC.html | 521 +++++++ htmlReport/ns-20/sources/source-1.html | 419 +++++ htmlReport/ns-20/sources/source-10.html | 121 ++ htmlReport/ns-20/sources/source-11.html | 103 ++ htmlReport/ns-20/sources/source-2.html | 340 ++++ htmlReport/ns-20/sources/source-3.html | 179 +++ htmlReport/ns-20/sources/source-4.html | 269 ++++ htmlReport/ns-20/sources/source-5.html | 243 +++ htmlReport/ns-20/sources/source-6.html | 168 ++ htmlReport/ns-20/sources/source-7.html | 251 +++ htmlReport/ns-20/sources/source-8.html | 168 ++ htmlReport/ns-20/sources/source-9.html | 168 ++ htmlReport/ns-20/sources/source-a.html | 327 ++++ htmlReport/ns-20/sources/source-b.html | 179 +++ htmlReport/ns-20/sources/source-c.html | 415 +++++ htmlReport/ns-20/sources/source-d.html | 346 ++++ htmlReport/ns-20/sources/source-e.html | 1236 +++++++++++++++ htmlReport/ns-20/sources/source-f.html | 346 ++++ htmlReport/ns-21/index.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_BLOCK.html | 413 +++++ .../ns-21/index_SORT_BY_BLOCK_DESC.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_CLASS.html | 413 +++++ .../ns-21/index_SORT_BY_CLASS_DESC.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_LINE.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_LINE_DESC.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_METHOD.html | 413 +++++ .../ns-21/index_SORT_BY_METHOD_DESC.html | 413 +++++ htmlReport/ns-21/index_SORT_BY_NAME_DESC.html | 413 +++++ htmlReport/ns-21/sources/source-1.html | 152 ++ htmlReport/ns-21/sources/source-2.html | 191 +++ htmlReport/ns-21/sources/source-3.html | 227 +++ htmlReport/ns-21/sources/source-4.html | 221 +++ htmlReport/ns-21/sources/source-5.html | 192 +++ htmlReport/ns-21/sources/source-6.html | 150 ++ htmlReport/ns-21/sources/source-7.html | 182 +++ htmlReport/ns-21/sources/source-8.html | 141 ++ htmlReport/ns-21/sources/source-9.html | 193 +++ htmlReport/ns-21/sources/source-a.html | 193 +++ htmlReport/ns-21/sources/source-b.html | 171 ++ htmlReport/ns-22/index.html | 251 +++ htmlReport/ns-22/index_SORT_BY_BLOCK.html | 251 +++ .../ns-22/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-22/index_SORT_BY_CLASS.html | 251 +++ .../ns-22/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-22/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-22/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-22/index_SORT_BY_METHOD.html | 251 +++ .../ns-22/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-22/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-22/sources/source-1.html | 218 +++ htmlReport/ns-22/sources/source-2.html | 217 +++ htmlReport/ns-22/sources/source-3.html | 163 ++ htmlReport/ns-22/sources/source-4.html | 192 +++ htmlReport/ns-22/sources/source-5.html | 171 ++ htmlReport/ns-23/index.html | 251 +++ htmlReport/ns-23/index_SORT_BY_BLOCK.html | 251 +++ .../ns-23/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-23/index_SORT_BY_CLASS.html | 251 +++ .../ns-23/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-23/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-23/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-23/index_SORT_BY_METHOD.html | 251 +++ .../ns-23/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-23/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-23/sources/source-1.html | 227 +++ htmlReport/ns-23/sources/source-2.html | 183 +++ htmlReport/ns-23/sources/source-3.html | 455 ++++++ htmlReport/ns-23/sources/source-4.html | 240 +++ htmlReport/ns-23/sources/source-5.html | 509 ++++++ htmlReport/ns-24/index.html | 197 +++ htmlReport/ns-24/index_SORT_BY_BLOCK.html | 197 +++ .../ns-24/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-24/index_SORT_BY_CLASS.html | 197 +++ .../ns-24/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-24/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-24/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-24/index_SORT_BY_METHOD.html | 197 +++ .../ns-24/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-24/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-24/sources/source-1.html | 178 +++ htmlReport/ns-24/sources/source-2.html | 170 ++ htmlReport/ns-24/sources/source-3.html | 157 ++ htmlReport/ns-25/index.html | 251 +++ htmlReport/ns-25/index_SORT_BY_BLOCK.html | 251 +++ .../ns-25/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-25/index_SORT_BY_CLASS.html | 251 +++ .../ns-25/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-25/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-25/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-25/index_SORT_BY_METHOD.html | 251 +++ .../ns-25/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-25/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-25/sources/source-1.html | 237 +++ htmlReport/ns-25/sources/source-2.html | 161 ++ htmlReport/ns-25/sources/source-3.html | 175 +++ htmlReport/ns-25/sources/source-4.html | 182 +++ htmlReport/ns-25/sources/source-5.html | 167 ++ htmlReport/ns-26/index.html | 197 +++ htmlReport/ns-26/index_SORT_BY_BLOCK.html | 197 +++ .../ns-26/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-26/index_SORT_BY_CLASS.html | 197 +++ .../ns-26/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-26/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-26/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-26/index_SORT_BY_METHOD.html | 197 +++ .../ns-26/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-26/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-26/sources/source-1.html | 170 ++ htmlReport/ns-26/sources/source-2.html | 190 +++ htmlReport/ns-26/sources/source-3.html | 184 +++ htmlReport/ns-27/index.html | 251 +++ htmlReport/ns-27/index_SORT_BY_BLOCK.html | 251 +++ .../ns-27/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-27/index_SORT_BY_CLASS.html | 251 +++ .../ns-27/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-27/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-27/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-27/index_SORT_BY_METHOD.html | 251 +++ .../ns-27/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-27/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-27/sources/source-1.html | 224 +++ htmlReport/ns-27/sources/source-2.html | 160 ++ htmlReport/ns-27/sources/source-3.html | 167 ++ htmlReport/ns-27/sources/source-4.html | 165 ++ htmlReport/ns-27/sources/source-5.html | 218 +++ htmlReport/ns-28/index.html | 224 +++ htmlReport/ns-28/index_SORT_BY_BLOCK.html | 224 +++ .../ns-28/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-28/index_SORT_BY_CLASS.html | 224 +++ .../ns-28/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-28/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-28/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-28/index_SORT_BY_METHOD.html | 224 +++ .../ns-28/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-28/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-28/sources/source-1.html | 194 +++ htmlReport/ns-28/sources/source-2.html | 161 ++ htmlReport/ns-28/sources/source-3.html | 294 ++++ htmlReport/ns-28/sources/source-4.html | 188 +++ htmlReport/ns-29/index.html | 224 +++ htmlReport/ns-29/index_SORT_BY_BLOCK.html | 224 +++ .../ns-29/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-29/index_SORT_BY_CLASS.html | 224 +++ .../ns-29/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-29/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-29/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-29/index_SORT_BY_METHOD.html | 224 +++ .../ns-29/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-29/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-29/sources/source-1.html | 192 +++ htmlReport/ns-29/sources/source-2.html | 172 ++ htmlReport/ns-29/sources/source-3.html | 160 ++ htmlReport/ns-29/sources/source-4.html | 152 ++ htmlReport/ns-2a/index.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_BLOCK.html | 413 +++++ .../ns-2a/index_SORT_BY_BLOCK_DESC.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_CLASS.html | 413 +++++ .../ns-2a/index_SORT_BY_CLASS_DESC.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_LINE.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_LINE_DESC.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_METHOD.html | 413 +++++ .../ns-2a/index_SORT_BY_METHOD_DESC.html | 413 +++++ htmlReport/ns-2a/index_SORT_BY_NAME_DESC.html | 413 +++++ htmlReport/ns-2a/sources/source-1.html | 207 +++ htmlReport/ns-2a/sources/source-2.html | 1223 +++++++++++++++ htmlReport/ns-2a/sources/source-3.html | 248 +++ htmlReport/ns-2a/sources/source-4.html | 177 +++ htmlReport/ns-2a/sources/source-5.html | 547 +++++++ htmlReport/ns-2a/sources/source-6.html | 234 +++ htmlReport/ns-2a/sources/source-7.html | 282 ++++ htmlReport/ns-2a/sources/source-8.html | 199 +++ htmlReport/ns-2a/sources/source-9.html | 349 +++++ htmlReport/ns-2a/sources/source-a.html | 433 +++++ htmlReport/ns-2a/sources/source-b.html | 203 +++ htmlReport/ns-2a/sources/source-c.html | 151 ++ htmlReport/ns-2b/index.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_BLOCK.html | 143 ++ .../ns-2b/index_SORT_BY_BLOCK_DESC.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_CLASS.html | 143 ++ .../ns-2b/index_SORT_BY_CLASS_DESC.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_LINE.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_LINE_DESC.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_METHOD.html | 143 ++ .../ns-2b/index_SORT_BY_METHOD_DESC.html | 143 ++ htmlReport/ns-2b/index_SORT_BY_NAME_DESC.html | 143 ++ htmlReport/ns-2b/sources/source-1.html | 224 +++ htmlReport/ns-2c/index.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_BLOCK.html | 251 +++ .../ns-2c/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_CLASS.html | 251 +++ .../ns-2c/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_METHOD.html | 251 +++ .../ns-2c/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-2c/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-2c/sources/source-1.html | 208 +++ htmlReport/ns-2c/sources/source-2.html | 275 ++++ htmlReport/ns-2c/sources/source-3.html | 153 ++ htmlReport/ns-2c/sources/source-4.html | 141 ++ htmlReport/ns-2c/sources/source-5.html | 141 ++ htmlReport/ns-2c/sources/source-6.html | 134 ++ htmlReport/ns-2c/sources/source-7.html | 104 ++ htmlReport/ns-2d/index.html | 68 + htmlReport/ns-2d/index_SORT_BY_BLOCK.html | 68 + .../ns-2d/index_SORT_BY_BLOCK_DESC.html | 68 + htmlReport/ns-2d/index_SORT_BY_CLASS.html | 68 + .../ns-2d/index_SORT_BY_CLASS_DESC.html | 68 + htmlReport/ns-2d/index_SORT_BY_LINE.html | 68 + htmlReport/ns-2d/index_SORT_BY_LINE_DESC.html | 68 + htmlReport/ns-2d/index_SORT_BY_METHOD.html | 68 + .../ns-2d/index_SORT_BY_METHOD_DESC.html | 68 + htmlReport/ns-2d/index_SORT_BY_NAME_DESC.html | 68 + htmlReport/ns-2d/sources/source-1.html | 101 ++ htmlReport/ns-2e/index.html | 68 + htmlReport/ns-2e/index_SORT_BY_BLOCK.html | 68 + .../ns-2e/index_SORT_BY_BLOCK_DESC.html | 68 + htmlReport/ns-2e/index_SORT_BY_CLASS.html | 68 + .../ns-2e/index_SORT_BY_CLASS_DESC.html | 68 + htmlReport/ns-2e/index_SORT_BY_LINE.html | 68 + htmlReport/ns-2e/index_SORT_BY_LINE_DESC.html | 68 + htmlReport/ns-2e/index_SORT_BY_METHOD.html | 68 + .../ns-2e/index_SORT_BY_METHOD_DESC.html | 68 + htmlReport/ns-2e/index_SORT_BY_NAME_DESC.html | 68 + htmlReport/ns-2e/sources/source-1.html | 139 ++ htmlReport/ns-2e/sources/source-2.html | 115 ++ htmlReport/ns-3/index.html | 170 ++ htmlReport/ns-3/index_SORT_BY_BLOCK.html | 170 ++ htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-3/index_SORT_BY_CLASS.html | 170 ++ htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-3/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-3/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-3/index_SORT_BY_METHOD.html | 170 ++ .../ns-3/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-3/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-3/sources/source-1.html | 501 ++++++ htmlReport/ns-3/sources/source-2.html | 274 ++++ htmlReport/ns-3/sources/source-3.html | 110 ++ htmlReport/ns-3/sources/source-4.html | 112 ++ htmlReport/ns-4/index.html | 197 +++ htmlReport/ns-4/index_SORT_BY_BLOCK.html | 197 +++ htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html | 197 +++ htmlReport/ns-4/index_SORT_BY_CLASS.html | 197 +++ htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html | 197 +++ htmlReport/ns-4/index_SORT_BY_LINE.html | 197 +++ htmlReport/ns-4/index_SORT_BY_LINE_DESC.html | 197 +++ htmlReport/ns-4/index_SORT_BY_METHOD.html | 197 +++ .../ns-4/index_SORT_BY_METHOD_DESC.html | 197 +++ htmlReport/ns-4/index_SORT_BY_NAME_DESC.html | 197 +++ htmlReport/ns-4/sources/source-1.html | 220 +++ htmlReport/ns-4/sources/source-2.html | 165 ++ htmlReport/ns-4/sources/source-3.html | 215 +++ htmlReport/ns-4/sources/source-4.html | 107 ++ htmlReport/ns-5/index.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_BLOCK.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_CLASS.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_LINE.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_LINE_DESC.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_METHOD.html | 413 +++++ .../ns-5/index_SORT_BY_METHOD_DESC.html | 413 +++++ htmlReport/ns-5/index_SORT_BY_NAME_DESC.html | 413 +++++ htmlReport/ns-5/sources/source-1.html | 149 ++ htmlReport/ns-5/sources/source-2.html | 150 ++ htmlReport/ns-5/sources/source-3.html | 150 ++ htmlReport/ns-5/sources/source-4.html | 278 ++++ htmlReport/ns-5/sources/source-5.html | 236 +++ htmlReport/ns-5/sources/source-6.html | 149 ++ htmlReport/ns-5/sources/source-7.html | 153 ++ htmlReport/ns-5/sources/source-8.html | 149 ++ htmlReport/ns-5/sources/source-9.html | 150 ++ htmlReport/ns-5/sources/source-a.html | 151 ++ htmlReport/ns-5/sources/source-b.html | 313 ++++ htmlReport/ns-5/sources/source-c.html | 125 ++ htmlReport/ns-6/index.html | 224 +++ htmlReport/ns-6/index_SORT_BY_BLOCK.html | 224 +++ htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html | 224 +++ htmlReport/ns-6/index_SORT_BY_CLASS.html | 224 +++ htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html | 224 +++ htmlReport/ns-6/index_SORT_BY_LINE.html | 224 +++ htmlReport/ns-6/index_SORT_BY_LINE_DESC.html | 224 +++ htmlReport/ns-6/index_SORT_BY_METHOD.html | 224 +++ .../ns-6/index_SORT_BY_METHOD_DESC.html | 224 +++ htmlReport/ns-6/index_SORT_BY_NAME_DESC.html | 224 +++ htmlReport/ns-6/sources/source-1.html | 203 +++ htmlReport/ns-6/sources/source-2.html | 282 ++++ htmlReport/ns-6/sources/source-3.html | 231 +++ htmlReport/ns-6/sources/source-4.html | 250 +++ htmlReport/ns-6/sources/source-5.html | 122 ++ htmlReport/ns-6/sources/source-6.html | 105 ++ htmlReport/ns-6/sources/source-7.html | 197 +++ htmlReport/ns-7/index.html | 170 ++ htmlReport/ns-7/index_SORT_BY_BLOCK.html | 170 ++ htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-7/index_SORT_BY_CLASS.html | 170 ++ htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-7/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-7/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-7/index_SORT_BY_METHOD.html | 170 ++ .../ns-7/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-7/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-7/sources/source-1.html | 438 ++++++ htmlReport/ns-7/sources/source-2.html | 703 +++++++++ htmlReport/ns-7/sources/source-3.html | 108 ++ htmlReport/ns-8/index.html | 170 ++ htmlReport/ns-8/index_SORT_BY_BLOCK.html | 170 ++ htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-8/index_SORT_BY_CLASS.html | 170 ++ htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-8/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-8/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-8/index_SORT_BY_METHOD.html | 170 ++ .../ns-8/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-8/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-8/sources/source-1.html | 150 ++ htmlReport/ns-8/sources/source-2.html | 149 ++ htmlReport/ns-8/sources/source-3.html | 157 ++ htmlReport/ns-8/sources/source-4.html | 153 ++ htmlReport/ns-9/index.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_BLOCK.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_CLASS.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_LINE.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_LINE_DESC.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_METHOD.html | 278 ++++ .../ns-9/index_SORT_BY_METHOD_DESC.html | 278 ++++ htmlReport/ns-9/index_SORT_BY_NAME_DESC.html | 278 ++++ htmlReport/ns-9/sources/source-1.html | 194 +++ htmlReport/ns-9/sources/source-2.html | 215 +++ htmlReport/ns-9/sources/source-3.html | 930 +++++++++++ htmlReport/ns-9/sources/source-4.html | 205 +++ htmlReport/ns-9/sources/source-5.html | 200 +++ htmlReport/ns-9/sources/source-6.html | 165 ++ htmlReport/ns-9/sources/source-7.html | 114 ++ htmlReport/ns-a/index.html | 170 ++ htmlReport/ns-a/index_SORT_BY_BLOCK.html | 170 ++ htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html | 170 ++ htmlReport/ns-a/index_SORT_BY_CLASS.html | 170 ++ htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html | 170 ++ htmlReport/ns-a/index_SORT_BY_LINE.html | 170 ++ htmlReport/ns-a/index_SORT_BY_LINE_DESC.html | 170 ++ htmlReport/ns-a/index_SORT_BY_METHOD.html | 170 ++ .../ns-a/index_SORT_BY_METHOD_DESC.html | 170 ++ htmlReport/ns-a/index_SORT_BY_NAME_DESC.html | 170 ++ htmlReport/ns-a/sources/source-1.html | 289 ++++ htmlReport/ns-a/sources/source-2.html | 204 +++ htmlReport/ns-b/index.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_BLOCK.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_CLASS.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_LINE.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_LINE_DESC.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_METHOD.html | 278 ++++ .../ns-b/index_SORT_BY_METHOD_DESC.html | 278 ++++ htmlReport/ns-b/index_SORT_BY_NAME_DESC.html | 278 ++++ htmlReport/ns-b/sources/source-1.html | 240 +++ htmlReport/ns-b/sources/source-2.html | 320 ++++ htmlReport/ns-b/sources/source-3.html | 247 +++ htmlReport/ns-b/sources/source-4.html | 152 ++ htmlReport/ns-b/sources/source-5.html | 332 ++++ htmlReport/ns-b/sources/source-6.html | 387 +++++ htmlReport/ns-c/index.html | 143 ++ htmlReport/ns-c/index_SORT_BY_BLOCK.html | 143 ++ htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html | 143 ++ htmlReport/ns-c/index_SORT_BY_CLASS.html | 143 ++ htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html | 143 ++ htmlReport/ns-c/index_SORT_BY_LINE.html | 143 ++ htmlReport/ns-c/index_SORT_BY_LINE_DESC.html | 143 ++ htmlReport/ns-c/index_SORT_BY_METHOD.html | 143 ++ .../ns-c/index_SORT_BY_METHOD_DESC.html | 143 ++ htmlReport/ns-c/index_SORT_BY_NAME_DESC.html | 143 ++ htmlReport/ns-c/sources/source-1.html | 215 +++ htmlReport/ns-c/sources/source-2.html | 105 ++ htmlReport/ns-d/index.html | 251 +++ htmlReport/ns-d/index_SORT_BY_BLOCK.html | 251 +++ htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-d/index_SORT_BY_CLASS.html | 251 +++ htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-d/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-d/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-d/index_SORT_BY_METHOD.html | 251 +++ .../ns-d/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-d/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-d/sources/source-1.html | 293 ++++ htmlReport/ns-d/sources/source-2.html | 204 +++ htmlReport/ns-d/sources/source-3.html | 308 ++++ htmlReport/ns-d/sources/source-4.html | 220 +++ htmlReport/ns-d/sources/source-5.html | 388 +++++ htmlReport/ns-d/sources/source-6.html | 154 ++ htmlReport/ns-d/sources/source-7.html | 156 ++ htmlReport/ns-d/sources/source-8.html | 133 ++ htmlReport/ns-d/sources/source-9.html | 114 ++ htmlReport/ns-d/sources/source-a.html | 118 ++ htmlReport/ns-d/sources/source-b.html | 108 ++ htmlReport/ns-e/index.html | 251 +++ htmlReport/ns-e/index_SORT_BY_BLOCK.html | 251 +++ htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html | 251 +++ htmlReport/ns-e/index_SORT_BY_CLASS.html | 251 +++ htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html | 251 +++ htmlReport/ns-e/index_SORT_BY_LINE.html | 251 +++ htmlReport/ns-e/index_SORT_BY_LINE_DESC.html | 251 +++ htmlReport/ns-e/index_SORT_BY_METHOD.html | 251 +++ .../ns-e/index_SORT_BY_METHOD_DESC.html | 251 +++ htmlReport/ns-e/index_SORT_BY_NAME_DESC.html | 251 +++ htmlReport/ns-e/sources/source-1.html | 134 ++ htmlReport/ns-e/sources/source-2.html | 234 +++ htmlReport/ns-e/sources/source-3.html | 951 +++++++++++ htmlReport/ns-e/sources/source-4.html | 688 ++++++++ htmlReport/ns-e/sources/source-5.html | 186 +++ htmlReport/ns-f/index.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_BLOCK.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_CLASS.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_LINE.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_LINE_DESC.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_METHOD.html | 413 +++++ .../ns-f/index_SORT_BY_METHOD_DESC.html | 413 +++++ htmlReport/ns-f/index_SORT_BY_NAME_DESC.html | 413 +++++ htmlReport/ns-f/sources/source-1.html | 230 +++ htmlReport/ns-f/sources/source-2.html | 175 +++ htmlReport/ns-f/sources/source-3.html | 152 ++ htmlReport/ns-f/sources/source-4.html | 143 ++ htmlReport/ns-f/sources/source-5.html | 903 +++++++++++ htmlReport/ns-f/sources/source-6.html | 151 ++ htmlReport/ns-f/sources/source-7.html | 143 ++ htmlReport/ns-f/sources/source-8.html | 146 ++ htmlReport/ns-f/sources/source-9.html | 470 ++++++ htmlReport/ns-f/sources/source-a.html | 149 ++ htmlReport/ns-f/sources/source-b.html | 156 ++ htmlReport/ns-f/sources/source-c.html | 102 ++ 759 files changed, 187817 insertions(+), 13 deletions(-) create mode 100644 core/api/container/src/test/java/org/codehaus/cargo/container/DtdTest.java create mode 100644 core/api/container/src/test/java/org/codehaus/cargo/container/packager/PackagerTypeTest.java create mode 100644 htmlReport/css/coverage.css create mode 100644 htmlReport/css/idea.min.css create mode 100644 htmlReport/img/arrowDown.gif create mode 100644 htmlReport/img/arrowUp.gif create mode 100644 htmlReport/index.html create mode 100644 htmlReport/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/index_SORT_BY_CLASS.html create mode 100644 htmlReport/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/index_SORT_BY_LINE.html create mode 100644 htmlReport/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/index_SORT_BY_METHOD.html create mode 100644 htmlReport/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/js/highlight.min.js create mode 100644 htmlReport/js/highlightjs-line-numbers.min.js create mode 100644 htmlReport/ns-1/index.html create mode 100644 htmlReport/ns-1/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1/sources/source-1.html create mode 100644 htmlReport/ns-1/sources/source-2.html create mode 100644 htmlReport/ns-1/sources/source-3.html create mode 100644 htmlReport/ns-1/sources/source-4.html create mode 100644 htmlReport/ns-1/sources/source-5.html create mode 100644 htmlReport/ns-1/sources/source-6.html create mode 100644 htmlReport/ns-1/sources/source-7.html create mode 100644 htmlReport/ns-1/sources/source-8.html create mode 100644 htmlReport/ns-1/sources/source-9.html create mode 100644 htmlReport/ns-1/sources/source-a.html create mode 100644 htmlReport/ns-10/index.html create mode 100644 htmlReport/ns-10/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-10/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-10/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-10/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-10/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-10/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-10/sources/source-1.html create mode 100644 htmlReport/ns-10/sources/source-2.html create mode 100644 htmlReport/ns-11/index.html create mode 100644 htmlReport/ns-11/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-11/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-11/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-11/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-11/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-11/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-11/sources/source-1.html create mode 100644 htmlReport/ns-11/sources/source-2.html create mode 100644 htmlReport/ns-12/index.html create mode 100644 htmlReport/ns-12/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-12/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-12/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-12/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-12/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-12/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-12/sources/source-1.html create mode 100644 htmlReport/ns-12/sources/source-2.html create mode 100644 htmlReport/ns-12/sources/source-3.html create mode 100644 htmlReport/ns-12/sources/source-4.html create mode 100644 htmlReport/ns-12/sources/source-5.html create mode 100644 htmlReport/ns-12/sources/source-6.html create mode 100644 htmlReport/ns-12/sources/source-7.html create mode 100644 htmlReport/ns-12/sources/source-8.html create mode 100644 htmlReport/ns-12/sources/source-9.html create mode 100644 htmlReport/ns-13/index.html create mode 100644 htmlReport/ns-13/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-13/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-13/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-13/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-13/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-13/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-13/sources/source-1.html create mode 100644 htmlReport/ns-13/sources/source-2.html create mode 100644 htmlReport/ns-13/sources/source-3.html create mode 100644 htmlReport/ns-13/sources/source-4.html create mode 100644 htmlReport/ns-13/sources/source-5.html create mode 100644 htmlReport/ns-13/sources/source-6.html create mode 100644 htmlReport/ns-13/sources/source-7.html create mode 100644 htmlReport/ns-14/index.html create mode 100644 htmlReport/ns-14/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-14/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-14/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-14/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-14/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-14/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-14/sources/source-1.html create mode 100644 htmlReport/ns-15/index.html create mode 100644 htmlReport/ns-15/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-15/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-15/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-15/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-15/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-15/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-15/sources/source-1.html create mode 100644 htmlReport/ns-15/sources/source-2.html create mode 100644 htmlReport/ns-15/sources/source-3.html create mode 100644 htmlReport/ns-16/index.html create mode 100644 htmlReport/ns-16/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-16/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-16/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-16/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-16/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-16/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-16/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-16/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-16/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-16/sources/source-1.html create mode 100644 htmlReport/ns-17/index.html create mode 100644 htmlReport/ns-17/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-17/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-17/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-17/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-17/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-17/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-17/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-17/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-17/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-17/sources/source-1.html create mode 100644 htmlReport/ns-17/sources/source-10.html create mode 100644 htmlReport/ns-17/sources/source-11.html create mode 100644 htmlReport/ns-17/sources/source-12.html create mode 100644 htmlReport/ns-17/sources/source-13.html create mode 100644 htmlReport/ns-17/sources/source-14.html create mode 100644 htmlReport/ns-17/sources/source-15.html create mode 100644 htmlReport/ns-17/sources/source-2.html create mode 100644 htmlReport/ns-17/sources/source-3.html create mode 100644 htmlReport/ns-17/sources/source-4.html create mode 100644 htmlReport/ns-17/sources/source-5.html create mode 100644 htmlReport/ns-17/sources/source-6.html create mode 100644 htmlReport/ns-17/sources/source-7.html create mode 100644 htmlReport/ns-17/sources/source-8.html create mode 100644 htmlReport/ns-17/sources/source-9.html create mode 100644 htmlReport/ns-17/sources/source-a.html create mode 100644 htmlReport/ns-17/sources/source-b.html create mode 100644 htmlReport/ns-17/sources/source-c.html create mode 100644 htmlReport/ns-17/sources/source-d.html create mode 100644 htmlReport/ns-17/sources/source-e.html create mode 100644 htmlReport/ns-17/sources/source-f.html create mode 100644 htmlReport/ns-18/index.html create mode 100644 htmlReport/ns-18/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-18/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-18/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-18/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-18/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-18/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-18/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-18/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-18/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-18/sources/source-1.html create mode 100644 htmlReport/ns-18/sources/source-2.html create mode 100644 htmlReport/ns-18/sources/source-3.html create mode 100644 htmlReport/ns-18/sources/source-4.html create mode 100644 htmlReport/ns-18/sources/source-5.html create mode 100644 htmlReport/ns-18/sources/source-6.html create mode 100644 htmlReport/ns-18/sources/source-7.html create mode 100644 htmlReport/ns-19/index.html create mode 100644 htmlReport/ns-19/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-19/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-19/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-19/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-19/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-19/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-19/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-19/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-19/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-19/sources/source-1.html create mode 100644 htmlReport/ns-19/sources/source-2.html create mode 100644 htmlReport/ns-19/sources/source-3.html create mode 100644 htmlReport/ns-19/sources/source-4.html create mode 100644 htmlReport/ns-19/sources/source-5.html create mode 100644 htmlReport/ns-19/sources/source-6.html create mode 100644 htmlReport/ns-19/sources/source-7.html create mode 100644 htmlReport/ns-19/sources/source-8.html create mode 100644 htmlReport/ns-19/sources/source-9.html create mode 100644 htmlReport/ns-19/sources/source-a.html create mode 100644 htmlReport/ns-19/sources/source-b.html create mode 100644 htmlReport/ns-1a/index.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1a/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1a/sources/source-1.html create mode 100644 htmlReport/ns-1a/sources/source-2.html create mode 100644 htmlReport/ns-1a/sources/source-3.html create mode 100644 htmlReport/ns-1a/sources/source-4.html create mode 100644 htmlReport/ns-1b/index.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1b/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1b/sources/source-1.html create mode 100644 htmlReport/ns-1b/sources/source-2.html create mode 100644 htmlReport/ns-1b/sources/source-3.html create mode 100644 htmlReport/ns-1c/index.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1c/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1c/sources/source-1.html create mode 100644 htmlReport/ns-1c/sources/source-2.html create mode 100644 htmlReport/ns-1c/sources/source-3.html create mode 100644 htmlReport/ns-1c/sources/source-4.html create mode 100644 htmlReport/ns-1d/index.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1d/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1d/sources/source-1.html create mode 100644 htmlReport/ns-1d/sources/source-2.html create mode 100644 htmlReport/ns-1d/sources/source-3.html create mode 100644 htmlReport/ns-1d/sources/source-4.html create mode 100644 htmlReport/ns-1e/index.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1e/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1e/sources/source-1.html create mode 100644 htmlReport/ns-1e/sources/source-2.html create mode 100644 htmlReport/ns-1e/sources/source-3.html create mode 100644 htmlReport/ns-1e/sources/source-4.html create mode 100644 htmlReport/ns-1e/sources/source-5.html create mode 100644 htmlReport/ns-1e/sources/source-6.html create mode 100644 htmlReport/ns-1e/sources/source-7.html create mode 100644 htmlReport/ns-1f/index.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-1f/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-1f/sources/source-1.html create mode 100644 htmlReport/ns-1f/sources/source-2.html create mode 100644 htmlReport/ns-1f/sources/source-3.html create mode 100644 htmlReport/ns-1f/sources/source-4.html create mode 100644 htmlReport/ns-2/index.html create mode 100644 htmlReport/ns-2/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2/sources/source-1.html create mode 100644 htmlReport/ns-2/sources/source-2.html create mode 100644 htmlReport/ns-2/sources/source-3.html create mode 100644 htmlReport/ns-2/sources/source-4.html create mode 100644 htmlReport/ns-2/sources/source-5.html create mode 100644 htmlReport/ns-2/sources/source-6.html create mode 100644 htmlReport/ns-2/sources/source-7.html create mode 100644 htmlReport/ns-2/sources/source-8.html create mode 100644 htmlReport/ns-20/index.html create mode 100644 htmlReport/ns-20/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-20/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-20/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-20/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-20/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-20/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-20/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-20/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-20/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-20/sources/source-1.html create mode 100644 htmlReport/ns-20/sources/source-10.html create mode 100644 htmlReport/ns-20/sources/source-11.html create mode 100644 htmlReport/ns-20/sources/source-2.html create mode 100644 htmlReport/ns-20/sources/source-3.html create mode 100644 htmlReport/ns-20/sources/source-4.html create mode 100644 htmlReport/ns-20/sources/source-5.html create mode 100644 htmlReport/ns-20/sources/source-6.html create mode 100644 htmlReport/ns-20/sources/source-7.html create mode 100644 htmlReport/ns-20/sources/source-8.html create mode 100644 htmlReport/ns-20/sources/source-9.html create mode 100644 htmlReport/ns-20/sources/source-a.html create mode 100644 htmlReport/ns-20/sources/source-b.html create mode 100644 htmlReport/ns-20/sources/source-c.html create mode 100644 htmlReport/ns-20/sources/source-d.html create mode 100644 htmlReport/ns-20/sources/source-e.html create mode 100644 htmlReport/ns-20/sources/source-f.html create mode 100644 htmlReport/ns-21/index.html create mode 100644 htmlReport/ns-21/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-21/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-21/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-21/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-21/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-21/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-21/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-21/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-21/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-21/sources/source-1.html create mode 100644 htmlReport/ns-21/sources/source-2.html create mode 100644 htmlReport/ns-21/sources/source-3.html create mode 100644 htmlReport/ns-21/sources/source-4.html create mode 100644 htmlReport/ns-21/sources/source-5.html create mode 100644 htmlReport/ns-21/sources/source-6.html create mode 100644 htmlReport/ns-21/sources/source-7.html create mode 100644 htmlReport/ns-21/sources/source-8.html create mode 100644 htmlReport/ns-21/sources/source-9.html create mode 100644 htmlReport/ns-21/sources/source-a.html create mode 100644 htmlReport/ns-21/sources/source-b.html create mode 100644 htmlReport/ns-22/index.html create mode 100644 htmlReport/ns-22/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-22/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-22/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-22/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-22/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-22/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-22/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-22/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-22/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-22/sources/source-1.html create mode 100644 htmlReport/ns-22/sources/source-2.html create mode 100644 htmlReport/ns-22/sources/source-3.html create mode 100644 htmlReport/ns-22/sources/source-4.html create mode 100644 htmlReport/ns-22/sources/source-5.html create mode 100644 htmlReport/ns-23/index.html create mode 100644 htmlReport/ns-23/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-23/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-23/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-23/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-23/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-23/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-23/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-23/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-23/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-23/sources/source-1.html create mode 100644 htmlReport/ns-23/sources/source-2.html create mode 100644 htmlReport/ns-23/sources/source-3.html create mode 100644 htmlReport/ns-23/sources/source-4.html create mode 100644 htmlReport/ns-23/sources/source-5.html create mode 100644 htmlReport/ns-24/index.html create mode 100644 htmlReport/ns-24/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-24/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-24/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-24/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-24/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-24/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-24/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-24/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-24/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-24/sources/source-1.html create mode 100644 htmlReport/ns-24/sources/source-2.html create mode 100644 htmlReport/ns-24/sources/source-3.html create mode 100644 htmlReport/ns-25/index.html create mode 100644 htmlReport/ns-25/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-25/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-25/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-25/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-25/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-25/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-25/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-25/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-25/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-25/sources/source-1.html create mode 100644 htmlReport/ns-25/sources/source-2.html create mode 100644 htmlReport/ns-25/sources/source-3.html create mode 100644 htmlReport/ns-25/sources/source-4.html create mode 100644 htmlReport/ns-25/sources/source-5.html create mode 100644 htmlReport/ns-26/index.html create mode 100644 htmlReport/ns-26/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-26/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-26/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-26/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-26/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-26/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-26/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-26/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-26/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-26/sources/source-1.html create mode 100644 htmlReport/ns-26/sources/source-2.html create mode 100644 htmlReport/ns-26/sources/source-3.html create mode 100644 htmlReport/ns-27/index.html create mode 100644 htmlReport/ns-27/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-27/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-27/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-27/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-27/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-27/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-27/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-27/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-27/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-27/sources/source-1.html create mode 100644 htmlReport/ns-27/sources/source-2.html create mode 100644 htmlReport/ns-27/sources/source-3.html create mode 100644 htmlReport/ns-27/sources/source-4.html create mode 100644 htmlReport/ns-27/sources/source-5.html create mode 100644 htmlReport/ns-28/index.html create mode 100644 htmlReport/ns-28/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-28/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-28/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-28/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-28/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-28/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-28/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-28/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-28/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-28/sources/source-1.html create mode 100644 htmlReport/ns-28/sources/source-2.html create mode 100644 htmlReport/ns-28/sources/source-3.html create mode 100644 htmlReport/ns-28/sources/source-4.html create mode 100644 htmlReport/ns-29/index.html create mode 100644 htmlReport/ns-29/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-29/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-29/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-29/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-29/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-29/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-29/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-29/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-29/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-29/sources/source-1.html create mode 100644 htmlReport/ns-29/sources/source-2.html create mode 100644 htmlReport/ns-29/sources/source-3.html create mode 100644 htmlReport/ns-29/sources/source-4.html create mode 100644 htmlReport/ns-2a/index.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2a/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2a/sources/source-1.html create mode 100644 htmlReport/ns-2a/sources/source-2.html create mode 100644 htmlReport/ns-2a/sources/source-3.html create mode 100644 htmlReport/ns-2a/sources/source-4.html create mode 100644 htmlReport/ns-2a/sources/source-5.html create mode 100644 htmlReport/ns-2a/sources/source-6.html create mode 100644 htmlReport/ns-2a/sources/source-7.html create mode 100644 htmlReport/ns-2a/sources/source-8.html create mode 100644 htmlReport/ns-2a/sources/source-9.html create mode 100644 htmlReport/ns-2a/sources/source-a.html create mode 100644 htmlReport/ns-2a/sources/source-b.html create mode 100644 htmlReport/ns-2a/sources/source-c.html create mode 100644 htmlReport/ns-2b/index.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2b/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2b/sources/source-1.html create mode 100644 htmlReport/ns-2c/index.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2c/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2c/sources/source-1.html create mode 100644 htmlReport/ns-2c/sources/source-2.html create mode 100644 htmlReport/ns-2c/sources/source-3.html create mode 100644 htmlReport/ns-2c/sources/source-4.html create mode 100644 htmlReport/ns-2c/sources/source-5.html create mode 100644 htmlReport/ns-2c/sources/source-6.html create mode 100644 htmlReport/ns-2c/sources/source-7.html create mode 100644 htmlReport/ns-2d/index.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2d/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2d/sources/source-1.html create mode 100644 htmlReport/ns-2e/index.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-2e/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-2e/sources/source-1.html create mode 100644 htmlReport/ns-2e/sources/source-2.html create mode 100644 htmlReport/ns-3/index.html create mode 100644 htmlReport/ns-3/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-3/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-3/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-3/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-3/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-3/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-3/sources/source-1.html create mode 100644 htmlReport/ns-3/sources/source-2.html create mode 100644 htmlReport/ns-3/sources/source-3.html create mode 100644 htmlReport/ns-3/sources/source-4.html create mode 100644 htmlReport/ns-4/index.html create mode 100644 htmlReport/ns-4/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-4/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-4/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-4/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-4/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-4/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-4/sources/source-1.html create mode 100644 htmlReport/ns-4/sources/source-2.html create mode 100644 htmlReport/ns-4/sources/source-3.html create mode 100644 htmlReport/ns-4/sources/source-4.html create mode 100644 htmlReport/ns-5/index.html create mode 100644 htmlReport/ns-5/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-5/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-5/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-5/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-5/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-5/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-5/sources/source-1.html create mode 100644 htmlReport/ns-5/sources/source-2.html create mode 100644 htmlReport/ns-5/sources/source-3.html create mode 100644 htmlReport/ns-5/sources/source-4.html create mode 100644 htmlReport/ns-5/sources/source-5.html create mode 100644 htmlReport/ns-5/sources/source-6.html create mode 100644 htmlReport/ns-5/sources/source-7.html create mode 100644 htmlReport/ns-5/sources/source-8.html create mode 100644 htmlReport/ns-5/sources/source-9.html create mode 100644 htmlReport/ns-5/sources/source-a.html create mode 100644 htmlReport/ns-5/sources/source-b.html create mode 100644 htmlReport/ns-5/sources/source-c.html create mode 100644 htmlReport/ns-6/index.html create mode 100644 htmlReport/ns-6/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-6/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-6/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-6/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-6/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-6/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-6/sources/source-1.html create mode 100644 htmlReport/ns-6/sources/source-2.html create mode 100644 htmlReport/ns-6/sources/source-3.html create mode 100644 htmlReport/ns-6/sources/source-4.html create mode 100644 htmlReport/ns-6/sources/source-5.html create mode 100644 htmlReport/ns-6/sources/source-6.html create mode 100644 htmlReport/ns-6/sources/source-7.html create mode 100644 htmlReport/ns-7/index.html create mode 100644 htmlReport/ns-7/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-7/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-7/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-7/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-7/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-7/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-7/sources/source-1.html create mode 100644 htmlReport/ns-7/sources/source-2.html create mode 100644 htmlReport/ns-7/sources/source-3.html create mode 100644 htmlReport/ns-8/index.html create mode 100644 htmlReport/ns-8/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-8/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-8/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-8/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-8/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-8/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-8/sources/source-1.html create mode 100644 htmlReport/ns-8/sources/source-2.html create mode 100644 htmlReport/ns-8/sources/source-3.html create mode 100644 htmlReport/ns-8/sources/source-4.html create mode 100644 htmlReport/ns-9/index.html create mode 100644 htmlReport/ns-9/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-9/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-9/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-9/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-9/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-9/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-9/sources/source-1.html create mode 100644 htmlReport/ns-9/sources/source-2.html create mode 100644 htmlReport/ns-9/sources/source-3.html create mode 100644 htmlReport/ns-9/sources/source-4.html create mode 100644 htmlReport/ns-9/sources/source-5.html create mode 100644 htmlReport/ns-9/sources/source-6.html create mode 100644 htmlReport/ns-9/sources/source-7.html create mode 100644 htmlReport/ns-a/index.html create mode 100644 htmlReport/ns-a/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-a/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-a/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-a/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-a/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-a/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-a/sources/source-1.html create mode 100644 htmlReport/ns-a/sources/source-2.html create mode 100644 htmlReport/ns-b/index.html create mode 100644 htmlReport/ns-b/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-b/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-b/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-b/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-b/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-b/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-b/sources/source-1.html create mode 100644 htmlReport/ns-b/sources/source-2.html create mode 100644 htmlReport/ns-b/sources/source-3.html create mode 100644 htmlReport/ns-b/sources/source-4.html create mode 100644 htmlReport/ns-b/sources/source-5.html create mode 100644 htmlReport/ns-b/sources/source-6.html create mode 100644 htmlReport/ns-c/index.html create mode 100644 htmlReport/ns-c/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-c/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-c/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-c/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-c/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-c/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-c/sources/source-1.html create mode 100644 htmlReport/ns-c/sources/source-2.html create mode 100644 htmlReport/ns-d/index.html create mode 100644 htmlReport/ns-d/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-d/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-d/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-d/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-d/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-d/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-d/sources/source-1.html create mode 100644 htmlReport/ns-d/sources/source-2.html create mode 100644 htmlReport/ns-d/sources/source-3.html create mode 100644 htmlReport/ns-d/sources/source-4.html create mode 100644 htmlReport/ns-d/sources/source-5.html create mode 100644 htmlReport/ns-d/sources/source-6.html create mode 100644 htmlReport/ns-d/sources/source-7.html create mode 100644 htmlReport/ns-d/sources/source-8.html create mode 100644 htmlReport/ns-d/sources/source-9.html create mode 100644 htmlReport/ns-d/sources/source-a.html create mode 100644 htmlReport/ns-d/sources/source-b.html create mode 100644 htmlReport/ns-e/index.html create mode 100644 htmlReport/ns-e/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-e/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-e/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-e/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-e/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-e/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-e/sources/source-1.html create mode 100644 htmlReport/ns-e/sources/source-2.html create mode 100644 htmlReport/ns-e/sources/source-3.html create mode 100644 htmlReport/ns-e/sources/source-4.html create mode 100644 htmlReport/ns-e/sources/source-5.html create mode 100644 htmlReport/ns-f/index.html create mode 100644 htmlReport/ns-f/index_SORT_BY_BLOCK.html create mode 100644 htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html create mode 100644 htmlReport/ns-f/index_SORT_BY_CLASS.html create mode 100644 htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html create mode 100644 htmlReport/ns-f/index_SORT_BY_LINE.html create mode 100644 htmlReport/ns-f/index_SORT_BY_LINE_DESC.html create mode 100644 htmlReport/ns-f/index_SORT_BY_METHOD.html create mode 100644 htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html create mode 100644 htmlReport/ns-f/index_SORT_BY_NAME_DESC.html create mode 100644 htmlReport/ns-f/sources/source-1.html create mode 100644 htmlReport/ns-f/sources/source-2.html create mode 100644 htmlReport/ns-f/sources/source-3.html create mode 100644 htmlReport/ns-f/sources/source-4.html create mode 100644 htmlReport/ns-f/sources/source-5.html create mode 100644 htmlReport/ns-f/sources/source-6.html create mode 100644 htmlReport/ns-f/sources/source-7.html create mode 100644 htmlReport/ns-f/sources/source-8.html create mode 100644 htmlReport/ns-f/sources/source-9.html create mode 100644 htmlReport/ns-f/sources/source-a.html create mode 100644 htmlReport/ns-f/sources/source-b.html create mode 100644 htmlReport/ns-f/sources/source-c.html diff --git a/core/api/container/src/main/java/org/codehaus/cargo/container/spi/configuration/AbstractConfigurationCapability.java b/core/api/container/src/main/java/org/codehaus/cargo/container/spi/configuration/AbstractConfigurationCapability.java index 2db0c298c2..7923dba2d1 100644 --- a/core/api/container/src/main/java/org/codehaus/cargo/container/spi/configuration/AbstractConfigurationCapability.java +++ b/core/api/container/src/main/java/org/codehaus/cargo/container/spi/configuration/AbstractConfigurationCapability.java @@ -25,7 +25,7 @@ import org.codehaus.cargo.container.configuration.ConfigurationCapability; /** - * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability} +F * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability} * that needs to be extended by the different configuration implementations. */ public abstract class AbstractConfigurationCapability implements ConfigurationCapability diff --git a/core/api/container/src/test/java/org/codehaus/cargo/container/DtdTest.java b/core/api/container/src/test/java/org/codehaus/cargo/container/DtdTest.java new file mode 100644 index 0000000000..a58563e46b --- /dev/null +++ b/core/api/container/src/test/java/org/codehaus/cargo/container/DtdTest.java @@ -0,0 +1,69 @@ +package org.codehaus.cargo.container; + +import junit.framework.TestCase; +import org.codehaus.cargo.module.Dtd; +import org.codehaus.cargo.module.DescriptorTag; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class DtdTest extends TestCase { + private Dtd dtd; + + protected void setUp() { + // Created a test double or mock Dtd instance for testing + dtd = createMockDtd(); + } + + public void testGetElementOrderForValidTag() { + String tagName = "ValidTag"; + + List elementOrder = dtd.getElementOrder(tagName); + + assertNotNull(elementOrder); + // Added assertions to validate the element order for the given tag + } + + public void testGetElementOrderForNonExistentTag() { + String tagName = "NonExistentTag"; + + List elementOrder = dtd.getElementOrder(tagName); + + assertNull(elementOrder); + } + + + private Dtd createMockDtd() { + // Created a mock Dtd or test double for testing + return new MockDtd(); + } + + + private class MockDtd extends Dtd { + private Map> elementOrders = new HashMap<>(); + + public MockDtd() { + super("mock.dtd"); + initializeElementOrders(); + } + + private void initializeElementOrders() { + + List validTagElementOrder = new ArrayList<>(); + + elementOrders.put("ValidTag", validTagElementOrder); + + List nonEmptyTagElementOrder = new ArrayList<>(); + + elementOrders.put("NonEmptyTag", nonEmptyTagElementOrder); + + } + + @Override + public List getElementOrder(String tagName) { + return elementOrders.get(tagName); + } + } +} diff --git a/core/api/container/src/test/java/org/codehaus/cargo/container/packager/PackagerTypeTest.java b/core/api/container/src/test/java/org/codehaus/cargo/container/packager/PackagerTypeTest.java new file mode 100644 index 0000000000..af7788ce46 --- /dev/null +++ b/core/api/container/src/test/java/org/codehaus/cargo/container/packager/PackagerTypeTest.java @@ -0,0 +1,30 @@ +package org.codehaus.cargo.container.packager; + +import junit.framework.TestCase; + +public class PackagerTypeTest extends TestCase { + public void testEquals() { + + PackagerType packagerType1 = new PackagerType("TypeA"); + + assertTrue(packagerType1.equals(packagerType1)); + + PackagerType packagerType2 = new PackagerType("TypeA"); + + assertTrue(packagerType1.equals(packagerType2)); + assertTrue(packagerType2.equals(packagerType1)); + + + PackagerType packagerType3 = new PackagerType("TypeB"); + + + assertFalse(packagerType1.equals(packagerType3)); + assertFalse(packagerType3.equals(packagerType1)); + + + assertFalse(packagerType1.equals(null)); + assertFalse(packagerType1.equals("TypeA")); + assertFalse(packagerType1.equals(new Object())); + } + +} diff --git a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java index f36d39927e..0d40a22532 100644 --- a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java +++ b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java @@ -22,8 +22,6 @@ import java.lang.reflect.Constructor; import org.codehaus.cargo.container.ContainerException; -import org.codehaus.cargo.container.packager.Packager; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.generic.AbstractFactoryRegistry; import org.codehaus.cargo.generic.internal.util.RegistrationKey; import org.codehaus.cargo.generic.internal.util.SimpleContainerIdentity; diff --git a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java index 6041f93887..509d521af9 100644 --- a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java +++ b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java @@ -19,9 +19,6 @@ */ package org.codehaus.cargo.generic.packager; -import org.codehaus.cargo.container.packager.Packager; -import org.codehaus.cargo.container.packager.PackagerType; - /** * Create a {@link org.codehaus.cargo.container.packager.Packager} instance for a given container. */ diff --git a/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java b/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java index 5a30a4b613..8e23b92c58 100644 --- a/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java +++ b/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java @@ -33,7 +33,6 @@ import org.codehaus.cargo.container.jetty.internal.JettyExistingLocalConfigurationCapability; import org.codehaus.cargo.container.jetty.internal.JettyRuntimeConfigurationCapability; import org.codehaus.cargo.container.jetty.internal.JettyStandaloneLocalConfigurationCapability; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.generic.AbstractFactoryRegistry; import org.codehaus.cargo.generic.ContainerCapabilityFactory; import org.codehaus.cargo.generic.ContainerFactory; diff --git a/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java b/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java index 851431d8d2..971c8e6309 100644 --- a/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java +++ b/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java @@ -24,7 +24,6 @@ import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployer.DeployerType; import org.codehaus.cargo.container.internal.ServletContainerCapability; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.container.tomcat.internal.Tomcat4xStandaloneLocalConfigurationCapability; import org.codehaus.cargo.container.tomcat.internal.Tomcat5xStandaloneLocalConfigurationCapability; import org.codehaus.cargo.container.tomcat.internal.Tomcat6xStandaloneLocalConfigurationCapability; diff --git a/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java b/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java index e9a53a458f..7e3042484d 100644 --- a/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java +++ b/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java @@ -23,7 +23,6 @@ import org.codehaus.cargo.container.configuration.ConfigurationType; import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployer.DeployerType; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.container.tomcat.TomcatDirectoryPackager; import org.codehaus.cargo.container.tomcat.TomcatWAR; import org.codehaus.cargo.container.tomcat.internal.TomcatExistingLocalConfigurationCapability; diff --git a/core/samples/java/src/main/java/org/codehaus/cargo/sample/java/validator/HasDirectoryPackagerValidator.java b/core/samples/java/src/main/java/org/codehaus/cargo/sample/java/validator/HasDirectoryPackagerValidator.java index bd82c4902b..e62f5f2b93 100644 --- a/core/samples/java/src/main/java/org/codehaus/cargo/sample/java/validator/HasDirectoryPackagerValidator.java +++ b/core/samples/java/src/main/java/org/codehaus/cargo/sample/java/validator/HasDirectoryPackagerValidator.java @@ -20,7 +20,6 @@ package org.codehaus.cargo.sample.java.validator; import org.codehaus.cargo.container.ContainerType; -import org.codehaus.cargo.container.packager.PackagerType; /** * Validate that the specified container has a directory packager registered. diff --git a/core/samples/java/src/test/java/org/codehaus/cargo/sample/java/PackagerTest.java b/core/samples/java/src/test/java/org/codehaus/cargo/sample/java/PackagerTest.java index 17c63e0793..90b1abc709 100644 --- a/core/samples/java/src/test/java/org/codehaus/cargo/sample/java/PackagerTest.java +++ b/core/samples/java/src/test/java/org/codehaus/cargo/sample/java/PackagerTest.java @@ -29,8 +29,6 @@ import org.codehaus.cargo.container.configuration.StandaloneLocalConfiguration; import org.codehaus.cargo.container.deployable.Deployable; import org.codehaus.cargo.container.deployable.DeployableType; -import org.codehaus.cargo.container.packager.Packager; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.container.spi.packager.AbstractDirectoryPackager; import org.codehaus.cargo.generic.DefaultContainerFactory; import org.codehaus.cargo.generic.deployable.DefaultDeployableFactory; diff --git a/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/configuration/Packager.java b/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/configuration/Packager.java index 669caaae6c..3f0e45ffa2 100644 --- a/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/configuration/Packager.java +++ b/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/configuration/Packager.java @@ -20,7 +20,6 @@ package org.codehaus.cargo.maven3.configuration; import org.apache.maven.plugin.MojoExecutionException; -import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.generic.packager.DefaultPackagerFactory; import org.codehaus.cargo.generic.packager.PackagerFactory; diff --git a/htmlReport/css/coverage.css b/htmlReport/css/coverage.css new file mode 100644 index 0000000000..cef776517f --- /dev/null +++ b/htmlReport/css/coverage.css @@ -0,0 +1,154 @@ +/* + * Copyright 2000-2021 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +* { + margin: 0; + padding: 0; +} + +body { + background-color: #fff; + font-family: helvetica neue, tahoma, arial, sans-serif; + font-size: 82%; + color: #151515; +} + +h1 { + margin: 0.5em 0; + color: #010101; + font-weight: normal; + font-size: 18px; +} + +h2 { + margin: 0.5em 0; + color: #010101; + font-weight: normal; + font-size: 16px; +} + +a { + color: #1564C2; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +span.separator { + color: #9BA9BA; + padding-left: 5px; + padding-right: 5px; +} + +div.content { + width: 99%; +} + +table.coverageStats { + width: 100%; + border-collapse: collapse; +} + +table.overallStats { + width: 20%; +} + +table.coverageStats td, table.coverageStats th { + padding: 4px 2px; + border-bottom: 1px solid #ccc; +} + +table.coverageStats th { + background-color: #959BA4; + border: none; + font-weight: bold; + text-align: left; + color: #FFF; +} + +table.coverageStats th.coverageStat { + width: 15%; +} + +table.coverageStats th a { + color: #FFF; +} + +table.coverageStats th a:hover { + text-decoration: none; +} + +table.coverageStats th.sortedDesc a { + background: url(../img/arrowDown.gif) no-repeat 100% 2px; + padding-right: 20px; +} + +table.coverageStats th.sortedAsc a { + background: url(../img/arrowUp.gif) no-repeat 100% 2px; + padding-right: 20px; +} + +div.footer { + margin: 2em .5em; + font-size: 85%; + text-align: left; + line-height: 140%; +} + +code.sourceCode { + width: 100%; + border: 1px solid #ccc; + font: normal 12px 'Menlo', 'Bitstream Vera Sans Mono', 'Courier New', 'Courier', monospace; + white-space: pre; +} + +code.sourceCode b { + font-weight: normal; +} + +code.sourceCode span.number { + color: #151515; +} + +code.sourceCode .fc { + background-color: #cfc; +} + +code.sourceCode .pc { + background-color: #ffc; +} + +code.sourceCode .nc { + background-color: #fcc; +} + +.percent, .absValue { + font-size: 90%; +} + +.percent .green, .absValue .green { + color: #32cc32; +} + +.percent .red, .absValue .red { + color: #f00; +} + +.percent .totalDiff { + color: #3f3f3f; +} diff --git a/htmlReport/css/idea.min.css b/htmlReport/css/idea.min.css new file mode 100644 index 0000000000..a8d5292bd5 --- /dev/null +++ b/htmlReport/css/idea.min.css @@ -0,0 +1,118 @@ +/* + * Copyright 2000-2021 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* +Intellij Idea-like styling (c) Vasily Polovnyov +*/ + +.hljs { + color: #000; + background: #fff; +} + +.hljs-subst, +.hljs-title { + font-weight: normal; + color: #000; +} + +.hljs-comment, +.hljs-quote { + color: #808080; + font-style: italic; +} + +.hljs-meta { + color: #808000; +} + +.hljs-tag { + background: #efefef; +} + +.hljs-section, +.hljs-name, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class { + font-weight: bold; + color: #000080; +} + +.hljs-attribute, +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: bold; + color: #0000ff; +} + +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: normal; +} + +.hljs-string { + color: #008000; + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +.hljs-doctag { + text-decoration: underline; +} + +.hljs-variable, +.hljs-template-variable { + color: #660e7a; +} + +.hljs-addition { + background: #baeeba; +} + +.hljs-deletion { + background: #ffc8bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-ln-numbers { + display: block; + float: left; + width: 3em; + border-right: 1px solid #ccc; + font-style: normal; + text-align: right; + background-color: #eee; +} diff --git a/htmlReport/img/arrowDown.gif b/htmlReport/img/arrowDown.gif new file mode 100644 index 0000000000000000000000000000000000000000..a4ac9b4b0f5eee9fc82deb7f03d0cc7f197b01c7 GIT binary patch literal 89 zcmZ?wbhEHbv%yJ&P?))?G g5?!@7agD+*@rGjs@joUks8}}Ha%HfNHz$KN0Orjd82|tP literal 0 HcmV?d00001 diff --git a/htmlReport/img/arrowUp.gif b/htmlReport/img/arrowUp.gif new file mode 100644 index 0000000000000000000000000000000000000000..d488db0089f15409b83a6f39718384cac89ea3c9 GIT binary patch literal 91 zcmZ?wbhEHbv%nBa6?))=2 j#jeJ<$W6!S$=vG=3s*2Wu3C5I!M+a(XH6zEFjxZs9OxeQ literal 0 HcmV?d00001 diff --git a/htmlReport/index.html b/htmlReport/index.html new file mode 100644 index 0000000000..69078adbcc --- /dev/null +++ b/htmlReport/index.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_BLOCK.html b/htmlReport/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..99fef1456b --- /dev/null +++ b/htmlReport/index_SORT_BY_BLOCK.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_BLOCK_DESC.html b/htmlReport/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..ee9a758073 --- /dev/null +++ b/htmlReport/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_CLASS.html b/htmlReport/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..240debb5d9 --- /dev/null +++ b/htmlReport/index_SORT_BY_CLASS.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_CLASS_DESC.html b/htmlReport/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..d3fdf75519 --- /dev/null +++ b/htmlReport/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_LINE.html b/htmlReport/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..b2a5611b7b --- /dev/null +++ b/htmlReport/index_SORT_BY_LINE.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_LINE_DESC.html b/htmlReport/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..88974cec54 --- /dev/null +++ b/htmlReport/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_METHOD.html b/htmlReport/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..f881dca92d --- /dev/null +++ b/htmlReport/index_SORT_BY_METHOD.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_METHOD_DESC.html b/htmlReport/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..16cc0bf92f --- /dev/null +++ b/htmlReport/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+
+ + + + + + + diff --git a/htmlReport/index_SORT_BY_NAME_DESC.html b/htmlReport/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..0a5ca2fc0d --- /dev/null +++ b/htmlReport/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,1303 @@ + + + + + + + Coverage Report > Summary + + + + + + +
+ + +

Overall Coverage Summary

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
all classes + + 22.6% + + + (53/235) + + + + 23.2% + + + (321/1383) + + + + 23.2% + + + (1403/6054) + +
+ +
+

Coverage Breakdown

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+
+ + + + + + + diff --git a/htmlReport/js/highlight.min.js b/htmlReport/js/highlight.min.js new file mode 100644 index 0000000000..e88731520e --- /dev/null +++ b/htmlReport/js/highlight.min.js @@ -0,0 +1,1388 @@ +/* + Highlight.js 10.7.2 (00233d63) + License: BSD-3-Clause + Copyright (c) 2006-2021, Ivan Sagalaev + + BSD 3-Clause License + + Copyright (c) 2006-2021, Ivan Sagalaev. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +var hljs=function(){"use strict";function e(t){ +return t instanceof Map?t.clear=t.delete=t.set=()=>{ +throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var i=t[n] +;"object"!=typeof i||Object.isFrozen(i)||e(i)})),t}var t=e,n=e;t.default=n +;class i{constructor(e){ +void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} +ignoreMatch(){this.isMatchIgnored=!0}}function s(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] +;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const r=e=>!!e.kind +;class l{constructor(e,t){ +this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ +this.buffer+=s(e)}openNode(e){if(!r(e))return;let t=e.kind +;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){ +r(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}class o{constructor(){this.rootNode={ +children:[]},this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} +;this.add(t),this.stack.push(t)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ +return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), +t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +o._collapse(e)})))}}class c extends o{constructor(e){super(),this.options=e} +addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} +addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root +;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ +return new l(this,this.options).value()}finalize(){return!0}}function g(e){ +return e?"string"==typeof e?e:e.source:null} +const u=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,h="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",f="\\b\\d+(\\.\\d+)?",p="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",m="\\b(0b[01]+)",b={ +begin:"\\\\[\\s\\S]",relevance:0},E={className:"string",begin:"'",end:"'", +illegal:"\\n",contains:[b]},x={className:"string",begin:'"',end:'"', +illegal:"\\n",contains:[b]},v={ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},w=(e,t,n={})=>{const i=a({className:"comment",begin:e,end:t,contains:[]},n) +;return i.contains.push(v),i.contains.push({className:"doctag", +begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),i +},y=w("//","$"),N=w("/\\*","\\*/"),R=w("#","$");var _=Object.freeze({ +__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:h,UNDERSCORE_IDENT_RE:d, +NUMBER_RE:f,C_NUMBER_RE:p,BINARY_NUMBER_RE:m, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const t=/^#![ ]*\// +;return e.binary&&(e.begin=((...e)=>e.map((e=>g(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)), +a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{ +0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:b,APOS_STRING_MODE:E, +QUOTE_STRING_MODE:x,PHRASAL_WORDS_MODE:v,COMMENT:w,C_LINE_COMMENT_MODE:y, +C_BLOCK_COMMENT_MODE:N,HASH_COMMENT_MODE:R,NUMBER_MODE:{className:"number", +begin:f,relevance:0},C_NUMBER_MODE:{className:"number",begin:p,relevance:0}, +BINARY_NUMBER_MODE:{className:"number",begin:m,relevance:0},CSS_NUMBER_MODE:{ +className:"number", +begin:f+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", +relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp", +begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[b,{begin:/\[/,end:/\]/, +relevance:0,contains:[b]}]}]},TITLE_MODE:{className:"title",begin:h,relevance:0 +},UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{ +begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ +t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function k(e,t){ +"."===e.input[e.index-1]&&t.ignoreMatch()}function M(e,t){ +t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=k,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, +void 0===e.relevance&&(e.relevance=0))}function O(e,t){ +Array.isArray(e.illegal)&&(e.illegal=((...e)=>"("+e.map((e=>g(e))).join("|")+")")(...e.illegal)) +}function A(e,t){if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function L(e,t){ +void 0===e.relevance&&(e.relevance=1)} +const I=["of","and","for","in","not","or","if","then","parent","list","value"] +;function j(e,t,n="keyword"){const i={} +;return"string"==typeof e?s(n,e.split(" ")):Array.isArray(e)?s(n,e):Object.keys(e).forEach((n=>{ +Object.assign(i,j(e[n],t,n))})),i;function s(e,n){ +t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") +;i[n[0]]=[e,B(n[0],n[1])]}))}}function B(e,t){ +return t?Number(t):(e=>I.includes(e.toLowerCase()))(e)?0:1} +function T(e,{plugins:t}){function n(t,n){ +return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class i{ +constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,t){ +t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), +this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){ +0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{let n=0 +;return e.map((e=>{n+=1;const t=n;let i=g(e),s="";for(;i.length>0;){ +const e=u.exec(i);if(!e){s+=i;break} +s+=i.substring(0,e.index),i=i.substring(e.index+e[0].length), +"\\"===e[0][0]&&e[1]?s+="\\"+(Number(e[1])+t):(s+=e[0],"("===e[0]&&n++)}return s +})).map((e=>`(${e})`)).join(t)})(e),!0),this.lastIndex=0}exec(e){ +this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e) +;if(!t)return null +;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n] +;return t.splice(0,n),Object.assign(t,i)}}class s{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const t=new i +;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), +t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ +this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ +const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex +;let n=t.exec(e) +;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ +const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} +return n&&(this.regexIndex+=n.position+1, +this.regexIndex===this.count&&this.considerAll()),n}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=a(e.classNameAliases||{}),function t(i,r){const l=i +;if(i.isCompiled)return l +;[A].forEach((e=>e(i,r))),e.compilerExtensions.forEach((e=>e(i,r))), +i.__beforeBegin=null,[M,O,L].forEach((e=>e(i,r))),i.isCompiled=!0;let o=null +;if("object"==typeof i.keywords&&(o=i.keywords.$pattern, +delete i.keywords.$pattern), +i.keywords&&(i.keywords=j(i.keywords,e.case_insensitive)), +i.lexemes&&o)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ") +;return o=o||i.lexemes||/\w+/, +l.keywordPatternRe=n(o,!0),r&&(i.begin||(i.begin=/\B|\b/), +l.beginRe=n(i.begin),i.endSameAsBegin&&(i.end=i.begin), +i.end||i.endsWithParent||(i.end=/\B|\b/), +i.end&&(l.endRe=n(i.end)),l.terminatorEnd=g(i.end)||"", +i.endsWithParent&&r.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+r.terminatorEnd)), +i.illegal&&(l.illegalRe=n(i.illegal)), +i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>a(e,{ +variants:null},t)))),e.cachedVariants?e.cachedVariants:S(e)?a(e,{ +starts:e.starts?a(e.starts):null +}):Object.isFrozen(e)?a(e):e))("self"===e?i:e)))),i.contains.forEach((e=>{t(e,l) +})),i.starts&&t(i.starts,r),l.matcher=(e=>{const t=new s +;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(l),l}(e)}function S(e){ +return!!e&&(e.endsWithParent||S(e.starts))}function P(e){const t={ +props:["language","code","autodetect"],data:()=>({detectedLanguage:"", +unknownLanguage:!1}),computed:{className(){ +return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){ +if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`), +this.unknownLanguage=!0,s(this.code);let t={} +;return this.autoDetect?(t=e.highlightAuto(this.code), +this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals), +this.detectedLanguage=this.language),t.value},autoDetect(){ +return!(this.language&&(e=this.autodetect,!e&&""!==e));var e}, +ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{ +class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{ +Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const D={ +"after:highlightElement":({el:e,result:t,text:n})=>{const i=H(e) +;if(!i.length)return;const a=document.createElement("div") +;a.innerHTML=t.value,t.value=((e,t,n)=>{let i=0,a="";const r=[];function l(){ +return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){ +a+=""}function g(e){("start"===e.event?o:c)(e.node)} +for(;e.length||t.length;){let t=l() +;if(a+=s(n.substring(i,t[0].offset)),i=t[0].offset,t===e){r.reverse().forEach(c) +;do{g(t.splice(0,1)[0]),t=l()}while(t===e&&t.length&&t[0].offset===i) +;r.reverse().forEach(o) +}else"start"===t[0].event?r.push(t[0].node):r.pop(),g(t.splice(0,1)[0])} +return a+s(n.substr(i))})(i,H(a),n)}};function C(e){ +return e.nodeName.toLowerCase()}function H(e){const t=[];return function e(n,i){ +for(let s=n.firstChild;s;s=s.nextSibling)3===s.nodeType?i+=s.nodeValue.length:1===s.nodeType&&(t.push({ +event:"start",offset:i,node:s}),i=e(s,i),C(s).match(/br|hr|img|input/)||t.push({ +event:"stop",offset:i,node:s}));return i}(e,0),t}const $={},U=e=>{ +console.error(e)},z=(e,...t)=>{console.log("WARN: "+e,...t)},K=(e,t)=>{ +$[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),$[`${e}/${t}`]=!0) +},G=s,V=a,W=Symbol("nomatch");return(e=>{ +const n=Object.create(null),s=Object.create(null),a=[];let r=!0 +;const l=/(^(<[^>]+>|\t|)+|\n)/gm,o="Could not find the language '{}', did you forget to load/include a language module?",g={ +disableAutodetect:!0,name:"Plain text",contains:[]};let u={ +noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +tabReplace:null,useBR:!1,languages:null,__emitter:c};function h(e){ +return u.noHighlightRe.test(e)}function d(e,t,n,i){let s="",a="" +;"object"==typeof t?(s=e, +n=t.ignoreIllegals,a=t.language,i=void 0):(K("10.7.0","highlight(lang, code, ...args) has been deprecated."), +K("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), +a=e,s=t);const r={code:s,language:a};M("before:highlight",r) +;const l=r.result?r.result:f(r.language,r.code,n,i) +;return l.code=r.code,M("after:highlight",l),l}function f(e,t,s,l){ +function c(e,t){const n=v.case_insensitive?t[0].toLowerCase():t[0] +;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]} +function g(){null!=R.subLanguage?(()=>{if(""===M)return;let e=null +;if("string"==typeof R.subLanguage){ +if(!n[R.subLanguage])return void k.addText(M) +;e=f(R.subLanguage,M,!0,_[R.subLanguage]),_[R.subLanguage]=e.top +}else e=p(M,R.subLanguage.length?R.subLanguage:null) +;R.relevance>0&&(O+=e.relevance),k.addSublanguage(e.emitter,e.language) +})():(()=>{if(!R.keywords)return void k.addText(M);let e=0 +;R.keywordPatternRe.lastIndex=0;let t=R.keywordPatternRe.exec(M),n="";for(;t;){ +n+=M.substring(e,t.index);const i=c(R,t);if(i){const[e,s]=i +;if(k.addText(n),n="",O+=s,e.startsWith("_"))n+=t[0];else{ +const n=v.classNameAliases[e]||e;k.addKeyword(t[0],n)}}else n+=t[0] +;e=R.keywordPatternRe.lastIndex,t=R.keywordPatternRe.exec(M)} +n+=M.substr(e),k.addText(n)})(),M=""}function h(e){ +return e.className&&k.openNode(v.classNameAliases[e.className]||e.className), +R=Object.create(e,{parent:{value:R}}),R}function d(e,t,n){let s=((e,t)=>{ +const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(s){if(e["on:end"]){ +const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(s=!1)}if(s){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return d(e.parent,t,n)}function m(e){ +return 0===R.matcher.regexIndex?(M+=e[0],1):(I=!0,0)}function b(e){ +const n=e[0],i=t.substr(e.index),s=d(R,e,i);if(!s)return W;const a=R +;a.skip?M+=n:(a.returnEnd||a.excludeEnd||(M+=n),g(),a.excludeEnd&&(M=n));do{ +R.className&&k.closeNode(),R.skip||R.subLanguage||(O+=R.relevance),R=R.parent +}while(R!==s.parent) +;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe), +h(s.starts)),a.returnEnd?0:n.length}let E={};function x(n,a){const l=a&&a[0] +;if(M+=n,null==l)return g(),0 +;if("begin"===E.type&&"end"===a.type&&E.index===a.index&&""===l){ +if(M+=t.slice(a.index,a.index+1),!r){const t=Error("0 width match regex") +;throw t.languageName=e,t.badRule=E.rule,t}return 1} +if(E=a,"begin"===a.type)return function(e){ +const t=e[0],n=e.rule,s=new i(n),a=[n.__beforeBegin,n["on:begin"]] +;for(const n of a)if(n&&(n(e,s),s.isMatchIgnored))return m(t) +;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")), +n.skip?M+=t:(n.excludeBegin&&(M+=t), +g(),n.returnBegin||n.excludeBegin||(M=t)),h(n),n.returnBegin?0:t.length}(a) +;if("illegal"===a.type&&!s){ +const e=Error('Illegal lexeme "'+l+'" for mode "'+(R.className||"")+'"') +;throw e.mode=R,e}if("end"===a.type){const e=b(a);if(e!==W)return e} +if("illegal"===a.type&&""===l)return 1 +;if(L>1e5&&L>3*a.index)throw Error("potential infinite loop, way more iterations than matches") +;return M+=l,l.length}const v=N(e) +;if(!v)throw U(o.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const w=T(v,{plugins:a});let y="",R=l||w;const _={},k=new u.__emitter(u);(()=>{ +const e=[];for(let t=R;t!==v;t=t.parent)t.className&&e.unshift(t.className) +;e.forEach((e=>k.openNode(e)))})();let M="",O=0,A=0,L=0,I=!1;try{ +for(R.matcher.considerAll();;){ +L++,I?I=!1:R.matcher.considerAll(),R.matcher.lastIndex=A +;const e=R.matcher.exec(t);if(!e)break;const n=x(t.substring(A,e.index),e) +;A=e.index+n}return x(t.substr(A)),k.closeAllNodes(),k.finalize(),y=k.toHTML(),{ +relevance:Math.floor(O),value:y,language:e,illegal:!1,emitter:k,top:R}}catch(n){ +if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{ +msg:n.message,context:t.slice(A-100,A+100),mode:n.mode},sofar:y,relevance:0, +value:G(t),emitter:k};if(r)return{illegal:!1,relevance:0,value:G(t),emitter:k, +language:e,top:R,errorRaised:n};throw n}}function p(e,t){ +t=t||u.languages||Object.keys(n);const i=(e=>{const t={relevance:0, +emitter:new u.__emitter(u),value:G(e),illegal:!1,top:g} +;return t.emitter.addText(e),t})(e),s=t.filter(N).filter(k).map((t=>f(t,e,!1))) +;s.unshift(i);const a=s.sort(((e,t)=>{ +if(e.relevance!==t.relevance)return t.relevance-e.relevance +;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1 +;if(N(t.language).supersetOf===e.language)return-1}return 0})),[r,l]=a,o=r +;return o.second_best=l,o}const m={"before:highlightElement":({el:e})=>{ +u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")) +},"after:highlightElement":({result:e})=>{ +u.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,E={ +"after:highlightElement":({result:e})=>{ +u.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,u.tabReplace))))}} +;function x(e){let t=null;const n=(e=>{let t=e.className+" " +;t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t) +;if(n){const t=N(n[1]) +;return t||(z(o.replace("{}",n[1])),z("Falling back to no-highlight mode for this block.",e)), +t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>h(e)||N(e)))})(e) +;if(h(n))return;M("before:highlightElement",{el:e,language:n}),t=e +;const i=t.textContent,a=n?d(i,{language:n,ignoreIllegals:!0}):p(i) +;M("after:highlightElement",{el:e,result:a,text:i +}),e.innerHTML=a.value,((e,t,n)=>{const i=t?s[t]:n +;e.classList.add("hljs"),i&&e.classList.add(i)})(e,n,a.language),e.result={ +language:a.language,re:a.relevance,relavance:a.relevance +},a.second_best&&(e.second_best={language:a.second_best.language, +re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{ +v.called||(v.called=!0, +K("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."), +document.querySelectorAll("pre code").forEach(x))};let w=!1;function y(){ +"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(x):w=!0 +}function N(e){return e=(e||"").toLowerCase(),n[e]||n[s[e]]} +function R(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ +s[e.toLowerCase()]=t}))}function k(e){const t=N(e) +;return t&&!t.disableAutodetect}function M(e,t){const n=e;a.forEach((e=>{ +e[n]&&e[n](t)}))} +"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ +w&&y()}),!1),Object.assign(e,{highlight:d,highlightAuto:p,highlightAll:y, +fixMarkup:e=>{ +return K("10.2.0","fixMarkup will be removed entirely in v11.0"),K("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"), +t=e, +u.tabReplace||u.useBR?t.replace(l,(e=>"\n"===e?u.useBR?"
":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t +;var t},highlightElement:x, +highlightBlock:e=>(K("10.7.0","highlightBlock will be removed entirely in v12.0"), +K("10.7.0","Please use highlightElement now."),x(e)),configure:e=>{ +e.useBR&&(K("10.3.0","'useBR' will be removed entirely in v11.0"), +K("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")), +u=V(u,e)},initHighlighting:v,initHighlightingOnLoad:()=>{ +K("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."), +w=!0},registerLanguage:(t,i)=>{let s=null;try{s=i(e)}catch(e){ +if(U("Language definition for '{}' could not be registered.".replace("{}",t)), +!r)throw e;U(e),s=g} +s.name||(s.name=t),n[t]=s,s.rawDefinition=i.bind(null,e),s.aliases&&R(s.aliases,{ +languageName:t})},unregisterLanguage:e=>{delete n[e] +;for(const t of Object.keys(s))s[t]===e&&delete s[t]}, +listLanguages:()=>Object.keys(n),getLanguage:N,registerAliases:R, +requireLanguage:e=>{ +K("10.4.0","requireLanguage will be removed entirely in v11."), +K("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844") +;const t=N(e);if(t)return t +;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))}, +autoDetection:k,inherit:V,addPlugin:e=>{(e=>{ +e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{ +e["before:highlightBlock"](Object.assign({block:t.el},t)) +}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{ +e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),a.push(e)}, +vuePlugin:P(e).VuePlugin}),e.debugMode=()=>{r=!1},e.safeMode=()=>{r=!0 +},e.versionString="10.7.2";for(const e in _)"object"==typeof _[e]&&t(_[e]) +;return Object.assign(e,_),e.addPlugin(m),e.addPlugin(D),e.addPlugin(E),e})({}) +}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); +hljs.registerLanguage("apache",(()=>{"use strict";return e=>{const n={ +className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/} +;return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0, +contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/, +contains:[n,{className:"number",begin:/:\d{1,5}/ +},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute", +begin:/\w+/,relevance:0,keywords:{ +nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername" +},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"}, +contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable", +begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}] +},n,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}} +})()); +hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s +})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ +begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ +begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] +},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/, +keyword:"if then else elif fi for while in do done case esac function", +literal:"true false", +built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" +},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ +},{className:"string",begin:/'/,end:/'/},n]}}})()); +hljs.registerLanguage("c",(()=>{"use strict";function e(e){ +return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") +}return t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] +}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",i={ +className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string", +variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", +contains:[t.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{ +className:"meta-string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},l={ +className:"title",begin:e(r)+t.IDENT_RE,relevance:0 +},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ +keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", +literal:"true false nullptr NULL"},m=[c,i,n,t.C_BLOCK_COMMENT_MODE,o,s],p={ +variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ +beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ +begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), +relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, +contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, +returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, +end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,s,o,i,{ +begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:["self",n,t.C_BLOCK_COMMENT_MODE,s,o,i]}] +},i,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"",keywords:u,contains:["self",i]},{begin:t.IDENT_RE+"::",keywords:u},{ +className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, +contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ +preprocessor:c,strings:s,keywords:u}}}})()); +hljs.registerLanguage("coffeescript",(()=>{"use strict" +;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) +;return r=>{const t={ +keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], +e=>!i.includes(e))),literal:n.concat(["yes","no","on","off"]), +built_in:a.concat(["npm","print"])};var i;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={ +className:"subst",begin:/#\{/,end:/\}/,keywords:t +},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?", +relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/, +contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE] +},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, +contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", +end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", +relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s +},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ +begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c +;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ +className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, +end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", +aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, +contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{ +className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0, +contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function", +begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class", +beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{ +beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l] +},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})()); +hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ +return t("(",e,")?")}function t(...e){return e.map((e=>{ +return(t=e)?"string"==typeof t?t:t.source:null;var t})).join("")}return n=>{ +const r=n.COMMENT("//","$",{contains:[{begin:/\\\n/}] +}),a="[a-zA-Z_]\\w*::",i="(decltype\\(auto\\)|"+e(a)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ +className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string", +variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", +contains:[n.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},n.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"meta-string"}),{ +className:"meta-string",begin:/<.*?>/},r,n.C_BLOCK_COMMENT_MODE]},d={ +className:"title",begin:e(a)+n.IDENT_RE,relevance:0 +},u=e(a)+n.IDENT_RE+"\\s*\\(",m={ +keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", +built_in:"_Bool _Complex _Imaginary", +_relevance_hints:["asin","atan2","atan","calloc","ceil","cosh","cos","exit","exp","fabs","floor","fmod","fprintf","fputs","free","frexp","auto_ptr","deque","list","queue","stack","vector","map","set","pair","bitset","multiset","multimap","unordered_set","fscanf","future","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","tolower","toupper","labs","ldexp","log10","log","malloc","realloc","memchr","memcmp","memcpy","memset","modf","pow","printf","putchar","puts","scanf","sinh","sin","snprintf","sprintf","sqrt","sscanf","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","tanh","tan","unordered_map","unordered_multiset","unordered_multimap","priority_queue","make_pair","array","shared_ptr","abort","terminate","abs","acos","vfprintf","vprintf","vsprintf","endl","initializer_list","unique_ptr","complex","imaginary","std","string","wstring","cin","cout","cerr","clog","stdin","stdout","stderr","stringstream","istringstream","ostringstream"], +literal:"true false nullptr NULL"},p={className:"function.dispatch",relevance:0, +keywords:m, +begin:t(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!while)/,n.IDENT_RE,(_=/\s*\(/, +t("(?=",_,")")))};var _;const g=[p,l,s,r,n.C_BLOCK_COMMENT_MODE,o,c],b={ +variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ +beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:g.concat([{ +begin:/\(/,end:/\)/,keywords:m,contains:g.concat(["self"]),relevance:0}]), +relevance:0},f={className:"function",begin:"("+i+"[\\*&\\s]+)+"+u, +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/, +contains:[{begin:"decltype\\(auto\\)",keywords:m,relevance:0},{begin:u, +returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/, +endsWithParent:!0,contains:[c,o]},{className:"params",begin:/\(/,end:/\)/, +keywords:m,relevance:0,contains:[r,n.C_BLOCK_COMMENT_MODE,c,o,s,{begin:/\(/, +end:/\)/,keywords:m,relevance:0,contains:["self",r,n.C_BLOCK_COMMENT_MODE,c,o,s] +}]},s,r,n.C_BLOCK_COMMENT_MODE,l]};return{name:"C++", +aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"",keywords:m,contains:["self",s]},{begin:n.IDENT_RE+"::",keywords:m},{ +className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, +contains:[{beginKeywords:"final class struct"},n.TITLE_MODE]}]),exports:{ +preprocessor:l,strings:c,keywords:m}}}})()); +hljs.registerLanguage("csharp",(()=>{"use strict";return e=>{const n={ +keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]), +built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"], +literal:["default","false","null","true"]},a=e.inherit(e.TITLE_MODE,{ +begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{ +begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] +},t=e.inherit(s,{illegal:/\n/}),r={className:"subst",begin:/\{/,end:/\}/, +keywords:n},l=e.inherit(r,{illegal:/\n/}),c={className:"string",begin:/\$"/, +end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ +},e.BACKSLASH_ESCAPE,l]},o={className:"string",begin:/\$@"/,end:'"',contains:[{ +begin:/\{\{/},{begin:/\}\}/},{begin:'""'},r]},d=e.inherit(o,{illegal:/\n/, +contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]}) +;r.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE], +l.contains=[d,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{ +illegal:/\n/})];const g={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},a] +},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={ +begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], +keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, +contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ +begin:"\x3c!--|--\x3e"},{begin:""}]}] +}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", +end:"$",keywords:{ +"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum" +}},g,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, +illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" +},a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", +relevance:0,end:/[{;=]/,illegal:/[^\s:]/, +contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ +beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, +contains:[a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", +begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ +className:"meta-string",begin:/"/,end:/"/}]},{ +beginKeywords:"new return throw await else",relevance:0},{className:"function", +begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, +end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ +beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", +relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, +contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/, +excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, +contains:[g,i,e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}})()); +hljs.registerLanguage("css",(()=>{"use strict" +;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() +;return n=>{const a=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, +HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, +ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, +illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} +}))(n),l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS", +case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"}, +classNameAliases:{keyframePosition:"selector-tag"}, +contains:[n.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/ +},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0 +},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 +},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ +begin:":("+i.join("|")+")"},{begin:"::("+o.join("|")+")"}]},{ +className:"attribute",begin:"\\b("+r.join("|")+")\\b"},{begin:":",end:"[;}]", +contains:[a.HEXCOLOR,a.IMPORTANT,n.CSS_NUMBER_MODE,...l,{ +begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" +},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}] +},{className:"built_in",begin:/[\w-]+(?=\()/}]},{ +begin:(s=/@/,((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?=",s,")")), +end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword", +begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, +relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only", +attribute:t.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute" +},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag", +begin:"\\b("+e.join("|")+")\\b"}]};var s}})()); +hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff", +aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{ +begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{ +begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /, +end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/ +},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{ +begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{ +className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, +end:/$/}]})})()); +hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={ +keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", +literal:"true false iota nil", +built_in:"append cap close complex copy imag len make new panic print println real recover delete" +};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{const a="HTTP/(2|1\\.[01])",s={className:"attribute", +begin:e("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{ +className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]} +},t=[s,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{ +name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})", +end:/$/,contains:[{className:"meta",begin:a},{className:"number", +begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:t}},{ +begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string", +begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{ +className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:t} +},n.inherit(s,{relevance:0})]}}})()); +hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(...n){ +return n.map((n=>e(n))).join("")}return s=>{const a={className:"number", +relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] +},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ +className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ +}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ +className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", +end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' +},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], +relevance:0 +},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" +;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, +contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ +begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", +starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})()); +hljs.registerLanguage("java",(()=>{"use strict" +;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ +className:"number",variants:[{ +begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ +begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ +begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ +begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], +relevance:0};return e=>{ +var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={ +className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", +contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{ +name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/, +contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, +relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ +begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ +className:"class",beginKeywords:"class interface enum",end:/[{;=]/, +excludeEnd:!0,relevance:1,keywords:"class interface enum",illegal:/[:"\[\]]/, +contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ +beginKeywords:"new throw return else",relevance:0},{className:"class", +begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0, +end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, +keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function", +begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(", +returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, +keywords:n,relevance:0, +contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE] +},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})()); +hljs.registerLanguage("javascript",(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) +;function r(e){return t("(?=",e,")")}function t(...e){return e.map((e=>{ +return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ +const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, +isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] +;"<"!==s?">"===s&&(((e,{after:n})=>{const a="", +returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ +begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 +},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f}]}] +},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ +variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, +end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, +contains:["self"]}]}],relevance:0},{className:"function", +beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, +contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),p],illegal:/%/},{ +beginKeywords:"while if switch catch for"},{className:"function", +begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,contains:[p,i.inherit(i.TITLE_MODE,{begin:c})]},{variants:[{ +begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", +beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ +beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, +end:/[{;]/,excludeEnd:!0,contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",p] +},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", +contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}] +}}})()); +hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={ +literal:"true false null" +},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={ +end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/, +end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/, +contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/ +})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)], +illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON", +contains:a,keywords:e,illegal:"\\S"}}})()); +hljs.registerLanguage("kotlin",(()=>{"use strict" +;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ +className:"number",variants:[{ +begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ +begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ +begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` +},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ +begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], +relevance:0};return e=>{const n={ +keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", +built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", +literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" +},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={ +className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", +variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'", +illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, +contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={ +className:"meta", +begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" +},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, +end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}] +},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={ +variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, +contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d], +{name:"Kotlin",aliases:["kt","kts"],keywords:n, +contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag", +begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,{className:"keyword", +begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", +begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$", +returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ +begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, +contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, +keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, +endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, +endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0 +},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class", +beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, +illegal:"extends implements",contains:[{ +beginKeywords:"public protected internal private constructor" +},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, +excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/, +excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env", +end:"$",illegal:"\n"},o]}}})()); +hljs.registerLanguage("less",(()=>{"use strict" +;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],n=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse(),r=i.concat(o) +;return a=>{const s=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, +HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, +ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, +illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} +}))(a),l=r,d="([\\w-]+|@\\{[\\w-]+\\})",c=[],g=[],b=e=>({className:"string", +begin:"~?"+e+".*?"+e}),m=(e,t,i)=>({className:e,begin:t,relevance:i}),u={ +$pattern:/[a-z-]+/,keyword:"and or not only",attribute:t.join(" ")},p={ +begin:"\\(",end:"\\)",contains:g,keywords:u,relevance:0} +;g.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,b("'"),b('"'),a.CSS_NUMBER_MODE,{ +begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", +excludeEnd:!0} +},s.HEXCOLOR,p,m("variable","@@?[\\w-]+",10),m("variable","@\\{[\\w-]+\\}"),m("built_in","~?`[^`]*?`"),{ +className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0 +},s.IMPORTANT);const f=g.concat({begin:/\{/,end:/\}/,contains:c}),h={ +beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not" +}].concat(g)},w={begin:d+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0, +contains:[{begin:/-(webkit|moz|ms|o)-/},{className:"attribute", +begin:"\\b("+n.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0, +illegal:"[<=$]",relevance:0,contains:g}}]},v={className:"keyword", +begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", +starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:g,relevance:0}},y={ +className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{ +begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:f}},k={variants:[{ +begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:d,end:/\{/}],returnBegin:!0, +returnEnd:!0,illegal:"[<='$\"]",relevance:0, +contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,h,m("keyword","all\\b"),m("variable","@\\{[\\w-]+\\}"),{ +begin:"\\b("+e.join("|")+")\\b",className:"selector-tag" +},m("selector-tag",d+"%?",0),m("selector-id","#"+d),m("selector-class","\\."+d,0),m("selector-tag","&",0),s.ATTRIBUTE_SELECTOR_MODE,{ +className:"selector-pseudo",begin:":("+i.join("|")+")"},{ +className:"selector-pseudo",begin:"::("+o.join("|")+")"},{begin:"\\(",end:"\\)", +contains:f},{begin:"!important"}]},E={begin:`[\\w-]+:(:)?(${l.join("|")})`, +returnBegin:!0,contains:[k]} +;return c.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,v,y,E,w,k),{ +name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:c}}})()); +hljs.registerLanguage("lua",(()=>{"use strict";return e=>{ +const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"] +},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n], +relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, +literal:"true false nil", +keyword:"and break do else elseif end for goto if in local not or repeat return then until while", +built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" +},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)", +contains:[e.inherit(e.TITLE_MODE,{ +begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", +begin:"\\(",endsWithParent:!0,contains:o}].concat(o) +},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", +begin:t,end:a,contains:[n],relevance:5}])}}})()); +hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={ +className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", +contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} +function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ +return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ +const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/, +contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ +className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ +className:"meta-string"}),m={endsWithParent:!0,illegal:/`]+/}]}] +}]};return{name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,contains:[{className:"meta",begin://, +relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta", +begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{ +relevance:10}),{begin://,relevance:10},i,{ +className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name", +begin:t,relevance:0,starts:m}]},{className:"tag",begin:a(/<\//,n(a(t,/>/))), +contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0, +endsParent:!0}]}]}}})()); +hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ +return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e +})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", +subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 +},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, +relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), +relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ +begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ +className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, +returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", +end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], +variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ +className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ +begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) +;let t=[a,i] +;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), +t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ +className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ +begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", +contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", +end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, +end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ +begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ +begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", +contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ +begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ +className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ +className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})()); +hljs.registerLanguage("nginx",(()=>{"use strict";return e=>{const n={ +className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{ +begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{ +$pattern:"[a-z/_]+", +literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" +},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string", +contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/ +}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n] +},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^", +end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{ +begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number", +begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{ +className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{ +name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{ +begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{ +className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{ +begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{ +className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}], +illegal:"[^\\s\\}]"}}})()); +hljs.registerLanguage("objectivec",(()=>{"use strict";return e=>{ +const n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n, +keyword:"@interface @class @protocol @implementation"};return{ +name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"], +keywords:{$pattern:n, +keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", +literal:"false true FALSE TRUE nil YES NO NULL", +built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" +},illegal:"/,end:/$/, +illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ +className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:/(\{|$)/, +excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{ +begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}})()); +hljs.registerLanguage("perl",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(...n){ +return n.map((n=>e(n))).join("")}function t(...n){ +return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ +const r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/, +keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" +},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},a={begin:/->\{/, +end:/\}/},o={variants:[{begin:/\$\d/},{ +begin:n(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])") +},{begin:/[$%@][^\s\w{]/,relevance:0}] +},c=[e.BACKSLASH_ESCAPE,i,o],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],l=(e,t,s="\\1")=>{ +const i="\\1"===s?s:n(s,t) +;return n(n("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,i,/(?:\\.|[^\\\/])*?/,s,r) +},d=(e,t,s)=>n(n("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,s,r),p=[o,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{ +endsWithParent:!0}),a,{className:"string",contains:c,variants:[{ +begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[", +end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{ +begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">", +relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'", +contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`", +contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{ +begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number", +begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", +relevance:0},{ +begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*", +keywords:"split return print reverse grep",relevance:0, +contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{ +begin:l("s|tr|y",t(...g))},{begin:l("s|tr|y","\\(","\\)")},{ +begin:l("s|tr|y","\\[","\\]")},{begin:l("s|tr|y","\\{","\\}")}],relevance:2},{ +className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{ +begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t(...g),/\1/)},{ +begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{ +begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub", +end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{ +begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$", +subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}] +}];return i.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:s, +contains:p}}})()); +hljs.registerLanguage("php",(()=>{"use strict";return e=>{const r={ +className:"variable", +begin:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?![A-Za-z0-9])(?![$])"},t={ +className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{ +begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/, +end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null +}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null, +contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({ +begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/, +contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string", +contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'" +}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},s={className:"number",variants:[{ +begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{ +begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{ +begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?" +}],relevance:0},c={ +keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield", +literal:"false null true", +built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass" +};return{aliases:["php3","php4","php5","php6","php7","php8"], +case_insensitive:!0,keywords:c, +contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t] +}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}] +}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0, +keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{ +begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function", +relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0, +illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{ +begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0,keywords:c, +contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s]}]},{className:"class",variants:[{ +beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait", +illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{ +beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ +beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/, +contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";", +contains:[e.UNDERSCORE_TITLE_MODE]},l,s]}}})()); +hljs.registerLanguage("php-template",(()=>{"use strict";return n=>({ +name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/, +subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"', +end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{ +illegal:null,className:null,contains:null,skip:!0 +}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null, +skip:!0})]}]})})()); +hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ +name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})()); +hljs.registerLanguage("properties",(()=>{"use strict";return e=>{ +var n="[ \\t\\f]*",a=n+"[:=]"+n,t="("+a+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",s="([^\\\\:= \\t\\f\\n]|\\\\.)+",i={ +end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{ +begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties", +case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{ +returnBegin:!0,variants:[{begin:r+a,relevance:1},{begin:r+"[ \\t\\f]+", +relevance:0}],contains:[{className:"attr",begin:r,endsParent:!0,relevance:0}], +starts:i},{begin:s+t,returnBegin:!0,relevance:0,contains:[{className:"meta", +begin:s,endsParent:!0,relevance:0}],starts:i},{className:"attr",relevance:0, +begin:s+n+"$"}]}}})()); +hljs.registerLanguage("python",(()=>{"use strict";return e=>{const n={ +$pattern:/[A-Za-z]\w+|__\w+__/, +keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"], +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/, +end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},t={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},r="[0-9](_?[0-9])*",l=`(\\b(${r}))?\\.(${r})|\\b(${r})\\.`,b={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${r})|(${l}))[eE][+-]?(${r})[jJ]?\\b`},{begin:`(${l})[jJ]?`},{ +begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{ +begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{ +begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${r})[jJ]\\b`}]},o={ +className:"comment", +begin:(d=/# type:/,((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?=",d,")")), +end:/$/,keywords:n,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/, +endsWithParent:!0}]},c={className:"params",variants:[{className:"", +begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0, +keywords:n,contains:["self",a,b,t,e.HASH_COMMENT_MODE]}]};var d +;return i.contains=[t,b,a],{name:"Python",aliases:["py","gyp","ipython"], +keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,b,{begin:/\bself\b/},{ +beginKeywords:"if",relevance:0},t,o,e.HASH_COMMENT_MODE,{variants:[{ +className:"function",beginKeywords:"def"},{className:"class", +beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/, +contains:[e.UNDERSCORE_TITLE_MODE,c,{begin:/->/,endsWithParent:!0,keywords:n}] +},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,c,t]}]}}})()); +hljs.registerLanguage("python-repl",(()=>{"use strict";return s=>({ +aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$", +subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{ +begin:/^\.\.\.(?=[ ]|$)/}]}]})})()); +hljs.registerLanguage("r",(()=>{"use strict";function e(...e){return e.map((e=>{ +return(a=e)?"string"==typeof a?a:a.source:null;var a})).join("")}return a=>{ +const n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;return{name:"R", +illegal:/->/,keywords:{$pattern:n, +keyword:"function if in break next repeat else for while", +literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", +built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" +},compilerExtensions:[(a,n)=>{if(!a.beforeMatch)return +;if(a.starts)throw Error("beforeMatch cannot be used with starts") +;const i=Object.assign({},a);Object.keys(a).forEach((e=>{delete a[e] +})),a.begin=e(i.beforeMatch,e("(?=",i.begin,")")),a.starts={relevance:0, +contains:[Object.assign(i,{endsParent:!0})]},a.relevance=0,delete i.beforeMatch +}],contains:[a.COMMENT(/#'/,/$/,{contains:[{className:"doctag", +begin:"@examples",starts:{contains:[{begin:/\n/},{begin:/#'\s*(?=@[a-zA-Z]+)/, +endsParent:!0},{begin:/#'/,end:/$/,excludeBegin:!0}]}},{className:"doctag", +begin:"@param",end:/$/,contains:[{className:"variable",variants:[{begin:n},{ +begin:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{className:"doctag", +begin:/@[a-zA-Z]+/},{className:"meta-keyword",begin:/\\[a-zA-Z]+/}] +}),a.HASH_COMMENT_MODE,{className:"string",contains:[a.BACKSLASH_ESCAPE], +variants:[a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/ +}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/ +}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/ +}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/ +}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/ +}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"', +relevance:0},{begin:"'",end:"'",relevance:0}]},{className:"number",relevance:0, +beforeMatch:/([^a-zA-Z0-9._])/,variants:[{ +match:/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/},{ +match:/0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/},{ +match:/(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/}]},{begin:"%",end:"%"},{ +begin:e(/[a-zA-Z][a-zA-Z_0-9]*/,"\\s+<-\\s+")},{begin:"`",end:"`",contains:[{ +begin:/\\./}]}]}}})()); +hljs.registerLanguage("ruby",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{ +const a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i={ +keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", +built_in:"proc lambda",literal:"true false nil"},s={className:"doctag", +begin:"@[A-Za-z]+"},r={begin:"#<",end:">"},b=[n.COMMENT("#","$",{contains:[s] +}),n.COMMENT("^=begin","^=end",{contains:[s],relevance:10 +}),n.COMMENT("^__END__","\\n$")],c={className:"subst",begin:/#\{/,end:/\}/, +keywords:i},t={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{ +begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, +end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ +begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, +end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ +begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{ +begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{ +begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{ +begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{ +begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{ +begin:/<<[-~]?'?/},n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, +contains:[n.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",d={className:"number", +relevance:0,variants:[{ +begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ +begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" +},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ +begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ +begin:"\\b0(_?[0-7])+r?i?\\b"}]},l={className:"params",begin:"\\(",end:"\\)", +endsParent:!0,keywords:i},o=[t,{className:"class",beginKeywords:"class module", +end:"$|;",illegal:/=/,contains:[n.inherit(n.TITLE_MODE,{ +begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ +begin:"("+n.IDENT_RE+"::)?"+n.IDENT_RE,relevance:0}]}].concat(b)},{ +className:"function",begin:e(/def\s+/,(_=a+"\\s*(\\(|;|$)",e("(?=",_,")"))), +relevance:0,keywords:"def",end:"$|;",contains:[n.inherit(n.TITLE_MODE,{begin:a +}),l].concat(b)},{begin:n.IDENT_RE+"::"},{className:"symbol", +begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol", +begin:":(?!\\s)",contains:[t,{begin:a}],relevance:0},d,{className:"variable", +begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ +className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{ +begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ +className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{ +begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", +end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] +}].concat(r,b),relevance:0}].concat(r,b);var _;c.contains=o,l.contains=o +;const E=[{begin:/^\s*=>/,starts:{end:"$",contains:o}},{className:"meta", +begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", +starts:{end:"$",contains:o}}];return b.unshift(r),{name:"Ruby", +aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/, +contains:[n.SHEBANG({binary:"ruby"})].concat(E).concat(b).concat(o)}}})()); +hljs.registerLanguage("rust",(()=>{"use strict";return e=>{ +const n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" +;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?", +keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", +literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}})()); +hljs.registerLanguage("scss",(()=>{"use strict" +;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() +;return a=>{const n=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, +HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, +ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, +illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} +}))(a),l=o,s=i,d="@[a-z-]+",c={className:"variable", +begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"};return{name:"SCSS",case_insensitive:!0, +illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{ +className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ +className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0 +},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag", +begin:"\\b("+e.join("|")+")\\b",relevance:0},{className:"selector-pseudo", +begin:":("+s.join("|")+")"},{className:"selector-pseudo", +begin:"::("+l.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[a.CSS_NUMBER_MODE] +},{className:"attribute",begin:"\\b("+r.join("|")+")\\b"},{ +begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" +},{begin:":",end:";", +contains:[c,n.HEXCOLOR,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.IMPORTANT] +},{begin:"@(page|font-face)",lexemes:d,keywords:"@page @font-face"},{begin:"@", +end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/, +keyword:"and or not only",attribute:t.join(" ")},contains:[{begin:d, +className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute" +},c,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.HEXCOLOR,a.CSS_NUMBER_MODE]}]}} +})()); +hljs.registerLanguage("shell",(()=>{"use strict";return s=>({ +name:"Shell Session",aliases:["console"],contains:[{className:"meta", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})()); +hljs.registerLanguage("sql",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function r(...r){ +return r.map((r=>e(r))).join("")}function t(...r){ +return"("+r.map((r=>e(r))).join("|")+")"}return e=>{ +const n=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],s=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=s,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!s.includes(e))),u={ +begin:r(/\b/,t(...c),/\s*\(/),keywords:{built_in:c}};return{name:"SQL", +case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/, +keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(l,{when:e=>e.length<3}),literal:a,type:i, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:t(...o),keywords:{$pattern:/[\w\.]+/,keyword:l.concat(o), +literal:a,type:i}},{className:"type", +begin:t("double precision","large object","with timezone","without timezone") +},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})()); +hljs.registerLanguage("swift",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} +function a(...n){return n.map((n=>e(n))).join("")}function t(...n){ +return"("+n.map((n=>e(n))).join("|")+")"} +const i=e=>a(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(i),u=["init","self"].map(i),c=["Any","Self"],r=["associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],o=["false","nil","true"],l=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],d=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),F=t(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=a(p,F,"*"),h=t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),f=t(h,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=a(h,f,"*"),y=a(/[A-Z]/,f,"*"),g=["autoclosure",a(/convention\(/,t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",a(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","testable","UIApplicationMain","unknown","usableFromInline"],E=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] +;return e=>{const p={match:/\s+/,relevance:0},h=e.COMMENT("/\\*","\\*/",{ +contains:["self"]}),v=[e.C_LINE_COMMENT_MODE,h],N={className:"keyword", +begin:a(/\./,n(t(...s,...u))),end:t(...s,...u),excludeBegin:!0},A={ +match:a(/\./,t(...r)),relevance:0 +},C=r.filter((e=>"string"==typeof e)).concat(["_|0"]),_={variants:[{ +className:"keyword", +match:t(...r.filter((e=>"string"!=typeof e)).concat(c).map(i),...u)}]},D={ +$pattern:t(/\b\w+/,/#\w+/),keyword:C.concat(m),literal:o},B=[N,A,_],k=[{ +match:a(/\./,t(...d)),relevance:0},{className:"built_in", +match:a(/\b/,t(...d),/(?=\()/)}],M={match:/->/,relevance:0},S=[M,{ +className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${F})+`}] +}],x="([0-9a-fA-F]_*)+",I={className:"number",relevance:0,variants:[{ +match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{ +match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(([0-9]_*)+))?\\b`},{ +match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(e="")=>({ +className:"subst",variants:[{match:a(/\\/,e,/[0\\tnr"']/)},{ +match:a(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),T=(e="")=>({className:"subst", +match:a(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(e="")=>({className:"subst", +label:"interpol",begin:a(/\\/,e,/\(/),end:/\)/}),P=(e="")=>({begin:a(e,/"""/), +end:a(/"""/,e),contains:[O(e),T(e),L(e)]}),$=(e="")=>({begin:a(e,/"/), +end:a(/"/,e),contains:[O(e),L(e)]}),K={className:"string", +variants:[P(),P("#"),P("##"),P("###"),$(),$("#"),$("##"),$("###")]},j={ +match:a(/`/,w,/`/)},z=[j,{className:"variable",match:/\$\d+/},{ +className:"variable",match:`\\$${f}+`}],q=[{match:/(@|#)available/, +className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:E, +contains:[...S,I,K]}]}},{className:"keyword",match:a(/@/,t(...g))},{ +className:"meta",match:a(/@/,w)}],U={match:n(/\b[A-Z]/),relevance:0,contains:[{ +className:"type", +match:a(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,f,"+") +},{className:"type",match:y,relevance:0},{match:/[?!]+/,relevance:0},{ +match:/\.\.\./,relevance:0},{match:a(/\s+&\s+/,n(y)),relevance:0}]},Z={ +begin://,keywords:D,contains:[...v,...B,...q,M,U]};U.contains.push(Z) +;const G={begin:/\(/,end:/\)/,relevance:0,keywords:D,contains:["self",{ +match:a(w,/\s*:/),keywords:"_|0",relevance:0 +},...v,...B,...k,...S,I,K,...z,...q,U]},H={beginKeywords:"func",contains:[{ +className:"title",match:t(j.match,w,b),endsParent:!0,relevance:0},p]},R={ +begin://,contains:[...v,U]},V={begin:/\(/,end:/\)/,keywords:D, +contains:[{begin:t(n(a(w,/\s*:/)),n(a(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0, +contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:w}] +},...v,...B,...S,I,K,...q,U,G],endsParent:!0,illegal:/["']/},W={ +className:"function",match:n(/\bfunc\b/),contains:[H,R,V,p],illegal:[/\[/,/%/] +},X={className:"function",match:/\b(subscript|init[?!]?)\s*(?=[<(])/,keywords:{ +keyword:"subscript init init? init!",$pattern:/\w+[?!]?/},contains:[R,V,p], +illegal:/\[|%/},J={beginKeywords:"operator",end:e.MATCH_NOTHING_RE,contains:[{ +className:"title",match:b,endsParent:!0,relevance:0}]},Q={ +beginKeywords:"precedencegroup",end:e.MATCH_NOTHING_RE,contains:[{ +className:"title",match:y,relevance:0},{begin:/{/,end:/}/,relevance:0, +endsParent:!0,keywords:[...l,...o],contains:[U]}]};for(const e of K.variants){ +const n=e.contains.find((e=>"interpol"===e.label));n.keywords=D +;const a=[...B,...k,...S,I,K,...z];n.contains=[...a,{begin:/\(/,end:/\)/, +contains:["self",...a]}]}return{name:"Swift",keywords:D,contains:[...v,W,X,{ +className:"class",beginKeywords:"struct protocol class extension enum", +end:"\\{",excludeEnd:!0,keywords:D,contains:[e.inherit(e.TITLE_MODE,{ +begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B]},J,Q,{ +beginKeywords:"import",end:/$/,contains:[...v],relevance:0 +},...B,...k,...S,I,K,...z,...q,U,G]}}})()); +hljs.registerLanguage("typescript",(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) +;function t(e){return r("(?=",e,")")}function r(...e){return e.map((e=>{ +return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ +const c={$pattern:e, +keyword:n.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]), +literal:a, +built_in:s.concat(["any","void","number","boolean","string","object","never","enum"]) +},o={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},l=(e,n,a)=>{ +const s=e.contains.findIndex((e=>e.label===n)) +;if(-1===s)throw Error("can not find mode to replace");e.contains.splice(s,1,a) +},b=(i=>{const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,s=e.input[a];"<"!==s?">"===s&&(((e,{after:n})=>{ +const a="", +returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ +begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 +},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f}]}] +},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ +variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, +end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, +contains:["self"]}]}],relevance:0},{className:"function", +beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, +contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),A],illegal:/%/},{ +beginKeywords:"while if switch catch for"},{className:"function", +begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,contains:[A,i.inherit(i.TITLE_MODE,{begin:c})]},{variants:[{ +begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", +beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ +beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, +end:/[{;]/,excludeEnd:!0,contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",A] +},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", +contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},A]},{begin:/\$[(.]/}] +}})(i) +;return Object.assign(b.keywords,c),b.exports.PARAMS_CONTAINS.push(o),b.contains=b.contains.concat([o,{ +beginKeywords:"namespace",end:/\{/,excludeEnd:!0},{beginKeywords:"interface", +end:/\{/,excludeEnd:!0,keywords:"interface extends" +}]),l(b,"shebang",i.SHEBANG()),l(b,"use_strict",{className:"meta",relevance:10, +begin:/^\s*['"]use strict['"]/ +}),b.contains.find((e=>"function"===e.className)).relevance=0,Object.assign(b,{ +name:"TypeScript",aliases:["ts","tsx"]}),b}})()); +hljs.registerLanguage("vbnet",(()=>{"use strict";function e(e){ +return e?"string"==typeof e?e:e.source:null}function n(...n){ +return n.map((n=>e(n))).join("")}function t(...n){ +return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ +const a=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,o={ +className:"literal",variants:[{begin:n(/# */,t(i,a),/ *#/)},{ +begin:n(/# */,r,/ *#/)},{begin:n(/# */,s,/ *#/)},{ +begin:n(/# */,t(i,a),/ +/,t(s,r),/ *#/)}]},l=e.COMMENT(/'''/,/$/,{contains:[{ +className:"doctag",begin:/<\/?/,end:/>/}]}),c=e.COMMENT(null,/$/,{variants:[{ +begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET", +aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{ +keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", +built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", +type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", +literal:"true false nothing"}, +illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{ +className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/, +end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o,{className:"number",relevance:0, +variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ +},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{ +begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{ +className:"label",begin:/^\w+:/},l,c,{className:"meta", +begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, +end:/$/,keywords:{ +"meta-keyword":"const disable else elseif enable end externalsource if region then" +},contains:[c]}]}}})()); +hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ +var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ +className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ +},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", +variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ +variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ +end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},t={begin:/\{/, +end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]", +contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{ +begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{ +begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$", +relevance:10},{className:"string", +begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ +begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, +relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", +begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a +},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", +begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", +relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ +className:"number", +begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" +},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],r=[...b] +;return r.pop(),r.push(i),l.contains=r,{name:"YAML",case_insensitive:!0, +aliases:["yml"],contains:b}}})()); \ No newline at end of file diff --git a/htmlReport/js/highlightjs-line-numbers.min.js b/htmlReport/js/highlightjs-line-numbers.min.js new file mode 100644 index 0000000000..8548576704 --- /dev/null +++ b/htmlReport/js/highlightjs-line-numbers.min.js @@ -0,0 +1,24 @@ +/* +The MIT License (MIT) + +Copyright (c) 2017 Yauheni Pakala + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ +!function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a
{6}',[l,s,c,m,h,o+n.startFrom,0{1}',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r{1}
\n',[n,0 + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_BLOCK.html b/htmlReport/ns-1/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..fb902d135f --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..8513410136 --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_CLASS.html b/htmlReport/ns-1/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..9a814d49bb --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..a5af64c9d5 --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_LINE.html b/htmlReport/ns-1/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..bb79429b74 --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..79d67384ec --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_METHOD.html b/htmlReport/ns-1/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..ddb07a6926 --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..0d2248f1bf --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..dc044bc79e --- /dev/null +++ b/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container + + 66.7% + + + (2/3) + + + + 22.2% + + + (4/18) + + + + 23.7% + + + (9/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-1.html b/htmlReport/ns-1/sources/source-1.html new file mode 100644 index 0000000000..f5b521deda --- /dev/null +++ b/htmlReport/ns-1/sources/source-1.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > ContainerException + + + + + + +
+ + +

Coverage Summary for Class: ContainerException (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ContainerException + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Base exception class for all Cargo Container API classes.
+  */
+ public class ContainerException extends CargoException
+ {
+     /**
+      * @param message the exception message
+      */
+     public ContainerException(String message)
+     {
+         super(message);
+     }
+ 
+     /**
+      * @param message the exception message
+      * @param throwable the exception to wrap
+      */
+     public ContainerException(String message, Throwable throwable)
+     {
+         super(message, throwable);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-2.html b/htmlReport/ns-1/sources/source-2.html new file mode 100644 index 0000000000..5bb64e57c7 --- /dev/null +++ b/htmlReport/ns-1/sources/source-2.html @@ -0,0 +1,250 @@ + + + + + + + + Coverage Report > ContainerType + + + + + + +
+ + +

Coverage Summary for Class: ContainerType (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ContainerType + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ /**
+  * Types of {@link org.codehaus.cargo.container.Container}s. There are currently 3 types: Local
+  * Installed, Local Embedded and Remote.
+  */
+ public class ContainerType
+ {
+     /**
+      * Represents a local installed container type.
+      */
+     public static final ContainerType INSTALLED = new ContainerType("installed");
+ 
+     /**
+      * Represents a local embedded container type.
+      */
+     public static final ContainerType EMBEDDED = new ContainerType("embedded");
+ 
+     /**
+      * Represents a remote container type.
+      */
+     public static final ContainerType REMOTE = new ContainerType("remote");
+ 
+     /**
+      * Container type.
+      */
+     private String type;
+ 
+     /**
+      * @param type the internal representation of the container type. For example:
+      * "installed","embedded" or "remote".
+      */
+     public ContainerType(String type)
+     {
+         this.type = type;
+     }
+ 
+     /**
+      * Transform a type represented as a string into a {@link ContainerType} object.
+      * 
+      * @param typeAsString the string to transform
+      * @return the {@link ContainerType} object
+      */
+     public static ContainerType toType(String typeAsString)
+     {
+         ContainerType type;
+         if (typeAsString.equalsIgnoreCase(INSTALLED.getType()))
+         {
+             type = INSTALLED;
+         }
+         else if (typeAsString.equalsIgnoreCase(EMBEDDED.getType()))
+         {
+             type = EMBEDDED;
+         }
+         else if (typeAsString.equalsIgnoreCase(REMOTE.getType()))
+         {
+             type = REMOTE;
+         }
+         else
+         {
+             type = new ContainerType(typeAsString);
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object != null && object instanceof ContainerType)
+         {
+             ContainerType type = (ContainerType) object;
+             if (type.getType().equals(getType()))
+             {
+                 result = true;
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.type.hashCode();
+     }
+ 
+     /**
+      * @return the container's type as a string
+      */
+     public String getType()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getType();
+     }
+ 
+     /**
+      * @return true if the container type is a local type (installed or embedded)
+      */
+     public boolean isLocal()
+     {
+         return this == INSTALLED || this == EMBEDDED;
+     }
+ 
+     /**
+      * @return true if the container type is a remote type
+      */
+     public boolean isRemote()
+     {
+         return this == REMOTE;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-3.html b/htmlReport/ns-1/sources/source-3.html new file mode 100644 index 0000000000..aaa7dd9159 --- /dev/null +++ b/htmlReport/ns-1/sources/source-3.html @@ -0,0 +1,209 @@ + + + + + + + + Coverage Report > State + + + + + + +
+ + +

Coverage Summary for Class: State (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
State + + 100% + + + (1/1) + + + + 28.6% + + + (2/7) + + + + 58.3% + + + (7/12) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ /**
+  * Represent the container states (started, starting, stopped, etc).
+  */
+ public final class State
+ {
+     /**
+      * State when container is started.
+      */
+     public static final State STARTED = new State("started");
+ 
+     /**
+      * State when container is stopped.
+      */
+     public static final State STOPPED = new State("stopped");
+ 
+     /**
+      * State when container is starting.
+      */
+     public static final State STARTING = new State("starting");
+ 
+     /**
+      * State when container is stopping.
+      */
+     public static final State STOPPING = new State("stopping");
+ 
+     /**
+      * Unknown state.
+      */
+     public static final State UNKNOWN = new State("unknown");
+ 
+     /**
+      * Textual representation of the state.
+      */
+     private String stateText;
+ 
+     /**
+      * @param stateText the textual representation of the state
+      */
+     private State(String stateText)
+     {
+         this.stateText = stateText;
+     }
+ 
+     /**
+      * @return the textual representation of the state
+      */
+     @Override
+     public String toString()
+     {
+         return this.stateText;
+     }
+ 
+     /**
+      * @return true if the container is started
+      */
+     public boolean isStarted()
+     {
+         return this.stateText.equals("started");
+     }
+ 
+     /**
+      * @return true if the container is stopped
+      */
+     public boolean isStopped()
+     {
+         return this.stateText.equals("stopped");
+     }
+ 
+     /**
+      * @return true if the container is starting
+      */
+     public boolean isStarting()
+     {
+         return this.stateText.equals("starting");
+     }
+ 
+     /**
+      * @return true if the container is stopping
+      */
+     public boolean isStopping()
+     {
+         return this.stateText.equals("stopping");
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-4.html b/htmlReport/ns-1/sources/source-4.html new file mode 100644 index 0000000000..997e0b410e --- /dev/null +++ b/htmlReport/ns-1/sources/source-4.html @@ -0,0 +1,104 @@ + + + + + + + + Coverage Report > EmbeddedLocalContainer + + + + + + +
+ + +

Coverage Summary for Class: EmbeddedLocalContainer (org.codehaus.cargo.container)

+ + + + + + + + + +
Class
EmbeddedLocalContainer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ /**
+  * Represents an embedded container which only requires the correct JARs in the classpath to work.
+  */
+ public interface EmbeddedLocalContainer extends LocalContainer
+ {
+     /**
+      * @return the classloader used to load the embedded container's classes
+      */
+     ClassLoader getClassLoader();
+ 
+     /**
+      * @param classLoader the classloader to use to load the embedded container's classes
+      */
+     void setClassLoader(ClassLoader classLoader);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-5.html b/htmlReport/ns-1/sources/source-5.html new file mode 100644 index 0000000000..d15c7987a5 --- /dev/null +++ b/htmlReport/ns-1/sources/source-5.html @@ -0,0 +1,124 @@ + + + + + + + + Coverage Report > InstalledLocalContainer + + + + + + +
+ + +

Coverage Summary for Class: InstalledLocalContainer (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + + + + +
Class
InstalledLocalContainer$MockitoMock$L1uZuq1I
InstalledLocalContainer$MockitoMock$L1uZuq1I$auxiliary$3ikisOhc
InstalledLocalContainer$MockitoMock$L1uZuq1I$auxiliary$bdbQbUpy
Total
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.container.internal.SpawnedContainer;
+ 
+ /**
+  * Represents a local container that requires an installation to work. The installation is where the
+  * container's runtime is located.
+  */
+ public interface InstalledLocalContainer extends LocalContainer, SpawnedContainer
+ {
+     /**
+      * @return the directory where the container is installed. Note that we're returning a String
+      * instead of a File because we want to leave the possibility of using URIs for specifying the
+      * home location.
+      */
+     String getHome();
+ 
+     /**
+      * @param home the directory where the container is installed. Note that we're passing a String
+      * instead of a File because we want to leave the possibility of using URIs for specifying the
+      * home location. <b>IMPORTANT</b>: While some containers can deal with this parameter being
+      * set as a relative path, some others require this path to be set to an absolute directory.
+      * Please refer to the documentation of the server to ensure you give the path in the
+      * appropriate way. If in doubt, you can use absolute paths -that is known to work with all
+      * containers.
+      */
+     void setHome(String home);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-6.html b/htmlReport/ns-1/sources/source-6.html new file mode 100644 index 0000000000..15a04f10d5 --- /dev/null +++ b/htmlReport/ns-1/sources/source-6.html @@ -0,0 +1,127 @@ + + + + + + + + Coverage Report > Container + + + + + + +
+ + +

Coverage Summary for Class: Container (org.codehaus.cargo.container)

+ + + + + + + + + +
Class
Container
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * Common container API to wrap a physical container. There can be specialized types of containers
+  * such as {@link org.codehaus.cargo.container.LocalContainer} or
+  * {@link org.codehaus.cargo.container.RemoteContainer}.
+  */
+ public interface Container extends Loggable
+ {
+     /**
+      * @return the short name of the container. Note: this is not a unique id. It is simply the name
+      * in a computer-usable format.
+      */
+     String getId();
+ 
+     /**
+      * @return the human readable name of the Container (ex: "Resin 3.x", "JBoss 3.0.8", etc).
+      */
+     String getName();
+ 
+     /**
+      * @return the {@link ContainerCapability} of the container in term of ability to deploy such
+      * and such type of {@link org.codehaus.cargo.container.deployable.Deployable}s (eg WAR, EAR,
+      * etc).
+      */
+     ContainerCapability getCapability();
+ 
+     /**
+      * @return the container state (Valid states are Container.STOPPED, Container.STARTED,
+      * Container.STARTING and Container.STOPPING)
+      */
+     State getState();
+ 
+     /**
+      * @return the container's type (local , remote, etc)
+      */
+     ContainerType getType();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-7.html b/htmlReport/ns-1/sources/source-7.html new file mode 100644 index 0000000000..43ae989e64 --- /dev/null +++ b/htmlReport/ns-1/sources/source-7.html @@ -0,0 +1,112 @@ + + + + + + + + Coverage Report > ScriptingCapableContainer + + + + + + +
+ + +

Coverage Summary for Class: ScriptingCapableContainer (org.codehaus.cargo.container)

+ + + + + + + + + +
Class
ScriptingCapableContainer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.configuration.script.ScriptCommand;
+ 
+ /**
+  * Represents container capable of executing configuration scripts.
+  */
+ public interface ScriptingCapableContainer extends Container
+ {
+     /**
+      * Executes script defined as list of script commands against container.
+      * 
+      * @param configurationScript List of script commands.
+      */
+     void executeScript(List<ScriptCommand> configurationScript);
+ 
+     /**
+      * Executes scripts stored in script files against container.
+      * 
+      * @param scriptFilePaths List of script file paths.
+      */
+     void executeScriptFiles(List<String> scriptFilePaths);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-8.html b/htmlReport/ns-1/sources/source-8.html new file mode 100644 index 0000000000..b20a226c38 --- /dev/null +++ b/htmlReport/ns-1/sources/source-8.html @@ -0,0 +1,114 @@ + + + + + + + + Coverage Report > ContainerCapability + + + + + + +
+ + +

Coverage Summary for Class: ContainerCapability (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + + + + +
Class
ContainerCapability$MockitoMock$jcejIqYi
ContainerCapability$MockitoMock$jcejIqYi$auxiliary$n2qcgKiE
ContainerCapability$MockitoMock$jcejIqYi$auxiliary$QC2LFKlU
Total
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.container.deployable.DeployableType;
+ 
+ /**
+  * Represents the capability of a container. More specifically what deployable type it supports,
+  * etc.
+  */
+ public interface ContainerCapability
+ {
+     /**
+      * Checks if the container supports the specified deployable type or not.
+      * 
+      * @param type the deployable type
+      * @return true if the container supports the specified deployable type
+      */
+     boolean supportsDeployableType(DeployableType type);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-9.html b/htmlReport/ns-1/sources/source-9.html new file mode 100644 index 0000000000..6f74866462 --- /dev/null +++ b/htmlReport/ns-1/sources/source-9.html @@ -0,0 +1,122 @@ + + + + + + + + Coverage Report > LocalContainer + + + + + + +
+ + +

Coverage Summary for Class: LocalContainer (org.codehaus.cargo.container)

+ + + + + + + + + +
Class
LocalContainer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.internal.RunnableContainer;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * A local container is a container that executes on the machine where Cargo is executing. A local
+  * container can be started and stopped and is thus controlled by Cargo. This is by opposition to a
+  * remote container which is outside the control of Cargo and which is started and stopped
+  * externally from Cargo.
+  */
+ public interface LocalContainer extends Container, RunnableContainer
+ {
+     /**
+      * @param configuration the local configuration implementation to use
+      */
+     void setConfiguration(LocalConfiguration configuration);
+ 
+     /**
+      * @return the local configuration to use
+      * @see #setConfiguration(LocalConfiguration)
+      */
+     LocalConfiguration getConfiguration();
+ 
+     /**
+      * @param handler means by which we affect local files.
+      */
+     void setFileHandler(FileHandler handler);
+ 
+     /**
+      * @return the means by which we affect local files.
+      */
+     FileHandler getFileHandler();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1/sources/source-a.html b/htmlReport/ns-1/sources/source-a.html new file mode 100644 index 0000000000..a7bc1aeb27 --- /dev/null +++ b/htmlReport/ns-1/sources/source-a.html @@ -0,0 +1,117 @@ + + + + + + + + Coverage Report > RemoteContainer + + + + + + +
+ + +

Coverage Summary for Class: RemoteContainer (org.codehaus.cargo.container)

+ + + + + + + + + + + + + + + + + + +
Class
RemoteContainer$MockitoMock$SqXSJ5js
RemoteContainer$MockitoMock$SqXSJ5js$auxiliary$22H7DG6h
RemoteContainer$MockitoMock$SqXSJ5js$auxiliary$OviDGWPn
Total
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container;
+ 
+ import org.codehaus.cargo.container.configuration.RuntimeConfiguration;
+ 
+ /**
+  * A remote container is a container that is already installed and started (locally or on a remote
+  * machine). It is accessed remotely without any file system access.
+  */
+ public interface RemoteContainer extends Container
+ {
+     /**
+      * @param configuration the runtime configuration implementation to use
+      */
+     void setConfiguration(RuntimeConfiguration configuration);
+ 
+     /**
+      * @return the runtime configuration to use
+      * @see #setConfiguration(RuntimeConfiguration)
+      */
+     RuntimeConfiguration getConfiguration();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-10/index.html b/htmlReport/ns-10/index.html new file mode 100644 index 0000000000..575fb99562 --- /dev/null +++ b/htmlReport/ns-10/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_BLOCK.html b/htmlReport/ns-10/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..8b147a60b4 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..d632337ac9 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_CLASS.html b/htmlReport/ns-10/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..488c21076a --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..b1e601e109 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_LINE.html b/htmlReport/ns-10/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..5537402d72 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..ab4c7d5c96 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_METHOD.html b/htmlReport/ns-10/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..232793ccb4 --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..b06d5cbb8d --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..8ab53dc62d --- /dev/null +++ b/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration.builder

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration.builder + + 0% + + + (0/2) + + + + 0% + + + (0/10) + + + + 0% + + + (0/43) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-10/sources/source-1.html b/htmlReport/ns-10/sources/source-1.html new file mode 100644 index 0000000000..17428acc35 --- /dev/null +++ b/htmlReport/ns-10/sources/source-1.html @@ -0,0 +1,258 @@ + + + + + + + + Coverage Report > AbstractConfigurationBuilder + + + + + + +
+ + +

Coverage Summary for Class: AbstractConfigurationBuilder (org.codehaus.cargo.container.spi.configuration.builder)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration.builder;
+ 
+ import org.codehaus.cargo.container.configuration.builder.ConfigurationBuilder;
+ import org.codehaus.cargo.container.configuration.builder.ConfigurationEntryType;
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.property.TransactionSupport;
+ 
+ /**
+  * {@inheritDoc}
+  */
+ public abstract class AbstractConfigurationBuilder implements ConfigurationBuilder
+ {
+     /**
+      * {@inheritDoc} Detects the type of <code>DataSource</code> to configure based on transactional
+      * properties and implementation class.
+      */
+     @Override
+     public String toConfigurationEntry(DataSource ds)
+     {
+         String returnVal = " ";
+         switch (ds.getConnectionType())
+         {
+             case ConfigurationEntryType.JDBC_DRIVER:
+                 returnVal = buildEntryForDriverConfiguredDataSource(ds);
+                 break;
+             case ConfigurationEntryType.XA_DATASOURCE:
+                 returnVal = buildConfigurationEntryForXADataSourceConfiguredDataSource(ds);
+                 break;
+             default:
+                 throw new IllegalArgumentException("Connection Type: " + ds.getConnectionType()
+                     + " not supported");
+         }
+ 
+         return returnVal;
+     }
+ 
+     /**
+      * This method looks at the transactional support for the DataSource and builds an appropriate
+      * configuration entry.
+      * 
+      * @param ds the {@link DataSource} with the following state:
+      * <ul>
+      * <li>{@link DataSource#getJndiLocation()} is set to a unique path for the container.</li>
+      * <li>{@link DataSource#getDriverClass()} is an implementation of
+      * <code>java.sql.Driver</code></li>
+      * </ul>
+      * @return configuration binding a container provided implementation of type
+      * <code>javax.sql.DataSource</code> to the JNDI path specified at
+      * {@link DataSource#getJndiLocation()}.
+      */
+     private String buildEntryForDriverConfiguredDataSource(DataSource ds)
+     {
+         String returnVal = null;
+ 
+         if (ds.getTransactionSupport().equals(TransactionSupport.NO_TRANSACTION))
+         {
+             returnVal = buildEntryForDriverConfiguredDataSourceWithNoTx(ds);
+         }
+         else if (ds.getTransactionSupport().equals(TransactionSupport.LOCAL_TRANSACTION))
+         {
+             returnVal = buildEntryForDriverConfiguredDataSourceWithLocalTx(ds);
+         }
+         else if (ds.getTransactionSupport().equals(TransactionSupport.XA_TRANSACTION))
+         {
+             returnVal = buildEntryForDriverConfiguredDataSourceWithXaTx(ds);
+         }
+         else
+         {
+             throw new IllegalArgumentException("Transaction support: "
+                 + ds.getTransactionSupport() + " not supported");
+         }
+         return returnVal;
+     }
+ 
+     /**
+      * @param ds the {@link DataSource} with the following state:
+      * <ul>
+      * <li>{@link DataSource#getJndiLocation()} is set to a unique path for the container.</li>
+      * <li>{@link DataSource#getDriverClass()} is an implementation of
+      * <code>java.sql.Driver</code></li>
+      * <li>{@link DataSource#getTransactionSupport()} is
+      * <code>TransactionSupport.XA_TRANSACTION</code></li>
+      * </ul>
+      * @return configuration binding a container provided implementation of type
+      * <code>javax.sql.DataSource</code> to the JNDI path specified at
+      * {@link DataSource#getJndiLocation()}.
+      */
+     public abstract String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds);
+ 
+     /**
+      * @param ds the {@link DataSource} with the following state:
+      * <ul>
+      * <li>{@link DataSource#getJndiLocation()} is set to a unique path for the container.</li>
+      * <li>{@link DataSource#getDriverClass()} is an implementation of
+      * <code>java.sql.Driver</code></li>
+      * <li>{@link DataSource#getTransactionSupport()} is
+      * <code>TransactionSupport.LOCAL_TRANSACTION</code></li>
+      * </ul>
+      * @return configuration binding a container provided implementation of type
+      * <code>javax.sql.DataSource</code> to the JNDI path specified at
+      * {@link DataSource#getJndiLocation()}.
+      */
+     public abstract String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds);
+ 
+     /**
+      * @param ds the {@link DataSource} with the following state:
+      * <ul>
+      * <li>{@link DataSource#getJndiLocation()} is set to a unique path for the container.</li>
+      * <li>{@link DataSource#getDriverClass()} is an implementation of
+      * <code>java.sql.Driver</code></li>
+      * <li>{@link DataSource#getTransactionSupport()} is
+      * <code>TransactionSupport.NO_TRANSACTION</code></li>
+      * </ul>
+      * @return configuration binding a container provided implementation of type
+      * <code>javax.sql.DataSource</code> to the JNDI path specified at
+      * {@link DataSource#getJndiLocation()}.
+      */
+     public abstract String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds);
+ 
+     /**
+      * @param ds the {@link DataSource} with the following state:
+      * <ul>
+      * <li>{@link DataSource#getJndiLocation()} is set to a unique path for the container.</li>
+      * <li>{@link DataSource#getConnectionType()} is <code>javax.sql.XADataSource</code></li>
+      * <li>{@link DataSource#getDriverClass()} is an implementation of
+      * <code>javax.sql.XADataSource</code></li>
+      * </ul>
+      * @return configuration binding a container provided implementation of type
+      * <code>javax.sql.DataSource</code> to the JNDI path specified at
+      * {@link DataSource#getJndiLocation()}. This container will provide XA support through the
+      * third party implementation specified at {@link DataSource#getDriverClass()}.
+      */
+     public abstract String buildConfigurationEntryForXADataSourceConfiguredDataSource(
+         DataSource ds);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-10/sources/source-2.html b/htmlReport/ns-10/sources/source-2.html new file mode 100644 index 0000000000..1c2142f929 --- /dev/null +++ b/htmlReport/ns-10/sources/source-2.html @@ -0,0 +1,294 @@ + + + + + + + + Coverage Report > AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + + + + + +
+ + +

Coverage Summary for Class: AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder (org.codehaus.cargo.container.spi.configuration.builder)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/24) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration.builder;
+ 
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.configuration.builder.ConfigurationBuilder;
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.configuration.entry.DataSourceSupport;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.configuration.entry.ResourceSupport;
+ import org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration;
+ import org.codehaus.cargo.util.DefaultXmlFileBuilder;
+ import org.codehaus.cargo.util.XmlFileBuilder;
+ 
+ /**
+  * {@inheritDoc} Convenience class that simplifies development of
+  * {@link org.codehaus.cargo.container.configuration.StandaloneLocalConfiguration} configurations
+  * with {@link DataSourceSupport}. It does this by implementing {@link DataSourceSupport} and
+  * instead asking for the inputs to this:
+  * <ol>
+  * <li> {@link createConfigurationBuilder}: how do we generate the xml element(s) representing the
+  * datasource</li>
+  * <li> {@link getXpathForDataSourcesParent}: under which element should datasource elements be
+  * inserted?</li>
+  * <li> {@link getNamespaces}: does this configuration file use namespaces?</li>
+  * <li> {@link getOrCreateDataSourceConfigurationFile}: where do we load and store the datasource
+  * configuration?</li>
+  * </ol>
+  */
+ public abstract class AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder extends
+     AbstractStandaloneLocalConfiguration implements DataSourceSupport, ResourceSupport
+ {
+ 
+     /**
+      * {@inheritDoc}
+      * 
+      * @param dir configuration home
+      */
+     public AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder(String dir)
+     {
+         super(dir);
+     }
+ 
+     /**
+      * Implementations should avoid passing null, and instead pass
+      * <code>Collections.EMPTY_MAP</code>, if the document is DTD bound.
+      * 
+      * @return a map of prefixes to the url namespaces used in the datasource configuration file.
+      */
+     protected abstract Map<String, String> getNamespaces();
+ 
+     /**
+      * DataSource entries must be stored in the xml configuration file. Under which element do we
+      * insert the entries? example: //Engine/DefaultContext
+      * 
+      * @return path the the parent element datasources should be inserted under.
+      */
+     protected abstract String getXpathForDataSourcesParent();
+ 
+     /**
+      * Resource entries must be stored in the xml configuration file. Under which element do we
+      * insert the entries? example: //Engine/DefaultContext
+      * 
+      * @return path the the parent element Resources should be inserted under.
+      */
+     protected abstract String getXpathForResourcesParent();
+ 
+     /**
+      * note that this file could hold other configuration besides datasources.
+      * 
+      * @param ds the DataSource configuration you wish to install on the container.
+      * @param container the container whose configuration you wish to affect.
+      * @return the file that holds datasource configuration.
+      */
+     protected abstract String getOrCreateDataSourceConfigurationFile(DataSource ds,
+         LocalContainer container);
+ 
+     /**
+      * note that this file could hold other configuration besides Resources.
+      * 
+      * @param resource the Resource configuration you wish to install on the container.
+      * @param container the container whose configuration you wish to affect.
+      * @return the file that holds Resource configuration.
+      */
+     protected abstract String getOrCreateResourceConfigurationFile(Resource resource,
+         LocalContainer container);
+ 
+     /**
+      * @param container Container the dataSource will be configured on.
+      * @return the object that produces xml entries for DataSource definitions.
+      */
+     protected abstract ConfigurationBuilder createConfigurationBuilder(LocalContainer container);
+ 
+     /**
+      * Configure the specified container.
+      * 
+      * @param container the container to configure
+      */
+     @Override
+     public void configure(LocalContainer container)
+     {
+         super.configure(container);
+         configureDataSources(container);
+         configureResources(container);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void configureDataSources(LocalContainer container)
+     {
+         for (DataSource dataSource : getDataSources())
+         {
+             configure(dataSource, container);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void configure(Resource ds, LocalContainer container)
+     {
+         ConfigurationBuilder builder = this.createConfigurationBuilder(container);
+         String xml = builder.toConfigurationEntry(ds);
+         String file = getOrCreateResourceConfigurationFile(ds, container);
+         writeConfigurationToXpath(file, xml, getXpathForResourcesParent());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void configureResources(LocalContainer container)
+     {
+         for (Resource resource : getResources())
+         {
+             configure(resource, container);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void configure(DataSource ds, LocalContainer container)
+     {
+         ConfigurationBuilder builder = this.createConfigurationBuilder(container);
+         String file = getOrCreateDataSourceConfigurationFile(ds, container);
+         String xml = builder.toConfigurationEntry(ds);
+         writeConfigurationToXpath(file, xml, getXpathForDataSourcesParent());
+     }
+ 
+     /**
+      * Utility method used to write XML to an appropriate place in the configuration file.
+      * 
+      * @param file where to write the datasource configuration to.
+      * @param xml node you wish to write to the resources configuration file.
+      * @param path where in the file to write the configuration.
+      */
+     protected void writeConfigurationToXpath(String file, String xml, String path)
+     {
+         XmlFileBuilder manager = new DefaultXmlFileBuilder(getFileHandler());
+         manager.setNamespaces(getNamespaces());
+         manager.setFile(file);
+         manager.loadFile();
+         manager.insertElementsUnderXPath(xml, path);
+         manager.writeFile();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-11/index.html b/htmlReport/ns-11/index.html new file mode 100644 index 0000000000..4558b66859 --- /dev/null +++ b/htmlReport/ns-11/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_BLOCK.html b/htmlReport/ns-11/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..22e1776cf2 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..7ec9e3fd02 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_CLASS.html b/htmlReport/ns-11/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..1cdebba42d --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..c03e379247 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_LINE.html b/htmlReport/ns-11/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..cc8847a997 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..45f43c9a46 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_METHOD.html b/htmlReport/ns-11/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..4689b80b74 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..456bfe4a3f --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..96a6e6aeb7 --- /dev/null +++ b/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployable + + 100% + + + (2/2) + + + + 66.7% + + + (10/15) + + + + 61.3% + + + (19/31) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-11/sources/source-1.html b/htmlReport/ns-11/sources/source-1.html new file mode 100644 index 0000000000..d230c197b7 --- /dev/null +++ b/htmlReport/ns-11/sources/source-1.html @@ -0,0 +1,272 @@ + + + + + + + + Coverage Report > AbstractDeployable + + + + + + +
+ + +

Coverage Summary for Class: AbstractDeployable (org.codehaus.cargo.container.spi.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDeployable + + 100% + + + (1/1) + + + + 63.6% + + + (7/11) + + + + 60.9% + + + (14/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployable;
+ 
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Common class for easy Deployable implementations.
+  */
+ public abstract class AbstractDeployable extends LoggedObject implements Deployable
+ {
+     /**
+      * The location of the Deployable file being wrapped.
+      */
+     private String file;
+ 
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * @param file the location of the deployable file being wrapped.
+      */
+     public AbstractDeployable(String file)
+     {
+         this.file = file;
+         this.fileHandler = new DefaultFileHandler();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFile()
+     {
+         return this.file;
+     }
+ 
+     /**
+      * @return the Cargo file utility class
+      */
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the Cargo file utility class to use. This method is useful for unit
+      * testing with Mock objects as it can be passed a test file handler that doesn't perform any
+      * real file action.
+      */
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * {@inheritDoc}
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         this.fileHandler.setLogger(logger);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isExpanded()
+     {
+         return getFileHandler().isDirectory(getFile());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         if (getFileHandler() != null && getFile() != null)
+         {
+             return this.getClass().getName() + "[" + getFileHandler().getName(getFile()) + "]";
+         }
+         else
+         {
+             return this.getClass().getName() + "[File not set]";
+         }
+     }
+ 
+     /**
+      * Returns the name of this deployable. Default value is computed from the
+      * Deployable file name (removing the filename extension).
+      * @return the name of this deployable
+      */
+     @Override
+     public String getName()
+     {
+         String name = getFileHandler().getName(getFile());
+         int nameIndex = name.lastIndexOf('.');
+         if (nameIndex >= 0)
+         {
+             name = name.substring(0, nameIndex);
+         }
+         return name;
+     }
+ 
+     /**
+      * {@inheritDoc}<br>
+      * <br>
+      * Default value is the Deployable file name.
+      */
+     @Override
+     public String getFilename()
+     {
+         return getFileHandler().getName(getFile());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object != null && object instanceof AbstractDeployable)
+         {
+             return object.toString().equals(this.toString());
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.toString().hashCode();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-11/sources/source-2.html b/htmlReport/ns-11/sources/source-2.html new file mode 100644 index 0000000000..aee092e861 --- /dev/null +++ b/htmlReport/ns-11/sources/source-2.html @@ -0,0 +1,183 @@ + + + + + + + + Coverage Report > AbstractDeployablewithSettableName + + + + + + +
+ + +

Coverage Summary for Class: AbstractDeployablewithSettableName (org.codehaus.cargo.container.spi.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDeployablewithSettableName + + 100% + + + (1/1) + + + + 75% + + + (3/4) + + + + 62.5% + + + (5/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployable;
+ 
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ 
+ /**
+  * Common class for easy Deployable implementations with settable names.
+  */
+ public abstract class AbstractDeployablewithSettableName extends AbstractDeployable
+ {
+     /**
+      * The name of this deployable (it can be anything, there's no special rule). If not specified
+      * by user, it is computed from the EAR's file name (removing the filename extension).
+      */
+     private String name;
+ 
+     /**
+      * @param file the location of the deployable file being wrapped.
+      */
+     public AbstractDeployablewithSettableName(String file)
+     {
+         super(file);
+         this.name = super.getName();
+     }
+ 
+     /**
+      * Sets the name of this deployable. It can be anything (there's no special rule), except
+      * <code>null</code> or an empty string.
+      * @param name the name of this deployable
+      */
+     public void setName(String name)
+     {
+         if (name == null || DefaultFileHandler.sanitizeFilename(name, getLogger()).isEmpty())
+         {
+             throw new NullPointerException("Custom deployable name cannot be null or empty");
+         }
+         this.name = name;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getName()
+     {
+         return this.name;
+     }
+ 
+     /**
+      * {@inheritDoc}<br>
+      * <br>
+      * Default value is the Deployable sanitized {@link #getName()} with the deployable type as
+      * extension.
+      */
+     @Override
+     public String getFilename()
+     {
+         return DefaultFileHandler.sanitizeFilename(
+             getName() + "." + getType().getType(), getLogger());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/index.html b/htmlReport/ns-12/index.html new file mode 100644 index 0000000000..941afcf10a --- /dev/null +++ b/htmlReport/ns-12/index.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_BLOCK.html b/htmlReport/ns-12/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..7625b333c2 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_BLOCK.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..742c654e1e --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_CLASS.html b/htmlReport/ns-12/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..0ea511f6d5 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_CLASS.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ede8a8b710 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_LINE.html b/htmlReport/ns-12/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..a8f9f6a03e --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_LINE.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..bad326ed59 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_METHOD.html b/htmlReport/ns-12/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..e4b5a83e81 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_METHOD.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..ed5d2b0d8b --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..cbb6768700 --- /dev/null +++ b/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.deployer + + 66.7% + + + (6/9) + + + + 37% + + + (20/54) + + + + 24.1% + + + (77/320) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-1.html b/htmlReport/ns-12/sources/source-1.html new file mode 100644 index 0000000000..05b37a767d --- /dev/null +++ b/htmlReport/ns-12/sources/source-1.html @@ -0,0 +1,378 @@ + + + + + + + + Coverage Report > AbstractCopyingInstalledLocalDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractCopyingInstalledLocalDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractCopyingInstalledLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 84.5% + + + (49/58) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.Collections;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Set;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.deployable.DeployableType;
+ import org.codehaus.cargo.container.deployable.EAR;
+ import org.codehaus.cargo.container.deployable.WAR;
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Local deployer that deploys deployables to a <code>deployable</code> directory of the given
+  * installed container. Note that this deployer supports some expanded deployables by copying the
+  * expanded deployable to the <code>deployable</code> directory. In other words it does not
+  * support in-place expanded deployables (e.g. expanded WARs located in a different directory).
+  */
+ public abstract class AbstractCopyingInstalledLocalDeployer extends
+     AbstractInstalledLocalDeployer
+ {
+     /**
+      * Contains those DeployableTypes that should not be deployed expanded. Default is to allow
+      * expanded deployment and the exceptions to that rule are set here.
+      */
+     private Set<DeployableType> doNotDeployExpanded = new HashSet<DeployableType>();
+ 
+     /**
+      * Deployed Deployables.
+      */
+     private List<Deployable> deployedDeployables;
+ 
+     /**
+      * {@inheritDoc}
+      * @see AbstractInstalledLocalDeployer#AbstractInstalledLocalDeployer(org.codehaus.cargo.container.LocalContainer)
+      */
+     public AbstractCopyingInstalledLocalDeployer(LocalContainer container)
+     {
+         super(container);
+ 
+         this.deployedDeployables = new ArrayList<Deployable>();
+     }
+ 
+     /**
+      * Decide whether some expanded deployables of the specified type should be deployed or not.
+      * Some classes using this deployer may not want to deploy some expanded deployables, as they
+      * may want to deploy them in-situ by modifying the container's configuration file to point
+      * to the location of the expanded deployable. This saves some copying time and make it easier
+      * for development round-trips.
+      * 
+      * @param type the deployable type
+      * @param flag whether expanded deployment of the specified deployment type should be allowed
+      *            or not
+      */
+     public void setShouldDeployExpanded(DeployableType type, boolean flag)
+     {
+         if (flag)
+         {
+             this.doNotDeployExpanded.remove(type);
+         }
+         else
+         {
+             this.doNotDeployExpanded.add(type);
+         }
+     }
+ 
+     /**
+      * @param type the deployable type
+      * @return whether expanded deployment of the specified deployment type should be done
+      */
+     protected boolean shouldDeployExpanded(DeployableType type)
+     {
+         return !this.doNotDeployExpanded.contains(type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public synchronized void deploy(Deployable deployable)
+     {
+         if (!canBeDeployed(deployable))
+         {
+             throw new ContainerException("Failed to deploy [" + deployable.getFile() + "] to ["
+                 + getDeployableDir(deployable) + "]. The required web context is already in use"
+                 + " by another application.");
+         }
+ 
+         // Check that the container supports the deployable type to deploy
+         if (!getContainer().getCapability().supportsDeployableType(deployable.getType()))
+         {
+             throw new ContainerException(deployable.getType().getType().toUpperCase()
+                 + " archives are not supported for deployment in [" + getContainer().getId()
+                 + "]. Got [" + deployable.getFile() + "]");
+         }
+ 
+         String deployableDir = getDeployableDir(deployable);
+ 
+         try
+         {
+             if (deployable.isExpanded())
+             {
+                 if (!shouldDeployExpanded(deployable.getType()))
+                 {
+                     throw new ContainerException("Container " + getContainer().getName()
+                         + " cannot deploy expanded " + deployable.getType() + " deployables");
+                 }
+ 
+                 if (!getFileHandler().isDirectory(deployable.getFile()))
+                 {
+                     throw new ContainerException("The deployable's file " + deployable.getFile()
+                         + " is not a directory, hence cannot be deployed as expanded");
+                 }
+             }
+ 
+             doDeploy(deployableDir, deployable);
+         }
+         catch (Exception e)
+         {
+             throw new ContainerException("Failed to deploy [" + deployable.getFile() + "] to ["
+                 + deployableDir + "]", e);
+         }
+ 
+         this.deployedDeployables.add(deployable);
+     }
+ 
+     /**
+      * Checks whether the given Deployable can actually be deployed and whether a deployable has a
+      * web context path that already exist in another previously deployed Deployable.
+      * 
+      * @param newDeployable deployable
+      * @return true, if the deployable can be deployed
+      */
+     protected boolean canBeDeployed(Deployable newDeployable)
+     {
+         final Set<String> newDeployableContextSet = getWebContextsSet(newDeployable);
+         for (Deployable deployedDeployable : this.deployedDeployables)
+         {
+             for (String webContext : getWebContexts(deployedDeployable))
+             {
+                 if (newDeployableContextSet.contains(webContext))
+                 {
+                     return false;
+                 }
+             }
+         }
+         return true;
+     }
+ 
+     /**
+      * Adapter method - to hide the fact that there is no unified API to retrieve web contexts from
+      * a deployable.
+      * 
+      * @param deployable deployable
+      * @return a list of all web contexts this deployable uses
+      */
+     private static List<String> getWebContexts(Deployable deployable)
+     {
+         List<String> webContexts;
+         if (deployable.getType() == DeployableType.EAR)
+         {
+             webContexts = ((EAR) deployable).getWebContexts();
+         }
+         else if (deployable.getType() == DeployableType.WAR)
+         {
+             webContexts = Arrays.asList(new String[] {((WAR) deployable).getContext()});
+         }
+         else
+         {
+             webContexts = Collections.emptyList();
+         }
+         return webContexts;
+     }
+ 
+     /**
+      * Create a set of all web contexts for a Deployable.
+      * 
+      * @param deployable Deployable
+      * @return a set of all web contexts contained in this deployable.
+      */
+     private static Set<String> getWebContextsSet(Deployable deployable)
+     {
+         final Set<String> webContextSet = new HashSet<String>();
+         for (String webContext : getWebContexts(deployable))
+         {
+             webContextSet.add(webContext);
+         }
+         return webContextSet;
+     }
+ 
+     /**
+      * Specifies the directory {@link org.codehaus.cargo.container.deployable.Deployable}s should be
+      * copied to.
+      * 
+      * @param deployable Deployable to deploy.
+      * @return Deployable directory
+      */
+     public abstract String getDeployableDir(Deployable deployable);
+ 
+     /**
+      * Do the actual deployment. This can be overriden.
+      * @param deployableDir Directory in which to deploy.
+      * @param deployable Deployable to deploy.
+      */
+     protected void doDeploy(String deployableDir, Deployable deployable)
+     {
+         getLogger().info("Deploying [" + deployable.getFile() + "] to [" + deployableDir + "]...",
+             this.getClass().getName());
+ 
+         if (!getFileHandler().isDirectory(deployableDir))
+         {
+             throw new CargoException("Target deployable directory does not exist: "
+                 + deployableDir);
+         }
+ 
+         String target = getFileHandler().append(deployableDir, getDeployableName(deployable));
+         if (deployable.isExpanded())
+         {
+             if (getFileHandler().exists(target) && !getFileHandler().isDirectory(target))
+             {
+                 // We are trying to deploy an expanded deployable but there already exists a file
+                 // with the same name as the deployable. Delete, else we have bug CARGO-1037.
+                 getFileHandler().delete(target);
+             }
+ 
+             getFileHandler().copyDirectory(deployable.getFile(), target);
+         }
+         else
+         {
+             if (getFileHandler().exists(target) && getFileHandler().isDirectory(target))
+             {
+                 // We are trying to deploy a file deployable but there already exists a directory
+                 // with the same name as the deployable. Delete, else we have bug CARGO-1037.
+                 getFileHandler().delete(target);
+             }
+ 
+             getFileHandler().copyFile(deployable.getFile(), target, true);
+         }
+     }
+ 
+     /**
+      * Gets the deployable name for the given <code>deployable</code>.
+      * @param deployable Deployable to get the name for.
+      * @return Deployable name.
+      */
+     protected String getDeployableName(Deployable deployable)
+     {
+         return deployable.getFilename();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-2.html b/htmlReport/ns-12/sources/source-2.html new file mode 100644 index 0000000000..541de65e5c --- /dev/null +++ b/htmlReport/ns-12/sources/source-2.html @@ -0,0 +1,352 @@ + + + + + + + + Coverage Report > AbstractDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDeployer + + 100% + + + (1/1) + + + + 15.4% + + + (2/13) + + + + 11.1% + + + (7/63) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import java.io.PrintWriter;
+ import java.io.StringWriter;
+ import java.io.Writer;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.deployer.DeployableMonitor;
+ import org.codehaus.cargo.container.deployer.Deployer;
+ import org.codehaus.cargo.util.log.LogLevel;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Base deployer for local and remote deployments.
+  */
+ public abstract class AbstractDeployer extends LoggedObject implements Deployer
+ {
+     /**
+      * @param container the container into which to perform deployment operations
+      */
+     public AbstractDeployer(Container container)
+     {
+         setLogger(container.getLogger());
+     }
+ 
+     /**
+      * Helper method to deploy multiple deployables at a time.
+      * @see Deployer#deploy(Deployable)
+      * @param deployables Deployables to deploy.
+      */
+     public void deploy(List<Deployable> deployables)
+     {
+         for (Deployable deployable : deployables)
+         {
+             deploy(deployable);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void deploy(Deployable deployable, DeployableMonitor monitor)
+     {
+         try
+         {
+             deploy(deployable);
+         }
+         catch (Throwable t)
+         {
+             // CARGO-1100: When the deployment action has failed, log the failure and then wait for
+             // the watchdog to return. If deployment was indeed complete, the watchdog will detect
+             // it; else it will make the method fail.
+             getLogger().info("The deployment has failed: " + t.toString(),
+                 this.getClass().getName());
+             if (getLogger().getLevel() == LogLevel.DEBUG)
+             {
+                 Writer stackTrace = new StringWriter();
+                 t.printStackTrace(new PrintWriter(stackTrace));
+                 getLogger().debug(stackTrace.toString(), this.getClass().getName());
+             }
+         }
+ 
+         // Wait for the Deployable to be deployed
+         DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+         watchdog.setLogger(getLogger());
+         watchdog.watchForAvailability();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void undeploy(Deployable deployable, DeployableMonitor monitor)
+     {
+         try
+         {
+             undeploy(deployable);
+         }
+         catch (Throwable t)
+         {
+             // CARGO-1100: When the undeployment action has failed, log the failure and then wait
+             // for the watchdog to return. If undeployment was indeed complete, the watchdog will
+             // detect it; else it will make the method fail.
+             getLogger().info("The undeployment has failed: " + t.toString(),
+                 this.getClass().getName());
+             if (getLogger().getLevel() == LogLevel.DEBUG)
+             {
+                 Writer stackTrace = new StringWriter();
+                 t.printStackTrace(new PrintWriter(stackTrace));
+                 getLogger().debug(stackTrace.toString(), this.getClass().getName());
+             }
+         }
+ 
+         // Wait for the Deployable to be undeployed
+         DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+         watchdog.setLogger(getLogger());
+         watchdog.watchForUnavailability();
+     }
+ 
+     /**
+      * Helper method to redeploy multiple deployables at a time.
+      * @see Deployer#redeploy(Deployable)
+      * @param deployables Deployables to redeploy.
+      */
+     public void redeploy(List<Deployable> deployables)
+     {
+         for (Deployable deployable : deployables)
+         {
+             redeploy(deployable);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void redeploy(Deployable deployable, DeployableMonitor monitor)
+     {
+         try
+         {
+             undeploy(deployable);
+         }
+         catch (Throwable t)
+         {
+             getLogger().info("The undeployment phase of the redeploy action has failed: "
+                 + t.toString(), this.getClass().getName());
+             if (getLogger().getLevel() == LogLevel.DEBUG)
+             {
+                 Writer stackTrace = new StringWriter();
+                 t.printStackTrace(new PrintWriter(stackTrace));
+                 getLogger().debug(stackTrace.toString(), this.getClass().getName());
+             }
+         }
+ 
+         // Wait for the Deployable to be undeployed
+         DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+         watchdog.setLogger(getLogger());
+         watchdog.watchForUnavailability();
+ 
+         deploy(deployable, monitor);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void start(Deployable deployable, DeployableMonitor monitor)
+     {
+         start(deployable);
+ 
+         // Wait for the Deployable to be started
+         DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+         watchdog.setLogger(getLogger());
+         watchdog.watchForAvailability();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void stop(Deployable deployable, DeployableMonitor monitor)
+     {
+         stop(deployable);
+ 
+         // Wait for the Deployable to be stopped
+         DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+         watchdog.setLogger(getLogger());
+         watchdog.watchForUnavailability();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void deploy(Deployable deployable)
+     {
+         throw new ContainerException("Not supported");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void start(Deployable deployable)
+     {
+         throw new ContainerException("Not supported");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void stop(Deployable deployable)
+     {
+         throw new ContainerException("Not supported");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void undeploy(Deployable deployable)
+     {
+         throw new ContainerException("Not supported");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void redeploy(Deployable deployable)
+     {
+         try
+         {
+             undeploy(deployable);
+         }
+         catch (Throwable t)
+         {
+             getLogger().info("The undeployment phase of the redeploy action has failed: "
+                 + t.toString(), this.getClass().getName());
+         }
+ 
+         deploy(deployable);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-3.html b/htmlReport/ns-12/sources/source-3.html new file mode 100644 index 0000000000..0740898524 --- /dev/null +++ b/htmlReport/ns-12/sources/source-3.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > AbstractEmbeddedLocalDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractEmbeddedLocalDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.EmbeddedLocalContainer;
+ import org.codehaus.cargo.container.deployer.DeployerType;
+ 
+ /**
+  * Base deployer to deploy to embedded local containers.
+  */
+ public abstract class AbstractEmbeddedLocalDeployer extends AbstractLocalDeployer
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalDeployer#AbstractLocalDeployer(org.codehaus.cargo.container.LocalContainer)
+      */
+     public AbstractEmbeddedLocalDeployer(EmbeddedLocalContainer container)
+     {
+         super(container);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployerType getType()
+     {
+         return DeployerType.EMBEDDED;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-4.html b/htmlReport/ns-12/sources/source-4.html new file mode 100644 index 0000000000..589d740b1a --- /dev/null +++ b/htmlReport/ns-12/sources/source-4.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > AbstractInstalledLocalDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractInstalledLocalDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractInstalledLocalDeployer + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.deployer.DeployerType;
+ 
+ /**
+  * Base deployer to deploy to installed local containers.
+  */
+ public abstract class AbstractInstalledLocalDeployer extends AbstractLocalDeployer
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalDeployer#AbstractLocalDeployer(org.codehaus.cargo.container.LocalContainer)
+      */
+     public AbstractInstalledLocalDeployer(LocalContainer container)
+     {
+         super(container);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployerType getType()
+     {
+         return DeployerType.INSTALLED;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-5.html b/htmlReport/ns-12/sources/source-5.html new file mode 100644 index 0000000000..41613d44c5 --- /dev/null +++ b/htmlReport/ns-12/sources/source-5.html @@ -0,0 +1,590 @@ + + + + + + + + Coverage Report > AbstractJsr88Deployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractJsr88Deployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractJsr88Deployer + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/155) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import java.io.File;
+ import java.lang.reflect.Constructor;
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import javax.enterprise.deploy.shared.ModuleType;
+ import javax.enterprise.deploy.shared.factories.DeploymentFactoryManager;
+ import javax.enterprise.deploy.spi.DeploymentManager;
+ import javax.enterprise.deploy.spi.Target;
+ import javax.enterprise.deploy.spi.TargetModuleID;
+ import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+ import javax.enterprise.deploy.spi.exceptions.TargetException;
+ import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+ import javax.enterprise.deploy.spi.status.DeploymentStatus;
+ import javax.enterprise.deploy.spi.status.ProgressObject;
+ 
+ import org.codehaus.cargo.container.RemoteContainer;
+ import org.codehaus.cargo.container.configuration.RuntimeConfiguration;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.deployable.DeployableType;
+ import org.codehaus.cargo.container.deployable.EAR;
+ import org.codehaus.cargo.container.deployable.WAR;
+ import org.codehaus.cargo.container.property.RemotePropertySet;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * JSR-88 remote deployer.
+  */
+ public abstract class AbstractJsr88Deployer extends AbstractRemoteDeployer
+ {
+ 
+     /**
+      * The run time configuration.
+      */
+     private final RuntimeConfiguration configuration;
+ 
+     /**
+      * File handler.
+      */
+     private final FileHandler fileHandler;
+ 
+     /**
+      * Timeout.
+      */
+     private long timeout;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param container the remote container
+      */
+     public AbstractJsr88Deployer(RemoteContainer container)
+     {
+         super(container);
+         this.configuration = container.getConfiguration();
+         this.fileHandler = new DefaultFileHandler();
+         this.fileHandler.setLogger(this.getLogger());
+ 
+         // Set a timeout in order to avoid CARGO-1299
+         String timeout = configuration.getPropertyValue(RemotePropertySet.TIMEOUT);
+         this.timeout = Long.parseLong(timeout);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void deploy(Deployable deployable)
+     {
+         File deployableFile;
+         File tempDirectory;
+         if (deployable.getType() == DeployableType.WAR)
+         {
+             String localFileName;
+             WAR war = (WAR) deployable;
+             if (war.getContext().isEmpty())
+             {
+                 localFileName = "rootContext.war";
+             }
+             else
+             {
+                 localFileName = war.getContext() + ".war";
+             }
+             tempDirectory = new File(fileHandler.createUniqueTmpDirectory());
+             deployableFile = new File(tempDirectory, localFileName);
+             fileHandler.copyFile(deployable.getFile(), deployableFile.getAbsolutePath());
+         }
+         else if (deployable.getType() == DeployableType.EAR)
+         {
+             EAR ear = (EAR) deployable;
+             String localFileName = ear.getName() + ".ear";
+             tempDirectory = new File(fileHandler.createUniqueTmpDirectory());
+             deployableFile = new File(tempDirectory, localFileName);
+             fileHandler.copyFile(deployable.getFile(), deployableFile.getAbsolutePath());
+         }
+         else
+         {
+             deployableFile = new File(deployable.getFile());
+             tempDirectory = null;
+         }
+ 
+         try
+         {
+             DeploymentManager deploymentManager = this.getDeploymentManager();
+ 
+             ProgressObject progressObject = deploymentManager.distribute(
+                 this.filterTargets(deploymentManager.getTargets()), deployableFile, null);
+             this.waitForProgressObject("Distributing", progressObject);
+ 
+             progressObject = deploymentManager.start(progressObject.getResultTargetModuleIDs());
+             this.waitForProgressObject("Starting", progressObject);
+         }
+         finally
+         {
+             if (tempDirectory != null)
+             {
+                 if (!deployableFile.delete())
+                 {
+                     getLogger().warn("Cannot delete the temporary file: " + deployableFile,
+                         this.getClass().getName());
+                 }
+ 
+                 if (!tempDirectory.delete())
+                 {
+                     getLogger().warn("Cannot delete the temporary directory: " + tempDirectory,
+                         this.getClass().getName());
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void undeploy(Deployable deployable)
+     {
+         DeploymentManager deploymentManager = this.getDeploymentManager();
+ 
+         TargetModuleID[] targetModules;
+         try
+         {
+             targetModules = this.findTargetModule(deploymentManager, deployable);
+         }
+         catch (TargetException e)
+         {
+             throw new CargoException("Cannot communicate with the server", e);
+         }
+ 
+         ProgressObject progressObject = deploymentManager.stop(targetModules);
+         this.waitForProgressObject("Stopping", progressObject);
+ 
+         progressObject = deploymentManager.undeploy(targetModules);
+         this.waitForProgressObject("Undeploying", progressObject);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void redeploy(Deployable deployable)
+     {
+         DeploymentManager deploymentManager = this.getDeploymentManager();
+ 
+         TargetModuleID[] targetModules = null;
+         try
+         {
+             targetModules = this.findTargetModule(deploymentManager, deployable);
+         }
+         catch (TargetException e)
+         {
+             throw new CargoException("Cannot communicate with the server", e);
+         }
+         catch (CargoException e)
+         {
+             // This means that the target module cannot be found, ignore
+         }
+ 
+         if (targetModules != null)
+         {
+             ProgressObject progressObject = deploymentManager.stop(targetModules);
+             this.waitForProgressObject("Stopping", progressObject);
+ 
+             progressObject = deploymentManager.undeploy(targetModules);
+             this.waitForProgressObject("Undeploying", progressObject);
+         }
+ 
+         this.deploy(deployable);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void start(Deployable deployable)
+     {
+         DeploymentManager deploymentManager = this.getDeploymentManager();
+ 
+         TargetModuleID[] targetModules = null;
+         try
+         {
+             targetModules = this.findTargetModule(deploymentManager, deployable);
+         }
+         catch (TargetException e)
+         {
+             throw new CargoException("Cannot communicate with the server", e);
+         }
+ 
+         ProgressObject progressObject = deploymentManager.start(targetModules);
+         this.waitForProgressObject("Starting", progressObject);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void stop(Deployable deployable)
+     {
+         DeploymentManager deploymentManager = this.getDeploymentManager();
+ 
+         TargetModuleID[] targetModules = null;
+         try
+         {
+             targetModules = this.findTargetModule(deploymentManager, deployable);
+         }
+         catch (TargetException e)
+         {
+             throw new CargoException("Cannot communicate with the server", e);
+         }
+ 
+         ProgressObject progressObject = deploymentManager.stop(targetModules);
+         this.waitForProgressObject("Stopping", progressObject);
+     }
+ 
+     /**
+      * Waits for a progress object.
+      * 
+      * @param reason Reason for wait (Start, Stop, etc.), used for error messages.
+      * @param progressObject Progress object.
+      * @throws CargoException If timeout or deployment fails.
+      */
+     private void waitForProgressObject(String reason, ProgressObject progressObject)
+         throws CargoException
+     {
+         long timeout = System.currentTimeMillis() + this.timeout;
+         while (System.currentTimeMillis() < timeout)
+         {
+             try
+             {
+                 Thread.sleep(1000);
+             }
+             catch (InterruptedException e)
+             {
+                 throw new CargoException("Thread.sleep failed", e);
+             }
+ 
+             DeploymentStatus status = progressObject.getDeploymentStatus();
+             if (status.isCompleted())
+             {
+                 return;
+             }
+             else if (status.isFailed())
+             {
+                 throw new CargoException(reason + " failed: " + status.getMessage());
+             }
+         }
+ 
+         throw new CargoException(reason + " timed out after " + this.timeout + " milliseconds");
+     }
+ 
+     /**
+      * @return The JSR-88 deployment manager for the target server.
+      * @throws CargoException If anything fails.
+      */
+     private DeploymentManager getDeploymentManager() throws CargoException
+     {
+         DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
+ 
+         String deploymentFactoryClassName = this.getDeploymentFactoryClassName();
+         try
+         {
+             Class<?> deploymentFactoryClass = null;
+             final ClassLoader tcccl = Thread.currentThread().getContextClassLoader();
+             if (tcccl != null)
+             {
+                 try
+                 {
+                     deploymentFactoryClass = tcccl.loadClass(deploymentFactoryClassName);
+                 }
+                 catch (ClassNotFoundException e)
+                 {
+                     deploymentFactoryClass = null;
+                 }
+             }
+             if (deploymentFactoryClass == null)
+             {
+                 deploymentFactoryClass = this.getClass().getClassLoader().loadClass(
+                     deploymentFactoryClassName);
+             }
+ 
+             Constructor<?> deploymentFactoryConstructor = deploymentFactoryClass.getConstructor();
+             DeploymentFactory deploymentFactoryInstance = (DeploymentFactory)
+                 deploymentFactoryConstructor.newInstance();
+             dfm.registerDeploymentFactory(deploymentFactoryInstance);
+         }
+         catch (ClassNotFoundException e)
+         {
+             throw new CargoException(
+                 "Cannot locate the JSR-88 deployer class " + deploymentFactoryClassName + "\nMake "
+                     + "sure the target server's librarires are in Codehaus Cargo's classpath.\n"
+                         + "Read more on: https://codehaus-cargo.github.io/cargo/JSR88.html", e);
+         }
+         catch (Throwable t)
+         {
+             throw new CargoException("Cannot create a JSR-88 deployer: " + t.getMessage(), t);
+         }
+ 
+         try
+         {
+             return this.getDeploymentManager(dfm);
+         }
+         catch (DeploymentManagerCreationException e)
+         {
+             throw new CargoException("Cannot create the DeploymentManager", e);
+         }
+     }
+ 
+     /**
+      * @return The class name of the JSR-88 deployment factory.
+      */
+     protected abstract String getDeploymentFactoryClassName();
+ 
+     /**
+      * @param dfm JSR-88 deployment factory manager with the target deployer factory registered.
+      * @return The JSR-88 deployment manager for the target server.
+      * @throws DeploymentManagerCreationException If deployment manager creation fails.
+      */
+     protected abstract DeploymentManager getDeploymentManager(DeploymentFactoryManager dfm)
+         throws DeploymentManagerCreationException;
+ 
+     /**
+      * Finds a JSR-88 module
+      * 
+      * @param deploymentManager Deployment manager.
+      * @param deployable Deployable to look for.
+      * @return JSR-88 module for the given deployable, put in an array.
+      * @throws CargoException If module not found.
+      * @throws TargetException If cannot reach server.
+      */
+     private TargetModuleID[] findTargetModule(DeploymentManager deploymentManager,
+         Deployable deployable) throws CargoException, TargetException
+     {
+         String moduleName;
+         if (deployable.getType() == DeployableType.WAR)
+         {
+             WAR war = (WAR) deployable;
+             if (war.getContext().isEmpty())
+             {
+                 moduleName = "rootContext";
+             }
+             else
+             {
+                 moduleName = war.getContext();
+             }
+         }
+         else if (deployable.getType() == DeployableType.EAR)
+         {
+             EAR ear = (EAR) deployable;
+             moduleName = ear.getName();
+         }
+         else
+         {
+             File moduleFile = new File(deployable.getFile());
+             moduleName = moduleFile.getName();
+             int extensionSeparator = moduleName.lastIndexOf('.');
+             if (extensionSeparator != -1)
+             {
+                 moduleName = moduleName.substring(0, extensionSeparator);
+             }
+         }
+ 
+         ModuleType moduleType;
+         if (DeployableType.EAR.equals(deployable.getType()))
+         {
+             moduleType = ModuleType.EAR;
+         }
+         else if (DeployableType.EJB.equals(deployable.getType()))
+         {
+             moduleType = ModuleType.EJB;
+         }
+         else if (DeployableType.RAR.equals(deployable.getType()))
+         {
+             moduleType = ModuleType.RAR;
+         }
+         else if (DeployableType.WAR.equals(deployable.getType()))
+         {
+             moduleType = ModuleType.WAR;
+         }
+         else
+         {
+             throw new IllegalArgumentException("Codehaus Cargo deployable type "
+                 + deployable.getType() + " has no JSR-88 match and cannot be remotely deployed.");
+         }
+ 
+         TargetModuleID[] modules = deploymentManager.getAvailableModules(moduleType,
+             deploymentManager.getTargets());
+ 
+         StringBuilder sb = new StringBuilder();
+         sb.append("Cannot find the module \"");
+         sb.append(moduleName);
+         sb.append("\". Available modules:");
+ 
+         List<TargetModuleID> targetModules = new ArrayList<>();
+ 
+         for (TargetModuleID module : modules)
+         {
+             String moduleId = module.getModuleID();
+ 
+             if (moduleName.equals(moduleId))
+             {
+                 targetModules.add(module);
+             }
+             else
+             {
+                 sb.append("\n\t- ");
+                 sb.append(moduleId);
+             }
+         }
+ 
+         if (targetModules.isEmpty())
+         {
+             throw new CargoException(sb.toString());
+         }
+ 
+         return filterTargetModuleIDs(targetModules);
+     }
+ 
+     /**
+      * @return The run time configuration.
+      */
+     protected RuntimeConfiguration getRuntimeConfiguration()
+     {
+         return this.configuration;
+     }
+ 
+     /**
+      * @param targets List with all available targets for this container instance.
+      * @return Let implementations filter targets for deploy.
+      */
+     protected Target[] filterTargets(Target[] targets)
+     {
+         return targets;
+     }
+ 
+     /**
+      * @param targetModuleIDs List with all available target module IDs for the target module.
+      * @return Let implementations filter target module IDs for deploy.
+      */
+     protected TargetModuleID[] filterTargetModuleIDs(List<TargetModuleID> targetModuleIDs)
+     {
+         return targetModuleIDs.toArray(new TargetModuleID[targetModuleIDs.size()]);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-6.html b/htmlReport/ns-12/sources/source-6.html new file mode 100644 index 0000000000..b11f92aad5 --- /dev/null +++ b/htmlReport/ns-12/sources/source-6.html @@ -0,0 +1,173 @@ + + + + + + + + Coverage Report > AbstractLocalDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractLocalDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractLocalDeployer + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (7/7) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * Base deployer to deploy to local containers (installed or embedded).
+  */
+ public abstract class AbstractLocalDeployer extends AbstractDeployer
+ {
+     /**
+      * Local installed container into which to perform deployment operations.
+      */
+     private LocalContainer container;
+ 
+     /**
+      * @param container the local installed container into which to perform deployment operations
+      */
+     public AbstractLocalDeployer(LocalContainer container)
+     {
+         super(container);
+         this.container = container;
+ 
+         String configurationHome = container.getConfiguration().getHome();
+         if (configurationHome != null && !getFileHandler().isDirectory(configurationHome))
+         {
+             throw new CargoException("The container configuration directory \""
+                 + configurationHome + "\" does not exist. Please configure the container before "
+                 + "attempting to perform any local deployment. Read more on: "
+                 + "https://codehaus-cargo.github.io/cargo/Local+Configuration.html");
+         }
+     }
+ 
+     /**
+      * @return the local container into which to perform deployment operations
+      */
+     protected LocalContainer getContainer()
+     {
+         return this.container;
+     }
+ 
+     /**
+      * @return the Cargo file utility class
+      */
+     protected FileHandler getFileHandler()
+     {
+         return container.getFileHandler();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-7.html b/htmlReport/ns-12/sources/source-7.html new file mode 100644 index 0000000000..3effe04ce0 --- /dev/null +++ b/htmlReport/ns-12/sources/source-7.html @@ -0,0 +1,164 @@ + + + + + + + + Coverage Report > AbstractRemoteDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractRemoteDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractRemoteDeployer + + 100% + + + (1/1) + + + + 33.3% + + + (1/3) + + + + 33.3% + + + (1/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.RemoteContainer;
+ import org.codehaus.cargo.container.deployer.DeployerType;
+ 
+ /**
+  * Base deployer to deploy to containers without any reference to where the container is installed
+  * (be it on the same machine or on another one).
+  */
+ public abstract class AbstractRemoteDeployer extends AbstractDeployer
+ {
+     /**
+      * Remote container into which to perform deployment operations.
+      */
+     private RemoteContainer container;
+ 
+     /**
+      * @param container the remote container into which to perform deployment operations
+      */
+     public AbstractRemoteDeployer(RemoteContainer container)
+     {
+         super(container);
+     }
+ 
+     /**
+      * @return the remote container into which to perform deployment operations
+      */
+     protected RemoteContainer getContainer()
+     {
+         return this.container;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployerType getType()
+     {
+         return DeployerType.REMOTE;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-8.html b/htmlReport/ns-12/sources/source-8.html new file mode 100644 index 0000000000..358f761bbc --- /dev/null +++ b/htmlReport/ns-12/sources/source-8.html @@ -0,0 +1,211 @@ + + + + + + + + Coverage Report > AbstractSwitchableLocalDeployer + + + + + + +
+ + +

Coverage Summary for Class: AbstractSwitchableLocalDeployer (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractSwitchableLocalDeployer + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/9) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.State;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.deployer.Deployer;
+ 
+ /**
+  * Implementation decides how to deploy or undeploy based on the running state of the server.
+  */
+ public abstract class AbstractSwitchableLocalDeployer extends AbstractInstalledLocalDeployer
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractInstalledLocalDeployer#AbstractInstalledLocalDeployer(org.codehaus.cargo.container.LocalContainer)
+      */
+     public AbstractSwitchableLocalDeployer(LocalContainer container)
+     {
+         super(container);
+     }
+ 
+     /**
+      * this deployer will be used when the server is running.
+      * 
+      * @return deployer used when server is up
+      */
+     protected abstract Deployer getHotDeployer();
+ 
+     /**
+      * this deployer will be used when the server is not running.
+      * 
+      * @return deployer used when server is down
+      */
+     protected abstract Deployer getColdDeployer();
+ 
+     /**
+      * {@inheritDoc} deploys via hotDeployer, if the server is started or starting. Otherwise, it
+      * uses the coldDeployer.
+      * 
+      * @see org.codehaus.cargo.container.spi.deployer.AbstractDeployer#deploy(org.codehaus.cargo.container.deployable.Deployable)
+      * @param deployable - what to deploy
+      */
+     @Override
+     public void deploy(Deployable deployable)
+     {
+         if (isRunning())
+         {
+             getHotDeployer().deploy(deployable);
+         }
+         else
+         {
+             getColdDeployer().deploy(deployable);
+         }
+     }
+ 
+     /**
+      * return whether or not the container is running.
+      * 
+      * @return true, if the container is running
+      */
+     private boolean isRunning()
+     {
+         return getContainer().getState().equals(State.STARTED)
+             || getContainer().getState().equals(State.STARTING);
+     }
+ 
+     /**
+      * {@inheritDoc} undeploys via hotDeployer, if the server is started or starting. Otherwise, it
+      * uses the coldDeployer.
+      * 
+      * @see org.codehaus.cargo.container.spi.deployer.AbstractDeployer#undeploy(org.codehaus.cargo.container.deployable.Deployable)
+      * @param deployable - what to undeploy
+      */
+     @Override
+     public void undeploy(Deployable deployable)
+     {
+         if (isRunning())
+ 
+         {
+             getHotDeployer().undeploy(deployable);
+         }
+         else
+         {
+             getColdDeployer().undeploy(deployable);
+         }
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-12/sources/source-9.html b/htmlReport/ns-12/sources/source-9.html new file mode 100644 index 0000000000..c3d2548b09 --- /dev/null +++ b/htmlReport/ns-12/sources/source-9.html @@ -0,0 +1,232 @@ + + + + + + + + Coverage Report > DeployerWatchdog + + + + + + +
+ + +

Coverage Summary for Class: DeployerWatchdog (org.codehaus.cargo.container.spi.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DeployerWatchdog + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 57.1% + + + (12/21) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.deployer;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.deployer.DeployableMonitor;
+ import org.codehaus.cargo.container.deployer.DeployableMonitorListener;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Wait for a deployable to be deployed.
+  */
+ public class DeployerWatchdog extends LoggedObject implements DeployableMonitorListener
+ {
+     /**
+      * The monitor to use to monitor the {@link org.codehaus.cargo.container.deployable.Deployable}
+      * being deployed.
+      */
+     private DeployableMonitor monitor;
+ 
+     /**
+      * Status flag set to true when the {@link org.codehaus.cargo.container.deployable.Deployable}
+      * is deployed.
+      */
+     private boolean isDeployed;
+ 
+     /**
+      * @param monitor the monitor to use to monitor the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} being deployed
+      */
+     public DeployerWatchdog(DeployableMonitor monitor)
+     {
+         this.monitor = monitor;
+         monitor.registerListener(this);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void deployed()
+     {
+         this.isDeployed = true;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void undeployed()
+     {
+         this.isDeployed = false;
+     }
+ 
+     /**
+      * Wait till the monitored Deployable is made available or throw an exception if the timeout
+      * period is reached. Equivalent to <code>watch(true)</code>.
+      */
+     public void watchForAvailability()
+     {
+         watch(true);
+     }
+ 
+     /**
+      * Wait till the monitored Deployable is made unavailable or throw an exception if the timeout
+      * period is reached. Equivalent to <code>watch(false)</code>.
+      */
+     public void watchForUnavailability()
+     {
+         watch(false);
+     }
+ 
+     /**
+      * @param shouldWatchForAvailability if true then wait till Deployable is made available, if
+      * false wait till the Deployable is made unavailable
+      */
+     public void watch(boolean shouldWatchForAvailability)
+     {
+         boolean exitCondition;
+ 
+         try
+         {
+             long startTime = System.currentTimeMillis();
+             do
+             {
+                 if (System.currentTimeMillis() - startTime > this.monitor.getTimeout())
+                 {
+                     String message = "Deployable [" + this.monitor.getDeployableName()
+                         + "] failed to finish "
+                         + (shouldWatchForAvailability ? "deploying" : "undeploying")
+                         + " within the timeout period [" + this.monitor.getTimeout()
+                         + "]. The Deployable state is thus unknown.";
+                     getLogger().info(message, this.getClass().getName());
+                     throw new ContainerException(message);
+                 }
+ 
+                 Thread.sleep(100);
+ 
+                 this.monitor.monitor();
+ 
+                 exitCondition = shouldWatchForAvailability ? !this.isDeployed : this.isDeployed;
+ 
+             }
+             while (exitCondition);
+         }
+         catch (InterruptedException e)
+         {
+             throw new ContainerException("Failed to monitor deployment", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/index.html b/htmlReport/ns-13/index.html new file mode 100644 index 0000000000..e4735237ee --- /dev/null +++ b/htmlReport/ns-13/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_BLOCK.html b/htmlReport/ns-13/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..19ef727c3f --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..b5ed4a44a4 --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_CLASS.html b/htmlReport/ns-13/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..b8bb8d9d40 --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..dfef91563f --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_LINE.html b/htmlReport/ns-13/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..f53a6e298e --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..030060c2c0 --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_METHOD.html b/htmlReport/ns-13/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..4e35851bda --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..609d4ace10 --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..34d7721a70 --- /dev/null +++ b/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.jvm + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.jvm

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.jvm + + 66.7% + + + (4/6) + + + + 53.2% + + + (25/47) + + + + 56.8% + + + (154/271) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
DefaultJvmLauncher + + 100% + + + (2/2) + + + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-1.html b/htmlReport/ns-13/sources/source-1.html new file mode 100644 index 0000000000..6dec68861f --- /dev/null +++ b/htmlReport/ns-13/sources/source-1.html @@ -0,0 +1,987 @@ + + + + + + + + Coverage Report > DefaultJvmLauncher + + + + + + +
+ + +

Coverage Summary for Class: DefaultJvmLauncher (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
DefaultJvmLauncher + + 57.6% + + + (19/33) + + + + 60.8% + + + (141/232) + +
DefaultJvmLauncher$1 + + 100% + + + (2/2) + + + + 100% + + + (3/3) + +
Total + + 60% + + + (21/35) + + + + 61.3% + + + (144/235) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ import java.lang.ProcessBuilder.Redirect;
+ import java.lang.reflect.Field;
+ import java.lang.reflect.InvocationTargetException;
+ import java.lang.reflect.Method;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.StringTokenizer;
+ import java.util.concurrent.TimeUnit;
+ 
+ import com.sun.jna.Pointer;
+ import com.sun.jna.platform.win32.Kernel32;
+ import com.sun.jna.platform.win32.WinNT.HANDLE;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * A JVM launcher that launches a new Process, that can be forcibly killed if needed.
+  */
+ public class DefaultJvmLauncher implements JvmLauncher
+ {
+     /**
+      * Whether a JVM shutdown is in progress.
+      */
+     public static boolean shutdownInProgress = false;
+ 
+     /**
+      * Information message when changing the process attribute visibility fails.
+      */
+     private static final String PROCESS_ATTRIBUTE_CHANGE_MESSAGE =
+         "Failed changing the visibility of internal JDK process classes, required for force "
+             + "killing of the Java process Codehaus Cargo has created. You could add --add-opens "
+                 + "to your JVM arguments to allow this. ";
+ 
+     /**
+      * The working directory.
+      */
+     private File workingDirectory;
+ 
+     /**
+      * The executable to run.
+      */
+     private String executable;
+ 
+     /**
+      * The vm arguments.
+      */
+     private final List<String> jvmArguments = new ArrayList<String>();
+ 
+     /**
+      * The vm classpath.
+      */
+     private String classpath;
+ 
+     /**
+      * The vm jar path.
+      */
+     private String jarPath;
+ 
+     /**
+      * The main class to run.
+      */
+     private String mainClass;
+ 
+     /**
+      * The vm system properties.
+      */
+     private final List<String> systemProperties = new ArrayList<String>();
+ 
+     /**
+      * The extra environment variables.
+      */
+     private final Map<String, String> environmentVariables = new HashMap<String, String>();
+ 
+     /**
+      * The application arguments.
+      */
+     private final List<String> applicationArguments = new ArrayList<String>();
+ 
+     /**
+      * Timeout while waiting for {@link #execute()} command to complete.
+      */
+     private long timeout = 60 * 1000;
+ 
+     /**
+      * The running process.
+      */
+     private Process process;
+ 
+     /**
+      * Output file.
+      */
+     private File outputFile;
+ 
+     /**
+      * Append output.
+      */
+     private boolean appendOutput = false;
+ 
+     /**
+      * The logger to which the output of the JVM is redirected
+      */
+     private Logger outputLogger;
+ 
+     /**
+      * The log category to use when logging the JVM's outputs
+      */
+     private String category;
+ 
+     /**
+      * Creates a new launcher.
+      */
+     public DefaultJvmLauncher()
+     {
+     }
+ 
+     /**
+      * Build the complete command line.
+      * 
+      * @return the array representing the tokens of the command line
+      */
+     private List<String> buildCommandLine()
+     {
+         List<String> commandLine = new ArrayList<String>();
+ 
+         if (executable == null)
+         {
+             throw new CargoException("Java executable not set");
+         }
+         commandLine.add(executable);
+ 
+         commandLine.addAll(jvmArguments);
+         commandLine.addAll(systemProperties);
+ 
+         if (classpath != null && jarPath == null)
+         {
+             commandLine.add("-classpath");
+             commandLine.add(classpath);
+         }
+ 
+         if (jarPath != null)
+         {
+             commandLine.add("-jar");
+             commandLine.add(jarPath);
+         }
+ 
+         if (jarPath == null)
+         {
+             commandLine.add(mainClass);
+         }
+         commandLine.addAll(applicationArguments);
+ 
+         return commandLine;
+     }
+ 
+     /**
+      * Add a path to the classpath.
+      * 
+      * @param path the path to add to the classpath
+      */
+     private void addClasspath(String path)
+     {
+         if (classpath == null)
+         {
+             classpath = path;
+         }
+         else
+         {
+             classpath += File.pathSeparator + path;
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setWorkingDirectory(File workingDirectory)
+     {
+         this.workingDirectory = workingDirectory;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setJvm(String command)
+     {
+         if (command == null || command.isEmpty())
+         {
+             return;
+         }
+         if (!new File(command).isFile())
+         {
+             throw new JvmLauncherException("JVM executable file [" + command + "] doesn't exist");
+         }
+         this.executable =
+             command.replace('/', File.separatorChar).replace('\\', File.separatorChar);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addJvmArgument(File file)
+     {
+         if (file != null)
+         {
+             jvmArguments.add(file.getAbsolutePath());
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addJvmArguments(String... values)
+     {
+         if (values != null)
+         {
+             for (String value : values)
+             {
+                 jvmArguments.add(value);
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addJvmArgumentLine(String line)
+     {
+         if (line != null)
+         {
+             String[] args = DefaultJvmLauncher.translateCommandline(line);
+ 
+             if (args != null)
+             {
+                 for (String arg : args)
+                 {
+                     jvmArguments.add(arg);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addClasspathEntries(String... paths)
+     {
+         if (paths != null)
+         {
+             for (String path : paths)
+             {
+                 addClasspath(path);
+             }
+         }
+     }
+ 
+     /**
+      * Adds additional classpath entries.
+      * 
+      * @param paths The additional classpath entries.
+      */
+     public void addClasspathEntries(List<String> paths)
+     {
+         if (paths != null)
+         {
+             for (String path : paths)
+             {
+                 addClasspath(path);
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addClasspathEntries(File... paths)
+     {
+         if (paths != null)
+         {
+             for (File path : paths)
+             {
+                 addClasspath(path.getAbsolutePath());
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getClasspath()
+     {
+         return classpath;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setSystemProperty(String name, String value)
+     {
+         if (name != null && !name.isEmpty())
+         {
+             systemProperties.add("-D" + name + "=" + value);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setEnvironmentVariable(String name, String value)
+     {
+         if (name != null && !name.isEmpty())
+         {
+             environmentVariables.put(name, value);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getEnvironmentVariable(String name)
+     {
+         String value = environmentVariables.get(name);
+         if (value == null)
+         {
+             value = System.getenv(name);
+         }
+         return value;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setJarFile(File jarFile)
+     {
+         if (jarFile != null)
+         {
+             jarPath = jarFile.getAbsolutePath();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setMainClass(String mainClass)
+     {
+         if (mainClass != null)
+         {
+             this.mainClass = mainClass;
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addAppArgument(File file)
+     {
+         if (file != null)
+         {
+             applicationArguments.add(file.getAbsolutePath());
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addAppArguments(String... values)
+     {
+         if (values != null)
+         {
+             for (String value : values)
+             {
+                 applicationArguments.add(value);
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addAppArgumentLine(String line)
+     {
+         if (line != null)
+         {
+             String[] args = DefaultJvmLauncher.translateCommandline(line);
+ 
+             if (args != null)
+             {
+                 for (String arg : args)
+                 {
+                     applicationArguments.add(arg);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}. This takes precendence over {@link #setOutputLogger(Logger, String)}.
+      */
+     @Override
+     public void setOutputFile(File outputFile)
+     {
+         this.outputFile = outputFile;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setAppendOutput(boolean appendOutput)
+     {
+         this.appendOutput = appendOutput;
+     }
+ 
+     /**
+      * {@inheritDoc}. If {@link #setOutputFile(File)} is set, that will take precedence.
+      */
+     @Override
+     public void setOutputLogger(Logger outputLogger, String category)
+     {
+         this.outputLogger = outputLogger;
+         if (category == null)
+         {
+             throw new IllegalArgumentException("Logger category should not be null");
+         }
+         this.category = category;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getCommandLine()
+     {
+         StringBuilder result = new StringBuilder();
+         List<String> commandLine = buildCommandLine();
+         if (commandLine != null)
+         {
+             for (int i = 0; i < commandLine.size(); i++)
+             {
+                 if (i != 0)
+                 {
+                     result.append(' ');
+                 }
+ 
+                 result.append(commandLine.get(i));
+             }
+         }
+ 
+         return result.toString();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void kill()
+     {
+         if (process != null)
+         {
+             // Call first method to kill the process
+             // This is cleanest in code, but no guarantees by the JVM...
+             process.destroy();
+ 
+             // So we call second method to kill the process to be sure
+             try
+             {
+                 nativeKill();
+             }
+             catch (NoClassDefFoundError e)
+             {
+                 if (outputLogger != null)
+                 {
+                     outputLogger.debug(
+                         PROCESS_ATTRIBUTE_CHANGE_MESSAGE + e.getMessage(),
+                             this.getClass().getName());
+                 }
+                 // This happens when the JVM is shutting down, ignore
+             }
+             process = null;
+             System.gc();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setTimeout(long millis)
+     {
+         this.timeout = millis;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setSpawn(boolean spawn)
+     {
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void start() throws JvmLauncherException
+     {
+         try
+         {
+             ProcessBuilder pb =
+                 new ProcessBuilder(buildCommandLine()).directory(workingDirectory)
+                     .redirectErrorStream(true);
+             if (outputFile != null)
+             {
+                 pb.redirectOutput(
+                     appendOutput ? Redirect.appendTo(outputFile) : Redirect.to(outputFile));
+             }
+             pb.environment().putAll(environmentVariables);
+ 
+             this.process = pb.start();
+             process.getOutputStream().close();
+ 
+             if (outputFile == null)
+             {
+                 if (outputLogger != null)
+                 {
+                     Thread outputStreamRedirector =
+                         new Thread(new DefaultJvmLauncherLoggerRedirector(
+                             process.getInputStream(), outputLogger, category));
+                     outputStreamRedirector.start();
+                 }
+                 else
+                 {
+                     process.getErrorStream().close();
+                     process.getInputStream().close();
+                 }
+             }
+         }
+         catch (IOException e)
+         {
+             throw new JvmLauncherException("Failed to launch process " + e);
+         }
+         finally
+         {
+             Runtime.getRuntime().addShutdownHook(new Thread()
+             {
+                 @Override
+                 public void run()
+                 {
+                     DefaultJvmLauncher.shutdownInProgress = true;
+                     DefaultJvmLauncher.this.kill();
+                 }
+             });
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int execute() throws JvmLauncherException
+     {
+         start();
+         try
+         {
+             if (this.process.waitFor(DefaultJvmLauncher.this.timeout, TimeUnit.MILLISECONDS))
+             {
+                 return this.process.exitValue();
+             }
+             else
+             {
+                 try
+                 {
+                     this.kill();
+                 }
+                 catch (Throwable e)
+                 {
+                     // Ignore, we tried our best
+                 }
+ 
+                 throw new JvmLauncherException("Java command [" + this.getCommandLine()
+                     + "] did not complete after " + DefaultJvmLauncher.this.timeout
+                         + " milliseconds");
+             }
+         }
+         catch (InterruptedException e)
+         {
+             throw new JvmLauncherException("Failed waiting for process to end", e);
+         }
+     }
+ 
+     /**
+      * Forcefully kill the launched process using platform specific methods.
+      */
+     private void nativeKill()
+     {
+         if (process == null)
+         {
+             return;
+         }
+         for (Field f : process.getClass().getDeclaredFields())
+         {
+             if ("pid".equals(f.getName()))
+             {
+                 if (makeFieldAccessible(f))
+                 {
+                     try
+                     {
+                         int pid = f.getInt(process);
+                         Runtime.getRuntime().exec(
+                             new String[] {"kill", "-9", Integer.toString(pid)});
+                     }
+                     catch (Throwable e)
+                     {
+                         // Ignore, we tried our best
+                     }
+                 }
+                 break;
+             }
+             else if ("handle".equals(f.getName()))
+             {
+                 if (makeFieldAccessible(f))
+                 {
+                     try
+                     {
+                         long handleId = f.getLong(process);
+ 
+                         Kernel32 kernel = Kernel32.INSTANCE;
+                         HANDLE handle = new HANDLE();
+                         handle.setPointer(Pointer.createConstant(handleId));
+                         int pid = kernel.GetProcessId(handle);
+                         Runtime.getRuntime().exec(
+                             new String[] {"taskkill", "/PID", Integer.toString(pid), "/F"});
+                     }
+                     catch (Throwable e)
+                     {
+                         // Ignore, we tried our best
+                     }
+                 }
+                 break;
+             }
+         }
+     }
+ 
+     /**
+      * Sets a given (private) field accessible, while remaining compatible with Java 8 and avoiding
+      * the <code>Illegal reflective access</code> messages in Java 9 onwards.
+      * @param f Field to make accessible
+      * @return Whether changing field accessibility fails.
+      */
+     private boolean makeFieldAccessible(Field f)
+     {
+         // See: https://stackoverflow.com/questions/46454995/#58834966
+         Method getModule;
+         try
+         {
+             getModule = Class.class.getMethod("getModule");
+         }
+         catch (NoSuchMethodException e)
+         {
+             // We are on Java 8
+             getModule = null;
+         }
+         if (getModule != null)
+         {
+             try
+             {
+                 Object thisModule = getModule.invoke(this.getClass());
+                 Method isNamed = thisModule.getClass().getMethod("isNamed");
+                 if (!(boolean) isNamed.invoke(thisModule))
+                 {
+                     Class fieldClass = f.getDeclaringClass().getClass();
+                     Object fieldModule = getModule.invoke(fieldClass);
+                     Method addOpens = fieldModule.getClass().getMethod(
+                         "addOpens", String.class, thisModule.getClass());
+                     Method getPackageName = fieldClass.getMethod("getPackageName");
+                     addOpens.invoke(fieldModule, getPackageName.invoke(fieldClass), thisModule);
+                 }
+             }
+             catch (Throwable t)
+             {
+                 if (t instanceof InvocationTargetException)
+                 {
+                     InvocationTargetException e = (InvocationTargetException) t;
+                     if (e.getCause() != null
+                         && e.getCause().getClass().getName().endsWith("IllegalCallerException"))
+                     {
+                         if (outputLogger != null)
+                         {
+                             outputLogger.debug(
+                                 PROCESS_ATTRIBUTE_CHANGE_MESSAGE + e.getCause().getMessage(),
+                                     this.getClass().getName());
+                         }
+                         t = null;
+                     }
+                 }
+                 if (t != null)
+                 {
+                     throw new CargoException("Cannot set field accessibility for [" + f + "]", t);
+                 }
+                 return false;
+             }
+         }
+         try
+         {
+             f.setAccessible(true);
+             return true;
+         }
+         catch (Throwable t)
+         {
+             if (t.getClass().getName().endsWith("InaccessibleObjectException"))
+             {
+                 if (outputLogger != null)
+                 {
+                     outputLogger.debug(
+                         PROCESS_ATTRIBUTE_CHANGE_MESSAGE + t.getMessage(),
+                             this.getClass().getName());
+                 }
+                 t = null;
+             }
+             if (t != null)
+             {
+                 throw new CargoException("Cannot set field accessibility for [" + f + "]", t);
+             }
+             return false;
+         }
+     }
+ 
+     /**
+      * Turn a string command line to an array of arguments. The logic takes into account the spaces
+      * between arguments, as well as single/double quotes for escaping arguments with spaces in
+      * them.
+      * @param toProcess the command line to process.
+      * @return the command line broken into strings.
+      * An empty or null toProcess parameter results in a zero sized array.
+      */
+     public static String[] translateCommandline(String toProcess)
+     {
+         if (toProcess == null || toProcess.isEmpty())
+         {
+             return new String[0];
+         }
+ 
+         final int normal = 0;
+         final int inQuote = 1;
+         final int inDoubleQuote = 2;
+         int state = normal;
+         final StringTokenizer tok = new StringTokenizer(toProcess, "\"' ", true);
+         final List<String> result = new ArrayList<>();
+         final StringBuilder current = new StringBuilder();
+         boolean lastTokenHasBeenQuoted = false;
+ 
+         while (tok.hasMoreTokens())
+         {
+             String nextTok = tok.nextToken();
+             switch (state)
+             {
+                 case inQuote:
+                     if ("'".equals(nextTok))
+                     {
+                         lastTokenHasBeenQuoted = true;
+                         state = normal;
+                     }
+                     else
+                     {
+                         current.append(nextTok);
+                     }
+                     break;
+ 
+                 case inDoubleQuote:
+                     if ("\"".equals(nextTok))
+                     {
+                         lastTokenHasBeenQuoted = true;
+                         state = normal;
+                     }
+                     else
+                     {
+                         current.append(nextTok);
+                     }
+                     break;
+ 
+                 default:
+                     if ("'".equals(nextTok))
+                     {
+                         state = inQuote;
+                     }
+                     else if ("\"".equals(nextTok))
+                     {
+                         state = inDoubleQuote;
+                     }
+                     else if (" ".equals(nextTok))
+                     {
+                         if (lastTokenHasBeenQuoted || current.length() > 0)
+                         {
+                             result.add(current.toString());
+                             current.setLength(0);
+                         }
+                     }
+                     else
+                     {
+                         current.append(nextTok);
+                     }
+                     lastTokenHasBeenQuoted = false;
+                     break;
+             }
+         }
+         if (lastTokenHasBeenQuoted || current.length() > 0)
+         {
+             result.add(current.toString());
+         }
+         if (state == inQuote || state == inDoubleQuote)
+         {
+             throw new CargoException("unbalanced quotes in " + toProcess);
+         }
+         return result.toArray(new String[result.size()]);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-2.html b/htmlReport/ns-13/sources/source-2.html new file mode 100644 index 0000000000..8003c0ab64 --- /dev/null +++ b/htmlReport/ns-13/sources/source-2.html @@ -0,0 +1,171 @@ + + + + + + + + Coverage Report > DefaultJvmLauncherFactory + + + + + + +
+ + +

Coverage Summary for Class: DefaultJvmLauncherFactory (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherFactory + + 100% + + + (1/1) + + + + 66.7% + + + (2/3) + + + + 57.1% + + + (4/7) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import java.util.List;
+ 
+ /**
+  * The factory to create JVM launchers.
+  */
+ public class DefaultJvmLauncherFactory implements JvmLauncherFactory
+ {
+     /**
+      * The additional classpath entries to use.
+      */
+     private List<String> additionalClasspathEntries;
+ 
+     /**
+      * Constructs a launcher with default settings.
+      */
+     public DefaultJvmLauncherFactory()
+     {
+     }
+ 
+     /**
+      * Constructs a launcher with additional classpath entries.
+      * 
+      * @param additionalClasspathEntries The addtional classpath.
+      */
+     public DefaultJvmLauncherFactory(List<String> additionalClasspathEntries)
+     {
+         this.additionalClasspathEntries = additionalClasspathEntries;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public JvmLauncher createJvmLauncher(JvmLauncherRequest request)
+     {
+         DefaultJvmLauncher launcher = new DefaultJvmLauncher();
+ 
+         if (additionalClasspathEntries != null && additionalClasspathEntries.size() != 0)
+         {
+             launcher.addClasspathEntries(additionalClasspathEntries);
+         }
+ 
+         return launcher;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-3.html b/htmlReport/ns-13/sources/source-3.html new file mode 100644 index 0000000000..1d1f0d51e3 --- /dev/null +++ b/htmlReport/ns-13/sources/source-3.html @@ -0,0 +1,205 @@ + + + + + + + + Coverage Report > DefaultJvmLauncherLoggerRedirector + + + + + + +
+ + +

Coverage Summary for Class: DefaultJvmLauncherLoggerRedirector (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultJvmLauncherLoggerRedirector + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.nio.charset.StandardCharsets;
+ 
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Redirects the output of a process into a {@link Logger} by periodically pumping data.
+  */
+ public class DefaultJvmLauncherLoggerRedirector implements Runnable
+ {
+     /**
+      * The input stream of the process
+      */
+     private final InputStream inputStream;
+ 
+     /**
+      * The logger to which the output of the JVM is redirected
+      */
+     private Logger outputLogger;
+ 
+     /**
+      * The log category to use when logging the JVM's outputs
+      */
+     private String category;
+ 
+     /**
+      * Creates a new redirector.
+      * 
+      * @param inputStream the input stream
+      * @param outputLogger The logger to which the output of the JVM is redirected
+      * @param category the log category to use when logging the JVM's outputs
+      */
+     public DefaultJvmLauncherLoggerRedirector(
+         InputStream inputStream, Logger outputLogger, String category)
+     {
+         if (inputStream == null)
+         {
+             throw new IllegalArgumentException("Input stream should not be null");
+         }
+         this.inputStream = inputStream;
+         this.outputLogger = outputLogger;
+         this.category = category;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void run()
+     {
+         try (BufferedReader reader = new BufferedReader(
+             new InputStreamReader(this.inputStream, StandardCharsets.UTF_8)))
+         {
+             String line;
+             while ((line = reader.readLine()) != null)
+             {
+                 this.outputLogger.info(line, this.category);
+             }
+         }
+         catch (Exception e)
+         {
+             this.outputLogger.warn("Error reading process stream: " + e, getClass().getName());
+             return;
+         }
+         finally
+         {
+             try
+             {
+                 inputStream.close();
+             }
+             catch (IOException e)
+             {
+                 return;
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-4.html b/htmlReport/ns-13/sources/source-4.html new file mode 100644 index 0000000000..c17e75cf90 --- /dev/null +++ b/htmlReport/ns-13/sources/source-4.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > JvmLauncherException + + + + + + +
+ + +

Coverage Summary for Class: JvmLauncherException (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JvmLauncherException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Exception thrown to signal a failure to launch a JVM.
+  */
+ public class JvmLauncherException extends CargoException
+ {
+ 
+     /**
+      * @param message The error message, may be {@code null}.
+      */
+     public JvmLauncherException(String message)
+     {
+         super(message);
+     }
+ 
+     /**
+      * @param message The error message, may be {@code null}.
+      * @param cause The error cause, may be {@code null}.
+      */
+     public JvmLauncherException(String message, Throwable cause)
+     {
+         super(message, cause);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-5.html b/htmlReport/ns-13/sources/source-5.html new file mode 100644 index 0000000000..32b8041e76 --- /dev/null +++ b/htmlReport/ns-13/sources/source-5.html @@ -0,0 +1,210 @@ + + + + + + + + Coverage Report > JvmLauncherRequest + + + + + + +
+ + +

Coverage Summary for Class: JvmLauncherRequest (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JvmLauncherRequest + + 100% + + + (1/1) + + + + 40% + + + (2/5) + + + + 60% + + + (6/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * A request to construct a JVM launcher.
+  */
+ public class JvmLauncherRequest
+ {
+     /**
+      * {@code true} to launch a server process, {@code false} to launch a client/utility process.
+      */
+     private boolean server;
+ 
+     /**
+      * The object to forward all logging to.
+      */
+     private Loggable loggable;
+ 
+     /**
+      * {@code true} if JVM should be spawned - outlive parent process.
+      */
+     private boolean spawned;
+ 
+     /**
+      * Creates a new JVM launch request with the specified properties.
+      * 
+      * @param server {@code true} to launch a server process, {@code false} to launch a
+      * client/utility process.
+      * @param loggable The object to forward all logging to, must not be {@code null}.
+      */
+     public JvmLauncherRequest(boolean server, Loggable loggable)
+     {
+         this(server, loggable, false);
+     }
+ 
+     /**
+      * Creates a new JVM launch request with the specified properties.
+      * 
+      * @param server {@code true} to launch a server process, {@code false} to launch a
+      * client/utility process.
+      * @param loggable The object to forward all logging to, must not be {@code null}.
+      * @param spawned {@code true} if JVM should be spawned - outlive parent process.
+      */
+     public JvmLauncherRequest(boolean server, Loggable loggable, boolean spawned)
+     {
+         if (loggable == null)
+         {
+             throw new IllegalArgumentException("JVM launch loggable missing");
+         }
+         this.server = server;
+         this.loggable = loggable;
+         this.spawned = spawned;
+     }
+ 
+     /**
+      * Indicates whether the launched JVM denotes a server process or just some (usually
+      * short-lived) client/utility process.
+      * 
+      * @return {@code true} to launch a server process, {@code false} to launch a client/utility
+      * process.
+      */
+     public boolean isServer()
+     {
+         return this.server;
+     }
+ 
+     /**
+      * Gets the object to forward all logging to.
+      * 
+      * @return The object to forward all logging to, never {@code null}.
+      */
+     public Loggable getLoggable()
+     {
+         return this.loggable;
+     }
+ 
+     /**
+      * Indicates whether the JVM should be launched as spawned process.
+      * 
+      * @return {@code true} if JVM should be spawned - outlive parent process.
+      */
+     public boolean isSpawned()
+     {
+         return spawned;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-6.html b/htmlReport/ns-13/sources/source-6.html new file mode 100644 index 0000000000..ff4a7e5404 --- /dev/null +++ b/htmlReport/ns-13/sources/source-6.html @@ -0,0 +1,104 @@ + + + + + + + + Coverage Report > JvmLauncherFactory + + + + + + +
+ + +

Coverage Summary for Class: JvmLauncherFactory (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + +
Class
JvmLauncherFactory
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ /**
+  * A factory to create JVM launchers.
+  */
+ public interface JvmLauncherFactory
+ {
+ 
+     /**
+      * Creates a new JVM launcher for the specified request.
+      * 
+      * @param request The details about the launch, must not be {@code null}.
+      * @return The new JVM launcher, never {@code null}.
+      */
+     JvmLauncher createJvmLauncher(JvmLauncherRequest request);
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-13/sources/source-7.html b/htmlReport/ns-13/sources/source-7.html new file mode 100644 index 0000000000..32e2cccd46 --- /dev/null +++ b/htmlReport/ns-13/sources/source-7.html @@ -0,0 +1,287 @@ + + + + + + + + Coverage Report > JvmLauncher + + + + + + +
+ + +

Coverage Summary for Class: JvmLauncher (org.codehaus.cargo.container.spi.jvm)

+ + + + + + + + + +
Class
JvmLauncher
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.jvm;
+ 
+ import java.io.File;
+ 
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * A JVM launcher is responsible to fork a JVM.
+  */
+ public interface JvmLauncher
+ {
+     /**
+      * Sets the working directory for the forked JVM.
+      * 
+      * @param workingDirectory The working directory for the forked JVM, may be {@code null}.
+      */
+     void setWorkingDirectory(File workingDirectory);
+ 
+     /**
+      * Sets the command to launch the JVM.
+      * 
+      * @param command The command to lauch the JVM, may be {@code null}.
+      */
+     void setJvm(String command);
+ 
+     /**
+      * Adds the specified pathname as an argument to the JVM.
+      * 
+      * @param file The pathname to add, may be {@code null}.
+      */
+     void addJvmArgument(File file);
+ 
+     /**
+      * Adds the specified values as arguments to the JVM.
+      * 
+      * @param values The values to add, may be {@code null}.
+      */
+     void addJvmArguments(String... values);
+ 
+     /**
+      * Adds the specified comma separated argument line as arguments to the JVM.
+      * 
+      * @param line The arguments to add, may be be {@code null}.
+      */
+     void addJvmArgumentLine(String line);
+ 
+     /**
+      * Adds the specified paths to the system classpath of the JVM.
+      * 
+      * @param paths The classpath entries, may be {@code null}.
+      */
+     void addClasspathEntries(String... paths);
+ 
+     /**
+      * Adds the specified paths to the system classpath of the JVM.
+      * 
+      * @param paths The classpath entries, may be {@code null}.
+      */
+     void addClasspathEntries(File... paths);
+ 
+     /**
+      * Gets the currently configured system classpath.
+      * 
+      * @return The currently configured system classpath, never {@code null}.
+      */
+     String getClasspath();
+ 
+     /**
+      * Sets a system property for the JVM.
+      * 
+      * @param name The property name, may be {@code null}.
+      * @param value The property value, may be {@code null}.
+      */
+     void setSystemProperty(String name, String value);
+ 
+     /**
+      * Sets an environment variable for the JVM.
+      * 
+      * @param name The variable name, may be {@code null}.
+      * @param value The property value, may be {@code null}.
+      */
+     void setEnvironmentVariable(String name, String value);
+ 
+     /**
+      * Gets an environment variable, as configured for the JVM. In case of manipulation of an
+      * existing variable, instead of replacing it (eg: when adding an additional directory to PATH)
+      * it is recommended to retrieve the value using this method instead of using
+      * {@link java.lang.System#getenv(java.lang.String)}.
+      * 
+      * @param name The variable name, may be {@code null}.
+      * @return Either the previously set value, the system value or null.
+      */
+     String getEnvironmentVariable(String name);
+ 
+     /**
+      * Sets the JAR file containing the main class to execute. Only one of {@link #setJarFile(File)}
+      * and {@link #setMainClass(String)} may be invoked.
+      * 
+      * @param jarFile The JAR file to execute, may be {@code null}.
+      */
+     void setJarFile(File jarFile);
+ 
+     /**
+      * Sets the qualified name of the Java class to execute. Only one of {@link #setJarFile(File)}
+      * and {@link #setMainClass(String)} may be invoked.
+      * 
+      * @param mainClass The qualified name of the Java class to execute, may be {@code null}.
+      */
+     void setMainClass(String mainClass);
+ 
+     /**
+      * Adds the specified pathname as an argument to the application.
+      * 
+      * @param file The pathname to add, may be {@code null}.
+      */
+     void addAppArgument(File file);
+ 
+     /**
+      * Adds the specified values as arguments to the application.
+      * 
+      * @param values The values to add, may be {@code null}.
+      */
+     void addAppArguments(String... values);
+ 
+     /**
+      * Adds the specified comma separated argument line as arguments to the application.
+      * 
+      * @param line The arguments to add, may be {@code null}.
+      */
+     void addAppArgumentLine(String line);
+ 
+     /**
+      * Sets the file to which the output of the JVM is redirected.
+      * 
+      * @param outputFile The file to which the output of the JVM is redirected, may be {@code null}.
+      */
+     void setOutputFile(File outputFile);
+ 
+     /**
+      * Controls whether the redirected output should be appended to an existing output file (if
+      * any).
+      * 
+      * @param appendOutput {@code true} to append the output, {@code false} to overwrite the file.
+      * @see #setOutputFile(File)
+      */
+     void setAppendOutput(boolean appendOutput);
+ 
+     /**
+      * Sets the logger to which the output of the JVM is redirected.
+      * 
+      * @param outputLogger The logger to which the output of the JVM is redirected, may be
+      * {@code null}.
+      * @param category the log category to use when logging the JVM's outputs, should not be
+      * {@code null}.
+      */
+     void setOutputLogger(Logger outputLogger, String category);
+ 
+     /**
+      * Gets a string representation of the currently configured command line.
+      * 
+      * @return The currently configured command line, never {@code null}.
+      */
+     String getCommandLine();
+ 
+     /**
+      * Forcibly kill the process that was launched, if supported by the JvmLauncher implementation.
+      */
+     void kill();
+ 
+     /**
+      * Sets the timeout in milliseconds after which the process will be killed if still running.
+      * 
+      * @param millis The timeout, may be non-positive to disable process watching.
+      */
+     void setTimeout(long millis);
+ 
+     /**
+      *  Sets whether the JVM should be launched in spawn mode
+      * 
+      * @param spawn {@code true} to launch JVM in spawn, {@code false} to launch normal JVM.
+      */
+     void setSpawn(boolean spawn);
+ 
+     /**
+      * Launches a JVM according to the configuration of this launcher. The method returns as soon as
+      * the JVM got launched and does not wait for its termination.
+      * 
+      * @throws JvmLauncherException If the JVM could not be launched.
+      */
+     void start() throws JvmLauncherException;
+ 
+     /**
+      * Launches a JVM according to the configuration of this launcher and waits for its termination.
+      * 
+      * @return The exit code of the JVM.
+      * @throws JvmLauncherException If the JVM could not be launched.
+      */
+     int execute() throws JvmLauncherException;
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-14/index.html b/htmlReport/ns-14/index.html new file mode 100644 index 0000000000..d9aabdd352 --- /dev/null +++ b/htmlReport/ns-14/index.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_BLOCK.html b/htmlReport/ns-14/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..d3b60b5801 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_BLOCK.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..bdb6c09328 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_CLASS.html b/htmlReport/ns-14/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..22eccc0aad --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_CLASS.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..07b8e26ce5 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_LINE.html b/htmlReport/ns-14/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..ed09461318 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_LINE.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..6fd39e7929 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_METHOD.html b/htmlReport/ns-14/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..3ed0558105 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_METHOD.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..9102aec752 --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..699c7e5aaf --- /dev/null +++ b/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.packager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-14/sources/source-1.html b/htmlReport/ns-14/sources/source-1.html new file mode 100644 index 0000000000..2d28413fbb --- /dev/null +++ b/htmlReport/ns-14/sources/source-1.html @@ -0,0 +1,249 @@ + + + + + + + + Coverage Report > AbstractDirectoryPackager + + + + + + +
+ + +

Coverage Summary for Class: AbstractDirectoryPackager (org.codehaus.cargo.container.spi.packager)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDirectoryPackager + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/18) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.packager;
+ 
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.InstalledLocalContainer;
+ import org.codehaus.cargo.container.packager.Packager;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Package a container distribution and its local configuration in a directory.
+  */
+ public abstract class AbstractDirectoryPackager extends LoggedObject implements Packager
+ {
+     /**
+      * The portion of that we by default exclude from packaging.
+      */
+     private static final List<String> EXCLUDED_FROM_CONFIGURATION =
+         Arrays.asList("**/cargocpc.war");
+ 
+     /**
+      * @see #getTargetDirectory()
+      */
+     private String targetDirectory;
+ 
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * @param targetDirectory the directory where the container distribution and its local
+      * configuration will be packaged
+      */
+     public AbstractDirectoryPackager(String targetDirectory)
+     {
+         this.fileHandler = new DefaultFileHandler();
+         this.targetDirectory = targetDirectory;
+     }
+ 
+     /**
+      * @return the directory where the container distribution and its local configuration will be
+      * packaged
+      */
+     public String getTargetDirectory()
+     {
+         return this.targetDirectory;
+     }
+ 
+     /**
+      * @return the Cargo file utility class
+      */
+     protected FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the Cargo file utility class to use. This method is useful for unit
+      * testing with Mock objects as it can be passed a test file handler that doesn't perform any
+      * real file action.
+      */
+     protected void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * {@inheritDoc}
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         this.fileHandler.setLogger(logger);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void packageContainer(InstalledLocalContainer container)
+     {
+         getFileHandler().copyDirectory(container.getHome(), getTargetDirectory(),
+             getDistributionExclusions());
+ 
+         List<String> configurationExclusions = new ArrayList<String>();
+         configurationExclusions.addAll(getDefaultConfigurationExclusions());
+         configurationExclusions.addAll(getConfigurationExclusions());
+ 
+         getFileHandler().copyDirectory(container.getConfiguration().getHome(),
+             getTargetDirectory(), configurationExclusions);
+     }
+ 
+     /**
+      * @return the list of files to exclude by default from the configuration.
+      * @see #getConfigurationExclusions()
+      */
+     private List<String> getDefaultConfigurationExclusions()
+     {
+         return AbstractDirectoryPackager.EXCLUDED_FROM_CONFIGURATION;
+     }
+ 
+     /**
+      * @return the list of distribution files (specified as <a
+      * href="http://ant.apache.org/manual/dirtasks.html#patterns">Ant File patterns</a>) which will
+      * not be present in the generated package. These files are files found in
+      * {@link org.codehaus.cargo.container.InstalledLocalContainer#getHome()}.
+      */
+     protected abstract List<String> getDistributionExclusions();
+ 
+     /**
+      * @return the list of configuration files (specified as <a
+      * href="http://ant.apache.org/manual/dirtasks.html#patterns">Ant File patterns</a>) which will
+      * not be present in the generated package. These files are files found in
+      * {@link org.codehaus.cargo.container.configuration.LocalConfiguration#getHome()}.
+      */
+     protected abstract List<String> getConfigurationExclusions();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-15/index.html b/htmlReport/ns-15/index.html new file mode 100644 index 0000000000..77710404d6 --- /dev/null +++ b/htmlReport/ns-15/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_BLOCK.html b/htmlReport/ns-15/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..fc4a244b51 --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..b55dbfb12d --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_CLASS.html b/htmlReport/ns-15/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..46984f9284 --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..eb016478d4 --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_LINE.html b/htmlReport/ns-15/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..be0a2c688b --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..fdd9e3380b --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_METHOD.html b/htmlReport/ns-15/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..12bd0995cf --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..6d06537a7b --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..06d9f5d88c --- /dev/null +++ b/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.startup

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.startup + + 0% + + + (0/3) + + + + 0% + + + (0/10) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-15/sources/source-1.html b/htmlReport/ns-15/sources/source-1.html new file mode 100644 index 0000000000..5717fad1ce --- /dev/null +++ b/htmlReport/ns-15/sources/source-1.html @@ -0,0 +1,206 @@ + + + + + + + + Coverage Report > AbstractContainerMonitor + + + + + + +
+ + +

Coverage Summary for Class: AbstractContainerMonitor (org.codehaus.cargo.container.spi.startup)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.startup;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.startup.ContainerMonitor;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Abstract implementation of monitor used for checking container status.
+  */
+ public abstract class AbstractContainerMonitor implements ContainerMonitor
+ {
+     /**
+      * Container to be monitored.
+      */
+     private LocalContainer container;
+ 
+     /**
+      * Configuration of monitored container.
+      */
+     private LocalConfiguration configuration;
+ 
+     /**
+      * Logger.
+      */
+     private Logger logger;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param container Container to be monitored.
+      */
+     public AbstractContainerMonitor(Container container)
+     {
+         setLogger(container.getLogger());
+ 
+         if (container instanceof LocalContainer)
+         {
+             this.container = (LocalContainer) container;
+             this.configuration = ((LocalContainer) container).getConfiguration();
+         }
+         else
+         {
+             throw new CargoException("Container monitor is applicable just for local containers.");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         this.logger = logger;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Logger getLogger()
+     {
+         return logger;
+     }
+ 
+     /**
+      * @return Container to be monitored.
+      */
+     protected LocalContainer getContainer()
+     {
+         return container;
+     }
+ 
+     /**
+      * @return Configuration of monitored container.
+      */
+     protected LocalConfiguration getConfiguration()
+     {
+         return configuration;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-15/sources/source-2.html b/htmlReport/ns-15/sources/source-2.html new file mode 100644 index 0000000000..9da02a2602 --- /dev/null +++ b/htmlReport/ns-15/sources/source-2.html @@ -0,0 +1,193 @@ + + + + + + + + Coverage Report > AbstractPingContainerMonitor + + + + + + +
+ + +

Coverage Summary for Class: AbstractPingContainerMonitor (org.codehaus.cargo.container.spi.startup)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractPingContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.startup;
+ 
+ import java.net.URL;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.container.internal.util.HttpUtils;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ 
+ /**
+  * Abstract implementation of monitor checking container status by pinging URL.
+  */
+ public abstract class AbstractPingContainerMonitor extends AbstractContainerMonitor
+ {
+     /**
+      * HTTP utils.
+      */
+     private HttpUtils httpUtils;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param container Container to be monitored.
+      */
+     public AbstractPingContainerMonitor(Container container)
+     {
+         super(container);
+         httpUtils = new HttpUtils();
+         httpUtils.setLogger(container.getLogger());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isRunning()
+     {
+         URL pingUrl = getPingUrl();
+         return httpUtils.ping(pingUrl);
+     }
+ 
+     /**
+      * @return URL to be pinged.
+      */
+     protected abstract URL getPingUrl();
+ 
+     /**
+      * Returns port with offset.
+      * 
+      * @param portProperty Port property.
+      * @return Port value with offset.
+      */
+     protected int getPortWithOffset(String portProperty)
+     {
+         String portOffset = getConfiguration().getPropertyValue(GeneralPropertySet.PORT_OFFSET);
+ 
+         boolean portOffsetApplicable = portOffset != null && !portOffset.equals("0");
+         boolean portOffsetApplied = getConfiguration().isOffsetApplied();
+         boolean applyPortOffset = portOffsetApplicable && !portOffsetApplied;
+ 
+         int portValue = Integer.parseInt(getConfiguration().getPropertyValue(portProperty));
+ 
+         if (applyPortOffset)
+         {
+             int portOffsetValue = Integer.parseInt(portOffset);
+             portValue = portValue + portOffsetValue;
+         }
+ 
+         return portValue;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-15/sources/source-3.html b/htmlReport/ns-15/sources/source-3.html new file mode 100644 index 0000000000..7083e5a097 --- /dev/null +++ b/htmlReport/ns-15/sources/source-3.html @@ -0,0 +1,175 @@ + + + + + + + + Coverage Report > CombinedContainerMonitor + + + + + + +
+ + +

Coverage Summary for Class: CombinedContainerMonitor (org.codehaus.cargo.container.spi.startup)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
CombinedContainerMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.startup;
+ 
+ import java.util.Arrays;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.container.startup.ContainerMonitor;
+ 
+ /**
+  * Monitor which gathers information from multiple monitors.
+  */
+ public class CombinedContainerMonitor extends AbstractContainerMonitor
+ {
+ 
+     /**
+      * Underlying monitors
+      */
+     private final List<ContainerMonitor> monitors;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param container Container to be monitored.
+      * @param monitors Underlying monitors
+      */
+     public CombinedContainerMonitor(Container container, ContainerMonitor... monitors)
+     {
+         super(container);
+         if (monitors == null || monitors.length == 0)
+         {
+             throw new IllegalArgumentException("Specify at least one monitor");
+         }
+         this.monitors = Arrays.asList(monitors);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isRunning()
+     {
+         for (ContainerMonitor monitor : monitors)
+         {
+             if (!monitor.isRunning())
+             {
+                 return false;
+             }
+         }
+         return true;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-16/index.html b/htmlReport/ns-16/index.html new file mode 100644 index 0000000000..9516395fa5 --- /dev/null +++ b/htmlReport/ns-16/index.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_BLOCK.html b/htmlReport/ns-16/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..9162757cfa --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_BLOCK.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-16/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..66f583fed4 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_CLASS.html b/htmlReport/ns-16/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..9a499b6190 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_CLASS.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-16/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..9ec4c92bb4 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_LINE.html b/htmlReport/ns-16/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..d68ccba408 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_LINE.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-16/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..b16e772f61 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_METHOD.html b/htmlReport/ns-16/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..cff28e8f74 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_METHOD.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-16/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..bd2983ed4a --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-16/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..7f48e45445 --- /dev/null +++ b/htmlReport/ns-16/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.util + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-16/sources/source-1.html b/htmlReport/ns-16/sources/source-1.html new file mode 100644 index 0000000000..76d453f466 --- /dev/null +++ b/htmlReport/ns-16/sources/source-1.html @@ -0,0 +1,199 @@ + + + + + + + + Coverage Report > ContainerUtils + + + + + + +
+ + +

Coverage Summary for Class: ContainerUtils (org.codehaus.cargo.container.spi.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ContainerUtils + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/12) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.util;
+ 
+ import java.net.MalformedURLException;
+ import java.net.URL;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.State;
+ import org.codehaus.cargo.container.configuration.Configuration;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Set of common Container utility methods for people extending Cargo.
+  */
+ public final class ContainerUtils
+ {
+     /**
+      * When we keep the container started, this is the time we wait before checking if the container
+      * is stopped.
+      */
+     private static final int SLEEP = 100;
+ 
+     /**
+      * Ensures that this utility class cannot be instantiated.
+      */
+     private ContainerUtils()
+     {
+         // Do nothing...
+     }
+ 
+     /**
+      * @param configuration the configuration from which to derive the CPC URL. We need it to get
+      * the hostname, the port, etc.
+      * @return the CPC Cargo URL
+      */
+     public static URL getCPCURL(Configuration configuration)
+     {
+         try
+         {
+             String hostname = configuration.getPropertyValue(GeneralPropertySet.HOSTNAME);
+             if ("0.0.0.0".equals(hostname) || "::0".equals(hostname))
+             {
+                 hostname = "localhost";
+             }
+             return new URL(configuration.getPropertyValue(GeneralPropertySet.PROTOCOL) + "://"
+                 + hostname + ":" + configuration.getPropertyValue(ServletPropertySet.PORT)
+                 + "/cargocpc/index.html");
+         }
+         catch (MalformedURLException e)
+         {
+             throw new ContainerException("Failed to compute CPC URL", e);
+         }
+     }
+ 
+     /**
+      * Wait indefinitely till the container is stopped.
+      * 
+      * @param container the local container
+      */
+     public static void waitTillContainerIsStopped(Container container)
+     {
+         while (container.getState() != State.STOPPED && container.getState() != State.UNKNOWN)
+         {
+             try
+             {
+                 Thread.sleep(SLEEP);
+             }
+             catch (InterruptedException e)
+             {
+                 throw new CargoException("Aborting container wait.", e);
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/index.html b/htmlReport/ns-17/index.html new file mode 100644 index 0000000000..79800494bd --- /dev/null +++ b/htmlReport/ns-17/index.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_BLOCK.html b/htmlReport/ns-17/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..d923133e22 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_BLOCK.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-17/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..8abc2bf370 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_CLASS.html b/htmlReport/ns-17/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..a3a49b47c6 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_CLASS.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-17/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..19707e1b11 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_LINE.html b/htmlReport/ns-17/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..05330c951b --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_LINE.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-17/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..4b3c05972d --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_METHOD.html b/htmlReport/ns-17/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..06b75afb2f --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_METHOD.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-17/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..e7790ebc89 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-17/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..cd2e1f9920 --- /dev/null +++ b/htmlReport/ns-17/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,467 @@ + + + + + + Coverage Report > org.codehaus.cargo.module + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module + + 21.4% + + + (3/14) + + + + 6.8% + + + (7/103) + + + + 11.2% + + + (53/473) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Dtd + + 100% + + + (2/2) + + + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-1.html b/htmlReport/ns-17/sources/source-1.html new file mode 100644 index 0000000000..babe485fcc --- /dev/null +++ b/htmlReport/ns-17/sources/source-1.html @@ -0,0 +1,641 @@ + + + + + + + + Coverage Report > AbstractDescriptor + + + + + + +
+ + +

Coverage Summary for Class: AbstractDescriptor (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDescriptor + + 0% + + + (0/1) + + + + 0% + + + (0/24) + + + + 0% + + + (0/138) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.jdom2.Comment;
+ import org.jdom2.Content;
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a deployment descriptor to provide convenience methods for
+  * easy access and manipulation.
+  */
+ public abstract class AbstractDescriptor extends Document implements Descriptor
+ {
+     /**
+      * Grammar of the descriptor.
+      */
+     private DescriptorType descriptorType;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root element of the document
+      * @param descriptorType The type of the descriptor
+      */
+     public AbstractDescriptor(Element rootElement, DescriptorType descriptorType)
+     {
+         super(rootElement);
+         if (descriptorType == null)
+         {
+             throw new NullPointerException();
+         }
+         this.descriptorType = descriptorType;
+     }
+ 
+     /**
+      * Return the representation as a document.
+      * 
+      * @return JDOM Document
+      */
+     @Override
+     public Document getDocument()
+     {
+         return this;
+     }
+ 
+     /**
+      * Get tags of a particular type.
+      * 
+      * @param tag type of elements to find
+      * @return list of tags
+      */
+     @Override
+     public List<Element> getTags(DescriptorTag tag)
+     {
+         return getRootElement().getChildren(tag.getTagName(), tag.getTagNamespace());
+     }
+ 
+     /**
+      * Get tags of a particular type.
+      * 
+      * @param tagName type of elements to find
+      * @return list of tags
+      */
+     @Override
+     public List<Element> getTags(String tagName)
+     {
+         List<Element> elements = new ArrayList<Element>();
+         for (Element child : (List<Element>) getRootElement().getChildren())
+         {
+             if (child.getName().equals(tagName))
+             {
+                 elements.add(child);
+             }
+         }
+         return elements;
+     }
+ 
+     /**
+      * Returns a list of the elements that match the specified tag.
+      * 
+      * @param tag The descriptor tag of which the elements should be returned
+      * @return A list of the elements matching the tag, in the order they occur in the descriptor
+      */
+     public List<Element> getElements(DescriptorTag tag)
+     {
+         if (tag == null)
+         {
+             throw new IllegalArgumentException("tag must not be null");
+         }
+ 
+         return getChildElements(getRootElement(), tag, new ArrayList<Element>());
+     }
+ 
+     /**
+      * Returns a list of the elements that match the specified tag.
+      * 
+      * @param tagName The name of a descriptor tag of which the elements should be returned
+      * @return A list of the elements matching the tag, in the order they occur in the descriptor
+      */
+     public List<Element> getElements(String tagName)
+     {
+         if (tagName == null)
+         {
+             throw new IllegalArgumentException("tagName must not be null");
+         }
+ 
+         return getElements(getDescriptorType().getTagByName(tagName));
+     }
+ 
+     /**
+      * Recursively get elements matching a particular tag.
+      * 
+      * @param element the parent element
+      * @param tag the tag required
+      * @param items collection of items found so far
+      * @return List of elements
+      */
+     private List<Element> getChildElements(Element element, DescriptorTag tag, List<Element> items)
+     {
+         if (element == null || tag == null || items == null)
+         {
+             throw new IllegalArgumentException("Cannot pass null values to getChildElements");
+         }
+ 
+         items.addAll(element.getChildren(tag.getTagName(), tag.getTagNamespace()));
+         List<Element> children = element.getChildren();
+         for (Element child : children)
+         {
+             getChildElements(child, tag, items);
+         }
+         return items;
+     }
+ 
+     /**
+      * Checks an element whether its name matches the specified name.
+      * 
+      * @param element The element to check
+      * @param expectedTag The expected tag name
+      * @throws IllegalArgumentException If the element name doesn't match
+      */
+     protected void checkElement(Element element, DescriptorTag expectedTag)
+         throws IllegalArgumentException
+     {
+         if (!expectedTag.getTagName().equals(element.getName()))
+         {
+             throw new IllegalArgumentException("Not a [" + expectedTag + "] element");
+         }
+     }
+ 
+     /**
+      * Returns a list of the child elements of the specified element that match the specified tag.
+      * 
+      * @param parent The element of which the nested elements should be retrieved
+      * @param tag The descriptor tag of which the elements should be returned
+      * @return A copy of the list of the elements matching the tag, in the order they occur in the
+      * descriptor
+      */
+     protected List<Element> getNestedElements(Element parent, DescriptorTag tag)
+     {
+         List<Element> nodeList = parent.getChildren(tag.getTagName(), tag.getTagNamespace());
+         return new ArrayList<Element>(nodeList);
+     }
+ 
+     /**
+      * Creates an element that contains nested text.
+      * 
+      * @param tag The tag to create an instance of
+      * @param text The text that should be nested in the element
+      * @return The created DOM element
+      */
+     protected Element createNestedText(DescriptorTag tag, String text)
+     {
+         Element element = new Element(tag.getTagName(), tag.getTagNamespace());
+         element.setText(text);
+ 
+         return element;
+     }
+ 
+     /**
+      * Returns the text nested inside a child element of the specified element.
+      * 
+      * @param parent The element of which the nested text should be returned
+      * @param tag The descriptor tag in which the text is nested
+      * @return The text nested in the element
+      */
+     protected String getNestedText(Element parent, DescriptorTag tag)
+     {
+         String text = null;
+         List<Element> nestedElements = parent.getChildren(tag.getTagName(), tag.getTagNamespace());
+         if (nestedElements.size() > 0)
+         {
+             text = getText(nestedElements.get(0));
+         }
+         return text;
+     }
+ 
+     /**
+      * Returns the text value of an element.
+      * 
+      * @param element the element of wich the text value should be returned
+      * @return the text value of an element
+      */
+     protected String getText(Element element)
+     {
+         return element.getText();
+     }
+ 
+     /**
+      * Gets a certain tag directly under the parent tag.
+      * 
+      * @param parent the tag to get the cild from
+      * @param tag name of the child tag
+      * @return tag directly under the parent tag.
+      */
+     protected Element getImmediateChild(Element parent, DescriptorTag tag)
+     {
+         Element e = null;
+         List<Element> nl = parent.getChildren();
+         for (Element n : nl)
+         {
+             if (n.getName().equals(tag.getTagName()))
+             {
+                 e = n;
+             }
+         }
+ 
+         return e;
+     }
+ 
+     /**
+      * Returns the text value from a child directly under the parent tag.
+      * 
+      * @param parent the parent tag to get the child text from
+      * @param tag the name of the child tag
+      * @return the text value of a child tag directly under the parent tag
+      */
+     protected String getChildText(Element parent, DescriptorTag tag)
+     {
+         String text = null;
+         Element e = getImmediateChild(parent, tag);
+         if (e != null)
+         {
+             text = getText(e);
+         }
+         return text;
+     }
+ 
+     /**
+      * Returns the text value from a child directly under the parent tag.
+      * 
+      * @param parent the parent tag to get the child text from
+      * @param tagName the name of the child tag
+      * @return the text value of a child tag directly under the parent tag
+      */
+     protected String getChildText(Element parent, String tagName)
+     {
+         return getChildText(parent, getDescriptorType().getTagByName(tagName));
+     }
+ 
+     /**
+      * Adds an element of the specified tag to the descriptor.
+      * 
+      * @param tag The descriptor tag
+      * @param child The child element to add
+      * @param parent The parent element to add the child to
+      * @return the inserted element
+      */
+     @Override
+     public Element addElement(DescriptorTag tag, Element child, Element parent)
+     {
+         Element importedNode = (Element) child.detach();
+ 
+         Element refNode = getInsertionPointFor(tag, parent.getName());
+ 
+         int idx = parent.getContent().indexOf(refNode);
+         if (idx == -1)
+         {
+             if (!containsElement(parent.getChildren(), importedNode))
+             {
+                 parent.addContent(importedNode);
+             }
+         }
+         else
+         {
+             // Navigate backwards if the previous item is a comment
+             while (idx > 0 && parent.getContent(idx - 1) instanceof Comment)
+             {
+                 idx--;
+             }
+ 
+             if (!containsElement(parent.getChildren(), importedNode))
+             {
+                 parent.addContent(idx, importedNode);
+             }
+         }
+ 
+         return importedNode;
+     }
+ 
+     /**
+      * Checks if <code>haystack</code> contains <code>needle</code>.
+      * @param haystack List of element to look into.
+      * @param needle Element to look for.
+      * @return Whether <code>haystack</code> contains <code>needle</code>.
+      */
+     protected boolean containsElement(List<Element> haystack, Element needle)
+     {
+         for (Element element : haystack)
+         {
+             if (sameElement(element, needle))
+             {
+                 return true;
+             }
+         }
+ 
+         return false;
+     }
+ 
+     /**
+      * Checks if two elements are the same.
+      * @param element1 First element.
+      * @param element2 Second element.
+      * @return Whether <code>element1</code> and <code>element2</code> are the same.
+      */
+     protected boolean sameElement(Element element1, Element element2)
+     {
+         if (!element1.getName().equals(element2.getName()))
+         {
+             return false;
+         }
+ 
+         List<Element> children1 = element1.getChildren();
+         List<Element> children2 = element2.getChildren();
+         if (children1.size() != children2.size())
+         {
+             return false;
+         }
+         if (children1.isEmpty())
+         {
+             return sameContent(element1, element2);
+         }
+ 
+         for (int i = 0; i < children1.size(); i++)
+         {
+             if (!sameElement(children1.get(i), children2.get(i)))
+             {
+                 return false;
+             }
+         }
+         return true;
+     }
+ 
+     /**
+      * Checks if two elements have the same content (excluding comments).
+      * @param element1 First element.
+      * @param element2 Second element.
+      * @return Whether <code>element1</code> and <code>element2</code> have the same content
+      * (excluding comments).
+      */
+     protected boolean sameContent(Element element1, Element element2)
+     {
+         List<Content> content1 = getContentExceptComments(element1);
+         List<Content> content2 = getContentExceptComments(element2);
+         if (content1.size() != content2.size())
+         {
+             return false;
+         }
+         for (int i = 0; i < content1.size(); i++)
+         {
+             String content1Value = content1.get(i).getValue();
+             String content2Value = content2.get(i).getValue();
+             if (content1Value == null || content2Value == null)
+             {
+                 return content1Value == content2Value;
+             }
+             if (!content1Value.equals(content2Value))
+             {
+                 return false;
+             }
+         }
+         return true;
+     }
+ 
+     /**
+      * Gets the content of an element (excluding comments).
+      * @param element Element to get the contents for.
+      * @return All content for <code>element</code> (excluding comments).
+      */
+     protected List<Content> getContentExceptComments(Element element)
+     {
+         List<Content> content = element.getContent();
+         List<Content> filteredContent = new ArrayList<Content>();
+         for (Content contentToCheck : content)
+         {
+             if (!(contentToCheck instanceof Comment))
+             {
+                 filteredContent.add(contentToCheck);
+             }
+         }
+         return filteredContent;
+     }
+ 
+     /**
+      * Returns the node before which the specified tag should be inserted, or <code>null</code> if
+      * the node should be inserted at the end of the descriptor.
+      * 
+      * @param tag The tag that should be inserted
+      * @param parent name of the parent tag
+      * @return The node before which the tag can be inserted
+      */
+     protected Element getInsertionPointFor(DescriptorTag tag, String parent)
+     {
+         List<DescriptorTag> elementOrder =
+             this.getDescriptorType().getGrammar().getElementOrder(parent);
+         if (elementOrder == null)
+         {
+             // No order required, just insert anywhere
+             return null;
+         }
+         for (int i = 0; i < elementOrder.size(); i++)
+         {
+             DescriptorTag orderTag = elementOrder.get(i);
+             if (orderTag.equals(tag))
+             {
+                 for (int j = i + 1; j < elementOrder.size(); j++)
+                 {
+                     DescriptorTag theTag = elementOrder.get(j);
+                     List<Element> elements =
+                         getRootElement().getChildren(
+                             theTag.getTagName(), theTag.getTagNamespace());
+                     if (elements.size() > 0)
+                     {
+                         Element result = elements.get(0);
+                         return result;
+                     }
+                 }
+                 break;
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * @return the descriptorType
+      */
+     @Override
+     public DescriptorType getDescriptorType()
+     {
+         return this.descriptorType;
+     }
+ 
+     /**
+      * Get elements of a particular descriptor tag whose identifier matches the passed parameter.
+      * 
+      * @param tag tag to search for
+      * @param value value for the identifier to match
+      * @return the element that matches
+      */
+     @Override
+     public Element getTagByIdentifier(DescriptorTag tag, String value)
+     {
+         if (value == null || tag == null)
+         {
+             throw new NullPointerException();
+         }
+         Identifier id = tag.getIdentifier();
+         if (id != null)
+         {
+             List<Element> tags = getTags(tag);
+ 
+             for (Element e : tags)
+             {
+                 if (value.equals(id.getIdentifier(e)))
+                 {
+                     return e;
+                 }
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * Get elements of a particular descriptor tag whose identifier matches the passed parameter.
+      * 
+      * @param tagName Name of the tag to search for
+      * @param value value for the identifier to match
+      * @return the element that matches
+      */
+     @Override
+     public Element getTagByIdentifier(String tagName, String value)
+     {
+         if (value == null || tagName == null)
+         {
+             throw new NullPointerException();
+         }
+         DescriptorTag tag = getDescriptorType().getTagByName(tagName);
+         Identifier id = tag.getIdentifier();
+         if (id != null)
+         {
+             List<Element> tags = getTags(tagName);
+ 
+             for (Element e : tags)
+             {
+                 if (value.equals(id.getIdentifier(e)))
+                 {
+                     return e;
+                 }
+             }
+         }
+         return null;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-10.html b/htmlReport/ns-17/sources/source-10.html new file mode 100644 index 0000000000..c32d08dbd6 --- /dev/null +++ b/htmlReport/ns-17/sources/source-10.html @@ -0,0 +1,168 @@ + + + + + + + + Coverage Report > Descriptor + + + + + + +
+ + +

Coverage Summary for Class: Descriptor (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
Descriptor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.List;
+ 
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ 
+ /**
+  * Common interface for Deployment Descriptors.
+  */
+ public interface Descriptor extends org.jdom2.Parent
+ {
+     /**
+      * Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.
+      * 
+      * @return the file name
+      */
+     String getFileName();
+ 
+     /**
+      * @return this descriptor as a document
+      */
+     @Override
+     Document getDocument();
+ 
+     /**
+      * @return Root element.
+      */
+     Element getRootElement();
+ 
+     /**
+      * Add an element into the descriptor.
+      * 
+      * @param tag Descriptor Tag
+      * @param right Element insert before
+      * @param rootElement Parent element
+      * @return The added element
+      */
+     Element addElement(DescriptorTag tag, Element right, Element rootElement);
+ 
+     /**
+      * Get elements of a particular descriptor tag whose identifier matches the passed parameter.
+      * 
+      * @param tag tag to search for
+      * @param value value for the identifier to match
+      * @return the element that matches
+      */
+     Element getTagByIdentifier(DescriptorTag tag, String value);
+ 
+     /**
+      * Get elements of a particular descriptor tag whose identifier matches the passed parameter.
+      * 
+      * @param tagName Name of the tag to search for
+      * @param value value for the identifier to match
+      * @return the element that matches
+      */
+     Element getTagByIdentifier(String tagName, String value);
+ 
+     /**
+      * Get tags of a particular type.
+      * 
+      * @param tag type of elements to find
+      * @return list of tags
+      */
+     List<Element> getTags(DescriptorTag tag);
+ 
+     /**
+      * Get tags of a particular type.
+      * 
+      * @param tagName type of elements to find
+      * @return list of tags
+      */
+     List<Element> getTags(String tagName);
+ 
+     /**
+      * Get the descriptor type for this descriptor.
+      * @return descriptor type.
+      */
+     DescriptorType getDescriptorType();
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-11.html b/htmlReport/ns-17/sources/source-11.html new file mode 100644 index 0000000000..c49f463970 --- /dev/null +++ b/htmlReport/ns-17/sources/source-11.html @@ -0,0 +1,134 @@ + + + + + + + + Coverage Report > DescriptorIo + + + + + + +
+ + +

Coverage Summary for Class: DescriptorIo (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
DescriptorIo
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.jdom2.Document;
+ import org.jdom2.JDOMException;
+ import org.jdom2.input.SAXBuilder;
+ import org.xml.sax.EntityResolver;
+ 
+ /**
+  */
+ public interface DescriptorIo
+ {
+     /**
+      * Parse XML into a document.
+      * 
+      * @param documentStream stream containing XML
+      * @return the document
+      * @throws IOException if error reading
+      * @throws JDOMException if error constructing document
+      */
+     Document parseXml(InputStream documentStream) throws JDOMException, IOException;
+ 
+     /**
+      * @param theInput Input XML stream
+      * @param theEntityResolver Entity Resolver
+      * @return the document
+      * @throws IOException if error reading
+      * @throws JDOMException if error constructing document
+      */
+     Document parseXml(InputStream theInput, EntityResolver theEntityResolver)
+         throws JDOMException, IOException;
+ 
+     /**
+      * Create a document builder.
+      * @return new document builder
+      */
+     SAXBuilder createDocumentBuilder();
+ 
+     /**
+      * @param theEntityResolver entity resolver or null
+      * @return a new non-validating, non-namespace-aware {@link javax.xml.parsers.DocumentBuilder}
+      * instance
+      */
+     SAXBuilder createDocumentBuilder(EntityResolver theEntityResolver);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-12.html b/htmlReport/ns-17/sources/source-12.html new file mode 100644 index 0000000000..4779c2ebdb --- /dev/null +++ b/htmlReport/ns-17/sources/source-12.html @@ -0,0 +1,108 @@ + + + + + + + + Coverage Report > JarArchiveUpdateable + + + + + + +
+ + +

Coverage Summary for Class: JarArchiveUpdateable (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
JarArchiveUpdateable
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.File;
+ 
+ /**
+  * Marker interface for a Jar archive that can be updated in-place.
+  */
+ public interface JarArchiveUpdateable extends JarArchive
+ {
+     /**
+      * @return File / directory that this archive is stored in.
+      */
+     File getFile();
+ 
+     /**
+      * Recursively copy files from source into this archive.
+      * 
+      * @param source directory or file to copy into this jar.
+      */
+     void copyAllIntoJar(File source);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-13.html b/htmlReport/ns-17/sources/source-13.html new file mode 100644 index 0000000000..1eae770573 --- /dev/null +++ b/htmlReport/ns-17/sources/source-13.html @@ -0,0 +1,109 @@ + + + + + + + + Coverage Report > J2eeDescriptor + + + + + + +
+ + +

Coverage Summary for Class: J2eeDescriptor (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
J2eeDescriptor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.List;
+ 
+ /**
+  * Common interface for all standard J2EE deployment descriptors (<code>web.xml</code>,
+  * <code>ejb-jar.xml</code>, etc).
+  */
+ public interface J2eeDescriptor extends Descriptor
+ {
+     /**
+      * Returns all vendor descriptors associated with this J2EE deployment descriptor. For example
+      * for JBoss the vendor descriptor associated with <code>web.xml</code> is
+      * <code>jboss-web.xml</code>.
+      * 
+      * @return List of Descriptor objects
+      */
+     List<Descriptor> getVendorDescriptors();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-14.html b/htmlReport/ns-17/sources/source-14.html new file mode 100644 index 0000000000..90a7bb2338 --- /dev/null +++ b/htmlReport/ns-17/sources/source-14.html @@ -0,0 +1,135 @@ + + + + + + + + Coverage Report > DescriptorType + + + + + + +
+ + +

Coverage Summary for Class: DescriptorType (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
DescriptorType
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.Collection;
+ 
+ import org.jdom2.JDOMFactory;
+ 
+ /**
+  * Represents a "type" of descriptor - e.g. web.xml
+  */
+ public interface DescriptorType
+ {
+     /**
+      * @return XML Grammar for this descriptor.
+      */
+     Grammar getGrammar();
+ 
+     /**
+      * @return JDOM Factory that can create typed descriptor elements.
+      */
+     JDOMFactory getJDOMFactory();
+ 
+     /**
+      * @return class for serializing descriptors of this type.
+      */
+     DescriptorIo getDescriptorIo();
+ 
+     /**
+      * Get a descriptor tag by name.
+      * 
+      * @param name the name of the tag
+      * @return the descriptor tag, or null if not found
+      */
+     DescriptorTag getTagByName(String name);
+ 
+     /**
+      * Get all defined tags for this descriptor.
+      * 
+      * @return a collection of all the tags
+      */
+     Collection<DescriptorTag> getAllTags();
+ 
+     /**
+      * Add a descriptor tag into this descriptor.
+      * 
+      * @param tag the tag to add
+      */
+     void addTag(DescriptorTag tag);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-15.html b/htmlReport/ns-17/sources/source-15.html new file mode 100644 index 0000000000..1134fe0451 --- /dev/null +++ b/htmlReport/ns-17/sources/source-15.html @@ -0,0 +1,104 @@ + + + + + + + + Coverage Report > Grammar + + + + + + +
+ + +

Coverage Summary for Class: Grammar (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
Grammar
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.List;
+ 
+ /**
+  * Contains methods for retrieving grammar information for an XML file.
+  */
+ public interface Grammar
+ {
+     /**
+      * Returns a List of {@link DescriptorTag} that describes the order that elements can appear in
+      * a certain element accordingly to the grammar.
+      * @param tagName the tag name to get the element order of.
+      * @return a List of {@link DescriptorTag} or null if tagName doesn't exist
+      */
+     List<DescriptorTag> getElementOrder(String tagName);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-2.html b/htmlReport/ns-17/sources/source-2.html new file mode 100644 index 0000000000..0085ab6801 --- /dev/null +++ b/htmlReport/ns-17/sources/source-2.html @@ -0,0 +1,354 @@ + + + + + + + + Coverage Report > AbstractDescriptorIo + + + + + + +
+ + +

Coverage Summary for Class: AbstractDescriptorIo (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDescriptorIo + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/50) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.File;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.io.StringWriter;
+ import java.nio.charset.Charset;
+ import java.nio.charset.StandardCharsets;
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.jdom2.Document;
+ import org.jdom2.JDOMException;
+ import org.jdom2.input.SAXBuilder;
+ import org.jdom2.output.Format;
+ import org.jdom2.output.XMLOutputter;
+ import org.xml.sax.EntityResolver;
+ 
+ /**
+  * Provides convenience methods for reading and writing descriptors.
+  */
+ public abstract class AbstractDescriptorIo implements DescriptorIo
+ {
+     /**
+      * The type of this descriptor IO.
+      */
+     private DescriptorType factory;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param descriptorType the descriptor type.
+      */
+     protected AbstractDescriptorIo(DescriptorType descriptorType)
+     {
+         // Voluntarily empty constructor as utility classes should not have a public or default
+         // constructor
+         this.factory = descriptorType;
+     }
+ 
+     /**
+      * Create a document builder.
+      * @return new document builder
+      */
+     @Override
+     public SAXBuilder createDocumentBuilder()
+     {
+         return createDocumentBuilder(null);
+     }
+ 
+     /**
+      * @param theEntityResolver entity resolver or null
+      * @return a new non-validating, non-namespace-aware {@link javax.xml.parsers.DocumentBuilder}
+      * instance
+      */
+     @Override
+     public SAXBuilder createDocumentBuilder(EntityResolver theEntityResolver)
+     {
+         SAXBuilder factory = new SAXBuilder();
+         factory.setValidation(false);
+         factory.setFactory(this.factory.getJDOMFactory());
+ 
+         EntityResolver resolver = theEntityResolver;
+         if (resolver == null)
+         {
+             resolver = getEntityResolver();
+         }
+ 
+         if (resolver != null)
+         {
+             factory.setEntityResolver(resolver);
+         }
+ 
+         return factory;
+     }
+ 
+     /**
+      * Get the default entity resolver for this type.
+      * @return default resolver, or null if none
+      */
+     protected EntityResolver getEntityResolver()
+     {
+         return null;
+     }
+ 
+     /**
+      * @param input the input stream
+      * @return JDOM Document
+      * @throws IOException if problem reading the stream
+      * @throws JDOMException if problem parsing the stream
+      */
+     @Override
+     public Document parseXml(InputStream input) throws JDOMException, IOException
+     {
+         return parseXml(input, new XmlEntityResolver());
+     }
+ 
+     /**
+      * Create a document from the input stream and resolver.
+      * 
+      * @param input the input stream
+      * @param resolver entity resolver, or null
+      * @return JDOM Document
+      * @throws IOException if problem reading the stream
+      * @throws JDOMException if problem parsing the stream
+      */
+     @Override
+     public Document parseXml(InputStream input, EntityResolver resolver)
+         throws JDOMException, IOException
+     {
+         SAXBuilder builder = createDocumentBuilder(resolver);
+         return builder.build(input);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param descriptor The descriptor to serialize
+      * @param file The file to write to
+      * 
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeDescriptor(Descriptor descriptor, File file) throws IOException
+     {
+         writeDescriptor(descriptor, file, StandardCharsets.UTF_8, false);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param descriptor The descriptor to serialize
+      * @param file The file to write to
+      * @param encoding The character encoding to use
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeDescriptor(Descriptor descriptor, File file, Charset encoding)
+         throws IOException
+     {
+         writeDescriptor(descriptor, file, encoding, false);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param descriptor The descriptor to serialize
+      * @param file The file to write to
+      * @param encoding The character encoding to use
+      * @param isIndent Whether the written XML should be indented
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeDescriptor(Descriptor descriptor, File file, Charset encoding,
+         boolean isIndent) throws IOException
+     {
+         try (OutputStream out = new FileOutputStream(file))
+         {
+             writeDescriptor(descriptor, out, encoding, isIndent);
+         }
+     }
+ 
+     /**
+      * Writes the specified document to an output stream.
+      * 
+      * @param descriptor The descriptor to serialize
+      * @param out The output stream to write to
+      * @param encoding The character encoding to use
+      * @param isIndent Whether the written XML should be indented
+      * 
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeDescriptor(Descriptor descriptor, OutputStream out, Charset encoding,
+         boolean isIndent) throws IOException
+     {
+         if (encoding == null)
+         {
+             throw new IllegalArgumentException("Encoding must not be null");
+         }
+ 
+         XMLOutputter serializer = new XMLOutputter();
+         Format format = Format.getPrettyFormat();
+         format.setEncoding(encoding.name());
+ 
+         // First, output as a String so we can fix some known issues with output
+         serializer.setFormat(format);
+         StringWriter writer = new StringWriter();
+         serializer.output((Document) descriptor, writer);
+         String result = writer.toString();
+ 
+         // Save the root tag (including namespace) and replace all other xmlns attributes
+         String root = descriptor.getRootElement().getName();
+         int startRoot = result.indexOf(root);
+         int endRoot = result.indexOf('>', startRoot);
+ 
+         String subString = result.substring(endRoot + 1);
+         subString = subString.replaceAll(" xmlns=\".*\"", "");
+         StringBuilder sb = new StringBuilder(result.substring(0, endRoot + 1));
+         sb.append(subString);
+         result = sb.toString();
+ 
+         // Remove empty extension tags
+         result = result.replace("<extension />", "");
+ 
+         // Then, output the String into the OutputStream
+         out.write(result.getBytes(encoding));
+     }
+ 
+     /**
+      * Writes the WebXml and its associated vendor descriptors to the specified directory.
+      * 
+      * @param descriptor The descriptor to serialize
+      * @param dir Directory to store the descriptors in
+      * @return Array of files for every created file
+      * @throws IOException if a I/O error occurs
+      */
+     public static File[] writeAll(J2eeDescriptor descriptor, String dir) throws IOException
+     {
+         List<File> files = new ArrayList<File>();
+         File webXmlFile = new File(dir, "web.xml");
+         writeDescriptor(descriptor, webXmlFile, StandardCharsets.UTF_8, true);
+         files.add(webXmlFile);
+         for (Descriptor descr : descriptor.getVendorDescriptors())
+         {
+             File file = new File(dir, descr.getFileName());
+             AbstractDescriptorIo.writeDescriptor(descr, file, StandardCharsets.UTF_8, true);
+             files.add(file);
+         }
+ 
+         return files.toArray(new File[files.size()]);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-3.html b/htmlReport/ns-17/sources/source-3.html new file mode 100644 index 0000000000..04ecc271d4 --- /dev/null +++ b/htmlReport/ns-17/sources/source-3.html @@ -0,0 +1,342 @@ + + + + + + + + Coverage Report > AbstractDescriptorType + + + + + + +
+ + +

Coverage Summary for Class: AbstractDescriptorType (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDescriptorType + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/40) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.lang.reflect.Constructor;
+ import java.util.ArrayList;
+ import java.util.Collection;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.DefaultJDOMFactory;
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ import org.jdom2.JDOMFactory;
+ import org.jdom2.Namespace;
+ 
+ /**
+  */
+ public class AbstractDescriptorType extends DefaultJDOMFactory implements DescriptorType
+ {
+ 
+     /**
+      * Parent descriptor.
+      */
+     private DescriptorType parent;
+ 
+     /**
+      * Grammar of the descriptor.
+      */
+     private Grammar grammar;
+ 
+     /**
+      * List of descriptor tags.
+      */
+     private List<DescriptorTag> tags;
+ 
+     /**
+      * Descriptor class.
+      */
+     private Class descriptorClass;
+ 
+     /**
+      * Class used for I/O.
+      */
+     private DescriptorIo descriptorIo;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param parent the parent of this type
+      * @param descriptorClass the class that implements this descriptor
+      * @param grammar grammar for this type (or null if none).
+      */
+     protected AbstractDescriptorType(DescriptorType parent, Class descriptorClass,
+         Grammar grammar)
+     {
+         this.parent = parent;
+         this.grammar = grammar;
+         this.descriptorClass = descriptorClass;
+ 
+         tags = new ArrayList<DescriptorTag>();
+     }
+ 
+     /**
+      * Get the IO class for this descriptor type.
+      * 
+      * @return the IO class
+      */
+     @Override
+     public DescriptorIo getDescriptorIo()
+     {
+         return this.descriptorIo;
+     }
+ 
+     /**
+      * Set the IO class for this descriptor type.
+      * 
+      * @param descriptorIo the IO class
+      */
+     protected void setDescriptorIo(DescriptorIo descriptorIo)
+     {
+         this.descriptorIo = descriptorIo;
+     }
+ 
+     /**
+      * Get the grammar for this descriptor type.
+      * 
+      * @return grammar
+      */
+     @Override
+     public Grammar getGrammar()
+     {
+         return this.grammar;
+     }
+ 
+     /**
+      * Add a descriptor tag to this descriptor type.
+      * 
+      * @param tag the tag to add.
+      */
+     @Override
+     public void addTag(DescriptorTag tag)
+     {
+         this.tags.add(tag);
+     }
+ 
+     /**
+      * @param name name of the tag
+      * @return the matching descriptor tag
+      */
+     @Override
+     public DescriptorTag getTagByName(String name)
+     {
+         for (DescriptorTag tag : tags)
+         {
+             if (tag.getTagName().equals(name))
+             {
+                 return tag;
+             }
+         }
+ 
+         return parent != null ? parent.getTagByName(name) : null;
+     }
+ 
+     /**
+      * @return a collection of all tags
+      */
+     @Override
+     public Collection<DescriptorTag> getAllTags()
+     {
+         List<DescriptorTag> items = new ArrayList<DescriptorTag>(tags);
+         if (parent != null)
+         {
+             items.addAll(parent.getAllTags());
+         }
+         return items;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Element element(int line, int col, String name)
+     {
+         DescriptorTag tag = getTagByName(name);
+         if (tag != null)
+         {
+             try
+             {
+                 return tag.create();
+             }
+             catch (Exception ignored)
+             {
+                 // Ignored
+             }
+         }
+ 
+         return super.element(line, col, name);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Element element(int line, int col, String name, Namespace namespace)
+     {
+         DescriptorTag tag = getTagByName(name);
+         if (tag != null)
+         {
+             try
+             {
+                 DescriptorElement element = tag.create();
+                 if (element.getNamespace() == null && namespace != null)
+                 {
+                     element.setNamespace(namespace);
+                 }
+                 return element;
+             }
+             catch (Exception ignored)
+             {
+                 // Ignored
+             }
+         }
+         return super.element(line, col, name, namespace);
+     }
+ 
+     /**
+      * Create a JDOM Document.
+      * @param rootElement the root element for the document
+      * @return the document created
+      */
+     @Override
+     public Document document(Element rootElement)
+     {
+         if (this.descriptorClass != null)
+         {
+             try
+             {
+                 Constructor constructor =
+                     this.descriptorClass.getConstructor(Element.class, DescriptorType.class);
+                 Document doc = (Document) constructor.newInstance(rootElement, this);
+                 return doc;
+             }
+             catch (Exception ex)
+             {
+                 throw new CargoException("Error constructing document type", ex);
+             }
+         }
+         return new Document(rootElement);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public JDOMFactory getJDOMFactory()
+     {
+         // This class is itself the JDOMFactory
+         return this;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-4.html b/htmlReport/ns-17/sources/source-4.html new file mode 100644 index 0000000000..fe8fbadd46 --- /dev/null +++ b/htmlReport/ns-17/sources/source-4.html @@ -0,0 +1,385 @@ + + + + + + + + Coverage Report > DefaultJarArchive + + + + + + +
+ + +

Coverage Summary for Class: DefaultJarArchive (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultJarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/75) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.ByteArrayOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.util.ArrayList;
+ import java.util.List;
+ import java.util.jar.JarInputStream;
+ import java.util.zip.ZipEntry;
+ 
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * Provide convenient methods to read information from a Jar archive.
+  */
+ public class DefaultJarArchive implements JarArchive
+ {
+     /**
+      * The content of the archive as an input stream.
+      */
+     private byte[] content;
+ 
+     /**
+      * The archive itself, if passed in as a file.
+      */
+     private String sourceFile;
+ 
+     /**
+      * File utility class to use for performing all file I/O.
+      */
+     private FileHandler fileHandler = new DefaultFileHandler();
+ 
+     /**
+      * Constructor.
+      * 
+      * @param file The archive file
+      */
+     public DefaultJarArchive(String file)
+     {
+         if (file == null)
+         {
+             throw new NullPointerException();
+         }
+         this.sourceFile = file;
+         this.content = null;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param inputStream The input stream for the archive (it will be closed after the constructor
+      * returns)
+      * @throws java.io.IOException If there was a problem reading the WAR
+      */
+     public DefaultJarArchive(InputStream inputStream) throws IOException
+     {
+         this.sourceFile = null;
+         this.content = streamToByteArray(inputStream);
+     }
+ 
+     /**
+      * @return the file utility class to use for performing all file I/O.
+      */
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the file utility class to use for performing all file I/O.
+      */
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean containsClass(String className) throws IOException
+     {
+         String resourceName = className.replace('.', '/') + ".class";
+         return getResource(resourceName) != null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String findResource(String name) throws IOException
+     {
+         String result = null;
+         for (String entryPath : getResources(""))
+         {
+             String entryName = entryPath;
+ 
+             int lastSlashIndex = entryName.lastIndexOf('/');
+             if (lastSlashIndex >= 0)
+             {
+                 entryName = entryName.substring(lastSlashIndex + 1);
+             }
+ 
+             if (entryName.equals(name))
+             {
+                 result = entryPath;
+                 break;
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public InputStream getResource(String path) throws IOException
+     {
+         try (JarInputStream in = getContentAsStream())
+         {
+             ZipEntry zipEntry;
+             while ((zipEntry = in.getNextEntry()) != null)
+             {
+                 if (path.equals(zipEntry.getName()))
+                 {
+                     ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+                     byte[] bytes = new byte[2048];
+                     int bytesRead;
+                     while ((bytesRead = in.read(bytes)) != -1)
+                     {
+                         buffer.write(bytes, 0, bytesRead);
+                     }
+                     return new ByteArrayInputStream(buffer.toByteArray());
+                 }
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<String> getResources(String path) throws IOException
+     {
+         String normalizedPath = path;
+         if (!path.endsWith("/") && !path.isEmpty())
+         {
+             normalizedPath = path + "/";
+         }
+ 
+         List<String> resources = new ArrayList<String>();
+         try (JarInputStream in = getContentAsStream())
+         {
+             ZipEntry zipEntry;
+             while ((zipEntry = in.getNextEntry()) != null)
+             {
+                 if (zipEntry.getName().startsWith(normalizedPath)
+                     && !zipEntry.getName().equals(normalizedPath))
+                 {
+                     resources.add(zipEntry.getName());
+                 }
+             }
+         }
+         return resources;
+     }
+ 
+     /**
+      * Returns the content of the archive as <code>JarInputStream</code>.
+      * 
+      * @return The input stream
+      * @throws IOException If an exception occurred reading the archive
+      */
+     protected final JarInputStream getContentAsStream() throws IOException
+     {
+         if (this.content != null)
+         {
+             return new JarInputStream(new ByteArrayInputStream(this.content));
+         }
+ 
+         return new JarInputStream(getFileHandler().getInputStream(this.sourceFile));
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void expandToPath(String path) throws IOException
+     {
+         try (JarInputStream inputStream = getContentAsStream())
+         {
+             byte[] buffer = new byte[40960];
+             ZipEntry entry;
+             while ((entry = inputStream.getNextEntry()) != null)
+             {
+                 String outFile = getFileHandler().append(
+                     path, DefaultFileHandler.sanitizeFilename(entry.getName(),
+                         getFileHandler().getLogger()));
+                 if (entry.isDirectory())
+                 {
+                     getFileHandler().mkdirs(outFile);
+                 }
+                 else
+                 {
+                     String parent = getFileHandler().getParent(outFile);
+                     if (!getFileHandler().exists(parent))
+                     {
+                         getFileHandler().mkdirs(parent);
+                     }
+ 
+                     if (!getFileHandler().exists(outFile))
+                     {
+                         getFileHandler().createFile(outFile);
+                     }
+ 
+                     try (OutputStream out = getFileHandler().getOutputStream(outFile))
+                     {
+                         int read;
+                         while ((read = inputStream.read(buffer)) > 0)
+                         {
+                             out.write(buffer, 0, read);
+                         }
+                     }
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Read a stream into a byte array.
+      * @param inputStream the input stream
+      * @return the byte array
+      * @throws java.io.IOException if an IO Exception
+      */
+     protected byte[] streamToByteArray(InputStream inputStream) throws IOException
+     {
+         try
+         {
+             ByteArrayOutputStream baos = new ByteArrayOutputStream();
+             byte[] buffer = new byte[40960];
+             int bytesRead;
+             while ((bytesRead = inputStream.read(buffer)) != -1)
+             {
+                 baos.write(buffer, 0, bytesRead);
+             }
+             return baos.toByteArray();
+         }
+         finally
+         {
+             if (inputStream != null)
+             {
+                 inputStream.close();
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-5.html b/htmlReport/ns-17/sources/source-5.html new file mode 100644 index 0000000000..c1d680e8a0 --- /dev/null +++ b/htmlReport/ns-17/sources/source-5.html @@ -0,0 +1,176 @@ + + + + + + + + Coverage Report > DescriptorElement + + + + + + +
+ + +

Coverage Summary for Class: DescriptorElement (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DescriptorElement + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/7) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import org.jdom2.Element;
+ 
+ /**
+  * Extension of JDOM element that represents a descriptor element.
+  */
+ public class DescriptorElement extends Element
+ {
+     /**
+      * The tag that this element represents.
+      */
+     private DescriptorTag tag;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag the tag type
+      */
+     public DescriptorElement(DescriptorTag tag)
+     {
+         super(tag.getTagName(), tag.getTagNamespace());
+         this.tag = tag;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag the tag type
+      * @param element element to clone
+      */
+     public DescriptorElement(DescriptorTag tag, Element element)
+     {
+         this.tag = tag;
+         this.addContent(element.detach());
+     }
+ 
+     /**
+      * @return the tag
+      */
+     public DescriptorTag getTag()
+     {
+         return this.tag;
+     }
+ 
+     /**
+      * @param tag the tag to set
+      */
+     public void setTag(DescriptorTag tag)
+     {
+         this.tag = tag;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-6.html b/htmlReport/ns-17/sources/source-6.html new file mode 100644 index 0000000000..b8070eb264 --- /dev/null +++ b/htmlReport/ns-17/sources/source-6.html @@ -0,0 +1,332 @@ + + + + + + + + Coverage Report > DescriptorTag + + + + + + +
+ + +

Coverage Summary for Class: DescriptorTag (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DescriptorTag + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.lang.reflect.Constructor;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.Namespace;
+ 
+ /**
+  * Represents the various top-level tags in a deployment descriptor as a typesafe enumeration.
+  */
+ public class DescriptorTag
+ {
+     /**
+      * The type this descriptor tag is in.
+      */
+     private DescriptorType descriptorType;
+ 
+     /**
+      * The tag name.
+      */
+     private String tagName;
+ 
+     /**
+      * The tag namespace.
+      */
+     private Namespace tagNamespace;
+ 
+     /**
+      * Whether multiple occurrences of the tag in the descriptor are allowed.
+      */
+     private boolean multipleAllowed;
+ 
+     /**
+      * Optional identifier for this tag.
+      */
+     private Identifier identifier;
+ 
+     /**
+      * Element Implementation class.
+      */
+     private Class implementationClass;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param descriptorType the type of this tag
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      * @param identifier optional tag identifier
+      * @param namespace The namespace to use
+      * @param clazz implementation class for this tag
+      */
+     public DescriptorTag(DescriptorType descriptorType, String tagName, Namespace namespace,
+         boolean isMultipleAllowed, Identifier identifier, Class clazz)
+     {
+         this.descriptorType = descriptorType;
+         this.tagName = tagName;
+         this.tagNamespace = namespace;
+         this.multipleAllowed = isMultipleAllowed;
+         this.identifier = identifier;
+         this.implementationClass = clazz;
+         if (this.descriptorType != null)
+         {
+             descriptorType.addTag(this);
+         }
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param descriptorType the type of this tag
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     public DescriptorTag(DescriptorType descriptorType, String tagName, boolean isMultipleAllowed)
+     {
+         this(descriptorType, tagName, null, isMultipleAllowed, null, null);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object other)
+     {
+         boolean eq = false;
+         if (other instanceof DescriptorTag)
+         {
+             DescriptorTag tag = (DescriptorTag) other;
+             if (tag.getTagName().equals(this.tagName))
+             {
+                 eq = true;
+             }
+         }
+         return eq;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.getTagName().hashCode();
+     }
+ 
+     /**
+      * Get tag name.
+      * @return the name of the tag.
+      */
+     public String getTagName()
+     {
+         return this.tagName;
+     }
+ 
+     /**
+      * Get tag namespace.
+      * @return the namespace this tag is in.
+      */
+     public Namespace getTagNamespace()
+     {
+         return this.tagNamespace;
+     }
+ 
+     /**
+      * Is this tag allowed multiple times?
+      * @return whether the tag is allowed multiple times.
+      */
+     public boolean isMultipleAllowed()
+     {
+         return this.multipleAllowed;
+     }
+ 
+     /**
+      * @return the identifier
+      */
+     public Identifier getIdentifier()
+     {
+         return this.identifier;
+     }
+ 
+     /**
+      * @return the webXmlElementClass
+      */
+     public Class getImplementationClass()
+     {
+         return this.implementationClass;
+     }
+ 
+     /**
+      * Return the descriptor type that this tag is defined in.
+      * @return descriptor type The descriptor type
+      */
+     public DescriptorType getDescriptorType()
+     {
+         return this.descriptorType;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getTagName();
+     }
+ 
+     /**
+      * @return instantiated descriptor element, or null if no implementation class.
+      * @throws CargoException if any configuration problem
+      */
+     public DescriptorElement create() throws CargoException
+     {
+         DescriptorElement returnValue = null;
+ 
+         if (implementationClass == null)
+         {
+             returnValue = new DescriptorElement(this);
+         }
+         else
+         {
+             Constructor[] constructors = implementationClass.getConstructors();
+ 
+             for (Constructor cons : constructors)
+             {
+                 if (cons.getParameterTypes().length == 1)
+                 {
+                     try
+                     {
+                         if (cons.getParameterTypes()[0].isAssignableFrom(this.getClass()))
+                         {
+                             returnValue = (DescriptorElement) cons.newInstance(this);
+                             break;
+                         }
+                     }
+                     catch (Exception e)
+                     {
+                         throw new CargoException(
+                             "Error instantiating class for " + getTagName(), e);
+                     }
+                 }
+             }
+         }
+         return returnValue;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-7.html b/htmlReport/ns-17/sources/source-7.html new file mode 100644 index 0000000000..aa2e2363b3 --- /dev/null +++ b/htmlReport/ns-17/sources/source-7.html @@ -0,0 +1,314 @@ + + + + + + + + Coverage Report > Dtd + + + + + + +
+ + +

Coverage Summary for Class: Dtd (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
Dtd + + 50% + + + (1/2) + + + + 72.2% + + + (13/18) + +
Dtd$1
Dtd$DtdHandler + + 33.3% + + + (2/6) + + + + 13% + + + (3/23) + +
Total + + 37.5% + + + (3/8) + + + + 39% + + + (16/41) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.IOException;
+ import java.nio.charset.StandardCharsets;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.StringTokenizer;
+ 
+ import javax.xml.parsers.ParserConfigurationException;
+ import javax.xml.parsers.SAXParser;
+ import javax.xml.parsers.SAXParserFactory;
+ 
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.SAXNotRecognizedException;
+ import org.xml.sax.XMLReader;
+ import org.xml.sax.ext.DeclHandler;
+ 
+ /**
+  * Contains methods for getting information from a dtd.
+  */
+ public class Dtd implements Grammar
+ {
+     /**
+      * Map containing all possible tag name as keys and the tags that they can contain as a List of
+      * {@link DescriptorTag}s. The list is ordered in the order that the tag can appear accordingly
+      * to the DTD.
+      */
+     private Map<String, List<DescriptorTag>> elementOrders;
+ 
+     /**
+      * Implementation of the SAX DeclHandler interface for parsing the DTD.
+      */
+     private static class DtdHandler implements DeclHandler
+     {
+         /**
+          * Map containing all possible tag name as keys and the tags that they can contain as a List
+          * of {@link DescriptorTag}s. The list is ordered in the order that the tag can appear
+          * accordingly to the DTD.
+          */
+         private Map<String, List<DescriptorTag>> elementOrders =
+             new HashMap<String, List<DescriptorTag>>();
+ 
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.ext.DeclHandler#attributeDecl(java.lang.String, java.lang.String,
+          * java.lang.String, java.lang.String, java.lang.String)
+          */
+         @Override
+         public void attributeDecl(String eName, String aName, String type, String mode,
+             String value)
+         {
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.ext.DeclHandler#elementDecl(java.lang.String, java.lang.String)
+          */
+         @Override
+         public void elementDecl(String name, String model)
+         {
+             List<DescriptorTag> elements = new ArrayList<DescriptorTag>();
+             if (!model.equals("EMPTY")
+                 && !model.equals("(#PCDATA)"))
+             {
+                 StringTokenizer st = new StringTokenizer(model, ",()| ");
+                 while (st.hasMoreTokens())
+                 {
+                     boolean multipleAllowed = false;
+                     String element = st.nextToken();
+                     if (element.endsWith("*")
+                         || element.endsWith("+"))
+                     {
+                         element = element.substring(0, element.length() - 1);
+                         multipleAllowed = true;
+                     }
+                     if (element.endsWith("?"))
+                     {
+                         element = element.substring(0, element.length() - 1);
+                     }
+                     DescriptorTag tag = new DescriptorTag(null, element, multipleAllowed);
+                     elements.add(tag);
+                 }
+             }
+             this.elementOrders.put(name, elements);
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(java.lang.String, java.lang.String,
+          * java.lang.String)
+          */
+         @Override
+         public void externalEntityDecl(String name, String publicId, String systemId)
+         {
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(java.lang.String, java.lang.String)
+          */
+         @Override
+         public void internalEntityDecl(String name, String value)
+         {
+         }
+ 
+         /**
+          * @return Returns the elementOrders.
+          */
+         public Map<String, List<DescriptorTag>> getElementOrders()
+         {
+             return this.elementOrders;
+         }
+     }
+ 
+     /**
+      * Contructor.
+      * 
+      * @param dtdPath path (URL) of the dtd to parse
+      */
+     public Dtd(String dtdPath)
+     {
+         try
+         {
+             SAXParserFactory factory = SAXParserFactory.newInstance();
+             SAXParser parser = factory.newSAXParser();
+             XMLReader reader = parser.getXMLReader();
+             reader.setEntityResolver(new XmlEntityResolver());
+             DtdHandler dtdHandler = new DtdHandler();
+             try
+             {
+                 reader.setProperty(
+                     "http://xml.org/sax/properties/declaration-handler", dtdHandler);
+             }
+             catch (SAXNotRecognizedException e)
+             {
+                 throw new SAXException(e);
+             }
+ 
+             String xml = "<!DOCTYPE dummy SYSTEM \"" + dtdPath + "\"><dummy/>";
+             reader.parse(
+                 new InputSource(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))));
+             this.elementOrders = dtdHandler.getElementOrders();
+         }
+         catch (IOException | ParserConfigurationException | SAXException e)
+         {
+             throw new DtdParseException("Failed to read dtd", e);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<DescriptorTag> getElementOrder(String tagName)
+     {
+         return this.elementOrders.get(tagName);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-8.html b/htmlReport/ns-17/sources/source-8.html new file mode 100644 index 0000000000..1f4644dd2e --- /dev/null +++ b/htmlReport/ns-17/sources/source-8.html @@ -0,0 +1,169 @@ + + + + + + + + Coverage Report > DtdParseException + + + + + + +
+ + +

Coverage Summary for Class: DtdParseException (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DtdParseException + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ /**
+  * Exception thrown to indicate that a certain DTD couldn't be parsed.
+  */
+ public class DtdParseException extends RuntimeException
+ {
+     /**
+      * Constructor.
+      */
+     public DtdParseException()
+     {
+         super();
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param message error message
+      */
+     public DtdParseException(String message)
+     {
+         super(message);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param message error message
+      * @param cause cause exception
+      */
+     public DtdParseException(String message, Throwable cause)
+     {
+         super(message, cause);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param cause cause exception
+      */
+     public DtdParseException(Throwable cause)
+     {
+         super(cause);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-9.html b/htmlReport/ns-17/sources/source-9.html new file mode 100644 index 0000000000..b6cbaba99f --- /dev/null +++ b/htmlReport/ns-17/sources/source-9.html @@ -0,0 +1,213 @@ + + + + + + + + Coverage Report > Identifier + + + + + + +
+ + +

Coverage Summary for Class: Identifier (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Identifier + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/22) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.Element;
+ import org.jdom2.JDOMException;
+ import org.jdom2.xpath.XPath;
+ 
+ /**
+  * Class used to work out how to 'identify' instances of DescrtiptorTags.
+  */
+ public class Identifier
+ {
+     /**
+      * String XPath of how to navigate to the identifier field.
+      */
+     private XPath xpath;
+ 
+     /**
+      * String XPath of how to navigate to the identifier field.<br><br>
+      * This is to avoid having namespace problems with XPath (see
+      * <a href="https://codehaus-cargo.atlassian.net/browse/CARGO-1175">CARGO-1175</a>)
+      */
+     private XPath xpathWithoutNamespace;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param xpath XPath to use to identify field
+      */
+     public Identifier(String xpath)
+     {
+         try
+         {
+             this.xpath = XPath.newInstance(xpath);
+         }
+         catch (JDOMException ex)
+         {
+             throw new CargoException("Unexpected xpath error", ex);
+         }
+     }
+ 
+     /**
+      * 
+      * @param namespaceMap The namespaceMap
+      * @param xpath The xpath
+      */
+     public Identifier(Map<String, String> namespaceMap, String xpath)
+     {
+         try
+         {
+             this.xpath = XPath.newInstance(xpath);
+             for (Map.Entry<String, String> namespaceEntry : namespaceMap.entrySet())
+             {
+                 String ns = namespaceEntry.getKey();
+                 String uri = namespaceEntry.getValue();
+                 this.xpath.addNamespace(ns, uri);
+             }
+             this.xpathWithoutNamespace = XPath.newInstance(xpath);
+         }
+         catch (JDOMException ex)
+         {
+             throw new CargoException("Unexpected xpath error", ex);
+         }
+     }
+ 
+     /**
+      * Get the value of the identifier for a particular element.
+      * 
+      * @param element element to use
+      * @return the value of the identifier
+      */
+     public String getIdentifier(Element element)
+     {
+         try
+         {
+             String identifier = xpath.valueOf(element);
+             if (identifier == null || identifier.isEmpty())
+             {
+                 identifier = this.xpathWithoutNamespace.valueOf(element);
+             }
+             return identifier;
+         }
+         catch (Exception ex)
+         {
+             return "";
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-a.html b/htmlReport/ns-17/sources/source-a.html new file mode 100644 index 0000000000..f30fc541e5 --- /dev/null +++ b/htmlReport/ns-17/sources/source-a.html @@ -0,0 +1,180 @@ + + + + + + + + Coverage Report > JarArchiveIo + + + + + + +
+ + +

Coverage Summary for Class: JarArchiveIo (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ /**
+  * Utility IO class for constructing Jar Archives. Use this class in preference to the concrete
+  * implementations of JarArchive.
+  */
+ public class JarArchiveIo
+ {
+     /**
+      * Constructor.
+      */
+     protected JarArchiveIo()
+     {
+         // do nothing, this class shouldn't have a constructor
+     }
+ 
+     /**
+      * Open a jar archive.
+      * 
+      * @param file Input File
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static JarArchive open(String file) throws IOException
+     {
+         return new DefaultJarArchive(file);
+     }
+ 
+     /**
+      * Open a jar archive.
+      * 
+      * @param is Input Stream
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static JarArchive open(InputStream is) throws IOException
+     {
+         return new DefaultJarArchive(is);
+     }
+ 
+     /**
+      * Open a jar archive.
+      * 
+      * @param f Input File
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static JarArchive open(File f) throws IOException
+     {
+         return new DefaultJarArchive(f.getAbsolutePath());
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-b.html b/htmlReport/ns-17/sources/source-b.html new file mode 100644 index 0000000000..fbb8aee36e --- /dev/null +++ b/htmlReport/ns-17/sources/source-b.html @@ -0,0 +1,263 @@ + + + + + + + + Coverage Report > XmlEntityResolver + + + + + + +
+ + +

Coverage Summary for Class: XmlEntityResolver (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
XmlEntityResolver + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 88.1% + + + (37/42) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.StringReader;
+ import java.net.URL;
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  * Implementation of the SAX EntityResolver interface that looks up the web-app DTDs from the JAR.
+  */
+ public class XmlEntityResolver implements EntityResolver
+ {
+     /**
+      * Properties containing mappings of public identifiers to system identifiers.
+      */
+     private static Map<String, String> publicIdentifiers;
+ 
+     static
+     {
+         publicIdentifiers = new HashMap<String, String>();
+         // application.xml
+         publicIdentifiers.put("-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN",
+                               "application_1_2.dtd");
+         publicIdentifiers.put("-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN",
+                               "application_1_3.dtd");
+         // ejb-jar.xml
+         publicIdentifiers.put("-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN",
+                               "ejb-jar_2_0.dtd");
+         // web.xml
+         publicIdentifiers.put("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
+                               "web-app_2_2.dtd");
+         publicIdentifiers.put("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",
+                               "web-app_2_3.dtd");
+ 
+         // orion
+         publicIdentifiers.put("-//ORACLE//DTD OC4J Enterprise JavaBeans runtime 9.04//EN",
+                               "orion-ejb-jar-9_04.dtd");
+         publicIdentifiers.put("-//ORACLE//DTD OC4J Web Application 9.04//EN",
+                               "orion-web-9_04.dtd");
+ 
+         // weblogic
+         publicIdentifiers.put("-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN",
+                               "weblogic-ejb-jar.dtd");
+         publicIdentifiers.put("-//BEA Systems, Inc.//DTD Web Application 8.1//EN",
+                               "weblogic810-web-jar.dtd");
+ 
+         // jboss
+         publicIdentifiers.put("-//JBoss//DTD JBOSS 4.0//EN",
+                               "jboss_4_0.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Service Reference 4.0//EN",
+                               "service-ref_4_0.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Application 2.4//EN",
+                               "jboss-web_4_0.dtd");
+         publicIdentifiers.put("-//JBoss//DTD JBOSS 4.2//EN",
+                               "jboss_4_2.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Service Reference 4.2//EN",
+                               "service-ref_4_2.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Application 4.2//EN",
+                               "jboss-web_4_2.dtd");
+         publicIdentifiers.put("-//JBoss//DTD JBOSS 5.0//EN",
+                               "jboss_5_0.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Service Reference 5.0//EN",
+                               "service-ref_5_0.dtd");
+         publicIdentifiers.put("-//JBoss//DTD Web Application 5.0//EN",
+                               "jboss-web_5_0.dtd");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public InputSource resolveEntity(String thePublicId, String theSystemId)
+         throws SAXException, IOException
+     {
+         InputSource inSource = null;
+         String fileName = getDtdFileName(thePublicId, theSystemId);
+ 
+         InputStream in = this.getClass().getResourceAsStream(
+             "/org/codehaus/cargo/module/internal/resource/" + fileName);
+ 
+         if (in == null)
+         {
+             URL url = new URL(theSystemId);
+             try
+             {
+                 in = url.openStream();
+             }
+             catch (IOException ignored)
+             {
+                 // Failed to connect to remote resource, is internet down?
+             }
+         }
+ 
+         if (in != null)
+         {
+             inSource = new InputSource(in);
+         }
+         else
+         {
+             inSource = new InputSource(new StringReader(""));
+         }
+ 
+         inSource.setPublicId(thePublicId);
+         inSource.setSystemId(theSystemId);
+         return inSource;
+     }
+ 
+     /**
+      * Tries to decide the file name of a DTD from the public and system id.
+      * 
+      * @param thePublicId the publid id
+      * @param theSystemId the system id
+      * @return the file name
+      */
+     public String getDtdFileName(String thePublicId, String theSystemId)
+     {
+         String fileName = null;
+         if (thePublicId != null)
+         {
+             String mappedValue = publicIdentifiers.get(thePublicId);
+             if (mappedValue != null)
+             {
+                 fileName = mappedValue;
+             }
+         }
+ 
+         if (fileName == null)
+         {
+             fileName = theSystemId.substring(theSystemId.lastIndexOf('/') + 1);
+         }
+ 
+         return fileName;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-c.html b/htmlReport/ns-17/sources/source-c.html new file mode 100644 index 0000000000..63c29b869c --- /dev/null +++ b/htmlReport/ns-17/sources/source-c.html @@ -0,0 +1,182 @@ + + + + + + + + Coverage Report > XmlMerger + + + + + + +
+ + +

Coverage Summary for Class: XmlMerger (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
XmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.merge.DescriptorMerger;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Class for merging XML FIles.
+  */
+ public class XmlMerger extends LoggedObject implements DescriptorMerger
+ {
+     /**
+      * List of mergers that will be applied to the xml file.
+      */
+     private List<DescriptorMerger> descriptorMergers = new ArrayList<DescriptorMerger>();
+ 
+     /**
+      * @param merger merge class to add
+      */
+     public void addMerger(DescriptorMerger merger)
+     {
+         this.descriptorMergers.add(merger);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void init(Descriptor base)
+     {
+         for (DescriptorMerger merger : descriptorMergers)
+         {
+             merger.init(base);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void merge(Descriptor other)
+     {
+         for (DescriptorMerger merger : descriptorMergers)
+         {
+             merger.merge(other);
+         }
+     }
+ 
+     /**
+      * @return list of merge classes
+      */
+     public List<DescriptorMerger> getMergers()
+     {
+         return this.descriptorMergers;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-d.html b/htmlReport/ns-17/sources/source-d.html new file mode 100644 index 0000000000..eeecda75e1 --- /dev/null +++ b/htmlReport/ns-17/sources/source-d.html @@ -0,0 +1,153 @@ + + + + + + + + Coverage Report > Xsd + + + + + + +
+ + +

Coverage Summary for Class: Xsd (org.codehaus.cargo.module)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Xsd + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.util.List;
+ 
+ /**
+  * Contains methods for getting information from a XSD.
+  */
+ public class Xsd implements Grammar
+ {
+ 
+     /**
+      * Contructor.
+      * 
+      * @param xsdPath path (URL) of the XSD to parse
+      */
+     public Xsd(String xsdPath)
+     {
+         // Empty for now, maybe one day we'll do something with the XSD path
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<DescriptorTag> getElementOrder(String tagName)
+     {
+         // The XSDs that we handle (webapp 2.5, webapp 3.0, etc.) do not have any order
+         return null;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-e.html b/htmlReport/ns-17/sources/source-e.html new file mode 100644 index 0000000000..aef30f68cd --- /dev/null +++ b/htmlReport/ns-17/sources/source-e.html @@ -0,0 +1,95 @@ + + + + + + + + Coverage Report > VendorDescriptor + + + + + + +
+ + +

Coverage Summary for Class: VendorDescriptor (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
VendorDescriptor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ /**
+  * Base interface for vendor specific descriptors.
+  */
+ public interface VendorDescriptor extends Descriptor
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-17/sources/source-f.html b/htmlReport/ns-17/sources/source-f.html new file mode 100644 index 0000000000..b27c927109 --- /dev/null +++ b/htmlReport/ns-17/sources/source-f.html @@ -0,0 +1,145 @@ + + + + + + + + Coverage Report > JarArchive + + + + + + +
+ + +

Coverage Summary for Class: JarArchive (org.codehaus.cargo.module)

+ + + + + + + + + +
Class
JarArchive
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.util.List;
+ 
+ /**
+  * Provide convenient methods to read information from a Jar archive.
+  */
+ public interface JarArchive
+ {
+     /**
+      * Returns whether a class of the specified name is contained in the archive.
+      * 
+      * @param className The name of the class to search for
+      * @return Whether the class was found
+      * @throws java.io.IOException If an I/O error occurred reading the archive
+      */
+     boolean containsClass(String className) throws IOException;
+ 
+     /**
+      * Returns the full path of a named resource in the archive.
+      * 
+      * @param name The name of the resource
+      * @return The full path to the resource inside the archive
+      * @throws java.io.IOException If an I/O error occurred reading the archive
+      */
+     String findResource(String name) throws IOException;
+ 
+     /**
+      * Returns a resource from the archive as input stream.
+      * 
+      * @param path The path to the resource in the archive
+      * @return An input stream containing the specified resource, or <code>null</code> if the
+      * resource was not found in the JAR
+      * @throws java.io.IOException If an I/O error occurs
+      */
+     InputStream getResource(String path) throws IOException;
+ 
+     /**
+      * Returns the list of resources in the specified directory in the archive.
+      * 
+      * @param path The directory
+      * @return The list of resources
+      * @throws java.io.IOException If an I/O error occurs
+      */
+     List<String> getResources(String path) throws IOException;
+ 
+     /**
+      * Expand the archive to the specified directory.
+      * @param path The path to expand to
+      * @throws java.io.IOException If an I/O error occurs
+      */
+     void expandToPath(String path) throws IOException;
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/index.html b/htmlReport/ns-18/index.html new file mode 100644 index 0000000000..8e6df04b9d --- /dev/null +++ b/htmlReport/ns-18/index.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_BLOCK.html b/htmlReport/ns-18/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..e05c1cd828 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_BLOCK.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-18/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..a816171208 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_CLASS.html b/htmlReport/ns-18/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..9949c9c647 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_CLASS.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-18/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..035bee6b12 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_LINE.html b/htmlReport/ns-18/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..cfc7f812eb --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_LINE.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-18/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..db25b7ec0a --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_METHOD.html b/htmlReport/ns-18/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..9d7fb52a4e --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_METHOD.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-18/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..e0724ce330 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-18/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..0afe4f0ee8 --- /dev/null +++ b/htmlReport/ns-18/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.application + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.application

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.application + + 0% + + + (0/7) + + + + 0% + + + (0/39) + + + + 0% + + + (0/135) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ApplicationXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-1.html b/htmlReport/ns-18/sources/source-1.html new file mode 100644 index 0000000000..64c040cbac --- /dev/null +++ b/htmlReport/ns-18/sources/source-1.html @@ -0,0 +1,332 @@ + + + + + + + + Coverage Report > ApplicationXml + + + + + + +
+ + +

Coverage Summary for Class: ApplicationXml (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ApplicationXml + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/63) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.J2eeDescriptor;
+ import org.jdom2.DocType;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of an EAR descriptor (<code>application.xml</code>) to
+  * provide convenience methods for easy access and manipulation.
+  */
+ public class ApplicationXml extends AbstractDescriptor implements J2eeDescriptor
+ {
+     /**
+      * List of vendor descriptors associated with this application.xml.
+      */
+     private List<Descriptor> vendorDescriptors = new ArrayList<Descriptor>();
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement the root element for this descriptor
+      * @param type the type of this descriptor
+      */
+     public ApplicationXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * @return The J2EE API version.
+      */
+     public ApplicationXmlVersion getVersion()
+     {
+         ApplicationXmlVersion version = null;
+         DocType docType = getDocument().getDocType();
+         if (docType != null)
+         {
+             version = ApplicationXmlVersion.valueOf(docType);
+         }
+         return version;
+     }
+ 
+     /**
+      * Returns the element that contains the definition of a specific web module, or
+      * <code>null</code> if a web module with the specified web-uri is not defined.
+      * 
+      * @param webUri The uri of the web module
+      * @return The DOM element representing the web module definition
+      */
+     public Element getWebModule(String webUri)
+     {
+         if (webUri == null)
+         {
+             throw new NullPointerException();
+         }
+         List<Element> moduleElements = getElements(ApplicationXmlTag.MODULE);
+         for (Element moduleElement : moduleElements)
+         {
+             List<Element> webElements = getNestedElements(moduleElement,
+                 getDescriptorType().getTagByName(ApplicationXmlTag.WEB));
+             if (!webElements.isEmpty())
+             {
+                 Element webElement = webElements.get(0);
+                 if (webUri.equals(getNestedText(webElement,
+                     getDescriptorType().getTagByName(ApplicationXmlTag.WEB_URI))))
+                 {
+                     return webElement;
+                 }
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * Returns the context root of the the specified web module.
+      * 
+      * @param webUri The uri of the web module
+      * @return The context root of the web module
+      */
+     public String getWebModuleContextRoot(String webUri)
+     {
+         Element webModuleElement = getWebModule(webUri);
+         if (webModuleElement == null)
+         {
+             throw new IllegalArgumentException("Web module [" + webUri + "] is not defined");
+         }
+         return getNestedText(webModuleElement, getDescriptorType().getTagByName(
+             ApplicationXmlTag.CONTEXT_ROOT));
+     }
+ 
+     /**
+      * Returns a list of the URIs of the web modules defined in the descriptor.
+      * 
+      * @return A list of the URIs of the web modules
+      */
+     public List<String> getWebModuleUris()
+     {
+         List<String> webUris = new ArrayList<String>();
+         List<Element> moduleElements = getElements(ApplicationXmlTag.MODULE);
+         for (Element moduleElement : moduleElements)
+         {
+             List<Element> webElements = getNestedElements(moduleElement,
+                 getDescriptorType().getTagByName(ApplicationXmlTag.WEB));
+             if (!webElements.isEmpty())
+             {
+                 Element webElement = webElements.get(0);
+                 String webUri = getNestedText(
+                     webElement, getDescriptorType().getTagByName(ApplicationXmlTag.WEB_URI));
+                 if (webUri != null)
+                 {
+                     webUris.add(webUri);
+                 }
+             }
+         }
+         return webUris;
+     }
+ 
+     /**
+      * Returns a list of the ejb modules defined in the descriptor.
+      * 
+      * @return A list of Strings over the ejb modules
+      */
+     public List<String> getEjbModules()
+     {
+         List<String> modules = new ArrayList<String>();
+         List<Element> moduleElements = getElements(ApplicationXmlTag.MODULE);
+         for (Element moduleElement : moduleElements)
+         {
+             String ejb = getNestedText(
+                 moduleElement, getDescriptorType().getTagByName(ApplicationXmlTag.EJB));
+             if (ejb != null)
+             {
+                 modules.add(ejb);
+             }
+         }
+         return modules;
+     }
+ 
+     /**
+      * Returns a list of the elements that match the specified tag.
+      * 
+      * @param tag The descriptor tag of which the elements should be returned
+      * @return A list of the elements matching the tag, in the order they occur in the descriptor
+      */
+     public List<Element> getElements(ApplicationXmlTag tag)
+     {
+         return super.getElements(tag);
+     }
+ 
+     /**
+      * Adds a web module to the deployment descriptor.
+      * 
+      * @param uri the uri of the new module
+      * @param context the context of the new module
+      */
+     public void addWebModule(String uri, String context)
+     {
+         Element moduleElement = new Element(ApplicationXmlTag.MODULE);
+         Element webElement = new Element(ApplicationXmlTag.WEB);
+         webElement.addContent(createNestedText(
+             getDescriptorType().getTagByName(ApplicationXmlTag.WEB_URI), uri));
+         webElement.addContent(createNestedText(
+             getDescriptorType().getTagByName(ApplicationXmlTag.CONTEXT_ROOT), context));
+         moduleElement.addContent(webElement);
+         addElement(getDescriptorType().getTagByName(
+             ApplicationXmlTag.MODULE), moduleElement, getRootElement());
+     }
+ 
+     /**
+      * Adds a ejb module to the deployment descriptor.
+      * 
+      * @param name the name of the new module
+      */
+     public void addEjbModule(String name)
+     {
+         Element moduleElement = new Element(ApplicationXmlTag.MODULE);
+         moduleElement.addContent(createNestedText(
+             getDescriptorType().getTagByName(ApplicationXmlTag.EJB), name));
+         addElement(getDescriptorType().getTagByName(
+             ApplicationXmlTag.MODULE), moduleElement, getRootElement());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<Descriptor> getVendorDescriptors()
+     {
+         return this.vendorDescriptors;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "application.xml";
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-2.html b/htmlReport/ns-18/sources/source-2.html new file mode 100644 index 0000000000..6ed9b17b43 --- /dev/null +++ b/htmlReport/ns-18/sources/source-2.html @@ -0,0 +1,332 @@ + + + + + + + + Coverage Report > ApplicationXmlIo + + + + + + +
+ + +

Coverage Summary for Class: ApplicationXmlIo (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
ApplicationXmlIo + + 0% + + + (0/7) + + + + 0% + + + (0/20) + +
ApplicationXmlIo$1
ApplicationXmlIo$ApplicationXmlEntityResolver + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
Total + + 0% + + + (0/9) + + + + 0% + + + (0/29) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.nio.charset.Charset;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ import org.jdom2.input.SAXBuilder;
+ import org.jdom2.output.Format;
+ import org.jdom2.output.XMLOutputter;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  * Provides convenience methods for reading and writing enterprise application deployment
+  * descriptors (application.xml).
+  */
+ public final class ApplicationXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Utility class should not have a public or default constructor.
+      */
+     private ApplicationXmlIo()
+     {
+         super(ApplicationXmlType.getInstance());
+     }
+ 
+     /**
+      * Implementation of the SAX EntityResolver interface that looks up the application DTDs from
+      * the JAR.
+      */
+     private static class ApplicationXmlEntityResolver implements EntityResolver
+     {
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.EntityResolver#resolveEntity
+          */
+         @Override
+         public InputSource resolveEntity(String thePublicId, String theSystemId)
+             throws SAXException, IOException
+         {
+             ApplicationXmlVersion version = ApplicationXmlVersion.valueOf(thePublicId);
+             if (version != null)
+             {
+                 String fileName = version.getSystemId().substring(
+                     version.getSystemId().lastIndexOf('/'));
+                 InputStream in = this.getClass().getResourceAsStream(
+                     "/org/codehaus/cargo/module/internal/resource" + fileName);
+                 if (in != null)
+                 {
+                     return new InputSource(in);
+                 }
+             }
+             return null;
+         }
+ 
+     }
+ 
+     /**
+      * Parses a deployment descriptor stored in a regular file.
+      * 
+      * @param file The file to parse
+      * @param entityResolver A SAX entity resolver, or <code>null</code> to use the default
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the file could not be parsed
+      */
+     public static ApplicationXml parseApplicationXmlFromFile(File file,
+         EntityResolver entityResolver) throws IOException, JDOMException
+     {
+         try (InputStream in = new FileInputStream(file))
+         {
+             return parseApplicationXml(in, entityResolver);
+         }
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @param entityResolver A SAX entity resolver, or <code>null</code> to use the default
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the input could not be parsed
+      */
+     public static ApplicationXml parseApplicationXml(InputStream input,
+         EntityResolver entityResolver) throws IOException, JDOMException
+     {
+         ApplicationXmlIo io = new ApplicationXmlIo();
+         SAXBuilder builder = io.createDocumentBuilder();
+ 
+         if (entityResolver != null)
+         {
+             builder.setEntityResolver(entityResolver);
+         }
+         else
+         {
+             builder.setEntityResolver(new ApplicationXmlEntityResolver());
+         }
+         return (ApplicationXml) builder.build(input);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param appXml The descriptor to serialize
+      * @param file The file to write to
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeApplicationXml(ApplicationXml appXml, File file)
+         throws IOException
+     {
+         writeApplicationXml(appXml, file, null, false);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param appXml The descriptor to serialize
+      * @param file The file to write to
+      * @param encoding The character encoding to use
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeApplicationXml(ApplicationXml appXml, File file, Charset encoding)
+         throws IOException
+     {
+         writeApplicationXml(appXml, file, encoding, false);
+     }
+ 
+     /**
+      * Writes the specified document to a file.
+      * 
+      * @param appXml The descriptor to serialize
+      * @param file The file to write to
+      * @param encoding The character encoding to use
+      * @param isIndent Whether the written XML should be indented
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeApplicationXml(ApplicationXml appXml, File file, Charset encoding,
+         boolean isIndent) throws IOException
+     {
+         try (OutputStream out = new FileOutputStream(file))
+         {
+             writeApplicationXml(appXml, out, encoding, isIndent);
+         }
+     }
+ 
+     /**
+      * Writes the specified document to an output stream.
+      * 
+      * @param appXml The descriptor to serialize
+      * @param output The output stream to write to
+      * @param encoding The character encoding to use
+      * @param isIndent Whether the written XML should be indented
+      * @throws IOException If an I/O error occurs
+      */
+     public static void writeApplicationXml(ApplicationXml appXml, OutputStream output,
+         Charset encoding, boolean isIndent) throws IOException
+     {
+         Format format = Format.getPrettyFormat();
+         if (encoding != null)
+         {
+             format.setEncoding(encoding.name());
+         }
+ 
+         XMLOutputter serializer = new XMLOutputter(format);
+ 
+         serializer.output(appXml.getDocument(), output);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-3.html b/htmlReport/ns-18/sources/source-3.html new file mode 100644 index 0000000000..15236cae76 --- /dev/null +++ b/htmlReport/ns-18/sources/source-3.html @@ -0,0 +1,205 @@ + + + + + + + + Coverage Report > ApplicationXmlTag + + + + + + +
+ + +

Coverage Summary for Class: ApplicationXmlTag (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ApplicationXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ 
+ /**
+  * Represents the various top-level tags in a enterprise application deployment descriptor as a
+  * typesafe enumeration.
+  */
+ public final class ApplicationXmlTag extends DescriptorTag
+ {
+ 
+     /**
+      * Element name 'icon'.
+      */
+     public static final String ICON = "icon";
+ 
+     /**
+      * Element name 'display-name'.
+      */
+     public static final String DISPLAY_NAME = "display-name";
+ 
+     /**
+      * Element name 'description'.
+      */
+     public static final String DESCRIPTION = "description";
+ 
+     /**
+      * Element name 'module'.
+      */
+     public static final String MODULE = "module";
+ 
+     /**
+      * Element name 'ejb'.
+      */
+     public static final String EJB = "ejb";
+ 
+     /**
+      * Element name 'web'.
+      */
+     public static final String WEB = "web";
+ 
+     /**
+      * Element name 'web-uri'.
+      */
+     public static final String WEB_URI = "web-uri";
+ 
+     /**
+      * Element name 'context-root'.
+      */
+     public static final String CONTEXT_ROOT = "context-root";
+ 
+     /**
+      * Element name 'security-role'.
+      */
+     public static final String SECURITY_ROLE = "security-role";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected ApplicationXmlTag(ApplicationXmlType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected ApplicationXmlTag(ApplicationXmlType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-4.html b/htmlReport/ns-18/sources/source-4.html new file mode 100644 index 0000000000..47b9c83f05 --- /dev/null +++ b/htmlReport/ns-18/sources/source-4.html @@ -0,0 +1,185 @@ + + + + + + + + Coverage Report > ApplicationXmlType + + + + + + +
+ + +

Coverage Summary for Class: ApplicationXmlType (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ApplicationXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  * Descriptor type for application xml.
+  */
+ public class ApplicationXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Single instance of the ApplicationXmlType.
+      */
+     private static ApplicationXmlType instance = new ApplicationXmlType();
+ 
+     /**
+      * All the tags in this type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private ApplicationXmlTag[] tags =
+         new ApplicationXmlTag[] {
+             new ApplicationXmlTag(this, "icon"),
+             new ApplicationXmlTag(this, "display-name"),
+             new ApplicationXmlTag(this, "description"),
+             new ApplicationXmlTag(this, "module"),
+             new ApplicationXmlTag(this, "ejb"),
+             new ApplicationXmlTag(this, "web"),
+             new ApplicationXmlTag(this, "web-uri"),
+             new ApplicationXmlTag(this, "context-root"),
+             new ApplicationXmlTag(this, "security-role"),
+             new ApplicationXmlTag(this, "icon"),
+             new ApplicationXmlTag(this, "display-name"),
+             new ApplicationXmlTag(this, "description"),
+             new ApplicationXmlTag(this, "module"),
+             new ApplicationXmlTag(this, "ejb"),
+             new ApplicationXmlTag(this, "web"),
+             new ApplicationXmlTag(this, "web-uri"),
+             new ApplicationXmlTag(this, "context-root"),
+             new ApplicationXmlTag(this, "security-role")};
+ 
+     /**
+      * Protected Constructor.
+      */
+     protected ApplicationXmlType()
+     {
+         super(null, ApplicationXml.class, new Dtd("http://java.sun.com/dtd/application_1_3.dtd"));
+     }
+ 
+     /**
+      * Get the application XML Descriptor type.
+      * @return the singleton instance
+      */
+     public static ApplicationXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-5.html b/htmlReport/ns-18/sources/source-5.html new file mode 100644 index 0000000000..494c8dde16 --- /dev/null +++ b/htmlReport/ns-18/sources/source-5.html @@ -0,0 +1,267 @@ + + + + + + + + Coverage Report > ApplicationXmlVersion + + + + + + +
+ + +

Coverage Summary for Class: ApplicationXmlVersion (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ApplicationXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/20) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import org.jdom2.DocType;
+ 
+ /**
+  * Enumerated type that represents the version of the deployment descriptor of a enterprise
+  * application (application.xml).
+  */
+ public final class ApplicationXmlVersion implements Comparable<ApplicationXmlVersion>
+ {
+     /**
+      * Instance for version 1.2.
+      */
+     public static final ApplicationXmlVersion V1_2 = new ApplicationXmlVersion(
+         "1.2",
+         "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN",
+         "http://java.sun.com/j2ee/dtds/application_1_2.dtd");
+ 
+     /**
+      * Instance for version 1.3.
+      */
+     public static final ApplicationXmlVersion V1_3 = new ApplicationXmlVersion(
+         "1.3",
+         "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN",
+         "http://java.sun.com/dtd/application_1_3.dtd");
+ 
+     /**
+      * The system ID of the corresponding document type.
+      */
+     private String systemId;
+ 
+     /**
+      * The version as string.
+      */
+     private String version;
+ 
+     /**
+      * The public ID of the corresponding document type.
+      */
+     private String publicId;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param theVersion The version as string
+      * @param thePublicId The public ID of the correspondig document type
+      * @param theSystemId The system ID of the correspondig document type
+      */
+     private ApplicationXmlVersion(String theVersion, String thePublicId, String theSystemId)
+     {
+         this.version = theVersion;
+         this.publicId = thePublicId;
+         this.systemId = theSystemId;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int compareTo(ApplicationXmlVersion other)
+     {
+         double thisVersion = this.version == null ? 0 : Double.parseDouble(this.version);
+         double thatVersion =
+             (other == null || other.version == null) ? 0 : Double.parseDouble(other.version);
+         return Double.compare(thisVersion, thatVersion);
+     }
+ 
+     /**
+      * Returns the tag name.
+      * 
+      * @return The tag name
+      */
+     public String getVersion()
+     {
+         return this.version;
+     }
+ 
+     /**
+      * Returns the public ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The public ID
+      */
+     public String getPublicId()
+     {
+         return this.publicId;
+     }
+ 
+     /**
+      * Returns the system ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The system ID
+      */
+     public String getSystemId()
+     {
+         return this.systemId;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getVersion();
+     }
+ 
+     /**
+      * Returns the version corresponding to the given document type.
+      * 
+      * @param theDocType The document type
+      * @return The version that matches the document type, or <code>null</code> if the doctype is
+      * not recognized
+      * @throws NullPointerException If the document type is <code>null</code>
+      */
+     public static ApplicationXmlVersion valueOf(DocType theDocType) throws NullPointerException
+     {
+         return valueOf(theDocType.getPublicID());
+     }
+ 
+     /**
+      * Returns the version corresponding to the given public ID.
+      * 
+      * @param thePublicId The public ID
+      * @return The version that matches the public ID, or <code>null</code> if the ID is not
+      * recognized
+      */
+     public static ApplicationXmlVersion valueOf(String thePublicId)
+     {
+         ApplicationXmlVersion version = null;
+ 
+         if (V1_2.getPublicId().equals(thePublicId))
+         {
+             version = ApplicationXmlVersion.V1_2;
+         }
+         else if (V1_3.getPublicId().equals(thePublicId))
+         {
+             version = ApplicationXmlVersion.V1_3;
+         }
+         return version;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-6.html b/htmlReport/ns-18/sources/source-6.html new file mode 100644 index 0000000000..1e1b138d0b --- /dev/null +++ b/htmlReport/ns-18/sources/source-6.html @@ -0,0 +1,216 @@ + + + + + + + + Coverage Report > DefaultEarArchive + + + + + + +
+ + +

Coverage Summary for Class: DefaultEarArchive (org.codehaus.cargo.module.application)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultEarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.DefaultJarArchive;
+ import org.codehaus.cargo.module.ejb.DefaultEjbArchive;
+ import org.codehaus.cargo.module.ejb.EjbArchive;
+ import org.codehaus.cargo.module.webapp.DefaultWarArchive;
+ import org.codehaus.cargo.module.webapp.WarArchive;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Encapsulates access to an EAR.
+  */
+ public class DefaultEarArchive extends DefaultJarArchive implements EarArchive
+ {
+     /**
+      * The parsed deployment descriptor.
+      */
+     private ApplicationXml applicationXml;
+ 
+     /**
+      * {@inheritDoc}
+      * @see DefaultJarArchive#DefaultJarArchive(String)
+      */
+     public DefaultEarArchive(String file)
+     {
+         super(file);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param inputStream The input stream for the enterprise application archive
+      * @throws IOException If there was a problem reading the EAR
+      */
+     public DefaultEarArchive(InputStream inputStream) throws IOException
+     {
+         super(inputStream);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ApplicationXml getApplicationXml() throws IOException, JDOMException
+     {
+         if (this.applicationXml == null)
+         {
+             try (InputStream in = getResource("META-INF/application.xml"))
+             {
+                 this.applicationXml = ApplicationXmlIo.parseApplicationXml(in, null);
+             }
+         }
+         return this.applicationXml;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WarArchive getWebModule(String uri) throws IOException
+     {
+         try (InputStream war = getResource(uri))
+         {
+             if (war != null)
+             {
+                 return new DefaultWarArchive(war);
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public EjbArchive getEjbModule(String uri) throws IOException
+     {
+         try (InputStream ejb = getResource(uri))
+         {
+             if (ejb != null)
+             {
+                 return new DefaultEjbArchive(ejb);
+             }
+         }
+         return null;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-18/sources/source-7.html b/htmlReport/ns-18/sources/source-7.html new file mode 100644 index 0000000000..98c681faed --- /dev/null +++ b/htmlReport/ns-18/sources/source-7.html @@ -0,0 +1,132 @@ + + + + + + + + Coverage Report > EarArchive + + + + + + +
+ + +

Coverage Summary for Class: EarArchive (org.codehaus.cargo.module.application)

+ + + + + + + + + +
Class
EarArchive
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.application;
+ 
+ import java.io.IOException;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.codehaus.cargo.module.ejb.EjbArchive;
+ import org.codehaus.cargo.module.webapp.WarArchive;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to an EAR.
+  */
+ public interface EarArchive extends JarArchive
+ {
+     /**
+      * Returns the deployment descriptor of the web application.
+      * 
+      * @return The parsed deployment descriptor
+      * @throws IOException If there was a problem reading the deployment descriptor in the EAR
+      * @throws JDOMException If there is an exception reading the application xml
+      */
+     ApplicationXml getApplicationXml()
+         throws IOException, JDOMException;
+ 
+     /**
+      * Returns the web-app archive stored in the EAR with the specified URI.
+      * 
+      * @param uri The URI of the web module
+      * @return The web-app archive, or <code>null</code> if no WAR was found at the specified URI
+      * @throws IOException If there was an errors reading from the EAR or WAR
+      */
+     WarArchive getWebModule(String uri) throws IOException;
+ 
+     /**
+      * Returns the ejb archive stored in the EAR with the specified URI.
+      * 
+      * @param uri The URI of the ejb module
+      * @return The ejb archive, or <code>null</code> if no WAR was found at the specified URI
+      * @throws IOException If there was an errors reading from the EAR or EJB
+      */
+     EjbArchive getEjbModule(String uri) throws IOException;
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/index.html b/htmlReport/ns-19/index.html new file mode 100644 index 0000000000..7a8c00bcb0 --- /dev/null +++ b/htmlReport/ns-19/index.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_BLOCK.html b/htmlReport/ns-19/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..13021ec331 --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_BLOCK.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-19/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..4e5eaef895 --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_CLASS.html b/htmlReport/ns-19/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..d75810b2fd --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_CLASS.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-19/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..387add10db --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_LINE.html b/htmlReport/ns-19/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..80c7b7561b --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_LINE.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-19/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..d4cc6f7128 --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_METHOD.html b/htmlReport/ns-19/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..8eace2b345 --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_METHOD.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-19/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..0678e17fc0 --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-19/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..ae0613598e --- /dev/null +++ b/htmlReport/ns-19/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,359 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb + + 0% + + + (0/10) + + + + 0% + + + (0/46) + + + + 0% + + + (0/133) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-1.html b/htmlReport/ns-19/sources/source-1.html new file mode 100644 index 0000000000..4beafa9215 --- /dev/null +++ b/htmlReport/ns-19/sources/source-1.html @@ -0,0 +1,273 @@ + + + + + + + + Coverage Report > DefaultEjbArchive + + + + + + +
+ + +

Coverage Summary for Class: DefaultEjbArchive (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultEjbArchive + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/35) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.DefaultJarArchive;
+ import org.codehaus.cargo.module.ejb.jboss.JBossXml;
+ import org.codehaus.cargo.module.ejb.jboss.JBossXmlIo;
+ import org.codehaus.cargo.module.ejb.orion.OrionEjbJarXml;
+ import org.codehaus.cargo.module.ejb.orion.OrionEjbJarXmlIo;
+ import org.codehaus.cargo.module.ejb.weblogic.WeblogicEjbJarXml;
+ import org.codehaus.cargo.module.ejb.weblogic.WeblogicEjbJarXmlIo;
+ import org.codehaus.cargo.module.ejb.websphere.IbmEjbJarBndXmi;
+ import org.codehaus.cargo.module.ejb.websphere.IbmEjbJarBndXmiIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to an EJB JAR.
+  */
+ public class DefaultEjbArchive extends DefaultJarArchive implements EjbArchive
+ {
+     /**
+      * The parsed deployment descriptor.
+      */
+     private EjbJarXml ejbJarXml;
+ 
+     /**
+      * {@inheritDoc}
+      * @see DefaultJarArchive#DefaultJarArchive(String)
+      */
+     public DefaultEjbArchive(String file)
+     {
+         super(file);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param theInputStream The input stream for the enterprise application archive
+      * @throws IOException If there was a problem reading the EJB
+      */
+     public DefaultEjbArchive(InputStream theInputStream) throws IOException
+     {
+         super(theInputStream);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public EjbJarXml getEjbJarXml() throws IOException, JDOMException
+     {
+         if (this.ejbJarXml == null)
+         {
+             try (InputStream in = getResource("META-INF/ejb-jar.xml"))
+             {
+                 this.ejbJarXml = EjbJarXmlIo.parseEjbJarXml(in, null);
+             }
+             addWeblogicDescriptor();
+             addOracleDescriptor();
+             addWebsphereDescriptor();
+             addJBossDescriptor();
+         }
+         return this.ejbJarXml;
+     }
+ 
+     /**
+      * Associates the ejb-jar.xml with a weblogic-ejb-jar.xml if one is present in the jar.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the EJB jar
+      * @throws JDOMException If the deployment descriptor of the EJB jar could not be parsed
+      */
+     private void addWeblogicDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("META-INF/weblogic-ejb-jar.xml"))
+         {
+             if (in != null)
+             {
+                 WeblogicEjbJarXml descr = WeblogicEjbJarXmlIo.parseWeblogicEjbJarXml(in);
+                 if (descr != null)
+                 {
+                     this.ejbJarXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the ejb-jar.xml with orion-ejb-jar.xml if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the JAR
+      * @throws JDOMException If the deployment descriptor of the EJB jar could not be parsed
+      */
+     private void addOracleDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("META-INF/orion-ejb-jar.xml"))
+         {
+             if (in != null)
+             {
+                 OrionEjbJarXml descr = OrionEjbJarXmlIo.parseOracleEjbJarXml(in);
+                 if (descr != null)
+                 {
+                     this.ejbJarXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the ejb-jar.xml with ibm-ejb-jar-bnd.xmi if one is present in the jar.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the JAR
+      * @throws JDOMException If the deployment descriptor of the EJB jar could not be parsed
+      */
+     private void addWebsphereDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("META-INF/ibm-ejb-jar-bnd.xmi"))
+         {
+             if (in != null)
+             {
+                 IbmEjbJarBndXmi descr = IbmEjbJarBndXmiIo.parseIbmEjbJarXmi(in);
+                 if (descr != null)
+                 {
+                     this.ejbJarXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the ejb-jar.xml with jboss.xml if one is present in the jar.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the JAR
+      * @throws JDOMException If there is an issue with JDOM
+      */
+     private void addJBossDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("META-INF/jboss.xml"))
+         {
+             if (in != null)
+             {
+                 JBossXml descr = JBossXmlIo.parseJBossXml(in);
+                 if (descr != null)
+                 {
+                     this.ejbJarXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-2.html b/htmlReport/ns-19/sources/source-2.html new file mode 100644 index 0000000000..10c92f425f --- /dev/null +++ b/htmlReport/ns-19/sources/source-2.html @@ -0,0 +1,259 @@ + + + + + + + + Coverage Report > EjbDef + + + + + + +
+ + +

Coverage Summary for Class: EjbDef (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbDef + + 0% + + + (0/1) + + + + 0% + + + (0/11) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ /**
+  * Class representing an EJB definition in a ejb-jar.xml descriptor.
+  */
+ public class EjbDef
+ {
+     /**
+      * Id attribute of the EJB definition element.
+      */
+     private String id;
+ 
+     /**
+      * Value of the nested name tag.
+      */
+     private String name;
+ 
+     /**
+      * Value of the nested local tag.
+      */
+     private String local;
+ 
+     /**
+      * Value of the nested local-home tag.
+      */
+     private String localHome;
+ 
+     /**
+      * Constructor.
+      */
+     public EjbDef()
+     {
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param name name of the ejb
+      */
+     public EjbDef(String name)
+     {
+         this.name = name;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param name name of the ejb
+      * @param id id of the ejb
+      */
+     public EjbDef(String name, String id)
+     {
+         this.name = name;
+         this.id = id;
+     }
+ 
+     /**
+      * Id accessor.
+      * 
+      * @return Returns the id.
+      */
+     public String getId()
+     {
+         return this.id;
+     }
+ 
+     /**
+      * Id setter.
+      * 
+      * @param id The id to set.
+      */
+     public void setId(String id)
+     {
+         this.id = id;
+     }
+ 
+     /**
+      * Name accessor.
+      * 
+      * @return Returns the name.
+      */
+     public String getName()
+     {
+         return this.name;
+     }
+ 
+     /**
+      * Name setter.
+      * 
+      * @param name The name to set.
+      */
+     public void setName(String name)
+     {
+         this.name = name;
+     }
+ 
+     /**
+      * Local accessor.
+      * 
+      * @return Returns the local.
+      */
+     public String getLocal()
+     {
+         return this.local;
+     }
+ 
+     /**
+      * Local setter.
+      * 
+      * @param local The local to set.
+      */
+     public void setLocal(String local)
+     {
+         this.local = local;
+     }
+ 
+     /**
+      * LocalHome accessor.
+      * 
+      * @return Returns the localHome.
+      */
+     public String getLocalHome()
+     {
+         return this.localHome;
+     }
+ 
+     /**
+      * LocalHome setter.
+      * 
+      * @param localHome The localHome to set.
+      */
+     public void setLocalHome(String localHome)
+     {
+         this.localHome = localHome;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-3.html b/htmlReport/ns-19/sources/source-3.html new file mode 100644 index 0000000000..5374e734ea --- /dev/null +++ b/htmlReport/ns-19/sources/source-3.html @@ -0,0 +1,277 @@ + + + + + + + + Coverage Report > EjbJarXml + + + + + + +
+ + +

Coverage Summary for Class: EjbJarXml (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/43) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.J2eeDescriptor;
+ import org.jdom2.Attribute;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a ejb deployment descriptor <code>ejb-jar.xml</code> to
+  * provide convenience methods for easy access and manipulation.
+  */
+ public class EjbJarXml extends AbstractDescriptor implements J2eeDescriptor
+ {
+     /**
+      * List of vendor descriptors associated with this ejb-jar.xml.
+      */
+     private List<Descriptor> vendorDescriptors = new ArrayList<Descriptor>();
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement the root element of the document
+      * @param type the document descriptor type
+      */
+     public EjbJarXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "ejb-jar.xml";
+     }
+ 
+     /**
+      * Associates a vendor specific descriptor with this web.xml.
+      * 
+      * @param descr the vendor specific dexcriptor to associate
+      */
+     public void addVendorDescriptor(VendorEjbDescriptor descr)
+     {
+         this.vendorDescriptors.add(descr);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<Descriptor> getVendorDescriptors()
+     {
+         return this.vendorDescriptors;
+     }
+ 
+     /**
+      * Returns all session ejbs in this descriptor.
+      * 
+      * @return List of Session objects representing all session ejbs
+      */
+     public List<Session> getSessionEjbs()
+     {
+         List<Session> ejbs = new ArrayList<Session>();
+         for (Element sessionElement : getElements(EjbJarXmlTag.SESSION))
+         {
+             Session session = new Session();
+             Attribute id = sessionElement.getAttribute("id");
+             if (id != null)
+             {
+                 session.setId(id.getValue());
+             }
+             session.setName(getChildText(sessionElement, EjbJarXmlTag.EJB_NAME));
+             session.setLocal(getChildText(sessionElement, EjbJarXmlTag.LOCAL));
+             session.setLocalHome(getChildText(sessionElement, EjbJarXmlTag.LOCAL_HOME));
+             ejbs.add(session);
+         }
+ 
+         return ejbs;
+     }
+ 
+     /**
+      * Returns all entity ejbs in this descriptor.
+      * 
+      * @return List of Entity objects representing all entity ejbs
+      */
+     public List<Entity> getEntityEjbs()
+     {
+         List<Entity> ejbs = new ArrayList<Entity>();
+         for (Element entityElement : getElements(EjbJarXmlTag.ENTITY))
+         {
+             Entity entity = new Entity();
+             Attribute id = entityElement.getAttribute("id");
+             if (id != null)
+             {
+                 entity.setId(id.getValue());
+             }
+             entity.setName(getChildText(entityElement, EjbJarXmlTag.EJB_NAME));
+             entity.setLocal(getChildText(entityElement, EjbJarXmlTag.LOCAL));
+             entity.setLocalHome(getChildText(entityElement, EjbJarXmlTag.LOCAL_HOME));
+             ejbs.add(entity);
+         }
+ 
+         return ejbs;
+     }
+ 
+     /**
+      * Return a specific session definition.
+      * 
+      * @param name the name of the ejb.
+      * @return the Session
+      */
+     public Session getSessionEjb(String name)
+     {
+         Session result = null;
+         for (Session ejb : getSessionEjbs())
+         {
+             if (ejb.getName().equals(name))
+             {
+                 result = ejb;
+                 break;
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * Return a specific entity definition.
+      * 
+      * @param name the name of the ejb.
+      * @return the Entity
+      */
+     public Entity getEntityEjb(String name)
+     {
+         Entity result = null;
+         for (Entity ejb : getEntityEjbs())
+         {
+             if (ejb.getName().equals(name))
+             {
+                 result = ejb;
+                 break;
+             }
+         }
+ 
+         return result;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-4.html b/htmlReport/ns-19/sources/source-4.html new file mode 100644 index 0000000000..16e0c8b62d --- /dev/null +++ b/htmlReport/ns-19/sources/source-4.html @@ -0,0 +1,235 @@ + + + + + + + + Coverage Report > EjbJarXmlIo + + + + + + +
+ + +

Coverage Summary for Class: EjbJarXmlIo (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
EjbJarXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + +
EjbJarXmlIo$1
EjbJarXmlIo$EjbJarXmlEntityResolver + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
Total + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ import org.jdom2.input.SAXBuilder;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  * Provides convenience methods for reading and writing ejb deployment descriptors (ejb-jar.xml).
+  */
+ public class EjbJarXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Protected constructor.
+      */
+     protected EjbJarXmlIo()
+     {
+         super(EjbJarXmlType.getInstance());
+     }
+ 
+     /**
+      * Implementation of the SAX EntityResolver interface that looks up the application DTDs from
+      * the JAR.
+      */
+     private static class EjbJarXmlEntityResolver implements EntityResolver
+     {
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.EntityResolver#resolveEntity
+          */
+         @Override
+         public InputSource resolveEntity(String thePublicId, String theSystemId)
+             throws SAXException, IOException
+         {
+             EjbJarXmlVersion version = EjbJarXmlVersion.valueOf(thePublicId);
+             if (version != null)
+             {
+                 String fileName = version.getSystemId().substring(
+                     version.getSystemId().lastIndexOf('/'));
+                 InputStream in = this.getClass().getResourceAsStream(
+                     "/org/codehaus/cargo/module/internal/resource" + fileName);
+                 if (in != null)
+                 {
+                     return new InputSource(in);
+                 }
+             }
+             return null;
+         }
+ 
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @param entityResolver A SAX entity resolver, or <code>null</code> to use the default
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the XML parser was not correctly configured
+      */
+     public static EjbJarXml parseEjbJarXml(InputStream input,
+         EntityResolver entityResolver)
+         throws IOException, JDOMException
+     {
+         EjbJarXmlIo io = new EjbJarXmlIo();
+         SAXBuilder builder = io.createDocumentBuilder();
+         if (entityResolver != null)
+         {
+             builder.setEntityResolver(entityResolver);
+         }
+         else
+         {
+             builder.setEntityResolver(new EjbJarXmlEntityResolver());
+         }
+         return (EjbJarXml) builder.build(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-5.html b/htmlReport/ns-19/sources/source-5.html new file mode 100644 index 0000000000..98ec63359b --- /dev/null +++ b/htmlReport/ns-19/sources/source-5.html @@ -0,0 +1,181 @@ + + + + + + + + Coverage Report > EjbJarXmlTag + + + + + + +
+ + +

Coverage Summary for Class: EjbJarXmlTag (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various tags in a ejb jar deployment descriptor.
+  */
+ public class EjbJarXmlTag extends DescriptorTag
+ {
+     /**
+      * Element name 'session'.
+      */
+     public static final String SESSION = "session";
+ 
+     /**
+      * Element name 'entity'.
+      */
+     public static final String ENTITY = "entity";
+ 
+     /**
+      * Element name 'ejb-name'.
+      */
+     public static final String EJB_NAME = "ejb-name";
+ 
+     /**
+      * Element name 'local'.
+      */
+     public static final String LOCAL = "local";
+ 
+     /**
+      * Element name 'local-home'.
+      */
+     public static final String LOCAL_HOME = "local-home";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected EjbJarXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected EjbJarXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-6.html b/htmlReport/ns-19/sources/source-6.html new file mode 100644 index 0000000000..47e1211c00 --- /dev/null +++ b/htmlReport/ns-19/sources/source-6.html @@ -0,0 +1,171 @@ + + + + + + + + Coverage Report > EjbJarXmlType + + + + + + +
+ + +

Coverage Summary for Class: EjbJarXmlType (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class EjbJarXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static EjbJarXmlType instance = new EjbJarXmlType();
+ 
+     /**
+      * All the tags in this type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private EjbJarXmlTag[] tags = new EjbJarXmlTag[] {
+         new EjbJarXmlTag(this, "session"),
+         new EjbJarXmlTag(this, "entity"),
+         new EjbJarXmlTag(this, "ejb-name"),
+         new EjbJarXmlTag(this, "local"),
+         new EjbJarXmlTag(this, "local-home")
+     };
+ 
+     /**
+      * Protected constructor.
+      */
+     protected EjbJarXmlType()
+     {
+         super(null, EjbJarXml.class, new Dtd("http://java.sun.com/dtd/ejb-jar_2_0.dtd"));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static EjbJarXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-7.html b/htmlReport/ns-19/sources/source-7.html new file mode 100644 index 0000000000..51fbee05c6 --- /dev/null +++ b/htmlReport/ns-19/sources/source-7.html @@ -0,0 +1,252 @@ + + + + + + + + Coverage Report > EjbJarXmlVersion + + + + + + +
+ + +

Coverage Summary for Class: EjbJarXmlVersion (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbJarXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import org.w3c.dom.DocumentType;
+ 
+ /**
+  * Enumerated type that represents the version of the deployment descriptor of a ejb descriptor
+  * (ejb-jar.xml).
+  */
+ public final class EjbJarXmlVersion implements Comparable<EjbJarXmlVersion>
+ {
+     /**
+      * Instance for version 2.0.
+      */
+     public static final EjbJarXmlVersion V2_0 = new EjbJarXmlVersion(
+         "2.0",
+         "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN",
+         "http://java.sun.com/dtd/ejb-jar_2_0.dtd");
+ 
+     /**
+      * The system ID of the corresponding document type.
+      */
+     private String systemId;
+ 
+     /**
+      * The version as string.
+      */
+     private String version;
+ 
+     /**
+      * The public ID of the corresponding document type.
+      */
+     private String publicId;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param version The version as string
+      * @param publicId The public ID of the correspondig document type
+      * @param systemId The system ID of the correspondig document type
+      */
+     private EjbJarXmlVersion(String version, String publicId, String systemId)
+     {
+         this.version = version;
+         this.publicId = publicId;
+         this.systemId = systemId;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int compareTo(EjbJarXmlVersion other)
+     {
+         double thisVersion = this.version == null ? 0 : Double.parseDouble(this.version);
+         double thatVersion =
+             (other == null || other.version == null) ? 0 : Double.parseDouble(other.version);
+         return Double.compare(thisVersion, thatVersion);
+     }
+ 
+     /**
+      * Returns the tag name.
+      * 
+      * @return The tag name
+      */
+     public String getVersion()
+     {
+         return this.version;
+     }
+ 
+     /**
+      * Returns the public ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The public ID
+      */
+     public String getPublicId()
+     {
+         return this.publicId;
+     }
+ 
+     /**
+      * Returns the system ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The system ID
+      */
+     public String getSystemId()
+     {
+         return this.systemId;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getVersion();
+     }
+ 
+     /**
+      * Returns the version corresponding to the given document type.
+      * 
+      * @param docType The document type
+      * @return The version that matches the document type, or <code>null</code> if the doctype is
+      * not recognized
+      * @throws NullPointerException If the document type is <code>null</code>
+      */
+     public static EjbJarXmlVersion valueOf(DocumentType docType) throws NullPointerException
+     {
+         return valueOf(docType.getPublicId());
+     }
+ 
+     /**
+      * Returns the version corresponding to the given public ID.
+      * 
+      * @param publicId The public ID
+      * @return The version that matches the public ID, or <code>null</code> if the ID is not
+      * recognized
+      */
+     public static EjbJarXmlVersion valueOf(String publicId)
+     {
+         EjbJarXmlVersion version = null;
+ 
+         if (V2_0.getPublicId().equals(publicId))
+         {
+             version = EjbJarXmlVersion.V2_0;
+         }
+         return version;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-8.html b/htmlReport/ns-19/sources/source-8.html new file mode 100644 index 0000000000..58160138cb --- /dev/null +++ b/htmlReport/ns-19/sources/source-8.html @@ -0,0 +1,131 @@ + + + + + + + + Coverage Report > Entity + + + + + + +
+ + +

Coverage Summary for Class: Entity (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Entity + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ /**
+  * Class representing an entity ejb definition in an ejb-jar.xml descriptor.
+  */
+ public class Entity extends EjbDef
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-9.html b/htmlReport/ns-19/sources/source-9.html new file mode 100644 index 0000000000..17f90bd319 --- /dev/null +++ b/htmlReport/ns-19/sources/source-9.html @@ -0,0 +1,131 @@ + + + + + + + + Coverage Report > Session + + + + + + +
+ + +

Coverage Summary for Class: Session (org.codehaus.cargo.module.ejb)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Session + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ /**
+  * Class representing a session ejb definition in an ejb-jar.xml descriptor.
+  */
+ public class Session extends EjbDef
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-a.html b/htmlReport/ns-19/sources/source-a.html new file mode 100644 index 0000000000..ad4f2028a9 --- /dev/null +++ b/htmlReport/ns-19/sources/source-a.html @@ -0,0 +1,104 @@ + + + + + + + + Coverage Report > VendorEjbDescriptor + + + + + + +
+ + +

Coverage Summary for Class: VendorEjbDescriptor (org.codehaus.cargo.module.ejb)

+ + + + + + + + + +
Class
VendorEjbDescriptor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import org.codehaus.cargo.module.VendorDescriptor;
+ 
+ /**
+  * Base interface for vendor specific EJB descriptors.
+  */
+ public interface VendorEjbDescriptor extends VendorDescriptor
+ {
+     /**
+      * Returns the jndi name for an EJB.
+      * 
+      * @param ejb The EjbDef to get the jndi for
+      * @return the jndi name of the ejb
+      */
+     String getJndiName(EjbDef ejb);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-19/sources/source-b.html b/htmlReport/ns-19/sources/source-b.html new file mode 100644 index 0000000000..bb9980eaa5 --- /dev/null +++ b/htmlReport/ns-19/sources/source-b.html @@ -0,0 +1,108 @@ + + + + + + + + Coverage Report > EjbArchive + + + + + + +
+ + +

Coverage Summary for Class: EjbArchive (org.codehaus.cargo.module.ejb)

+ + + + + + + + + +
Class
EjbArchive
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb;
+ 
+ import java.io.IOException;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to an EJB JAR.
+  */
+ public interface EjbArchive extends JarArchive
+ {
+     /**
+      * Return the ejb-jar.xml.
+      * 
+      * @return the EjbJarXml
+      * @throws IOException If there was a problem reading the deployment descriptor in the EAR
+      * @throws JDOMException If there is a problem with the XML
+      */
+     EjbJarXml getEjbJarXml() throws IOException, JDOMException;
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1a/index.html b/htmlReport/ns-1a/index.html new file mode 100644 index 0000000000..4966b37f7e --- /dev/null +++ b/htmlReport/ns-1a/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_BLOCK.html b/htmlReport/ns-1a/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..bb4b2b32a0 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1a/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..c75700fc2b --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_CLASS.html b/htmlReport/ns-1a/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..c182e3be38 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1a/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..e31a6b7108 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_LINE.html b/htmlReport/ns-1a/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..47e936be68 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1a/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..58ca3f16d4 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_METHOD.html b/htmlReport/ns-1a/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..6f066107b8 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1a/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..077f182639 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1a/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..104e4266a3 --- /dev/null +++ b/htmlReport/ns-1a/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.jboss + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1a/sources/source-1.html b/htmlReport/ns-1a/sources/source-1.html new file mode 100644 index 0000000000..ce79414f34 --- /dev/null +++ b/htmlReport/ns-1a/sources/source-1.html @@ -0,0 +1,206 @@ + + + + + + + + Coverage Report > JBossXml + + + + + + +
+ + +

Coverage Summary for Class: JBossXml (org.codehaus.cargo.module.ejb.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.jboss;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.ejb.EjbDef;
+ import org.codehaus.cargo.module.ejb.VendorEjbDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a jboss ejb deployment descriptor <code>jboss.xml</code>
+  * to provide convenience methods for easy access and manipulation.
+  */
+ public class JBossXml extends AbstractDescriptor implements VendorEjbDescriptor
+ {
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root of the DOM document representing the parsed deployment descriptor
+      * @param type The descriptor type
+      */
+     public JBossXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * Returns the JNDI name for the ejb..
+      * @param ejb The ejb
+      * @return The jndi name
+      */
+     @Override
+     public String getJndiName(EjbDef ejb)
+     {
+         String jndiName = null;
+ 
+         Element ejbElement = getEjb(ejb.getName());
+         if (ejbElement != null)
+         {
+             jndiName = getNestedText(ejbElement, getDescriptorType().getTagByName(
+                     JBossXmlTag.LOCAL_JNDI_NAME));
+             if (jndiName == null)
+             {
+                 jndiName = getNestedText(ejbElement, getDescriptorType().getTagByName(
+                         JBossXmlTag.JNDI_NAME));
+             }
+         }
+ 
+         return jndiName;
+     }
+ 
+     /**
+      * Returns the file name 'jboss.xml'.
+      * @return The file name.
+      */
+     @Override
+     public String getFileName()
+     {
+         return "jboss.xml";
+     }
+ 
+     /**
+      * Returns a specific ejb.
+      * 
+      * @param ejbName the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getEjb(String ejbName)
+     {
+         Element ejbElement = null;
+ 
+         for (Element nameElement : getElements(JBossXmlTag.EJB_NAME))
+         {
+             String name = nameElement.getText();
+             if (ejbName.equals(name))
+             {
+                 ejbElement = nameElement.getParentElement();
+                 break;
+             }
+         }
+ 
+         return ejbElement;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1a/sources/source-2.html b/htmlReport/ns-1a/sources/source-2.html new file mode 100644 index 0000000000..daa7a26185 --- /dev/null +++ b/htmlReport/ns-1a/sources/source-2.html @@ -0,0 +1,159 @@ + + + + + + + + Coverage Report > JBossXmlIo + + + + + + +
+ + +

Coverage Summary for Class: JBossXmlIo (org.codehaus.cargo.module.ejb.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.jboss;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading JBoss ejb jar deployment descriptor.
+  */
+ public class JBossXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Protected Constructor.
+      */
+     protected JBossXmlIo()
+     {
+         super(JBossXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If an XML Parsing problem
+      */
+     public static JBossXml parseJBossXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         JBossXmlIo xio = new JBossXmlIo();
+         return (JBossXml) xio.parseXml(input);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1a/sources/source-3.html b/htmlReport/ns-1a/sources/source-3.html new file mode 100644 index 0000000000..2e320bfe10 --- /dev/null +++ b/htmlReport/ns-1a/sources/source-3.html @@ -0,0 +1,172 @@ + + + + + + + + Coverage Report > JBossXmlTag + + + + + + +
+ + +

Coverage Summary for Class: JBossXmlTag (org.codehaus.cargo.module.ejb.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.jboss;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Defines the JBoss XML tags.
+  */
+ public class JBossXmlTag extends DescriptorTag
+ {
+     /**
+      * ejb-name.
+      */
+     public static final String EJB_NAME = "ejb-name";
+ 
+     /**
+      * jndi-name.
+      */
+     public static final String JNDI_NAME = "jndi-name";
+ 
+     /**
+      * local-jndi-name.
+      */
+     public static final String LOCAL_JNDI_NAME = "local-jndi-name";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected JBossXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected JBossXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1a/sources/source-4.html b/htmlReport/ns-1a/sources/source-4.html new file mode 100644 index 0000000000..1cabf8c575 --- /dev/null +++ b/htmlReport/ns-1a/sources/source-4.html @@ -0,0 +1,167 @@ + + + + + + + + Coverage Report > JBossXmlType + + + + + + +
+ + +

Coverage Summary for Class: JBossXmlType (org.codehaus.cargo.module.ejb.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.jboss;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class JBossXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static JBossXmlType instance = new JBossXmlType();
+ 
+     /**
+      * All the tags in this type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private JBossXmlTag[] tags = new JBossXmlTag[] {
+         new JBossXmlTag(this, JBossXmlTag.EJB_NAME),
+         new JBossXmlTag(this, JBossXmlTag.JNDI_NAME),
+         new JBossXmlTag(this, JBossXmlTag.LOCAL_JNDI_NAME)
+     };
+ 
+     /**
+      * Protected constructor.
+      */
+     protected JBossXmlType()
+     {
+         super(null, JBossXml.class,
+             new Dtd("http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"));
+         setDescriptorIo(new JBossXmlIo());
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static JBossXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1b/index.html b/htmlReport/ns-1b/index.html new file mode 100644 index 0000000000..98c12c091b --- /dev/null +++ b/htmlReport/ns-1b/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_BLOCK.html b/htmlReport/ns-1b/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..8a62afdcb5 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1b/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..40511d1f36 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_CLASS.html b/htmlReport/ns-1b/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..b1c14cdf08 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1b/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..29a3cfbb1a --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_LINE.html b/htmlReport/ns-1b/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..da6a7e2523 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1b/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..5bc28208f2 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_METHOD.html b/htmlReport/ns-1b/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..133efac11f --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1b/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..0c61c30f88 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1b/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..a221cd9260 --- /dev/null +++ b/htmlReport/ns-1b/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.orion + + 0% + + + (0/3) + + + + 0% + + + (0/11) + + + + 0% + + + (0/38) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1b/sources/source-1.html b/htmlReport/ns-1b/sources/source-1.html new file mode 100644 index 0000000000..3f565e09f5 --- /dev/null +++ b/htmlReport/ns-1b/sources/source-1.html @@ -0,0 +1,245 @@ + + + + + + + + Coverage Report > OrionEjbJarXml + + + + + + +
+ + +

Coverage Summary for Class: OrionEjbJarXml (org.codehaus.cargo.module.ejb.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/32) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.orion;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.ejb.EjbDef;
+ import org.codehaus.cargo.module.ejb.VendorEjbDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a oracle ejb deployment descriptor
+  * <code>orion-ejb-jar.xml</code> to provide convenience methods for easy access and manipulation.
+  */
+ public class OrionEjbJarXml extends AbstractDescriptor implements VendorEjbDescriptor
+ {
+     /**
+      * Constructor.
+      * 
+      * @param document The DOM document representing the parsed deployment descriptor
+      * @param type the type of the descriptor
+      */
+     public OrionEjbJarXml(Element document, DescriptorType type)
+     {
+         super(document, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "orion-ejb-jar.xml";
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getJndiName(EjbDef ejb)
+     {
+         String jndiName = null;
+         Element ejbElement = getEjb(ejb.getName());
+         if (ejbElement != null)
+         {
+             if (ejb.getLocal() != null)
+             {
+                 jndiName = ejbElement.getAttribute("local-location").getValue();
+             }
+             if (jndiName == null)
+             {
+                 jndiName = ejbElement.getAttribute("location").getValue();
+             }
+         }
+         return jndiName;
+     }
+ 
+     /**
+      * Returns a specific ejb.
+      * 
+      * @param ejbName the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getEjb(String ejbName)
+     {
+         Element ejbElement = getSessionEjb(ejbName);
+         if (ejbElement == null)
+         {
+             ejbElement = getEntityEjb(ejbName);
+         }
+ 
+         return ejbElement;
+     }
+ 
+     /**
+      * Returns a specific ejb.
+      * 
+      * @param ejbName the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getSessionEjb(String ejbName)
+     {
+         Element ejbElement = null;
+ 
+         for (Element deploymentElement : getElements(new DescriptorTag(
+             OrionEjbJarXmlType.getInstance(), "session-deployment", true)))
+         {
+             String name = deploymentElement.getAttribute("name").getValue();
+             if (name.equals(ejbName))
+             {
+                 ejbElement = deploymentElement;
+                 break;
+             }
+         }
+ 
+         return ejbElement;
+     }
+ 
+     /**
+      * Returns a specific ejb.
+      * 
+      * @param ejbName the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getEntityEjb(String ejbName)
+     {
+         Element ejbElement = null;
+ 
+         for (Element deploymentElement : getElements(new DescriptorTag(
+             OrionEjbJarXmlType.getInstance(), "entity-deployment", true)))
+         {
+             String name = deploymentElement.getAttribute("name").getValue();
+             if (name.equals(ejbName))
+             {
+                 ejbElement = deploymentElement;
+                 break;
+             }
+         }
+ 
+         return ejbElement;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1b/sources/source-2.html b/htmlReport/ns-1b/sources/source-2.html new file mode 100644 index 0000000000..81bedbec70 --- /dev/null +++ b/htmlReport/ns-1b/sources/source-2.html @@ -0,0 +1,160 @@ + + + + + + + + Coverage Report > OrionEjbJarXmlIo + + + + + + +
+ + +

Coverage Summary for Class: OrionEjbJarXmlIo (org.codehaus.cargo.module.ejb.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.orion;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Oracle ejb jar deployment descriptor.
+  */
+ public class OrionEjbJarXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Protected constructor.
+      */
+     protected OrionEjbJarXmlIo()
+     {
+         super(OrionEjbJarXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the input could not be parsed
+      */
+     public static OrionEjbJarXml parseOracleEjbJarXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         OrionEjbJarXmlIo xio = new OrionEjbJarXmlIo();
+         return (OrionEjbJarXml) xio.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1b/sources/source-3.html b/htmlReport/ns-1b/sources/source-3.html new file mode 100644 index 0000000000..a16cd90944 --- /dev/null +++ b/htmlReport/ns-1b/sources/source-3.html @@ -0,0 +1,159 @@ + + + + + + + + Coverage Report > OrionEjbJarXmlType + + + + + + +
+ + +

Coverage Summary for Class: OrionEjbJarXmlType (org.codehaus.cargo.module.ejb.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.orion;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  * EJB JAR XML file for Orion.
+  */
+ public class OrionEjbJarXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static OrionEjbJarXmlType instance = new OrionEjbJarXmlType();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected OrionEjbJarXmlType()
+     {
+         super(null, OrionEjbJarXml.class,
+             new Dtd("http://www.oracle.com/technology/ias/dtds/orion-ejb-jar-9_04.dtd"));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static OrionEjbJarXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1c/index.html b/htmlReport/ns-1c/index.html new file mode 100644 index 0000000000..929813d18a --- /dev/null +++ b/htmlReport/ns-1c/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_BLOCK.html b/htmlReport/ns-1c/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..da00d2624a --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1c/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..96c5ba6c18 --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_CLASS.html b/htmlReport/ns-1c/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..c1675e5f1b --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1c/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..16a0073275 --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_LINE.html b/htmlReport/ns-1c/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..c803022167 --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1c/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..3dd60f8445 --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_METHOD.html b/htmlReport/ns-1c/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..271d8cfafb --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1c/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..fdd4a62b8c --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1c/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..b9ddaf5f93 --- /dev/null +++ b/htmlReport/ns-1c/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/13) + + + + 0% + + + (0/39) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1c/sources/source-1.html b/htmlReport/ns-1c/sources/source-1.html new file mode 100644 index 0000000000..a6ad17710e --- /dev/null +++ b/htmlReport/ns-1c/sources/source-1.html @@ -0,0 +1,250 @@ + + + + + + + + Coverage Report > WeblogicEjbJarXml + + + + + + +
+ + +

Coverage Summary for Class: WeblogicEjbJarXml (org.codehaus.cargo.module.ejb.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXml + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/30) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.weblogic;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.ejb.EjbDef;
+ import org.codehaus.cargo.module.ejb.VendorEjbDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a weblogic ejb deployment descriptor
+  * <code>weblogic-ejb-jar.xml</code> to provide convenience methods for easy access and
+  * manipulation.
+  */
+ public class WeblogicEjbJarXml extends AbstractDescriptor implements VendorEjbDescriptor
+ {
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root of the DOM document representing the parsed deployment descriptor
+      * @param type The descriptor type
+      */
+     public WeblogicEjbJarXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "weblogic-ejb-jar.xml";
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getJndiName(EjbDef ejb)
+     {
+         String jndiName = null;
+ 
+         Element ejbElement = getEjb(ejb.getName());
+         if (ejbElement != null)
+         {
+             jndiName = getNestedText(ejbElement,
+                 getDescriptorType().getTagByName(WeblogicEjbJarXmlTag.LOCAL_JNDI_NAME));
+             if (jndiName == null)
+             {
+                 jndiName = getNestedText(ejbElement,
+                     getDescriptorType().getTagByName(WeblogicEjbJarXmlTag.JNDI_NAME));
+             }
+         }
+ 
+         return jndiName;
+     }
+ 
+     /**
+      * Adds a dispatch policy to a ejb definition.
+      * 
+      * @param ejb The ejb to be modified
+      * @param policy The policy to add
+      * @throws IllegalArgumentException if the given ejb does not exist in the descriptor
+      */
+     public void addDispatchPolicy(EjbDef ejb, String policy)
+     {
+         Element ejbElement = getEjb(ejb.getName());
+         if (ejbElement == null)
+         {
+             throw new IllegalArgumentException("No ejb named " + ejb.getName() + " found.");
+         }
+         else
+         {
+             ejbElement.addContent(createNestedText(
+                 getDescriptorType().getTagByName(WeblogicEjbJarXmlTag.DISPATCH_POLICY), policy));
+         }
+     }
+ 
+     /**
+      * Returns the dispatch policy for a given ejb.
+      * 
+      * @param ejb The ejb to get the dispatch policy for
+      * @return the dispatch policy or null if no one is specified
+      * @throws IllegalArgumentException if the given ejb does not exist in the descriptor
+      */
+     public String getDispatchPolicy(EjbDef ejb)
+     {
+         String policy;
+ 
+         Element ejbElement = getEjb(ejb.getName());
+         if (ejbElement == null)
+         {
+             throw new IllegalArgumentException("No ejb named " + ejb.getName() + " found.");
+         }
+         else
+         {
+             policy = getNestedText(ejbElement,
+                 getDescriptorType().getTagByName(WeblogicEjbJarXmlTag.DISPATCH_POLICY));
+         }
+ 
+         return policy;
+     }
+ 
+     /**
+      * Returns a specific ejb.
+      * 
+      * @param ejbName the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getEjb(String ejbName)
+     {
+         Element ejbElement = null;
+ 
+         for (Element nameElement : getElements(WeblogicEjbJarXmlTag.EJB_NAME))
+         {
+             String name = nameElement.getText();
+             if (ejbName.equals(name))
+             {
+                 ejbElement = nameElement.getParentElement();
+                 break;
+             }
+         }
+ 
+         return ejbElement;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1c/sources/source-2.html b/htmlReport/ns-1c/sources/source-2.html new file mode 100644 index 0000000000..c83021d968 --- /dev/null +++ b/htmlReport/ns-1c/sources/source-2.html @@ -0,0 +1,160 @@ + + + + + + + + Coverage Report > WeblogicEjbJarXmlIo + + + + + + +
+ + +

Coverage Summary for Class: WeblogicEjbJarXmlIo (org.codehaus.cargo.module.ejb.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.weblogic;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading WebLogic ejb jar deployment descriptor.
+  */
+ public class WeblogicEjbJarXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Protected Constrictor.
+      */
+     protected WeblogicEjbJarXmlIo()
+     {
+         super(WeblogicEjbJarXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If an XML Parsing problem
+      */
+     public static WeblogicEjbJarXml parseWeblogicEjbJarXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         WeblogicEjbJarXmlIo xio = new WeblogicEjbJarXmlIo();
+         return (WeblogicEjbJarXml) xio.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1c/sources/source-3.html b/htmlReport/ns-1c/sources/source-3.html new file mode 100644 index 0000000000..0e378c875f --- /dev/null +++ b/htmlReport/ns-1c/sources/source-3.html @@ -0,0 +1,177 @@ + + + + + + + + Coverage Report > WeblogicEjbJarXmlTag + + + + + + +
+ + +

Coverage Summary for Class: WeblogicEjbJarXmlTag (org.codehaus.cargo.module.ejb.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.weblogic;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various tags in a weblogic ejb jar deployment descriptor.
+  */
+ public class WeblogicEjbJarXmlTag extends DescriptorTag
+ {
+ 
+     /**
+      * Element name 'ejb-name'.
+      */
+     public static final String EJB_NAME = "ejb-name";
+ 
+     /**
+      * Element name 'local-jndi-name'.
+      */
+     public static final String LOCAL_JNDI_NAME = "local-jndi-name";
+ 
+     /**
+      * Element name 'jndi-name'.
+      */
+     public static final String JNDI_NAME = "jndi-name";
+ 
+     /**
+      * Element name 'dispatch-policy'.
+      */
+     public static final String DISPATCH_POLICY = "dispatch-policy";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected WeblogicEjbJarXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected WeblogicEjbJarXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1c/sources/source-4.html b/htmlReport/ns-1c/sources/source-4.html new file mode 100644 index 0000000000..50fdd1fd44 --- /dev/null +++ b/htmlReport/ns-1c/sources/source-4.html @@ -0,0 +1,171 @@ + + + + + + + + Coverage Report > WeblogicEjbJarXmlType + + + + + + +
+ + +

Coverage Summary for Class: WeblogicEjbJarXmlType (org.codehaus.cargo.module.ejb.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicEjbJarXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.weblogic;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class WeblogicEjbJarXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static WeblogicEjbJarXmlType instance = new WeblogicEjbJarXmlType();
+ 
+     /**
+      * All the tags in this type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private WeblogicEjbJarXmlTag[] tags = new WeblogicEjbJarXmlTag[] {
+         new WeblogicEjbJarXmlTag(this, "ejb-name"),
+         new WeblogicEjbJarXmlTag(this, "local-jndi-name"),
+         new WeblogicEjbJarXmlTag(this, "jndi-name"),
+         new WeblogicEjbJarXmlTag(this, "dispatch-policy")
+     };
+ 
+     /**
+      * Protected constructor.
+      */
+     protected WeblogicEjbJarXmlType()
+     {
+         super(null, WeblogicEjbJarXml.class,
+             new Dtd("http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd"));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static WeblogicEjbJarXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1d/index.html b/htmlReport/ns-1d/index.html new file mode 100644 index 0000000000..4c0ae6ee8f --- /dev/null +++ b/htmlReport/ns-1d/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_BLOCK.html b/htmlReport/ns-1d/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..b786fddad2 --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1d/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..58d0eac181 --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_CLASS.html b/htmlReport/ns-1d/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..b6d8880808 --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1d/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ea371af764 --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_LINE.html b/htmlReport/ns-1d/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..be6aede94f --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1d/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..a7476b0f7d --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_METHOD.html b/htmlReport/ns-1d/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..498d357f88 --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1d/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..5646ffd2fc --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1d/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..06e2d3b75b --- /dev/null +++ b/htmlReport/ns-1d/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.ejb.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.ejb.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.ejb.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/11) + + + + 0% + + + (0/27) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1d/sources/source-1.html b/htmlReport/ns-1d/sources/source-1.html new file mode 100644 index 0000000000..eb05ad8d4f --- /dev/null +++ b/htmlReport/ns-1d/sources/source-1.html @@ -0,0 +1,201 @@ + + + + + + + + Coverage Report > IbmEjbJarBndXmi + + + + + + +
+ + +

Coverage Summary for Class: IbmEjbJarBndXmi (org.codehaus.cargo.module.ejb.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.websphere;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.ejb.EjbDef;
+ import org.codehaus.cargo.module.ejb.VendorEjbDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a websphere ejb deployment descriptor
+  * <code>ibm-ejb-jar-bnd.xmi</code> to provide convenience methods for easy access and manipulation.
+  */
+ public class IbmEjbJarBndXmi extends AbstractDescriptor implements VendorEjbDescriptor
+ {
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root document element
+      * @param type The descriptor type
+      */
+     public IbmEjbJarBndXmi(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "ibm-ejb-jar-bnd.xmi";
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getJndiName(EjbDef ejb)
+     {
+         String jndiName = null;
+         Element bindings = getEjbBindings(ejb.getId());
+         if (bindings != null)
+         {
+             jndiName = bindings.getAttribute("jndiName").getValue();
+         }
+         return jndiName;
+     }
+ 
+     /**
+      * Returns a specific ejb binding.
+      * 
+      * @param id the name of the ejb to get
+      * @return the ejb or null if no ejb with that name exists
+      */
+     private Element getEjbBindings(String id)
+     {
+         Element ejbElement = null;
+         String wantedHref = "META-INF/ejb-jar.xml#" + id;
+         for (Element bindingsElement : getElements(new DescriptorTag(
+             IbmEjbJarBndXmiType.getInstance(), "ejbBindings", true)))
+         {
+             List<Element> nl = bindingsElement.getChildren("enterpriseBean");
+             Element beanElement = nl.get(0);
+             String href = beanElement.getAttribute("href").getValue();
+             if (wantedHref.equals(href))
+             {
+                 ejbElement = bindingsElement;
+                 break;
+             }
+         }
+ 
+         return ejbElement;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1d/sources/source-2.html b/htmlReport/ns-1d/sources/source-2.html new file mode 100644 index 0000000000..3b8a29271c --- /dev/null +++ b/htmlReport/ns-1d/sources/source-2.html @@ -0,0 +1,147 @@ + + + + + + + + Coverage Report > IbmEjbJarBndXmiGrammar + + + + + + +
+ + +

Coverage Summary for Class: IbmEjbJarBndXmiGrammar (org.codehaus.cargo.module.ejb.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.websphere;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.Grammar;
+ 
+ /**
+  * Websphere specific grammar implementation. Since websphere uses xml schemas to describe their
+  * descriptors and no general xml schema Grammar implementation exists we have to use a specific
+  * one.
+  */
+ public class IbmEjbJarBndXmiGrammar implements Grammar
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<DescriptorTag> getElementOrder(String tagName)
+     {
+         // TODO Auto-generated method stub
+         return null;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1d/sources/source-3.html b/htmlReport/ns-1d/sources/source-3.html new file mode 100644 index 0000000000..e6c6c4e62d --- /dev/null +++ b/htmlReport/ns-1d/sources/source-3.html @@ -0,0 +1,160 @@ + + + + + + + + Coverage Report > IbmEjbJarBndXmiIo + + + + + + +
+ + +

Coverage Summary for Class: IbmEjbJarBndXmiIo (org.codehaus.cargo.module.ejb.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.websphere;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Webspeher ejb jar deployment descriptor.
+  */
+ public class IbmEjbJarBndXmiIo extends AbstractDescriptorIo
+ {
+     /**
+      * Constructor.
+      */
+     protected IbmEjbJarBndXmiIo()
+     {
+         super(IbmEjbJarBndXmiType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws JDOMException If the input could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static IbmEjbJarBndXmi parseIbmEjbJarXmi(InputStream input)
+         throws IOException, JDOMException
+     {
+         IbmEjbJarBndXmiIo xio = new IbmEjbJarBndXmiIo();
+         return (IbmEjbJarBndXmi) xio.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1d/sources/source-4.html b/htmlReport/ns-1d/sources/source-4.html new file mode 100644 index 0000000000..4317b56cf3 --- /dev/null +++ b/htmlReport/ns-1d/sources/source-4.html @@ -0,0 +1,156 @@ + + + + + + + + Coverage Report > IbmEjbJarBndXmiType + + + + + + +
+ + +

Coverage Summary for Class: IbmEjbJarBndXmiType (org.codehaus.cargo.module.ejb.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmEjbJarBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.ejb.websphere;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ 
+ /**
+  */
+ public class IbmEjbJarBndXmiType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static IbmEjbJarBndXmiType instance = new IbmEjbJarBndXmiType();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected IbmEjbJarBndXmiType()
+     {
+         super(null, IbmEjbJarBndXmi.class, new IbmEjbJarBndXmiGrammar());
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static IbmEjbJarBndXmiType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/index.html b/htmlReport/ns-1e/index.html new file mode 100644 index 0000000000..e30223c618 --- /dev/null +++ b/htmlReport/ns-1e/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_BLOCK.html b/htmlReport/ns-1e/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..2a865eff96 --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1e/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..5fabf71b1f --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_CLASS.html b/htmlReport/ns-1e/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..adc01a2730 --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1e/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..064b19b5ef --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_LINE.html b/htmlReport/ns-1e/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..d3d7df9b7e --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1e/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..7ef34a75c5 --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_METHOD.html b/htmlReport/ns-1e/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..7078879c25 --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1e/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..156b883e5b --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1e/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..f96ce6b35e --- /dev/null +++ b/htmlReport/ns-1e/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge + + 0% + + + (0/10) + + + + 0% + + + (0/43) + + + + 0% + + + (0/179) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DocumentStreamAdapter + + 0% + + + (0/2) + + + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
DocumentMergerByXslt + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
DescriptorMergerByTag + + 0% + + + (0/4) + + + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-1.html b/htmlReport/ns-1e/sources/source-1.html new file mode 100644 index 0000000000..4fb31c9556 --- /dev/null +++ b/htmlReport/ns-1e/sources/source-1.html @@ -0,0 +1,497 @@ + + + + + + + + Coverage Report > DescriptorMergerByTag + + + + + + +
+ + +

Coverage Summary for Class: DescriptorMergerByTag (org.codehaus.cargo.module.merge)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
DescriptorMergerByTag + + 0% + + + (0/10) + + + + 0% + + + (0/69) + +
DescriptorMergerByTag$1 + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
DescriptorMergerByTag$2 + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
DescriptorMergerByTag$3 + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
Total + + 0% + + + (0/22) + + + + 0% + + + (0/86) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.Identifier;
+ import org.codehaus.cargo.module.merge.tagstrategy.MergeStrategy;
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.Element;
+ 
+ /**
+  * Merge a descriptor by tag.
+  */
+ public class DescriptorMergerByTag implements DescriptorMerger
+ {
+     /**
+      * A default merge strategy for ignoring items.
+      */
+     public static final MergeStrategy IGNORE = new MergeStrategy()
+     {
+         @Override
+         public int inBoth(Descriptor target, DescriptorElement left, DescriptorElement right)
+         {
+             return 0;
+         }
+ 
+         @Override
+         public int inLeft(Descriptor target, DescriptorElement left)
+         {
+             return 0;
+         }
+ 
+         @Override
+         public int inRight(Descriptor target, DescriptorElement right)
+         {
+             return 0;
+         }
+     };
+ 
+     /**
+      * A default merge strategy for overwriting items.
+      */
+     public static final MergeStrategy OVERWRITE = new MergeStrategy()
+     {
+         @Override
+         public int inBoth(Descriptor target, DescriptorElement left, DescriptorElement right)
+         {
+             Element parent = left.getParentElement();
+             parent.removeContent(left);
+             target.addElement(right.getTag(), right, parent);
+             return 1;
+         }
+ 
+         @Override
+         public int inLeft(Descriptor target, DescriptorElement left)
+         {
+             return 0;
+         }
+ 
+         @Override
+         public int inRight(Descriptor target, DescriptorElement right)
+         {
+             target.addElement(right.getTag(), right, target.getRootElement());
+             return 1;
+         }
+     };
+ 
+     /**
+      * A default merge strategy for preserving items.
+      */
+     public static final MergeStrategy PRESERVE = new MergeStrategy()
+     {
+         @Override
+         public int inBoth(Descriptor target, DescriptorElement left, DescriptorElement right)
+         {
+             return 0;
+         }
+ 
+         @Override
+         public int inLeft(Descriptor target, DescriptorElement left)
+         {
+             return 0;
+         }
+ 
+         @Override
+         public int inRight(Descriptor target, DescriptorElement right)
+         {
+             target.addElement(right.getTag(), right, target.getRootElement());
+             return 1;
+         }
+ 
+     };
+ 
+     /**
+      * The descriptor being merged onto.
+      */
+     private Descriptor baseDescriptor;
+ 
+     /**
+      * The descriptor tag factory.
+      */
+     private DescriptorType descriptorTagFactory;
+ 
+     /**
+      * Various Strategies for merging the individual descriptor tags.
+      */
+     private Map<String, MergeStrategy> mapDescriptorTagToStrategy;
+ 
+     /**
+      * the default merging strategy.
+      */
+     private MergeStrategy defaultStrategyIfNoneSpecified = OVERWRITE;
+ 
+     /**
+      * Constructor.
+      */
+     public DescriptorMergerByTag()
+     {
+         this.mapDescriptorTagToStrategy = new HashMap<String, MergeStrategy>();
+     }
+ 
+     /**
+      * Set the merging strategy for a particular tag.
+      * @param tag Tag to set
+      * @param strategy Strategy to use
+      */
+     public void setStrategy(String tag, MergeStrategy strategy)
+     {
+         this.mapDescriptorTagToStrategy.put(tag, strategy);
+     }
+ 
+     /**
+      * Initialize.
+      * 
+      * @param base the base for the merge.
+      */
+     @Override
+     public void init(Descriptor base)
+     {
+         this.baseDescriptor = base;
+     }
+ 
+     /**
+      * Merge this descriptor onto another.
+      * @param other descriptor to merge
+      */
+     @Override
+     public void merge(Descriptor other)
+     {
+         for (DescriptorTag tag : descriptorTagFactory.getAllTags())
+         {
+             Identifier identifier = tag.getIdentifier();
+             if (identifier != null)
+             {
+                 MergeStrategy strategy = getMergeStrategy(tag.getTagName());
+ 
+                 Descriptor left = baseDescriptor;
+                 Descriptor right = other;
+ 
+                 List<Element> itemsL = new ArrayList<Element>(left.getTags(tag));
+                 List<Element> itemsR = new ArrayList<Element>(right.getTags(tag));
+ 
+                 try
+                 {
+                     for (Element itemL : itemsL)
+                     {
+                         DescriptorElement lElement = (DescriptorElement) itemL;
+                         DescriptorElement rElement =
+                             (DescriptorElement) right.getTagByIdentifier(tag.getTagName(),
+                                 identifier.getIdentifier(lElement));
+ 
+                         if (rElement != null)
+                         {
+                             strategy.inBoth(left, lElement, rElement);
+                         }
+                         else
+                         {
+                             strategy.inLeft(left, lElement);
+                         }
+                     }
+ 
+                     for (Element itemR : itemsR)
+                     {
+                         DescriptorElement rElement = (DescriptorElement) itemR;
+                         DescriptorElement lElement =
+                             (DescriptorElement) left.getTagByIdentifier(tag.getTagName(),
+                                 identifier.getIdentifier(rElement));
+ 
+                         if (lElement == null)
+                         {
+                             strategy.inRight(left, rElement);
+                         }
+                     }
+                 }
+                 catch (Exception e)
+                 {
+                     throw new CargoException("Element Merging Exception", e);
+                 }
+             }
+             else
+             {
+                 Descriptor left = baseDescriptor;
+                 Descriptor right = other;
+ 
+                 List<Element> itemsL = left.getTags(tag);
+                 List<Element> itemsR = new ArrayList<Element>(right.getTags(tag));
+ 
+                 if (tag.isMultipleAllowed())
+                 {
+                     // If multiple items are allowed, but there's no way of
+                     // identifying tags
+                     // From each other, then the best we can do is merge them
+                     // together by addition...
+                     for (Element itemR : itemsR)
+                     {
+                         DescriptorElement rightElement = (DescriptorElement) itemR;
+                         left.addElement(tag, rightElement, left.getRootElement());
+                     }
+                 }
+                 else
+                 {
+                     // It is possible that this tag is a single value item (e.g.
+                     // webxml display-name)
+                     // so either it can exist singly, or not at all.
+                     MergeStrategy strategy = getMergeStrategy(tag.getTagName());
+ 
+                     DescriptorElement leftElement = itemsL.isEmpty() ? null
+                             : (DescriptorElement) itemsL.get(0);
+                     DescriptorElement rightElement = itemsR.isEmpty() ? null
+                             : (DescriptorElement) itemsR.get(0);
+ 
+                     try
+                     {
+                         if (leftElement != null && rightElement != null)
+                         {
+                             strategy.inBoth(left, leftElement, rightElement);
+                         }
+                         else if (leftElement != null)
+                         {
+                             strategy.inLeft(left, leftElement);
+                         }
+                         else if (rightElement != null)
+                         {
+                             strategy.inRight(left, rightElement);
+                         }
+                     }
+                     catch (Exception e)
+                     {
+                         throw new CargoException("Element Merging Exception", e);
+                     }
+                 }
+ 
+             }
+ 
+         }
+     }
+ 
+     /**
+      * @param tag tag to get the merge strategy for
+      * @return the merge strategy
+      */
+     protected MergeStrategy getMergeStrategy(String tag)
+     {
+         MergeStrategy strategy = mapDescriptorTagToStrategy.get(tag);
+         if (strategy == null)
+         {
+             return defaultStrategyIfNoneSpecified;
+         }
+         return strategy;
+     }
+ 
+     /**
+      * @return the defaultStrategyIfNoneSpecified
+      */
+     public MergeStrategy getDefaultStrategyIfNoneSpecified()
+     {
+         return this.defaultStrategyIfNoneSpecified;
+     }
+ 
+     /**
+      * @param defaultStrategyIfNoneSpecified the defaultStrategyIfNoneSpecified to set
+      */
+     public void setDefaultStrategyIfNoneSpecified(MergeStrategy defaultStrategyIfNoneSpecified)
+     {
+         this.defaultStrategyIfNoneSpecified = defaultStrategyIfNoneSpecified;
+     }
+ 
+     /**
+      * @return the descriptorTagFactory
+      */
+     public DescriptorType getDescriptorType()
+     {
+         return this.descriptorTagFactory;
+     }
+ 
+     /**
+      * @param descriptorTagFactory the descriptorTagFactory to set
+      */
+     public void setDescriptorType(DescriptorType descriptorTagFactory)
+     {
+         this.descriptorTagFactory = descriptorTagFactory;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-2.html b/htmlReport/ns-1e/sources/source-2.html new file mode 100644 index 0000000000..32c6b2debb --- /dev/null +++ b/htmlReport/ns-1e/sources/source-2.html @@ -0,0 +1,216 @@ + + + + + + + + Coverage Report > DocumentMerger + + + + + + +
+ + +

Coverage Summary for Class: DocumentMerger (org.codehaus.cargo.module.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DocumentMerger + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/21) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.jdom2.Content;
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ 
+ /**
+  * Class that can merge two DOM Documents, relatively simply. This works by just importing all the
+  * child nodes from the right-hand document into the left-hand document.<br>
+  * <br>
+  * Create the <code>DocumentMerger</code>, then call <code>addMergeItem</code> successive times
+  * with <code>Document</code>s. Finally call <code>performMerge()</code>, which will return you the
+  * merged DOM Document.<br>
+  * <br>
+  * This class may be overridden by subclasses that wish to apply strategies to particular types of
+  * XML document.
+  */
+ public class DocumentMerger implements MergeProcessor
+ {
+     /**
+      * The list of merge documents.
+      */
+     private List<Document> documents = new ArrayList<Document>();
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addMergeItem(Object mergeItem) throws MergeException
+     {
+         if (mergeItem instanceof Document)
+         {
+             this.documents.add((Document) mergeItem);
+         }
+         else
+         {
+             throw new MergeException("DocumentMerger can only merge Documents");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Object performMerge()
+     {
+         if (this.documents.isEmpty())
+         {
+             return null;
+         }
+ 
+         Document doc = this.documents.get(0);
+ 
+         for (int i = 1; i < this.documents.size(); i++)
+         {
+             Document temp = merge(doc, this.documents.get(i));
+             doc = temp;
+         }
+ 
+         return doc;
+     }
+ 
+ 
+     /**
+      * Merge the right hand document into the left hand document, currently by just adding all the
+      * nodes from right into left.
+      * 
+      * @param left in the left hand document
+      * @param right the right hand document
+      * @return merged document
+      */
+     private Document merge(Document left, Document right)
+     {
+         List<Content> children = new ArrayList<Content>();
+         children.addAll(right.getRootElement().getContent());
+ 
+         Document tempLeft = (Document) left.clone();
+ 
+         for (Content node : children)
+         {
+             if (node instanceof Element)
+             {
+                 Content clone = ((Element) node).detach();
+                 tempLeft.getRootElement().addContent(clone);
+             }
+         }
+ 
+         return tempLeft;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-3.html b/htmlReport/ns-1e/sources/source-3.html new file mode 100644 index 0000000000..ac120b8d4f --- /dev/null +++ b/htmlReport/ns-1e/sources/source-3.html @@ -0,0 +1,320 @@ + + + + + + + + Coverage Report > DocumentMergerByXslt + + + + + + +
+ + +

Coverage Summary for Class: DocumentMergerByXslt (org.codehaus.cargo.module.merge)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
DocumentMergerByXslt + + 0% + + + (0/5) + + + + 0% + + + (0/38) + +
DocumentMergerByXslt$1 + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Total + + 0% + + + (0/7) + + + + 0% + + + (0/40) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.ByteArrayOutputStream;
+ import java.io.InputStream;
+ import java.io.StringReader;
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import javax.xml.transform.Transformer;
+ import javax.xml.transform.TransformerFactory;
+ import javax.xml.transform.stream.StreamResult;
+ import javax.xml.transform.stream.StreamSource;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ import org.jdom2.input.SAXBuilder;
+ import org.jdom2.output.DOMOutputter;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  */
+ public class DocumentMergerByXslt implements MergeProcessor
+ {
+     /**
+      * The list of merge documents.
+      */
+     private List<Document> documents = new ArrayList<Document>();
+ 
+     /**
+      * The XSLT source to use.
+      */
+     private StreamSource xsltSource;
+ 
+     /**
+      * The lazily-compiled XSLT transformer.
+      */
+     private Transformer transformer;
+ 
+     /**
+      * Constructor.
+      * @param stream XML Stream for source XSLT
+      */
+     public DocumentMergerByXslt(InputStream stream)
+     {
+         xsltSource = new StreamSource(stream);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addMergeItem(Object mergeItem) throws MergeException
+     {
+         if (mergeItem instanceof Document)
+         {
+             this.documents.add((Document) mergeItem);
+         }
+         else
+         {
+             throw new MergeException("DocumentMerger can only merge Documents");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Object performMerge() throws MergeException
+     {
+         if (this.documents.isEmpty())
+         {
+             return null;
+         }
+ 
+         Document doc = this.documents.get(0);
+ 
+         for (int i = 1; i < this.documents.size(); i++)
+         {
+             doc = merge(doc, this.documents.get(i));
+         }
+ 
+         return doc;
+     }
+ 
+     /**
+      * Merge 2 documents by XSLT.
+      * 
+      * @param left Left hand document
+      * @param right Right hand document
+      * @return The merged document
+      */
+     private Document merge(Document left, Document right)
+     {
+         try
+         {
+             Document doc = createUnifiedDocument(left, right);
+ 
+             DOMOutputter outputter = new DOMOutputter();
+             org.w3c.dom.Document domDocument = outputter.output(doc);
+ 
+             javax.xml.transform.Source xmlSource =
+                 new javax.xml.transform.dom.DOMSource(domDocument);
+ 
+             if (transformer == null)
+             {
+                 TransformerFactory tFactory = TransformerFactory.newInstance();
+                 transformer = tFactory.newTransformer(xsltSource);
+             }
+ 
+             ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ 
+             StreamResult xmlResult = new StreamResult(baos);
+ 
+             transformer.transform(xmlSource, xmlResult);
+ 
+             // PArse it back into a JDOM document
+             SAXBuilder factory = new SAXBuilder();
+             factory.setValidation(false);
+ 
+             // We don't know what the DTD of the document is, so we won't have a local
+             // copy - so we don't want to fail if we can't get it!
+ 
+             factory.setEntityResolver(new EntityResolver()
+             {
+                 @Override
+                 public InputSource resolveEntity(String thePublicId,
+                     String theSystemId) throws SAXException
+                 {
+                     return new InputSource(new StringReader(""));
+                 }
+             });
+ 
+             return factory.build(new ByteArrayInputStream(baos.toByteArray()));
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Exception whilst trying to transform documents", e);
+         }
+     }
+ 
+     /**
+      * Create a document that has both the left and the right items.
+      * 
+      * @param left Left Document
+      * @param right Right Document
+      * @return Merged Document
+      */
+     private Document createUnifiedDocument(Document left, Document right)
+     {
+         Document mergedDocument = new Document();
+ 
+         Element rootElement = new Element("merge");
+         Element leftElement = new Element("left");
+         Element rightElement = new Element("right");
+ 
+         rootElement.addContent(leftElement);
+         rootElement.addContent(rightElement);
+ 
+         leftElement.addContent((Element) left.getRootElement().clone());
+         rightElement.addContent((Element) right.getRootElement().clone());
+ 
+         mergedDocument.setRootElement(rootElement);
+ 
+         return mergedDocument;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-4.html b/htmlReport/ns-1e/sources/source-4.html new file mode 100644 index 0000000000..162f365650 --- /dev/null +++ b/htmlReport/ns-1e/sources/source-4.html @@ -0,0 +1,303 @@ + + + + + + + + Coverage Report > DocumentStreamAdapter + + + + + + +
+ + +

Coverage Summary for Class: DocumentStreamAdapter (org.codehaus.cargo.module.merge)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
DocumentStreamAdapter + + 0% + + + (0/6) + + + + 0% + + + (0/28) + +
DocumentStreamAdapter$1 + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Total + + 0% + + + (0/8) + + + + 0% + + + (0/30) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.ByteArrayOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.StringReader;
+ 
+ import org.codehaus.cargo.module.DescriptorIo;
+ import org.jdom2.Document;
+ import org.jdom2.JDOMException;
+ import org.jdom2.input.SAXBuilder;
+ import org.jdom2.output.Format;
+ import org.jdom2.output.XMLOutputter;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  * Adapter class to convert streams into documents.<br>
+  * <br>
+  * This is needed because the DocumentMerger understands DOM Documents, but items in War files are
+  * accessed as streams - therefore use this wrapper to pass streams into the DocumentMerger (or
+  * subclass).
+  */
+ public class DocumentStreamAdapter implements MergeProcessor
+ {
+     /**
+      * The next item to merge.
+      */
+     private MergeProcessor next;
+ 
+     /**
+      * The Descriptor IO.
+      */
+     private DescriptorIo descriptorIo;
+ 
+     /**
+      * constructor.
+      * 
+      * @param next the processor to adapt
+      */
+     public DocumentStreamAdapter(MergeProcessor next)
+     {
+         this.next = next;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addMergeItem(Object mergeItem) throws MergeException
+     {
+         if (mergeItem instanceof InputStream)
+         {
+             try
+             {
+                 this.next.addMergeItem(getDocument((InputStream) mergeItem));
+             }
+             catch (Exception e)
+             {
+                 throw new MergeException("Exception creating document", e);
+             }
+         }
+ 
+         else
+         {
+             throw new MergeException("DocumentMerger can only merge InputStreams");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Object performMerge() throws MergeException
+     {
+         try
+         {
+             Document doc = (Document) this.next.performMerge();
+ 
+             if (doc == null)
+             {
+                 return null;
+             }
+ 
+             XMLOutputter serializer = new XMLOutputter();
+             Format format = Format.getPrettyFormat();
+ 
+             ByteArrayOutputStream out = new ByteArrayOutputStream();
+             serializer.setFormat(format);
+             serializer.output(doc, out);
+ 
+             byte[] data = out.toByteArray();
+             return new ByteArrayInputStream(data);
+         }
+         catch (Exception e)
+         {
+             throw new MergeException("Error whilst merging documents", e);
+         }
+     }
+ 
+     /**
+      * Parse the input stream into a document.
+      * 
+      * @param theInput in the InputStream to read
+      * @return Document generated from the stream
+      * @throws IOException on IO exception
+      * @throws JDOMException if there is an XML problem
+      */
+     protected Document getDocument(InputStream theInput) throws
+         IOException, JDOMException
+     {
+         if (descriptorIo == null)
+         {
+             SAXBuilder builder = new SAXBuilder();
+             builder.setValidation(false);
+ 
+             // We don't know what the DTD of the document is, so we won't have a local
+             // copy - so we don't want to fail if we can't get it!
+ 
+             builder.setEntityResolver(new EntityResolver()
+             {
+                 @Override
+                 public InputSource resolveEntity(String thePublicId,
+                     String theSystemId) throws SAXException
+                 {
+                     return new InputSource(new StringReader(""));
+                 }
+             });
+ 
+             return builder.build(theInput);
+         }
+ 
+         return descriptorIo.createDocumentBuilder().build(theInput);
+     }
+ 
+     /**
+      * @return the descriptorIo
+      */
+     public DescriptorIo getDescriptorIo()
+     {
+         return this.descriptorIo;
+     }
+ 
+     /**
+      * @param descriptorIo the descriptorIo to set
+      */
+     public void setDescriptorIo(DescriptorIo descriptorIo)
+     {
+         this.descriptorIo = descriptorIo;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-5.html b/htmlReport/ns-1e/sources/source-5.html new file mode 100644 index 0000000000..e53adb9131 --- /dev/null +++ b/htmlReport/ns-1e/sources/source-5.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > MergeException + + + + + + +
+ + +

Coverage Summary for Class: MergeException (org.codehaus.cargo.module.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MergeException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Class for various exceptions happening within merges.
+  */
+ public class MergeException extends CargoException
+ {
+     /**
+      * @param string in string to describe the exception
+      */
+     public MergeException(String string)
+     {
+         super(string);
+     }
+ 
+     /**
+      * @param string in string to describe the exception
+      * @param e in exception causing error
+      */
+     public MergeException(String string, Throwable e)
+     {
+         super(string, e);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-6.html b/htmlReport/ns-1e/sources/source-6.html new file mode 100644 index 0000000000..dec5b8b28c --- /dev/null +++ b/htmlReport/ns-1e/sources/source-6.html @@ -0,0 +1,110 @@ + + + + + + + + Coverage Report > MergeProcessor + + + + + + +
+ + +

Coverage Summary for Class: MergeProcessor (org.codehaus.cargo.module.merge)

+ + + + + + + + + +
Class
MergeProcessor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ /**
+  * Interface implemented by merger classes.
+  */
+ public interface MergeProcessor
+ {
+     /**
+      * Add an item to be merged.
+      * 
+      * @param mergeItem in the item to merge.
+      * @throws MergeException on exceptions
+      */
+     void addMergeItem(Object mergeItem) throws MergeException;
+ 
+     /**
+      * Perform the merge.
+      * 
+      * @return the merged artifact
+      * @throws MergeException if there is a problem
+      */
+     Object performMerge() throws MergeException;
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1e/sources/source-7.html b/htmlReport/ns-1e/sources/source-7.html new file mode 100644 index 0000000000..4fa3d8d3be --- /dev/null +++ b/htmlReport/ns-1e/sources/source-7.html @@ -0,0 +1,111 @@ + + + + + + + + Coverage Report > DescriptorMerger + + + + + + +
+ + +

Coverage Summary for Class: DescriptorMerger (org.codehaus.cargo.module.merge)

+ + + + + + + + + +
Class
DescriptorMerger
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ 
+ /**
+  * Interface to merge two descriptors.
+  */
+ public interface DescriptorMerger
+ {
+     /**
+      * Initialise the merger with the base (first) item to be merged.
+      * @param base Descriptor to use
+      */
+     void init(Descriptor base);
+ 
+     /**
+      * Merge the descriptor with a second item.
+      * @param other Descriptor to use
+      */
+     void merge(Descriptor other);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1f/index.html b/htmlReport/ns-1f/index.html new file mode 100644 index 0000000000..866ec2230a --- /dev/null +++ b/htmlReport/ns-1f/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_BLOCK.html b/htmlReport/ns-1f/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..6eabbb0b8a --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-1f/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..405a2fc3d2 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_CLASS.html b/htmlReport/ns-1f/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..ec30c0fb81 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-1f/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..3902c6ede5 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_LINE.html b/htmlReport/ns-1f/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..26ae44b226 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-1f/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..67ca1b2549 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_METHOD.html b/htmlReport/ns-1f/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..1a91773190 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-1f/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..500738059f --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-1f/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..35af99a0b7 --- /dev/null +++ b/htmlReport/ns-1f/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.merge.tagstrategy + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.merge.tagstrategy

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.merge.tagstrategy + + 0% + + + (0/3) + + + + 0% + + + (0/14) + + + + 0% + + + (0/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-1f/sources/source-1.html b/htmlReport/ns-1f/sources/source-1.html new file mode 100644 index 0000000000..477ba93e8f --- /dev/null +++ b/htmlReport/ns-1f/sources/source-1.html @@ -0,0 +1,173 @@ + + + + + + + + Coverage Report > AbstractChoiceMergeStrategy + + + + + + +
+ + +

Coverage Summary for Class: AbstractChoiceMergeStrategy (org.codehaus.cargo.module.merge.tagstrategy)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractChoiceMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge.tagstrategy;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ 
+ /**
+  * A merging strategy that can make a decision between various differing merge strategies, depending
+  * upon the state that it is passed.
+  *
+  * Child classes implement the getApplicableStrategy based on whatever information is neccessary to
+  * make that decision
+  */
+ public abstract class AbstractChoiceMergeStrategy implements MergeStrategy
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inLeft(Descriptor set, DescriptorElement element)
+     {
+         return getApplicableStrategy(set, element).inLeft(set, element);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inRight(Descriptor set, DescriptorElement element)
+     {
+         return getApplicableStrategy(set, element).inRight(set, element);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inBoth(Descriptor set, DescriptorElement left, DescriptorElement right)
+     {
+         return getApplicableStrategy(set, left).inBoth(set, left, right);
+     }
+ 
+     /**
+      * Get an appropriate merge strategy given the passed parameters.
+      * 
+      * @param set the parent set
+      * @param element the element under consideration
+      * @return the applicable merge strategy
+      */
+     abstract MergeStrategy getApplicableStrategy(Descriptor set, DescriptorElement element);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1f/sources/source-2.html b/htmlReport/ns-1f/sources/source-2.html new file mode 100644 index 0000000000..6e56c71c02 --- /dev/null +++ b/htmlReport/ns-1f/sources/source-2.html @@ -0,0 +1,188 @@ + + + + + + + + Coverage Report > ChooseByNameMergeStrategy + + + + + + +
+ + +

Coverage Summary for Class: ChooseByNameMergeStrategy (org.codehaus.cargo.module.merge.tagstrategy)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ChooseByNameMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge.tagstrategy;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.Identifier;
+ 
+ /**
+  * A merging strategy that is determined by name.
+  */
+ public class ChooseByNameMergeStrategy extends AbstractChoiceMergeStrategy
+ {
+     /**
+      * The default strategy to use.
+      */
+     private MergeStrategy defaultStrategy;
+ 
+     /**
+      * Map of named values to use.
+      */
+     private Map<String, MergeStrategy> strategyMap;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param defaultStrategy in the default strategy to use
+      */
+     public ChooseByNameMergeStrategy(MergeStrategy defaultStrategy)
+     {
+         this.defaultStrategy = defaultStrategy;
+         this.strategyMap = new HashMap<String, MergeStrategy>();
+     }
+ 
+     /**
+      * If the element has this name, then use this strategy.
+      * 
+      * @param name in the name
+      * @param strategy in the strategy
+      */
+     public void addStrategyForName(String name, MergeStrategy strategy)
+     {
+         this.strategyMap.put(name, strategy);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     MergeStrategy getApplicableStrategy(Descriptor set, DescriptorElement element)
+     {
+         Identifier id = element.getTag().getIdentifier();
+ 
+         if (id != null)
+         {
+             String identityValue = id.getIdentifier(element);
+             if (this.strategyMap.containsKey(identityValue))
+             {
+                 return this.strategyMap.get(identityValue);
+             }
+         }
+         return this.defaultStrategy;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1f/sources/source-3.html b/htmlReport/ns-1f/sources/source-3.html new file mode 100644 index 0000000000..407ac79924 --- /dev/null +++ b/htmlReport/ns-1f/sources/source-3.html @@ -0,0 +1,318 @@ + + + + + + + + Coverage Report > NodeMergeStrategy + + + + + + +
+ + +

Coverage Summary for Class: NodeMergeStrategy (org.codehaus.cargo.module.merge.tagstrategy)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
NodeMergeStrategy + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/58) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge.tagstrategy;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.util.List;
+ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.jdom2.Content;
+ import org.jdom2.Element;
+ import org.jdom2.JDOMException;
+ import org.jdom2.Text;
+ import org.jdom2.xpath.XPath;
+ 
+ /**
+  * A merging strategy that can be used to combine two XML documents together.
+  */
+ public class NodeMergeStrategy implements MergeStrategy
+ {
+     /**
+      * The template for the output.
+      */
+     private Element template;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type the descriptor type
+      * @param template in the template to use in the merge
+      */
+     public NodeMergeStrategy(DescriptorType type, Element template)
+     {
+         if (template == null)
+         {
+             throw new IllegalArgumentException("Template must not be null");
+         }
+         this.template = template;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor Type
+      * @param stream content input stream
+      * @throws IOException if IO Exception
+      * @throws JDOMException if parser error
+      */
+     public NodeMergeStrategy(DescriptorType type, InputStream stream) throws
+         IOException, JDOMException
+     {
+         this.template = type.getDescriptorIo().parseXml(stream).getRootElement();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inBoth(Descriptor target, DescriptorElement left, DescriptorElement right)
+     {
+         // Merge common items by overwriting them
+         int idx = target.getDocument().getRootElement().getContent().indexOf(left);
+         target.getDocument().getRootElement().removeContent(left);
+ 
+         Element newElement = (Element) this.template.clone();
+         applyValues(newElement, left, right);
+         target.getRootElement().addContent(idx, newElement);
+ 
+         return 1;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inLeft(Descriptor target, DescriptorElement left)
+     {
+         return 0;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int inRight(Descriptor target, DescriptorElement right)
+     {
+         target.addElement(right.getTag(), right, target.getRootElement());
+         return 1;
+     }
+ 
+     /**
+      * Apply some merge parameters on the element passed in, using the left and write elements in
+      * the merge pair.
+      * 
+      * @param content the content to apply to
+      * @param left The Left hand element to use
+      * @param right The Right hand element to use
+      */
+     private void applyValues(Content content, DescriptorElement left, DescriptorElement right)
+     {
+         if (content instanceof Element)
+         {
+             Element element = (Element) content;
+             List<Content> childNodes = element.getContent();
+ 
+             for (Content n : childNodes)
+             {
+                 applyValues(n, left, right);
+             }
+         }
+         else if (content instanceof Text)
+         {
+             Pattern pat = Pattern.compile("\\$(left:|right:)[^ ,\\t]*");
+ 
+             Text element = (Text) content;
+             Matcher m = pat.matcher(element.getText());
+             StringBuffer sb = new StringBuffer();
+             while (m.find())
+             {
+                 String repl = replaceValue(m.group(), left, right).replaceAll("\\$", "\\\\\\$");
+                 m.appendReplacement(sb, repl);
+             }
+             m.appendTail(sb);
+ 
+             element.setText(sb.toString());
+         }
+     }
+ 
+     /**
+      * Replace a value.
+      * 
+      * @param string - the expression
+      * @param left The left hand node
+      * @param right The right hand node
+      * @return the replaced string
+      */
+     private String replaceValue(String string, DescriptorElement left, DescriptorElement right)
+     {
+         String xPath;
+         Element element;
+ 
+         String result = "";
+ 
+         if (string.startsWith("$left:"))
+         {
+             xPath = string.substring(6);
+             element = left;
+         }
+         else if (string.startsWith("$right:"))
+         {
+             xPath = string.substring(7);
+             element = right;
+         }
+         else
+         {
+             // Make sure we don't loop forever!
+             return "";
+         }
+         try
+         {
+             // CARGO-1175: Avoid XPath and namespace problems
+             String nsPrefix = null;
+             if (!element.getNamespaceURI().isEmpty())
+             {
+                 nsPrefix = element.getNamespacePrefix();
+                 if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix))
+                 {
+                     if (nsPrefix.isEmpty())
+                     {
+                         nsPrefix = "cargo-xs";
+                     }
+                     xPath = nsPrefix + ":" + xPath;
+                 }
+             }
+             XPath xp = XPath.newInstance(xPath);
+             if (nsPrefix != null)
+             {
+                 xp.addNamespace(nsPrefix, element.getNamespaceURI());
+             }
+             Element nestedText = (Element) xp.selectSingleNode(element);
+             if (nestedText != null)
+             {
+                 result = nestedText.getText();
+             }
+         }
+         catch (JDOMException e)
+         {
+             result = e.getMessage();
+         }
+         return result;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-1f/sources/source-4.html b/htmlReport/ns-1f/sources/source-4.html new file mode 100644 index 0000000000..9ddbd245ef --- /dev/null +++ b/htmlReport/ns-1f/sources/source-4.html @@ -0,0 +1,124 @@ + + + + + + + + Coverage Report > MergeStrategy + + + + + + +
+ + +

Coverage Summary for Class: MergeStrategy (org.codehaus.cargo.module.merge.tagstrategy)

+ + + + + + + + + +
Class
MergeStrategy
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.merge.tagstrategy;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ 
+ /**
+  */
+ public interface MergeStrategy
+ {
+     /**
+      * Process when the element appears in both descriptors.
+      * 
+      * @param target output descriptor
+      * @param left left element
+      * @param right right element
+      * @return count of merged elements
+      */
+     int inBoth(Descriptor target, DescriptorElement left, DescriptorElement right);
+ 
+     /**
+      * Process when the element appears just in the left descriptor.
+      * 
+      * @param target output descriptor
+      * @param left left element
+      * @return count of merged elements
+      */
+     int inLeft(Descriptor target, DescriptorElement left);
+ 
+     /**
+      * Process when the element appears just in the right descriptor.
+      * 
+      * @param target output descriptor
+      * @param right right element
+      * @return count of merged elements
+      */
+     int inRight(Descriptor target, DescriptorElement right);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/index.html b/htmlReport/ns-2/index.html new file mode 100644 index 0000000000..84047de3f1 --- /dev/null +++ b/htmlReport/ns-2/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_BLOCK.html b/htmlReport/ns-2/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..f04e94329e --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..e0b1a709d3 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_CLASS.html b/htmlReport/ns-2/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..c7055738d1 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..6820ee3108 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_LINE.html b/htmlReport/ns-2/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..a1dcfc4008 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..a4a5bdece4 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_METHOD.html b/htmlReport/ns-2/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..38660100a5 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..36e2c6fa23 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..2a33ef7142 --- /dev/null +++ b/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration + + 50% + + + (1/2) + + + + 60.9% + + + (14/23) + + + + 43.2% + + + (19/44) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-1.html b/htmlReport/ns-2/sources/source-1.html new file mode 100644 index 0000000000..9c5d0a432c --- /dev/null +++ b/htmlReport/ns-2/sources/source-1.html @@ -0,0 +1,234 @@ + + + + + + + + Coverage Report > ConfigurationType + + + + + + +
+ + +

Coverage Summary for Class: ConfigurationType (org.codehaus.cargo.container.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ConfigurationType + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/22) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ /**
+  * Configuration type of {@link org.codehaus.cargo.container.configuration.Configuration}s. There
+  * are currently 3 types: Standalone local, Existing local and runtime configurations.
+  */
+ public class ConfigurationType
+ {
+     /**
+      * Represents a standalone configuration type.
+      */
+     public static final ConfigurationType STANDALONE = new ConfigurationType("standalone");
+ 
+     /**
+      * Represents an existing configuration type.
+      */
+     public static final ConfigurationType EXISTING = new ConfigurationType("existing");
+ 
+     /**
+      * Represents a runtime configuration type.
+      */
+     public static final ConfigurationType RUNTIME = new ConfigurationType("runtime");
+ 
+     /**
+      * Configuration type.
+      */
+     private String type;
+ 
+     /**
+      * @param type the internal string representation of the configuration type. For example:
+      * "standalone", "existing" or "runtime".
+      */
+     public ConfigurationType(String type)
+     {
+         this.type = type;
+     }
+ 
+     /**
+      * Transform a type represented as a string into a {@link ConfigurationType} object.
+      * 
+      * @param typeAsString the string to transform
+      * @return the {@link ConfigurationType} object
+      */
+     public static ConfigurationType toType(String typeAsString)
+     {
+         ConfigurationType type;
+         if (typeAsString.equalsIgnoreCase(STANDALONE.getType()))
+         {
+             type = STANDALONE;
+         }
+         else if (typeAsString.equalsIgnoreCase(EXISTING.getType()))
+         {
+             type = EXISTING;
+         }
+         else if (typeAsString.equalsIgnoreCase(RUNTIME.getType()))
+         {
+             type = RUNTIME;
+         }
+         else
+         {
+             type = new ConfigurationType(typeAsString);
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object != null && object instanceof ConfigurationType)
+         {
+             ConfigurationType type = (ConfigurationType) object;
+             if (type.getType().equals(getType()))
+             {
+                 result = true;
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.type.hashCode();
+     }
+ 
+     /**
+      * @return the configuration type
+      */
+     public String getType()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getType();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-2.html b/htmlReport/ns-2/sources/source-2.html new file mode 100644 index 0000000000..c8cd5b1a13 --- /dev/null +++ b/htmlReport/ns-2/sources/source-2.html @@ -0,0 +1,342 @@ + + + + + + + + Coverage Report > FileConfig + + + + + + +
+ + +

Coverage Summary for Class: FileConfig (org.codehaus.cargo.container.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
FileConfig + + 100% + + + (1/1) + + + + 87.5% + + + (14/16) + + + + 86.4% + + + (19/22) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ import java.nio.charset.Charset;
+ 
+ /**
+  * Contains data about configuration files that should be used for the container. This option only
+  * works with standalone local containers.
+  * <ul>
+  * <li>The <code>toDir</code> and <code>toFile</code> are used to tell Cargo where to install the
+  * file in reference to the container's <code>home</code> location.</li>
+  * <li><code>toDir</code> and <code>toFile</code> can be used independently or together. If
+  * <code>toDir</code> is <code>null</code> and <code>toFile</code> is <code>foo</code>, the
+  * destination of the file will be <code>${cargo.home}/foo</code>.</li>
+  * <li>If <code>toDir</code> is <code>foo</code> and the <code>toFile</code> is <code>null</code>,
+  * the destination of the new file will be
+  * <code>${cargo.home}/foo/<i>original file's name</i>}</code>.</li>
+  * <li>If <code>toDir</code> is <code>foo</code> and <code>toFile</code> is <code>bar</code>, the
+  * destination of the new file will be <code>${cargo.home}/foo/bar</code>.</li>
+  * </ul>
+  */
+ public class FileConfig
+ {
+ 
+     /**
+      * The file to be used.
+      */
+     private String file;
+ 
+     /**
+      * The name and location of where the file should be saved in reference to the containers home.
+      */
+     private String tofile;
+ 
+     /**
+      * The name of the directory where the file should be saved.
+      */
+     private String todir;
+ 
+     /**
+      * If the file should be overwritten if the destination file exists.
+      */
+     private boolean overwrite;
+ 
+     /**
+      * If the file should be considered a configuration file. If true then token replacement will
+      * occur on the file.
+      */
+     private boolean configfile;
+ 
+     /**
+      * The character encoding to use when token filtering is performed.
+      */
+     private String encoding;
+ 
+     /**
+      * Constructor.
+      */
+     public FileConfig()
+     {
+         this.file = null;
+         this.tofile = null;
+         this.overwrite = true;
+         this.configfile = false;
+     }
+ 
+     /**
+      * Returns the name of the file to be used.
+      * 
+      * @return The file to be used
+      */
+     public String getFile()
+     {
+         return file;
+     }
+ 
+     /**
+      * Returns the name of the destination file.
+      * 
+      * @return The name of the destination file
+      */
+     public String getToFile()
+     {
+         return tofile;
+     }
+ 
+     /**
+      * Returns the name of the destination directory.
+      * 
+      * @return The destination directory
+      */
+     public String getToDir()
+     {
+         return todir;
+     }
+ 
+     /**
+      * Return true if the file should overwrite an existing file.
+      * @return if the file should be overwritten
+      */
+     public boolean getOverwrite()
+     {
+         return overwrite;
+     }
+ 
+     /**
+      * Returns true if the file is marked as a configuration file
+      * @return If the file is a config file or not
+      */
+     public boolean getConfigfile()
+     {
+         return configfile;
+     }
+ 
+     /**
+      * Sets the file to be used.
+      * 
+      * @param file The file to use
+      */
+     public void setFile(String file)
+     {
+         this.file = file;
+     }
+ 
+     /**
+      * Sets the destination file name.
+      * 
+      * @param tofile The destination file name
+      */
+     public void setToFile(String tofile)
+     {
+         this.tofile = tofile;
+     }
+ 
+     /**
+      * Sets the destination directory to use.
+      * @param todir The destination directory
+      */
+     public void setToDir(String todir)
+     {
+         this.todir = todir;
+     }
+ 
+     /**
+      * Set if the destination file should be overwritten.
+      * @param overwrite Set to true if files should overwrite
+      */
+     public void setOverwrite(String overwrite)
+     {
+         this.overwrite = Boolean.parseBoolean(overwrite);
+     }
+ 
+     /**
+      * Set if the destination file should be overwritten.
+      * @param overwrite Set to true if files should overwrite
+      */
+     public void setOverwrite(boolean overwrite)
+     {
+         this.overwrite = overwrite;
+     }
+ 
+     /**
+      * Set if the destination should be considered a configuration file
+      * @param configfile Set to true if file is a configfile
+      */
+     public void setConfigfile(String configfile)
+     {
+         this.configfile = Boolean.parseBoolean(configfile);
+     }
+ 
+     /**
+      * Set if the destination should be considered a configuration file
+      * @param configfile Set to true if file is a configfile
+      */
+     public void setConfigfile(boolean configfile)
+     {
+         this.configfile = configfile;
+     }
+ 
+     /**
+      * Gets the character encoding to use when token filtering is performed.
+      * 
+      * @return The character encoding to use when token filtering is performed or {@code null}/empty
+      *         if the platform's default encoding should be used.
+      */
+     public String getEncoding()
+     {
+         return encoding;
+     }
+ 
+     /**
+      * Gets the character encoding to use when token filtering is performed, as a Charset.
+      * 
+      * @return The character encoding to use when token filtering is performed or {@code null}/empty
+      *         if the platform's default encoding should be used.
+      */
+     public Charset getEncodingAsCharset()
+     {
+         if (encoding == null)
+         {
+             return null;
+         }
+         else
+         {
+             return Charset.forName(encoding);
+         }
+     }
+ 
+     /**
+      * Sets the character encoding to use when token filtering is performed.
+      * 
+      * @param encoding The character encoding to use when token filtering is performed, may be
+      *            {@code null} or empty to use the platform's default encoding.
+      */
+     public void setEncoding(String encoding)
+     {
+         this.encoding = encoding;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-3.html b/htmlReport/ns-2/sources/source-3.html new file mode 100644 index 0000000000..358137e8fe --- /dev/null +++ b/htmlReport/ns-2/sources/source-3.html @@ -0,0 +1,170 @@ + + + + + + + + Coverage Report > StandaloneLocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: StandaloneLocalConfiguration (org.codehaus.cargo.container.configuration)

+ + + + + + + + + +
Class
StandaloneLocalConfiguration
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.util.XmlReplacement;
+ 
+ /**
+  * Using a standalone configuration allows Cargo to create a valid configuration for your container
+  * in the directory of your choice. It uses default parameters and allows you to modify important
+  * ones. If you find that there are parameters that you cannot modify using a standalone
+  * configuration you should switch to an {@link ExistingLocalConfiguration}. However, doing so means
+  * that you'll need to set up the configuration yourself on your local file system.
+  */
+ public interface StandaloneLocalConfiguration extends LocalConfiguration
+ {
+     /**
+      * Adds an XML replacement.
+      * 
+      * @param xmlReplacement XML replacement to add.
+      */
+     void addXmlReplacement(XmlReplacement xmlReplacement);
+ 
+     /**
+      * Adds an XML replacement.
+      * 
+      * @param filename File in which to replace.
+      * @param xpathExpression XPath expression to look for.
+      * @param configurationPropertyName Name of the configuration property to set. The XML
+      * replacement will be ignored if the property is set to <code>null</code>.
+      */
+     void addXmlReplacement(String filename, String xpathExpression,
+         String configurationPropertyName);
+ 
+     /**
+      * Adds an XML replacement.
+      * 
+      * @param filename File in which to replace.
+      * @param xpathExpression XPath expression to look for.
+      * @param attributeName Attribute name to modify. If <code>null</code>, the node's contents
+      * will be modified.
+      * @param configurationPropertyName Name of the configuration property to set. The XML
+      * replacement will be ignored if the property is set to <code>null</code>.
+      */
+     void addXmlReplacement(String filename, String xpathExpression, String attributeName,
+         String configurationPropertyName);
+ 
+     /**
+      * Adds an XML replacement.
+      * 
+      * @param filename File in which to replace.
+      * @param xpathExpression XPath expression to look for.
+      * @param attributeName Attribute name to modify. If <code>null</code>, the node's contents
+      * will be modified.
+      * @param configurationPropertyName Name of the configuration property to set. The XML
+      * replacement will be ignored if the property is set to <code>null</code>.
+      * @param replacementBehavior Behavior if XPath expression doesn't match anything.
+      */
+     void addXmlReplacement(String filename, String xpathExpression, String attributeName,
+         String configurationPropertyName, XmlReplacement.ReplacementBehavior replacementBehavior);
+ 
+     /**
+      * Removes an XML replacement.
+      * 
+      * @param filename File in which to replace.
+      * @param xpathExpression XPath expression to look for.
+      */
+     void removeXmlReplacement(String filename, String xpathExpression);
+ 
+     /**
+      * Removes an XML replacement.
+      * 
+      * @param filename File in which to replace.
+      * @param xpathExpression XPath expression to look for.
+      * @param attributeName Attribute name to modify. If <code>null</code>, the node's contents
+      * will be modified.
+      */
+     void removeXmlReplacement(String filename, String xpathExpression, String attributeName);
+ 
+     /**
+      * @return All XML replacements.
+      */
+     List<XmlReplacement> getXmlReplacements();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-4.html b/htmlReport/ns-2/sources/source-4.html new file mode 100644 index 0000000000..ed8b12bd8c --- /dev/null +++ b/htmlReport/ns-2/sources/source-4.html @@ -0,0 +1,142 @@ + + + + + + + + Coverage Report > Configuration + + + + + + +
+ + +

Coverage Summary for Class: Configuration (org.codehaus.cargo.container.configuration)

+ + + + + + + + + +
Class
Configuration
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * A configuration represents how a container is configured: where deployables are deployed,
+  * container ports, logging levels, container authentication, etc. Cargo supports several types of
+  * configuration:
+  * <ul>
+  * <li>
+  * <b>local configuration</b>: it represents a configuration located somewhere on the local file
+  * system. A local configuration is activated before the container is started.</li>
+  * <li>
+  * <b>runtime configuration</b>: it represents a configuration for a container that is already
+  * started. The settings that can be set/unset depend on the container's capability for dynamically
+  * changing settings.</li>
+  * </ul>
+  */
+ public interface Configuration extends Loggable
+ {
+     /**
+      * A property is a configuration value for the container (eg the web port, the number of
+      * executing threads, etc).
+      * 
+      * @param name the property name
+      * @param value the property value
+      */
+     void setProperty(String name, String value);
+ 
+     /**
+      * @return the list of properties set
+      * @see #setProperty(String, String)
+      */
+     Map<String, String> getProperties();
+ 
+     /**
+      * @param name the property name for which to return the value
+      * @return the property's value
+      * @see #setProperty(String, String)
+      */
+     String getPropertyValue(String name);
+ 
+     /**
+      * @return the {@link ConfigurationCapability} of the configuration in term of properties it
+      * supports, etc
+      */
+     ConfigurationCapability getCapability();
+ 
+     /**
+      * @return the configuration type (standalone, existing, runtime, etc)
+      */
+     ConfigurationType getType();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-5.html b/htmlReport/ns-2/sources/source-5.html new file mode 100644 index 0000000000..e01d15e454 --- /dev/null +++ b/htmlReport/ns-2/sources/source-5.html @@ -0,0 +1,97 @@ + + + + + + + + Coverage Report > RuntimeConfiguration + + + + + + +
+ + +

Coverage Summary for Class: RuntimeConfiguration (org.codehaus.cargo.container.configuration)

+ + + + + + + + + +
Class
RuntimeConfiguration
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ /**
+  * A runtime configuration represents a configuration for a container that is already started. The
+  * parameters that can be set/unset depend on the container's capability for changing parameters at
+  * runtime (for example most containers support using JMX for changing some parameters).
+  */
+ public interface RuntimeConfiguration extends Configuration
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-6.html b/htmlReport/ns-2/sources/source-6.html new file mode 100644 index 0000000000..39dce78e8e --- /dev/null +++ b/htmlReport/ns-2/sources/source-6.html @@ -0,0 +1,108 @@ + + + + + + + + Coverage Report > ConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: ConfigurationCapability (org.codehaus.cargo.container.configuration)

+ + + + + + + + + +
Class
ConfigurationCapability
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ import java.util.Map;
+ 
+ /**
+  * Represents the capability of a configuration. More specifically it describes the properties that
+  * the configuration supports.
+  */
+ public interface ConfigurationCapability
+ {
+     /**
+      * @param propertyName the property for which to verify the support for this configuration
+      * @return true if the configuration supports the passed property
+      */
+     boolean supportsProperty(String propertyName);
+ 
+     /**
+      * @return the list of supported or not supported configuration properties
+      */
+     Map<String, Boolean> getProperties();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-7.html b/htmlReport/ns-2/sources/source-7.html new file mode 100644 index 0000000000..10d5e65b4f --- /dev/null +++ b/htmlReport/ns-2/sources/source-7.html @@ -0,0 +1,99 @@ + + + + + + + + Coverage Report > ExistingLocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: ExistingLocalConfiguration (org.codehaus.cargo.container.configuration)

+ + + + + + + + + +
Class
ExistingLocalConfiguration
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ /**
+  * An existing configuration allows you to point Cargo to a container configuration that you have
+  * already set somewhere on your local file system. For example for JBoss this points to a JBoss
+  * server configuration (usually a directory located in <code>JBOSSHOME/server</code>, such as
+  * <code>JBOSSHOME/server/default</code> for example). The default configuration locations depend on
+  * the container you're using.
+  */
+ public interface ExistingLocalConfiguration extends LocalConfiguration
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2/sources/source-8.html b/htmlReport/ns-2/sources/source-8.html new file mode 100644 index 0000000000..c8e17e0353 --- /dev/null +++ b/htmlReport/ns-2/sources/source-8.html @@ -0,0 +1,225 @@ + + + + + + + + Coverage Report > LocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: LocalConfiguration (org.codehaus.cargo.container.configuration)

+ + + + + + + + + + + + + + + + + + +
Class
LocalConfiguration$MockitoMock$Fz52IvB0
LocalConfiguration$MockitoMock$Fz52IvB0$auxiliary$fNZ0ImR2
LocalConfiguration$MockitoMock$Fz52IvB0$auxiliary$iZqniWOI
Total
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.property.User;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * A local configuration represents a container configuration located somewhere on the local file
+  * system. A local configuration is activated before the container is started. In addition, a local
+  * configuration allows you to deploy {@link Deployable}s before the container is started.
+  */
+ public interface LocalConfiguration extends Configuration
+ {
+     /**
+      * @return the configuration home directory. Note that we're returning a String instead of a
+      * File because we want to leave the possibility of using URIs for specifying the home location.
+      */
+     String getHome();
+ 
+     /**
+      * @param handler means by which we affect local files.
+      */
+     void setFileHandler(FileHandler handler);
+ 
+     /**
+      * @return the means by which we affect local files.
+      */
+     FileHandler getFileHandler();
+ 
+     /**
+      * set the config file property for a configuration.
+      * 
+      * @param fileConfig The FileConfig to use
+      */
+     void setConfigFileProperty(FileConfig fileConfig);
+ 
+     /**
+      * set the file property for a configuration.
+      * @param fileConfig The FileConfig to use
+      */
+     void setFileProperty(FileConfig fileConfig);
+ 
+     /**
+      * Returns the file configurations.
+      * 
+      * @return The configuration file properies
+      */
+     List<FileConfig> getFileProperties();
+ 
+     /**
+      * Deploy a {@link Deployable} in the container. It installs the {@link Deployable} in the
+      * container's configuration directory.
+      * 
+      * @param deployable the {@link org.codehaus.cargo.container.deployable.Deployable} to deploy
+      */
+     void addDeployable(Deployable deployable);
+ 
+     /**
+      * @return the list of {@link Deployable}s that are going to be deployed in the container when
+      * it is started
+      */
+     List<Deployable> getDeployables();
+ 
+     /**
+      * Add resources the container can take advantage of. I.e. datasources.
+      * 
+      * @param resource the {@link Resource} to add.
+      */
+     void addResource(Resource resource);
+ 
+     /**
+      * @return the list of {@link Resource}s that are going to be added to the container when it is
+      * started.
+      */
+     List<Resource> getResources();
+ 
+     /**
+      * Add user to container.
+      * 
+      * @param user the {@link User} to add.
+      */
+     void addUser(User user);
+ 
+     /**
+      * @return the list of {@link User}s that are going to be added to the container.
+      */
+     List<User> getUsers();
+ 
+     /**
+      * Add data source the container can take advantage of.
+      * 
+      * @param dataSource the {@link DataSource} to add.
+      */
+     void addDataSource(DataSource dataSource);
+ 
+     /**
+      * @return the configured DataSources for this container.
+      */
+     List<DataSource> getDataSources();
+ 
+     /**
+      * Apply the port offset to the configuration port properties.
+      */
+     void applyPortOffset();
+ 
+     /**
+      * Revert the port offset on the configuration port properties.
+      */
+     void revertPortOffset();
+ 
+     /**
+      * Checks whether the offset is already applied or not.
+      * @return <code>true</code> if the offset is already applied
+      */
+     boolean isOffsetApplied();
+ 
+     /**
+      * Setup the container which means setting up a valid directory structure, setting up
+      * configuration files and deploying static deployables.
+      * 
+      * @param container the container to configure
+      */
+     void configure(LocalContainer container);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/index.html b/htmlReport/ns-20/index.html new file mode 100644 index 0000000000..dfff47d0c5 --- /dev/null +++ b/htmlReport/ns-20/index.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_BLOCK.html b/htmlReport/ns-20/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..01da83295c --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_BLOCK.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-20/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..d17fc7eaef --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_CLASS.html b/htmlReport/ns-20/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..f11701fddf --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_CLASS.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-20/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..bf5ded7a3b --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_LINE.html b/htmlReport/ns-20/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..0e2f6b8a42 --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_LINE.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-20/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..01a81bb61a --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_METHOD.html b/htmlReport/ns-20/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..e20c4d7bd4 --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_METHOD.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-20/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..2ece82ae26 --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-20/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..8ab34ae41f --- /dev/null +++ b/htmlReport/ns-20/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,521 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp + + 0% + + + (0/16) + + + + 0% + + + (0/138) + + + + 0% + + + (0/671) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
WebXmlIo + + 0% + + + (0/2) + + + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-1.html b/htmlReport/ns-20/sources/source-1.html new file mode 100644 index 0000000000..c973b6f634 --- /dev/null +++ b/htmlReport/ns-20/sources/source-1.html @@ -0,0 +1,419 @@ + + + + + + + + Coverage Report > DefaultWarArchive + + + + + + +
+ + +

Coverage Summary for Class: DefaultWarArchive (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/80) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.io.File;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.nio.charset.StandardCharsets;
+ import java.util.ArrayList;
+ import java.util.List;
+ import java.util.jar.JarEntry;
+ import java.util.jar.JarInputStream;
+ import java.util.jar.JarOutputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.codehaus.cargo.module.DefaultJarArchive;
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.JarArchive;
+ import org.codehaus.cargo.module.webapp.jboss.JBossWebXml;
+ import org.codehaus.cargo.module.webapp.jboss.JBossWebXmlIo;
+ import org.codehaus.cargo.module.webapp.orion.OrionWebXml;
+ import org.codehaus.cargo.module.webapp.orion.OrionWebXmlIo;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXml;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlIo;
+ import org.codehaus.cargo.module.webapp.weblogic.WeblogicXml;
+ import org.codehaus.cargo.module.webapp.weblogic.WeblogicXmlIo;
+ import org.codehaus.cargo.module.webapp.websphere.IbmWebBndXmi;
+ import org.codehaus.cargo.module.webapp.websphere.IbmWebBndXmiIo;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to a WAR.
+  */
+ public class DefaultWarArchive extends DefaultJarArchive implements WarArchive
+ {
+     /**
+      * The parsed deployment descriptor.
+      */
+     private WebXml webXml;
+ 
+     /**
+      * The filename.
+      */
+     private String file;
+ 
+     /**
+      * {@inheritDoc}
+      * @see DefaultJarArchive#DefaultJarArchive(String)
+      */
+     public DefaultWarArchive(String file)
+     {
+         super(file);
+         this.file = file;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param inputStream The input stream for the web application archive
+      * @throws java.io.IOException If there was a problem reading the WAR
+      */
+     public DefaultWarArchive(InputStream inputStream) throws IOException
+     {
+         super(inputStream);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXml getWebXml() throws IOException, JDOMException
+     {
+         if (this.webXml == null)
+         {
+             try (InputStream in = getResource("WEB-INF/web.xml"))
+             {
+                 if (in != null)
+                 {
+                     this.webXml = WebXmlIo.parseWebXml(in, null);
+                 }
+                 else
+                 {
+                     // need to create something, as otherwise vendor descriptors
+                     // will fail
+                     this.webXml = new WebXml();
+                 }
+             }
+             catch (Exception ex)
+             {
+                 throw new CargoException("Error parsing the web.xml file in " + file, ex);
+             }
+             addWeblogicDescriptor();
+             addOracleDescriptor();
+             addWebsphereDescriptor();
+             addResinDescriptor();
+             addJBossDescriptor();
+         }
+         return this.webXml;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void store(File warFile) throws IOException, JDOMException
+     {
+         FileHandler fileHandler = new DefaultFileHandler();
+         JarOutputStream out;
+         try (JarInputStream in = getContentAsStream())
+         {
+             out = new JarOutputStream(new FileOutputStream(warFile));
+ 
+             // Find all deployment descriptors that Cargo is handling for this WAR file.
+             List<String> descriptorNames = new ArrayList<String>();
+             descriptorNames.add("WEB-INF/" + getWebXml().getFileName());
+             for (Descriptor vendorDescriptor : getWebXml().getVendorDescriptors())
+             {
+                 descriptorNames.add("WEB-INF/" + vendorDescriptor.getFileName());
+             }
+ 
+             // Copy all entries from the original WAR file except for deployment descriptors. The
+             // reason we do not copy deployment descriptors is because they may have been modified
+             // since they were initially read from the original WAR file.
+             JarEntry entry;
+             while ((entry = in.getNextJarEntry()) != null)
+             {
+                 if (!descriptorNames.contains(entry.getName()))
+                 {
+                     out.putNextEntry(entry);
+                     fileHandler.copy(in, out);
+                 }
+             }
+         }
+ 
+         // Copy the deployment descriptors to the output file. Start by writing the web.xml file
+         // and then the vendor descriptors.
+ 
+         JarEntry webXmlEntry = new JarEntry("WEB-INF/" + getWebXml().getFileName());
+         out.putNextEntry(webXmlEntry);
+         AbstractDescriptorIo.writeDescriptor(getWebXml(), out, StandardCharsets.UTF_8, true);
+ 
+         for (Descriptor descriptor : getWebXml().getVendorDescriptors())
+         {
+             JarEntry descriptorEntry = new JarEntry("WEB-INF/" + descriptor.getFileName());
+             out.putNextEntry(descriptorEntry);
+             AbstractDescriptorIo.writeDescriptor(descriptor, out, StandardCharsets.UTF_8, true);
+         }
+ 
+         out.close();
+     }
+ 
+     /**
+      * Returns whether a class of the specified name is contained in the web-app archive, either
+      * directly in WEB-INF/classes, or in one of the JARs in WEB-INF/lib.
+      * 
+      * @param className The name of the class to search for
+      * 
+      * @return Whether the class was found in the archive
+      * 
+      * @throws java.io.IOException If an I/O error occurred reading the archive
+      */
+     @Override
+     public boolean containsClass(String className) throws IOException
+     {
+         boolean containsClass = false;
+ 
+         // Look in WEB-INF/classes first
+         String resourceName = "WEB-INF/classes/" + className.replace('.', '/') + ".class";
+         if (getResource(resourceName) != null)
+         {
+             containsClass = true;
+         }
+ 
+         // Next scan the JARs in WEB-INF/lib
+         for (String resource : getResources("WEB-INF/lib/"))
+         {
+             JarArchive jar = new DefaultJarArchive(getResource(resource));
+             if (jar.containsClass(className))
+             {
+                 containsClass = true;
+             }
+         }
+ 
+         return containsClass;
+     }
+ 
+     /**
+      * Associates the webXml with a weblogic.xml if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private void addWeblogicDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("WEB-INF/weblogic.xml"))
+         {
+             if (in != null)
+             {
+                 WeblogicXml descr = WeblogicXmlIo.parseWeblogicXml(in);
+                 if (descr != null)
+                 {
+                     this.webXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the webXml with a resin-web if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private void addResinDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("WEB-INF/resin-web.xml"))
+         {
+             if (in != null)
+             {
+                 ResinWebXml descr = ResinWebXmlIo.parseResinXml(in);
+                 if (descr != null)
+                 {
+                     this.webXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the webXml with a orion-web.xml if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private void addOracleDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("WEB-INF/orion-web.xml"))
+         {
+             if (in != null)
+             {
+                 OrionWebXml descr = OrionWebXmlIo.parseOrionXml(in);
+                 if (descr != null)
+                 {
+                     this.webXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the webXml with a ibm-web-bnd.xmi, if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private void addWebsphereDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("WEB-INF/ibm-web-bnd.xmi"))
+         {
+             if (in != null)
+             {
+                 IbmWebBndXmi descr = IbmWebBndXmiIo.parseIbmWebBndXmi(in);
+                 if (descr != null)
+                 {
+                     this.webXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Associates the webXml with a jboss-web.xml, if one is present in the war.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private void addJBossDescriptor() throws IOException, JDOMException
+     {
+         try (InputStream in = getResource("WEB-INF/jboss-web.xml"))
+         {
+             if (in != null)
+             {
+                 JBossWebXml descr = JBossWebXmlIo.parseJBossWebXml(in);
+                 if (descr != null)
+                 {
+                     this.webXml.addVendorDescriptor(descr);
+                 }
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-10.html b/htmlReport/ns-20/sources/source-10.html new file mode 100644 index 0000000000..c29c27a561 --- /dev/null +++ b/htmlReport/ns-20/sources/source-10.html @@ -0,0 +1,121 @@ + + + + + + + + Coverage Report > WarArchive + + + + + + +
+ + +

Coverage Summary for Class: WarArchive (org.codehaus.cargo.module.webapp)

+ + + + + + + + + +
Class
WarArchive
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Encapsulates access to a WAR.
+  */
+ public interface WarArchive extends JarArchive
+ {
+     /**
+      * Returns the deployment descriptor of the web application.
+      * 
+      * @return The parsed deployment descriptor
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     WebXml getWebXml() throws IOException, JDOMException;
+ 
+     /**
+      * Stores the war archive to file. Changes to the descriptors of the war archive will be stored
+      * as well.
+      * 
+      * @param warFile file to store the war in.
+      * 
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     void store(File warFile) throws IOException, JDOMException;
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-11.html b/htmlReport/ns-20/sources/source-11.html new file mode 100644 index 0000000000..c9023550d3 --- /dev/null +++ b/htmlReport/ns-20/sources/source-11.html @@ -0,0 +1,103 @@ + + + + + + + + Coverage Report > VendorWebAppDescriptor + + + + + + +
+ + +

Coverage Summary for Class: VendorWebAppDescriptor (org.codehaus.cargo.module.webapp)

+ + + + + + + + + +
Class
VendorWebAppDescriptor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.VendorDescriptor;
+ 
+ /**
+  * Common interface for vendor specific deployment descriptors.
+  */
+ public interface VendorWebAppDescriptor extends VendorDescriptor
+ {
+     /**
+      * Adds an ejb reference to the descriptor.
+      * 
+      * @param ref ejb reference to add to the descriptor
+      */
+     void addEjbReference(EjbRef ref);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-2.html b/htmlReport/ns-20/sources/source-2.html new file mode 100644 index 0000000000..d103f675d2 --- /dev/null +++ b/htmlReport/ns-20/sources/source-2.html @@ -0,0 +1,340 @@ + + + + + + + + Coverage Report > EjbRef + + + + + + +
+ + +

Coverage Summary for Class: EjbRef (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EjbRef + + 0% + + + (0/1) + + + + 0% + + + (0/16) + + + + 0% + + + (0/21) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ /**
+  * Represents a ejb-ref element of a web application descriptor.
+  */
+ public class EjbRef
+ {
+     /**
+      * Constant representing an session ejb reference.
+      */
+     public static final String SESSION = "Session";
+ 
+     /**
+      * Constant representing an entity ejb reference.
+      */
+     public static final String ENTITY = "Entity";
+ 
+     /**
+      * Name of the references. For example ejb/MyEjb.
+      */
+     private String name;
+ 
+     /**
+      * Class name of the ejb interface.
+      */
+     private String ejbInterface;
+ 
+     /**
+      * Class name of the ejb home interface.
+      */
+     private String ejbHomeInterface;
+ 
+     /**
+      * Name of the referenced ejb.
+      */
+     private String ejbName;
+ 
+     /**
+      * Jndi name of the referenced ejb.
+      */
+     private String jndiName;
+ 
+     /**
+      * Indicates if the referenced ejb is a local ejb.
+      */
+     private boolean local = true;
+ 
+     /**
+      * Type of ejb. Possible value is {@link SESSION} or {@link ENTITY}.
+      */
+     private String type = SESSION;
+ 
+     /**
+      * Empty constructor.
+      */
+     public EjbRef()
+     {
+     }
+ 
+     /**
+      * Construct a new ejb-ref.
+      * 
+      * @param name Name of the reference. For example ejb/MyEjb.
+      * @param ejbInterface Class name of the ejb interface.
+      * @param ejbHomeInterface Class name of the ejb home interface.
+      */
+     public EjbRef(String name, String ejbInterface, String ejbHomeInterface)
+     {
+         this.name = name;
+         this.ejbInterface = ejbInterface;
+         this.ejbHomeInterface = ejbHomeInterface;
+     }
+ 
+     /**
+      * Returns the ejb home inteface.
+      * 
+      * @return ejb home interface.
+      */
+     public String getEjbHomeInterface()
+     {
+         return ejbHomeInterface;
+     }
+ 
+     /**
+      * Sets the ejb home interface.
+      * 
+      * @param ejbHomeInterface the home interface of the ejb.
+      */
+     public void setEjbHomeInterface(String ejbHomeInterface)
+     {
+         this.ejbHomeInterface = ejbHomeInterface;
+     }
+ 
+     /**
+      * Returns the ejb inteface.
+      * 
+      * @return ejb interface.
+      */
+     public String getEjbInterface()
+     {
+         return ejbInterface;
+     }
+ 
+     /**
+      * Sets the ejb interface.
+      * 
+      * @param ejbInterface the interface of the ejb.
+      */
+     public void setEjbInterface(String ejbInterface)
+     {
+         this.ejbInterface = ejbInterface;
+     }
+ 
+     /**
+      * Returns the ejb name.
+      * 
+      * @return ejb name.
+      */
+     public String getEjbName()
+     {
+         return ejbName;
+     }
+ 
+     /**
+      * Sets the ejb name. This will result in an ejb ref by ejb-link.
+      * 
+      * @param ejbName the name of the ejb.
+      */
+     public void setEjbName(String ejbName)
+     {
+         this.ejbName = ejbName;
+     }
+ 
+     /**
+      * Returns the jndi inteface.
+      * 
+      * @return jndi interface.
+      */
+     public String getJndiName()
+     {
+         return jndiName;
+     }
+ 
+     /**
+      * Sets the jndi name. This will result in an ejb ref by vendor specific mappings.
+      * 
+      * @param jndiName jndi name of the referenced ejb.
+      */
+     public void setJndiName(String jndiName)
+     {
+         this.jndiName = jndiName;
+     }
+ 
+     /**
+      * Indicates if the ejb referenced is a local ejb.
+      * 
+      * @return true if the ejb referenced is a local ejb.
+      */
+     public boolean isLocal()
+     {
+         return local;
+     }
+ 
+     /**
+      * Set if the referenced ejb is a local ejb.
+      * 
+      * @param local true if the referenced ejb is local.
+      */
+     public void setLocal(boolean local)
+     {
+         this.local = local;
+     }
+ 
+     /**
+      * Returns the name of the reference.
+      * 
+      * @return name of the reference.
+      */
+     public String getName()
+     {
+         return name;
+     }
+ 
+     /**
+      * Sets the name of the reference.
+      * 
+      * @param name name of the reference.
+      */
+     public void setName(String name)
+     {
+         this.name = name;
+     }
+ 
+     /**
+      * Returns the type of reference.
+      * 
+      * @see EjbRef#SESSION
+      * @see EjbRef#ENTITY
+      * @return type of reference.
+      */
+     public String getType()
+     {
+         return type;
+     }
+ 
+     /**
+      * Sets the type of the reference.
+      * 
+      * @see EjbRef#SESSION
+      * @see EjbRef#ENTITY
+      * @param type type of reference.
+      */
+     public void setType(String type)
+     {
+         this.type = type;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-3.html b/htmlReport/ns-20/sources/source-3.html new file mode 100644 index 0000000000..582217ac14 --- /dev/null +++ b/htmlReport/ns-20/sources/source-3.html @@ -0,0 +1,179 @@ + + + + + + + + Coverage Report > WarArchiveIo + + + + + + +
+ + +

Coverage Summary for Class: WarArchiveIo (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WarArchiveIo + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ /**
+  * Utility IO class for constructing War Archives. Use this class in preference to the concrete
+  * implementations of WarArchive.
+  */
+ public class WarArchiveIo
+ {
+     /**
+      * Constructor.
+      */
+     protected WarArchiveIo()
+     {
+         // Utility should not have a public constructor.
+     }
+ 
+     /**
+      * Open a war archive.
+      * 
+      * @param file Input File
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static WarArchive open(String file) throws IOException
+     {
+         return new DefaultWarArchive(file);
+     }
+ 
+     /**
+      * Open a war archive.
+      * 
+      * @param is Input Stream
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static WarArchive open(InputStream is) throws IOException
+     {
+         return new DefaultWarArchive(is);
+     }
+ 
+     /**
+      * Open a war archive.
+      * 
+      * @param f Input File
+      * @return WarArchive
+      * @throws IOException if an IO error occurs
+      */
+     public static WarArchive open(File f) throws IOException
+     {
+         return new DefaultWarArchive(f.getAbsolutePath());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-4.html b/htmlReport/ns-20/sources/source-4.html new file mode 100644 index 0000000000..da73f5c533 --- /dev/null +++ b/htmlReport/ns-20/sources/source-4.html @@ -0,0 +1,269 @@ + + + + + + + + Coverage Report > WebXml + + + + + + +
+ + +

Coverage Summary for Class: WebXml (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml + + 0% + + + (0/1) + + + + 0% + + + (0/9) + + + + 0% + + + (0/24) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.Identifier;
+ import org.codehaus.cargo.module.J2eeDescriptor;
+ import org.jdom2.DocType;
+ import org.jdom2.Element;
+ import org.jdom2.Namespace;
+ 
+ /**
+  * Encapsulates the DOM representation of a web deployment descriptor <code>web.xml</code> to
+  * provide convenience methods for easy access and manipulation.
+  */
+ public class WebXml extends AbstractDescriptor implements J2eeDescriptor
+ {
+     /**
+      * List of vendor specific descriptors associated with this web.xml.
+      */
+     private List<Descriptor> vendorDescriptors = new ArrayList<Descriptor>();
+ 
+     /**
+      * Constructor.
+      */
+     public WebXml()
+     {
+         super(new Element("web-app"), WebXml23Type.getInstance());
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root webxml element
+      * @param type The descriptor type to use
+      */
+     public WebXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return "web.xml";
+     }
+ 
+     /**
+      * Associates a vendor specific descriptor with this web.xml.
+      * 
+      * @param descr the vendor specific dexcriptor to associate
+      */
+     public void addVendorDescriptor(VendorWebAppDescriptor descr)
+     {
+         this.vendorDescriptors.add(descr);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<Descriptor> getVendorDescriptors()
+     {
+         return this.vendorDescriptors;
+     }
+ 
+     /**
+      * Get the namespace that tags in this descriptor live in.
+      * @return the namespace, or null if none
+      */
+     protected Namespace getTagNamespace()
+     {
+         if (this.getVersion() == null)
+         {
+             return null;
+         }
+         return this.getVersion().getNamespace();
+     }
+ 
+     /**
+      * Returns the servlet API version.
+      * 
+      * @return The version
+      */
+     public WebXmlVersion getVersion()
+     {
+         DocType docType = getDocType();
+         if (docType != null)
+         {
+             return WebXmlVersion.valueOf(docType);
+         }
+ 
+         return WebXmlVersion.valueOf(this.getRootElement());
+     }
+ 
+     /**
+      * Add a tag into the document.
+      * @param element The element to add
+      */
+     public void addTag(DescriptorElement element)
+     {
+         Identifier id = element.getTag().getIdentifier();
+         if (id != null)
+         {
+             if (getTagByIdentifier(element.getTag(), id.getIdentifier(element)) != null)
+             {
+                 throw new IllegalStateException();
+             }
+         }
+ 
+         addElement(element.getTag(), element, getRootElement());
+     }
+ 
+     /**
+      * Get a tag by name.
+      * 
+      * @param tag The tag name
+      * @return the element for the tag
+      */
+     public Element getTag(String tag)
+     {
+         if (tag == null)
+         {
+             throw new NullPointerException();
+         }
+ 
+         List<Element> items = getRootElement().getChildren(tag, getTagNamespace());
+         if (items.isEmpty())
+         {
+             return null;
+         }
+ 
+         return items.get(0);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-5.html b/htmlReport/ns-20/sources/source-5.html new file mode 100644 index 0000000000..9fbe0f7266 --- /dev/null +++ b/htmlReport/ns-20/sources/source-5.html @@ -0,0 +1,243 @@ + + + + + + + + Coverage Report > WebXml22Type + + + + + + +
+ + +

Coverage Summary for Class: WebXml22Type (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml22Type + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ import org.codehaus.cargo.module.Identifier;
+ import org.codehaus.cargo.module.webapp.elements.AuthConstraint;
+ import org.codehaus.cargo.module.webapp.elements.ContextParam;
+ import org.codehaus.cargo.module.webapp.elements.Filter;
+ import org.codehaus.cargo.module.webapp.elements.FilterMapping;
+ import org.codehaus.cargo.module.webapp.elements.InitParam;
+ import org.codehaus.cargo.module.webapp.elements.Listener;
+ import org.codehaus.cargo.module.webapp.elements.MimeMapping;
+ import org.codehaus.cargo.module.webapp.elements.SecurityConstraint;
+ import org.codehaus.cargo.module.webapp.elements.Servlet;
+ import org.codehaus.cargo.module.webapp.elements.ServletMapping;
+ 
+ /**
+  * Web 2.2 Descriptor.
+  */
+ public class WebXml22Type extends WebXmlType
+ {
+ 
+     /**
+      * Single instance.
+      */
+     private static WebXml22Type instance = new WebXml22Type();
+ 
+     /**
+      * Ensure all tags constructed.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private WebXmlTag[] tags =
+         new WebXmlTag[] {
+             new WebXmlTag(this, "icon", false),
+             new WebXmlTag(this, "display-name", false),
+             new WebXmlTag(this, "description", false),
+             new WebXmlTag(this, "distributable", false),
+             new WebXmlTag(this, "context-param", true, new Identifier("param-name"),
+                 ContextParam.class),
+             new WebXmlTag(this, "param-name"),
+             new WebXmlTag(this, "param-value"),
+             new WebXmlTag(this, "filter", true, new Identifier("filter-name"), Filter.class),
+             new WebXmlTag(this, "filter-name"),
+             new WebXmlTag(this, "filter-class"),
+             new WebXmlTag(this, "filter-mapping", true, new Identifier("filter-name"),
+                 FilterMapping.class),
+             new WebXmlTag(this, "init-param", true, new Identifier("param-name"), InitParam.class),
+             new WebXmlTag(this, "listener", true, new Identifier("listener-class"), Listener.class),
+             new WebXmlTag(this, "listener-class"),
+             new WebXmlTag(this, "servlet", true, new Identifier("servlet-name"), Servlet.class),
+             new WebXmlTag(this, "servlet-name"),
+             new WebXmlTag(this, "jsp-file"),
+             new WebXmlTag(this, "servlet-class"),
+             new WebXmlTag(this, "load-on-startup"),
+             new WebXmlTag(this, "run-as"),
+             new WebXmlTag(this, "servlet-mapping", true, new Identifier("servlet-name"),
+                 ServletMapping.class),
+             new WebXmlTag(this, "url-pattern"),
+             new WebXmlTag(this, "session-config", false),
+             new WebXmlTag(this, "mime-mapping", false, null, MimeMapping.class),
+             new WebXmlTag(this, "welcome-file-list", false),
+             new WebXmlTag(this, "error-page", true, new Identifier(
+                 "concat(error-code,'>',exception-type)"), null), new WebXmlTag(this, "taglib"),
+             new WebXmlTag(this, "resource-env-ref"), new WebXmlTag(this, "resource-ref"),
+             new WebXmlTag(this, "security-constraint", true, null, SecurityConstraint.class),
+             new WebXmlTag(this, "web-resource-collection"),
+             new WebXmlTag(this, "web-resource-name"),
+             new WebXmlTag(this, "auth-constraint", false, null, AuthConstraint.class),
+             new WebXmlTag(this, "login-config", false), new WebXmlTag(this, "auth-method"),
+             new WebXmlTag(this, "realm-name"),
+             new WebXmlTag(this, "security-role", true, new Identifier("role-name"), null),
+             new WebXmlTag(this, "role-name"), new WebXmlTag(this, "env-entry"),
+             new WebXmlTag(this, "ejb-ref", true, new Identifier("ejb-ref-name"), null),
+             new WebXmlTag(this, "ejb-local-ref"), new WebXmlTag(this, "ejb-ref-name"),
+             new WebXmlTag(this, "ejb-ref-type"), new WebXmlTag(this, "local"),
+             new WebXmlTag(this, "local-home"), new WebXmlTag(this, "remote"),
+             new WebXmlTag(this, "home"), new WebXmlTag(this, "ejb-link")
+         };
+ 
+     /**
+      * Protected Constructor.
+      */
+     protected WebXml22Type()
+     {
+         super(null, new Dtd("http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"));
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Protected constructor.
+      * 
+      * @param parent Parent type if any
+      * @param grammar grammar to use
+      */
+     protected WebXml22Type(AbstractDescriptorType parent, Dtd grammar)
+     {
+         super(parent, grammar);
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the instance of the WEB XML Type.
+      * @return WebXmlType
+      */
+     public static WebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+     /**
+      * Get the web xml version for his type.
+      * @return the version for this type
+      */
+     @Override
+     public WebXmlVersion getVersion()
+     {
+         return WebXmlVersion.V2_2;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-6.html b/htmlReport/ns-20/sources/source-6.html new file mode 100644 index 0000000000..0d5f8ea3ee --- /dev/null +++ b/htmlReport/ns-20/sources/source-6.html @@ -0,0 +1,168 @@ + + + + + + + + Coverage Report > WebXml23Type + + + + + + +
+ + +

Coverage Summary for Class: WebXml23Type (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml23Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  * Web 2.3 Descriptor.
+  */
+ public class WebXml23Type extends WebXmlType
+ {
+     /**
+      * Single instance.
+      */
+     private static WebXml23Type instance = new WebXml23Type();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected WebXml23Type()
+     {
+         // We don't have an XSD grammar orderer yet so use 2.3 for now
+         super(WebXml22Type.getInstance(), new Dtd("http://java.sun.com/dtd/web-app_2_3.dtd"));
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the instance of the WEB XML Type.
+      * @return WebXmlType
+      */
+     public static WebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXmlVersion getVersion()
+     {
+         return WebXmlVersion.V2_3;
+     }
+ };
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-7.html b/htmlReport/ns-20/sources/source-7.html new file mode 100644 index 0000000000..2eb68e778c --- /dev/null +++ b/htmlReport/ns-20/sources/source-7.html @@ -0,0 +1,251 @@ + + + + + + + + Coverage Report > WebXml24Type + + + + + + +
+ + +

Coverage Summary for Class: WebXml24Type (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml24Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.module.Dtd;
+ import org.codehaus.cargo.module.Identifier;
+ import org.codehaus.cargo.module.webapp.elements.AuthConstraint;
+ import org.codehaus.cargo.module.webapp.elements.ContextParam;
+ import org.codehaus.cargo.module.webapp.elements.Filter;
+ import org.codehaus.cargo.module.webapp.elements.FilterMapping;
+ import org.codehaus.cargo.module.webapp.elements.InitParam;
+ import org.codehaus.cargo.module.webapp.elements.Listener;
+ import org.codehaus.cargo.module.webapp.elements.MimeMapping;
+ import org.codehaus.cargo.module.webapp.elements.SecurityConstraint;
+ import org.codehaus.cargo.module.webapp.elements.Servlet;
+ import org.codehaus.cargo.module.webapp.elements.ServletMapping;
+ 
+ /**
+  * Web 2.4 Descriptor.
+  */
+ public class WebXml24Type extends WebXmlType
+ {
+ 
+     /**
+      * Single instance.
+      */
+     private static WebXml24Type instance = new WebXml24Type();
+ 
+     /**
+      * Ensure all tags constructed.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private WebXmlTag[] tags;
+ 
+     /**
+      * Protected constructor.
+      */
+     protected WebXml24Type()
+     {
+         super(null, new Dtd("http://java.sun.com/dtd/web-app_2_3.dtd"));
+ 
+         Map<String, String> namespaceMap = new HashMap<String, String>();
+         namespaceMap.put("j2ee", this.getVersion().getNamespace().getURI());
+ 
+         this.tags = new WebXmlTag[] {
+             new WebXmlTag(this, "icon", false),
+             new WebXmlTag(this, "display-name", false),
+             new WebXmlTag(this, "description", false),
+             new WebXmlTag(this, "distributable", false),
+             new WebXmlTag(this, "context-param", true,
+                 new Identifier(namespaceMap, "j2ee:param-name"), ContextParam.class),
+             new WebXmlTag(this, "param-name"),
+             new WebXmlTag(this, "param-value"),
+             new WebXmlTag(this, "filter", true,
+                 new Identifier(namespaceMap, "j2ee:filter-name"), Filter.class),
+             new WebXmlTag(this, "filter-name"),
+             new WebXmlTag(this, "filter-class"),
+             new WebXmlTag(this, "filter-mapping", true,
+                 new Identifier(namespaceMap, "j2ee:filter-name"), FilterMapping.class),
+             new WebXmlTag(this, "init-param", true,
+                 new Identifier(namespaceMap, "j2ee:param-name"), InitParam.class),
+             new WebXmlTag(this, "listener", true,
+                 new Identifier(namespaceMap, "j2ee:listener-class"), Listener.class),
+             new WebXmlTag(this, "servlet", true,
+                 new Identifier(namespaceMap, "j2ee:servlet-name"), Servlet.class),
+             new WebXmlTag(this, "servlet-name"),
+             new WebXmlTag(this, "jsp-file"),
+             new WebXmlTag(this, "servlet-class"),
+             new WebXmlTag(this, "load-on-startup"),
+             new WebXmlTag(this, "run-as"),
+             new WebXmlTag(this, "servlet-mapping", true, new Identifier("servlet-name"),
+                 ServletMapping.class),
+             new WebXmlTag(this, "url-pattern"),
+             new WebXmlTag(this, "session-config", false),
+             new WebXmlTag(this, "mime-mapping", false, null, MimeMapping.class),
+             new WebXmlTag(this, "welcome-file-list", false),
+             new WebXmlTag(this, "error-page", true,
+                 new Identifier("concat(error-code,'>',exception-type)"), null),
+             new WebXmlTag(this, "taglib"),
+             new WebXmlTag(this, "resource-env-ref"),
+             new WebXmlTag(this, "resource-ref"),
+             new WebXmlTag(this, "security-constraint", true, null, SecurityConstraint.class),
+             new WebXmlTag(this, "web-resource-collection"),
+             new WebXmlTag(this, "web-resource-name"),
+             new WebXmlTag(this, "auth-constraint", false, null, AuthConstraint.class),
+             new WebXmlTag(this, "login-config", false),
+             new WebXmlTag(this, "auth-method"),
+             new WebXmlTag(this, "realm-name"),
+             new WebXmlTag(this, "security-role", true,
+                 new Identifier(namespaceMap, "j2ee:role-name"), null),
+             new WebXmlTag(this, "role-name"),
+             new WebXmlTag(this, "env-entry"),
+             new WebXmlTag(this, "ejb-ref", true,
+                 new Identifier(namespaceMap, "j2ee:ejb-ref-name"), null),
+             new WebXmlTag(this, "ejb-local-ref"),
+             new WebXmlTag(this, "ejb-ref-name"),
+             new WebXmlTag(this, "ejb-ref-type"),
+             new WebXmlTag(this, "local"),
+             new WebXmlTag(this, "local-home"),
+             new WebXmlTag(this, "remote"),
+             new WebXmlTag(this, "home"),
+             new WebXmlTag(this, "ejb-link")};
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the instance of the WEB XML Type.
+      * @return WebXmlType
+      */
+     public static WebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXmlVersion getVersion()
+     {
+         return WebXmlVersion.V2_4;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-8.html b/htmlReport/ns-20/sources/source-8.html new file mode 100644 index 0000000000..9178eaed4a --- /dev/null +++ b/htmlReport/ns-20/sources/source-8.html @@ -0,0 +1,168 @@ + + + + + + + + Coverage Report > WebXml25Type + + + + + + +
+ + +

Coverage Summary for Class: WebXml25Type (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml25Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.Xsd;
+ 
+ /**
+  * Web 2.5 Descriptor.
+  */
+ public class WebXml25Type extends WebXmlType
+ {
+     /**
+      * Single instance.
+      */
+     private static WebXml25Type instance = new WebXml25Type();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected WebXml25Type()
+     {
+         super(WebXml22Type.getInstance(), new Xsd(
+                 "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"));
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the instance of the WEB XML Type.
+      * @return WebXmlType
+      */
+     public static WebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXmlVersion getVersion()
+     {
+         return WebXmlVersion.V2_5;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-9.html b/htmlReport/ns-20/sources/source-9.html new file mode 100644 index 0000000000..a9844a4659 --- /dev/null +++ b/htmlReport/ns-20/sources/source-9.html @@ -0,0 +1,168 @@ + + + + + + + + Coverage Report > WebXml30Type + + + + + + +
+ + +

Coverage Summary for Class: WebXml30Type (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXml30Type + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.Xsd;
+ 
+ /**
+  * Web 3.0 Descriptor.
+  */
+ public class WebXml30Type extends WebXmlType
+ {
+     /**
+      * Single instance.
+      */
+     private static WebXml30Type instance = new WebXml30Type();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected WebXml30Type()
+     {
+         super(WebXml25Type.getInstance(), new Xsd(
+                 "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"));
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the instance of the WEB XML Type.
+      * @return WebXmlType
+      */
+     public static WebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXmlVersion getVersion()
+     {
+         return WebXmlVersion.V3_0;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-a.html b/htmlReport/ns-20/sources/source-a.html new file mode 100644 index 0000000000..d07736155b --- /dev/null +++ b/htmlReport/ns-20/sources/source-a.html @@ -0,0 +1,327 @@ + + + + + + + + Coverage Report > WebXmlIo + + + + + + +
+ + +

Coverage Summary for Class: WebXmlIo (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
WebXmlIo + + 0% + + + (0/5) + + + + 0% + + + (0/30) + +
WebXmlIo$1
WebXmlIo$WebXmlEntityResolver + + 0% + + + (0/2) + + + + 0% + + + (0/9) + +
Total + + 0% + + + (0/7) + + + + 0% + + + (0/39) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.DocType;
+ import org.jdom2.Document;
+ import org.jdom2.Element;
+ import org.jdom2.JDOMException;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ 
+ /**
+  * Provides convenience methods for reading and writing web deployment descriptors.
+  */
+ public final class WebXmlIo extends AbstractDescriptorIo
+ {
+ 
+     /**
+      * Constructor.
+      * @param type descriptor type
+      */
+     public WebXmlIo(DescriptorType type)
+     {
+         super(type);
+     }
+ 
+     /**
+      * Implementation of the SAX EntityResolver interface that looks up the web-app DTDs and XSDs
+      * from the JAR.
+      */
+     private static class WebXmlEntityResolver implements EntityResolver
+     {
+         /**
+          * {@inheritDoc}
+          * @see org.xml.sax.EntityResolver#resolveEntity
+          */
+         @Override
+         public InputSource resolveEntity(String thePublicId, String theSystemId)
+             throws SAXException, IOException
+         {
+             WebXmlVersion version = WebXmlVersion.valueOf(thePublicId);
+             if (version != null)
+             {
+                 String fileName = version.getSystemId().substring(
+                     version.getSystemId().lastIndexOf('/'));
+                 InputStream in = this.getClass().getResourceAsStream(
+                     "/org/codehaus/cargo/module/internal/resource" + fileName);
+                 if (in != null)
+                 {
+                     return new InputSource(in);
+                 }
+             }
+             return null;
+         }
+ 
+     }
+ 
+     /**
+      * @return the configured entity resolver
+      */
+     @Override
+     protected EntityResolver getEntityResolver()
+     {
+         return new WebXmlEntityResolver();
+     }
+ 
+     /**
+      * Creates a new empty deployment descriptor.
+      * 
+      * @param theVersion The version of the descriptor to create
+      * 
+      * @return The new descriptor
+      */
+     public static WebXml newWebXml(WebXmlVersion theVersion)
+     {
+         Element root = new Element("web-app");
+ 
+         Document document = null;
+ 
+         if (theVersion.equals(WebXmlVersion.V2_2))
+         {
+             document = new WebXml22Type().document(root);
+             document.setDocType(new DocType("web-app",
+                     "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
+                     "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"));
+         }
+         else if (theVersion.equals(WebXmlVersion.V2_3))
+         {
+             document = new WebXml23Type().document(root);
+             document.setDocType(new DocType("web-app",
+                     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",
+                     "http://java.sun.com/dtd/web-app_2_3.dtd"));
+         }
+         else if (theVersion.equals(WebXmlVersion.V2_4))
+         {
+             document = new WebXml24Type().document(root);
+             document.setDocType(new DocType("web-app", "http://java.sun.com/xml/ns/j2ee"));
+         }
+         else if (theVersion.equals(WebXmlVersion.V2_5))
+         {
+             document = new WebXml25Type().document(root);
+             document.setDocType(new DocType("web-app", "http://java.sun.com/xml/ns/j2ee"));
+         }
+         else if (theVersion.equals(WebXmlVersion.V3_0))
+         {
+             document = new WebXml30Type().document(root);
+             document.setDocType(new DocType("web-app", "http://java.sun.com/xml/ns/j2ee"));
+         }
+         else
+         {
+             // Default to web-app 2.5 (Java EE 5)
+             document = new WebXml25Type().document(root);
+             document.setDocType(new DocType("web-app", "http://java.sun.com/xml/ns/j2ee"));
+         }
+         return (WebXml) document;
+     }
+ 
+     /**
+      * Parses a deployment descriptor stored in a regular file.
+      * 
+      * @param theFile The file to parse
+      * @param theEntityResolver A SAX entity resolver, or <code>null</code> to use the default
+      * 
+      * @return The parsed descriptor
+      * 
+      * @throws JDOMException If the file could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static WebXml parseWebXmlFromFile(File theFile, EntityResolver theEntityResolver)
+         throws IOException, JDOMException
+     {
+         try (InputStream in = new FileInputStream(theFile))
+         {
+             return parseWebXml(in, theEntityResolver);
+         }
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param theInput The input stream
+      * @param theEntityResolver A SAX entity resolver, or <code>null</code> to use the default
+      * 
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the input could not be parsed
+      */
+     public static WebXml parseWebXml(InputStream theInput,
+         EntityResolver theEntityResolver)
+         throws IOException, JDOMException
+     {
+         // When we are passed an InputStream, we don't know if this is a 2.2, 2.3 or 2.4 stream. We
+         // need to create using the correct type, so we need to 'pre-read' te stream to work out
+         // which one it is.
+ 
+         WebXmlTypeAwareParser handler = new WebXmlTypeAwareParser(theInput, theEntityResolver);
+         WebXml result = handler.parse();
+         if (result == null)
+         {
+             throw new CargoException("Parsing the web.xml returned null");
+         }
+         return result;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-b.html b/htmlReport/ns-20/sources/source-b.html new file mode 100644 index 0000000000..4be3706c3d --- /dev/null +++ b/htmlReport/ns-20/sources/source-b.html @@ -0,0 +1,179 @@ + + + + + + + + Coverage Report > WebXmlTag + + + + + + +
+ + +

Coverage Summary for Class: WebXmlTag (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.Identifier;
+ 
+ /**
+  * Represents the various top-level tags in a web deployment descriptor as a typesafe enumeration.
+  */
+ public final class WebXmlTag extends DescriptorTag
+ {
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      * @param identifier Optional tag identifier instance
+      * @param clazz Name of the implementation class
+      */
+     protected WebXmlTag(DescriptorType type, String tagName,
+         boolean isMultipleAllowed, Identifier identifier, Class clazz)
+     {
+         super(type, tagName, ((WebXmlType) type).getVersion().getNamespace(), isMultipleAllowed,
+                 identifier, clazz);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected WebXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, ((WebXmlType) type).getVersion().getNamespace(), isMultipleAllowed,
+                 null, null);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected WebXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-c.html b/htmlReport/ns-20/sources/source-c.html new file mode 100644 index 0000000000..ea4453f5a1 --- /dev/null +++ b/htmlReport/ns-20/sources/source-c.html @@ -0,0 +1,415 @@ + + + + + + + + Coverage Report > WebXmlType + + + + + + +
+ + +

Coverage Summary for Class: WebXmlType (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Grammar;
+ 
+ /**
+  * A document type for web.xml web deployment descriptors.
+  */
+ public abstract class WebXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Element name 'icon'.
+      */
+     public static final String ICON = "icon";
+ 
+     /**
+      * Element name 'display-name'.
+      */
+     public static final String DISPLAY_NAME = "display-name";
+ 
+     /**
+      * Element name 'description'.
+      */
+     public static final String DESCRIPTION = "description";
+ 
+     /**
+      * Element name 'distributable'.
+      */
+     public static final String DISTRIBUTABLE = "distributable";
+ 
+     /**
+      * Element name 'context-param'.
+      */
+     public static final String CONTEXT_PARAM = "context-param";
+ 
+     /**
+      * Element name 'param-name'.
+      */
+     public static final String PARAM_NAME = "param-name";
+ 
+     /**
+      * Element name 'param-value'.
+      */
+     public static final String PARAM_VALUE = "param-value";
+ 
+     /**
+      * Element name 'filter'.
+      */
+     public static final String FILTER = "filter";
+ 
+     /**
+      * Element name 'filter-name'.
+      */
+     public static final String FILTER_NAME = "filter-name";
+ 
+     /**
+      * Element name 'filter-class'.
+      */
+     public static final String FILTER_CLASS = "filter-class";
+ 
+     /**
+      * Element name 'filter-mapping'.
+      */
+     public static final String FILTER_MAPPING = "filter-mapping";
+ 
+     /**
+      * Element name 'init-param'.
+      */
+     public static final String INIT_PARAM = "init-param";
+ 
+     /**
+      * Element name 'listener'.
+      */
+     public static final String LISTENER = "listener";
+ 
+     /**
+      * Element name 'servlet'.
+      */
+     public static final String SERVLET = "servlet";
+ 
+     /**
+      * Element name 'servlet-name'.
+      */
+     public static final String SERVLET_NAME = "servlet-name";
+ 
+     /**
+      * Element name 'jsp-file'.
+      */
+     public static final String JSP_FILE = "jsp-file";
+ 
+     /**
+      * Element name 'servlet-class'.
+      */
+     public static final String SERVLET_CLASS = "servlet-class";
+ 
+     /**
+      * Element name 'load-on-startup'.
+      */
+     public static final String LOAD_ON_STARTUP = "load-on-startup";
+ 
+     /**
+      * Element name 'run-as'.
+      */
+     public static final String RUN_AS = "run-as";
+ 
+     /**
+      * Element name 'servlet-mapping'.
+      */
+     public static final String SERVLET_MAPPING = "servlet-mapping";
+ 
+     /**
+      * Element name 'url-pattern'.
+      */
+     public static final String URL_PATTERN = "url-pattern";
+ 
+     /**
+      * Element name 'session-config'.
+      */
+     public static final String SESSION_CONFIG = "session-config";
+ 
+     /**
+      * Element name 'mime-mapping'.
+      */
+     public static final String MIME_MAPPING = "mime-mapping";
+ 
+     /**
+      * Element name 'extension'.
+      */
+     public static final String EXTENSION = "extension";
+ 
+     /**
+      * Element name 'mime-type'.
+      */
+     public static final String MIME_TYPE = "mime-type";
+ 
+     /**
+      * Element name 'welcome-file-list'.
+      */
+     public static final String WELCOME_FILE_LIST = "welcome-file-list";
+ 
+     /**
+      * Element name 'error-page'.
+      */
+     public static final String ERROR_PAGE = "error-page";
+ 
+     /**
+      * Element name 'taglib'.
+      */
+     public static final String TAGLIB = "taglib";
+ 
+     /**
+      * Element name 'resource-env-ref'.
+      */
+     public static final String RESOURCE_ENV_REF = "resource-env-ref";
+ 
+     /**
+      * Element name 'resource-ref'.
+      */
+     public static final String RESOURCE_REF = "resource-ref";
+ 
+     /**
+      * Element name 'res-ref-name'.
+      */
+     public static final String RES_REF_NAME = "res-ref-name";
+ 
+     /**
+      * Element name 'res-type'.
+      */
+     public static final String RES_TYPE = "res-type";
+ 
+     /**
+      * Element name 'security-constraint'.
+      */
+     public static final String SECURITY_CONSTRAINT = "security-constraint";
+ 
+     /**
+      * Element name 'web-resource-collection'.
+      */
+     public static final String WEB_RESOURCE_COLLECTION = "web-resource-collection";
+ 
+     /**
+      * Element name 'web-resource-name'.
+      */
+     public static final String WEB_RESOURCE_NAME = "web-resource-name";
+ 
+     /**
+      * Element name 'auth-constraint'.
+      */
+     public static final String AUTH_CONSTRAINT = "auth-constraint";
+ 
+     /**
+      * Element name 'login-config'.
+      */
+     public static final String LOGIN_CONFIG = "login-config";
+ 
+     /**
+      * Element name 'auth-method'.
+      */
+     public static final String AUTH_METHOD = "auth-method";
+ 
+     /**
+      * Element name 'realm-name'.
+      */
+     public static final String REALM_NAME = "realm-name";
+ 
+     /**
+      * Element name 'security-role'.
+      */
+     public static final String SECURITY_ROLE = "security-role";
+ 
+     /**
+      * Element name 'role-name'.
+      */
+     public static final String ROLE_NAME = "role-name";
+ 
+     /**
+      * Element name 'env-entry'.
+      */
+     public static final String ENV_ENTRY = "env-entry";
+ 
+     /**
+      * Element name 'ejb-ref'.
+      */
+     public static final String EJB_REF = "ejb-ref";
+ 
+     /**
+      * Element name 'ejb-local-ref'.
+      */
+     public static final String EJB_LOCAL_REF = "ejb-local-ref";
+ 
+     /**
+      * Element name 'ejb-ref-name'.
+      */
+     public static final String EJB_REF_NAME = "ejb-ref-name";
+ 
+     /**
+      * Element name 'ejb-ref-type'.
+      */
+     public static final String EJB_REF_TYPE = "ejb-ref-type";
+ 
+     /**
+      * Element name 'local'.
+      */
+     public static final String LOCAL = "local";
+ 
+     /**
+      * Element name 'local-home'.
+      */
+     public static final String LOCAL_HOME = "local-home";
+ 
+     /**
+      * Element name 'remote'.
+      */
+     public static final String REMOTE = "remote";
+ 
+     /**
+      * Element name 'home'.
+      */
+     public static final String HOME = "home";
+ 
+     /**
+      * Element name 'local-home'.
+      */
+     public static final String EJB_LINK = "ejb-link";
+ 
+     /**
+      * Element name 'dispatcher'.
+      */
+     public static final String DISPATCHER = "dispatcher";
+ 
+     /**
+      * Protected constructor.
+      * 
+      * @param parent Parent type if any
+      * @param grammar grammar to use
+      */
+     protected WebXmlType(AbstractDescriptorType parent, Grammar grammar)
+     {
+         super(parent, WebXml.class, grammar);
+         setDescriptorIo(new WebXmlIo(this));
+     }
+ 
+     /**
+      * Get the web xml version for his type.
+      * @return the version for this type
+      */
+     public abstract WebXmlVersion getVersion();
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-d.html b/htmlReport/ns-20/sources/source-d.html new file mode 100644 index 0000000000..844d3d5d44 --- /dev/null +++ b/htmlReport/ns-20/sources/source-d.html @@ -0,0 +1,346 @@ + + + + + + + + Coverage Report > WebXmlTypeAwareParser + + + + + + +
+ + +

Coverage Summary for Class: WebXmlTypeAwareParser (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlTypeAwareParser + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/53) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.io.BufferedInputStream;
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ 
+ import javax.xml.parsers.SAXParser;
+ import javax.xml.parsers.SAXParserFactory;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.JDOMException;
+ import org.xml.sax.Attributes;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.helpers.DefaultHandler;
+ 
+ /**
+  * SAX Handler for working out what the type of a web descriptor is.
+  */
+ public class WebXmlTypeAwareParser extends DefaultHandler
+ {
+     /**
+      * The version that we think the XML data is.
+      */
+     protected WebXmlVersion version;
+ 
+     /**
+      * Buffered Input Stream for sniffing versions and parsing data.
+      */
+     private BufferedInputStream bufferedStream;
+ 
+     /**
+      * Entity resolver.
+      */
+     private EntityResolver theEntityResolver;
+ 
+     /**
+      * Generated web xml.
+      */
+     private WebXml webXml;
+ 
+     /**
+      * Constructor. Make a Web XML parser which will generate a web xml of the correct type, by
+      * examining the stream.
+      * 
+      * @param theInput stream to read from
+      * @param theEntityResolver entity resolver to use
+      */
+     public WebXmlTypeAwareParser(InputStream theInput, EntityResolver theEntityResolver)
+     {
+         this.bufferedStream = new BufferedInputStream(theInput);
+         this.theEntityResolver = theEntityResolver;
+     }
+ 
+     /**
+      * Perform the parsing of the passed stream, and return a Web XML from the contents.
+      * @return WebXml
+      * @throws IOException if there is a problem reading the stream
+      * @throws JDOMException if there is an XML problem
+      */
+     public WebXml parse() throws IOException, JDOMException
+     {
+         bufferedStream.mark(1024 * 1024);
+ 
+         // Trying to find out what the DOCTYPE declaration from SAX seems to be
+         // unbelievably difficult unless you rely on implementation specifics.
+         // Do something cheap instead - sniff the first few lines for decls until we
+         // see the web-app definition.
+ 
+         BufferedReader reader = new BufferedReader(new InputStreamReader(bufferedStream));
+         String line = reader.readLine();
+ 
+         while (line != null && this.version == null)
+         {
+             if (line.contains(WebXmlVersion.V2_2.getPublicId()))
+             {
+                 version = WebXmlVersion.V2_2;
+             }
+             if (line.contains(WebXmlVersion.V2_3.getPublicId()))
+             {
+                 version = WebXmlVersion.V2_3;
+             }
+             if (line.contains("<web-app"))
+             {
+                 break;
+             }
+             line = reader.readLine();
+         }
+ 
+         if (this.version != null)
+         {
+             generateWebXml();
+         }
+         else
+         {
+             try
+             {
+                 bufferedStream.reset();
+                 bufferedStream.mark(1024 * 1024);
+                 SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
+ 
+                 parser.parse(new InputSource(bufferedStream), this);
+             }
+             catch (SAXException ignored)
+             {
+                 // This exception is expected - the handler aborts the reading
+                 // when it has worked out what the type is.
+             }
+             catch (Exception e)
+             {
+                 // Something went wrong - just try normal generation
+                 throw new CargoException("Problem in parsing", e);
+             }
+         }
+ 
+         return this.webXml;
+     }
+ 
+     /**
+      * Generate the web xml once we know the type to use.
+      * 
+      * @throws IOException if there is an IO error
+      * @throws JDOMException if there is an XML error
+      */
+     private void generateWebXml() throws IOException, JDOMException
+     {
+         bufferedStream.reset();
+ 
+         // Default to 2.5 if nothing else specified
+         WebXmlType descriptorType = WebXml25Type.getInstance();
+ 
+         if (WebXmlVersion.V2_2.equals(getVersion()))
+         {
+             descriptorType = WebXml22Type.getInstance();
+         }
+         else if (WebXmlVersion.V2_3.equals(getVersion()))
+         {
+             descriptorType = WebXml23Type.getInstance();
+         }
+         else if (WebXmlVersion.V2_4.equals(getVersion()))
+         {
+             descriptorType = WebXml24Type.getInstance();
+         }
+         else if (WebXmlVersion.V2_5.equals(getVersion()))
+         {
+             descriptorType = WebXml25Type.getInstance();
+         }
+         else if (WebXmlVersion.V3_0.equals(getVersion()))
+         {
+             descriptorType = WebXml30Type.getInstance();
+         }
+ 
+         webXml = (WebXml) descriptorType.getDescriptorIo().parseXml(bufferedStream,
+                 theEntityResolver);
+     }
+ 
+     /**
+      * {@inheritDoc}. This is an empty implementation.
+      */
+     @Override
+     public void notationDecl(String namespaceURI, String sName, String qName) throws SAXException
+     {
+         // Nothing
+     }
+ 
+     /**
+      * {@inheritDoc}. This is an empty implementation.
+      */
+     @Override
+     public void unparsedEntityDecl(java.lang.String arg0, java.lang.String arg1,
+             java.lang.String arg2, java.lang.String arg3) throws org.xml.sax.SAXException
+     {
+         // Nothing
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void startElement(String namespaceURI, String sName, String qName, Attributes attrs)
+         throws org.xml.sax.SAXException
+     {
+         try
+         {
+             String xmlNs = attrs.getValue("xmlns");
+             if (WebXmlVersion.V2_4.getNamespace().getURI().equals(xmlNs))
+             {
+                 // We are at a minimum a V2.4
+                 this.version = WebXmlVersion.V2_4;
+             }
+             else if (WebXmlVersion.V2_5.getNamespace().getURI().equals(xmlNs))
+             {
+                 // We are at a minimum a V2.5
+                 this.version = WebXmlVersion.V2_5;
+             }
+             else if (WebXmlVersion.V3_0.getNamespace().getURI().equals(xmlNs))
+             {
+                 // We are at a minimum a V3.0
+                 this.version = WebXmlVersion.V3_0;
+             }
+ 
+             generateWebXml();
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Problem in parsing web xml file", e);
+         }
+         throw new SAXException("Finished examining file - stop the parser");
+     }
+ 
+     /**
+      * Get the version that was determined.
+      * @return the version.
+      */
+     public WebXmlVersion getVersion()
+     {
+         return this.version;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-e.html b/htmlReport/ns-20/sources/source-e.html new file mode 100644 index 0000000000..79d4aac1ab --- /dev/null +++ b/htmlReport/ns-20/sources/source-e.html @@ -0,0 +1,1236 @@ + + + + + + + + Coverage Report > WebXmlUtils + + + + + + +
+ + +

Coverage Summary for Class: WebXmlUtils (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/48) + + + + 0% + + + (0/376) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import java.util.ArrayList;
+ import java.util.Collections;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.webapp.elements.ContextParam;
+ import org.codehaus.cargo.module.webapp.elements.Filter;
+ import org.codehaus.cargo.module.webapp.elements.FilterMapping;
+ import org.codehaus.cargo.module.webapp.elements.InitParam;
+ import org.codehaus.cargo.module.webapp.elements.SecurityConstraint;
+ import org.codehaus.cargo.module.webapp.elements.Servlet;
+ import org.codehaus.cargo.module.webapp.elements.ServletMapping;
+ import org.codehaus.cargo.module.webapp.elements.WebXmlElement;
+ import org.jdom2.Element;
+ import org.jdom2.filter.ElementFilter;
+ 
+ /**
+  */
+ public final class WebXmlUtils
+ {
+     /**
+      * Private no-args constructor.
+      */
+     private WebXmlUtils()
+     {
+         // No constructor
+     }
+ 
+     /**
+      * Returns a list of names of filters that are mapped to the specified class.
+      * 
+      * @param webXml The webXml file to use
+      * @param className The fully qualified name of the filter class
+      * @return A list of the names of the filters mapped to the class
+      */
+     public static List<String> getFilterNamesForClass(WebXml webXml, String className)
+     {
+         if (className == null)
+         {
+             throw new NullPointerException();
+         }
+         List<String> filterNames = new ArrayList<String>();
+         for (Element element : webXml.getTags(WebXmlType.FILTER))
+         {
+             Filter filterElement = (Filter) element;
+             if (className.equals(filterElement.getFilterClass()))
+             {
+                 filterNames.add(filterElement.getFilterName());
+             }
+         }
+         return filterNames;
+     }
+ 
+     /**
+      * Returns the URL-patterns that the specified filter is mapped to in an ordered list. If there
+      * are no mappings for the specified filter, an empty list is returned.
+      * 
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the servlet filter of which the mappings should be retrieved
+      * @return An ordered list of the URL-patterns
+      */
+     public static List<String> getFilterMappings(WebXml webXml, String theFilterName)
+     {
+         if (theFilterName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<String> filterUrlPatterns = new ArrayList<String>();
+         List<Element> filterMappingElements = webXml.getElements(WebXmlType.FILTER_MAPPING);
+         for (Element filterMappingElement : filterMappingElements)
+         {
+             if (theFilterName.equals(filterMappingElement.getChild(
+                 WebXmlType.FILTER_NAME, filterMappingElement.getNamespace()).getText()))
+             {
+                 List<Element> urlPatternElements = filterMappingElement.getChildren(
+                     WebXmlType.URL_PATTERN, filterMappingElement.getNamespace());
+                 for (Element urlPatternElement : urlPatternElements)
+                 {
+                     filterUrlPatterns.add(urlPatternElement.getText());
+                 }
+             }
+         }
+         return filterUrlPatterns;
+     }
+ 
+     /**
+      * Returns the dispatchers that the specified filter is mapped to in an ordered list. If there
+      * are no mappings for the specified filter, an empty list is returned.
+      * 
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the servlet filter of which the mappings should be retrieved
+      * @return An ordered list of the dispatchers
+      */
+     public static List<String> getFilterDispatchers(WebXml webXml, String theFilterName)
+     {
+         if (theFilterName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<String> filterDispatchers = new ArrayList<String>();
+         List<Element> filterMappingElements = webXml.getElements(WebXmlType.FILTER_MAPPING);
+         for (Element filterMappingElement : filterMappingElements)
+         {
+             if (theFilterName.equals(filterMappingElement.getChild(
+                 WebXmlType.FILTER_NAME, filterMappingElement.getNamespace()).getText()))
+             {
+                 List<Element> urlPatternElements = filterMappingElement.getChildren(
+                     WebXmlType.DISPATCHER, filterMappingElement.getNamespace());
+                 for (Element urlPatternElement : urlPatternElements)
+                 {
+                     filterDispatchers.add(urlPatternElement.getText());
+                 }
+             }
+         }
+         return filterDispatchers;
+     }
+ 
+     /**
+      * Returns the filter mappings that the specified filter is mapped to in an ordered list. If
+      * there are no mappings for the specified filter, an empty list is returned.
+      * 
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the servlet filter of which the mappings should be retrieved
+      * @return An ordered list of the filter elements
+      */
+     public static List<FilterMapping> getFilterMappingElements(WebXml webXml, String theFilterName)
+     {
+         if (theFilterName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<FilterMapping> filterMappings = new ArrayList<FilterMapping>();
+         for (Element element : webXml.getTags(WebXmlType.FILTER_MAPPING))
+         {
+             FilterMapping filterMappingElement = (FilterMapping) element;
+             if (theFilterName.equals(filterMappingElement.getFilterName()))
+             {
+                 filterMappings.add(filterMappingElement);
+             }
+         }
+         return filterMappings;
+     }
+ 
+     /**
+      * Returns whether a context param by the specified name is defined in the deployment
+      * descriptor.
+      * 
+      * @param webXml The webXml file to use
+      * @param theParamName The name of the context param
+      * @return <code>true</code> if the context param is defined, <code>false</code> otherwise
+      */
+     public static boolean hasContextParam(WebXml webXml, String theParamName)
+     {
+         return getContextParam(webXml, theParamName) != null;
+     }
+ 
+     /**
+      * Returns the element that contains the definition of a specific context param, or
+      * <code>null</code> if a context param of the specified name is not defined in the descriptor.
+      * 
+      * @param webXml The webXml file to use
+      * @param paramName The context param name
+      * @return The DOM element representing the context param definition
+      */
+     public static Element getContextParam(WebXml webXml, String paramName)
+     {
+         if (paramName == null)
+         {
+             throw new NullPointerException();
+         }
+         return webXml.getTagByIdentifier(WebXmlType.CONTEXT_PARAM, paramName);
+     }
+ 
+     /**
+      * Returns whether a servlet filter by the specified name is defined in the deployment
+      * descriptor.
+      * 
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the filter
+      * @return <code>true</code> if the filter is defined, <code>false</code> otherwise
+      */
+     public static boolean hasFilter(WebXml webXml, String theFilterName)
+     {
+         return webXml.getTagByIdentifier(WebXmlType.FILTER, theFilterName) != null;
+     }
+ 
+     /**
+      * For a named servlet, return the run-as role name.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName the name of the servlet
+      * @return the run-as role name
+      */
+     public static String getServletRunAsRoleName(WebXml webXml, String theServletName)
+     {
+         if (theServletName == null)
+         {
+             throw new NullPointerException();
+         }
+         String roleName = null;
+         Servlet servlet = getServlet(webXml, theServletName);
+         List<Element> nodeList = servlet.getChildren(WebXmlType.RUN_AS, servlet.getNamespace());
+         if (nodeList != null && nodeList.size() > 0)
+         {
+             Element e = nodeList.get(0);
+             if (e != null)
+             {
+                 roleName = e.getChildText(WebXmlType.ROLE_NAME, e.getNamespace());
+             }
+         }
+ 
+         return roleName;
+     }
+ 
+     /**
+      * Add an init-param to the web xml.
+      * @param itemElement The the parent element to add to
+      * @param name The name of the param
+      * @param value The value for the param
+      */
+     public static void addTagInitParam(WebXmlElement itemElement, String name, String value)
+     {
+         WebXmlTag tag = (WebXmlTag) itemElement.getTag().getDescriptorType().getTagByName(
+                 "init-param");
+         InitParam init = new InitParam(tag, name, value);
+         itemElement.getChildren().add(init);
+     }
+ 
+     /**
+      * Get the init parameter names for a filter.
+      * 
+      * @param webXml The webXml file to use
+      * @param name The name of the filter to use
+      * @return a list of the param names
+      */
+     public static List<String> getFilterInitParamNames(WebXml webXml, String name)
+     {
+         WebXmlElement element =
+             (WebXmlElement) webXml.getTagByIdentifier(WebXmlType.FILTER, name);
+         if (element != null)
+         {
+             List<Element> items =
+                 element.getChildren("init-param", element.getTag().getTagNamespace());
+             List<String> result = new ArrayList<String>(items.size());
+             for (Element item : items)
+             {
+                 InitParam ip = (InitParam) item;
+                 result.add(ip.getParamName());
+             }
+             return result;
+         }
+         else
+         {
+             return Collections.emptyList();
+         }
+     }
+ 
+     /**
+      * Add an init param to a filter.
+      * 
+      * @param webXml The webXml file to use
+      * @param name The name of the filter
+      * @param paramName The name of the parameter
+      * @param paramValue The value of the parameter
+      */
+     public static void addFilterInitParam(WebXml webXml, String name, String paramName,
+         String paramValue)
+     {
+         WebXmlElement element =
+             (WebXmlElement) webXml.getTagByIdentifier(WebXmlType.FILTER, name);
+         addTagInitParam(element, paramName, paramValue);
+     }
+ 
+     /**
+      * Does the web xml have a named servlet.
+      * 
+      * @param webXml The webXml file to use
+      * @param servletName The name of the servlet
+      * @return <code>true</code> if it does, <code>false</code> if not.
+      */
+     public static boolean hasServlet(WebXml webXml, String servletName)
+     {
+         return webXml.getTagByIdentifier(WebXmlType.SERVLET, servletName) != null;
+     }
+ 
+     /**
+      * Add a servlet to the descriptor.
+      * 
+      * @param webXml The webXml file to use
+      * @param servletName The servlet name
+      * @param servletClass The servlet class name
+      */
+     public static void addServlet(WebXml webXml, String servletName, String servletClass)
+     {
+         WebXmlTag tag = (WebXmlTag) webXml.getDescriptorType().getTagByName("servlet");
+         Servlet servlet = new Servlet(tag, servletName, servletClass);
+         webXml.addTag(servlet);
+     }
+ 
+     /**
+      * Get the names that this servlet uses.
+      * @param webXml The webXml file to use
+      * @param className the name of the class
+      * @return a list of the servlet names
+      */
+     public static List<String> getServletNamesForClass(WebXml webXml, String className)
+     {
+         List<Element> items = webXml.getTags(WebXmlType.SERVLET);
+ 
+         List<String> result = new ArrayList<String>(items.size());
+         for (Element item : items)
+         {
+             Servlet servlet = (Servlet) item;
+             if (servlet.getServletClass().equals(className))
+             {
+                 result.add(servlet.getServletName());
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * Returns a list of names of servlets that are mapped to the specified JSP file.
+      * 
+      * @param webXml The webXml file to use
+      * @param theJspFile The path to the JSP file, relative to the root of the web-application
+      * @return A list of the names of the servlets mapped to the JSP file
+      */
+     public static List<String> getServletNamesForJspFile(WebXml webXml, String theJspFile)
+     {
+         if (theJspFile == null)
+         {
+             throw new NullPointerException();
+         }
+         List<Element> servletElements = webXml.getElements(WebXmlType.SERVLET);
+         List<String> servletNames = new ArrayList<String>();
+         for (Element servletElement : servletElements)
+         {
+             Element thisElement =
+                 servletElement.getChild(WebXmlType.JSP_FILE, servletElement.getNamespace());
+             if (thisElement != null && theJspFile.equals(thisElement.getText()))
+             {
+                 servletNames.add(servletElement.getChild(
+                     WebXmlType.SERVLET_NAME, servletElement.getNamespace()).getText());
+             }
+         }
+         return servletNames;
+     }
+ 
+     /**
+      * Get a list of the servlet names in the web xml.
+      * 
+      * @param webXml The webXml file to use
+      * @return list of the servlet names in the web xml
+      */
+     public static List<String> getServletNames(WebXml webXml)
+     {
+         List<Element> items = webXml.getTags(WebXmlType.SERVLET);
+ 
+         List<String> result = new ArrayList<String>(items.size());
+         for (Element item : items)
+         {
+             Servlet servlet = (Servlet) item;
+             result.add(servlet.getServletName());
+         }
+         return result;
+     }
+ 
+     /**
+      * Get the servlet mappings to the named servlet.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @return A list of the mappings
+      */
+     public static List<String> getServletMappings(WebXml webXml, String theServletName)
+     {
+         if (theServletName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<String> servletMappings = new ArrayList<String>();
+         List<Element> servletMappingElements = webXml.getElements(WebXmlType.SERVLET_MAPPING);
+         for (Element servletMappingElement : servletMappingElements)
+         {
+             if (theServletName.equals(servletMappingElement.getChild(
+                 WebXmlType.SERVLET_NAME, servletMappingElement.getNamespace()).getText()))
+             {
+                 List<Element> urlPatternElements = servletMappingElement.getChildren(
+                     WebXmlType.URL_PATTERN, servletMappingElement.getNamespace());
+                 for (Element urlPatternElement : urlPatternElements)
+                 {
+                     servletMappings.add(urlPatternElement.getText());
+                 }
+             }
+         }
+         return servletMappings;
+     }
+ 
+     /**
+      * Returns the servlet mappings that the specified servlet is mapped to in an ordered list. If
+      * there are no mappings for the specified servlet, an empty list is returned.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet of which the mappings should be retrieved
+      * @return An ordered list of the servlet elements
+      */
+     public static List<ServletMapping> getServletMappingElements(
+         WebXml webXml, String theServletName)
+     {
+         if (theServletName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<ServletMapping> servletMappings = new ArrayList<ServletMapping>();
+         for (Element element : webXml.getTags(WebXmlType.SERVLET_MAPPING))
+         {
+             ServletMapping servletMappingElement = (ServletMapping) element;
+             if (theServletName.equals(servletMappingElement.getServletName()))
+             {
+                 servletMappings.add(servletMappingElement);
+             }
+         }
+         return servletMappings;
+     }
+ 
+     /**
+      * Add a servlet to the web xml.
+      * 
+      * @param webXml The webXml file to use
+      * @param element The servlet element
+      */
+     public static void addServlet(WebXml webXml, Servlet element)
+     {
+         if (element == null)
+         {
+             throw new NullPointerException();
+         }
+         webXml.addTag(element);
+     }
+ 
+     /**
+      * Add an init param to a servlet.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @param name The name of the init param
+      * @param value The value for the init param
+      */
+     public static void addServletInitParam(WebXml webXml, String theServletName, String name,
+         String value)
+     {
+         WebXmlTag tag = (WebXmlTag) webXml.getDescriptorType().getTagByName("init-param");
+         Servlet servletElement = getServlet(webXml, theServletName);
+         if (servletElement == null)
+         {
+             throw new IllegalStateException("Servlet '" + theServletName + "' not defined");
+         }
+         InitParam ip = new InitParam(tag);
+         ip.setParamName(name);
+         ip.setParamValue(value);
+ 
+         Element loadOnStartupElements =
+             servletElement.getChild(WebXmlType.LOAD_ON_STARTUP, servletElement.getNamespace());
+ 
+         if (loadOnStartupElements != null)
+         {
+             servletElement.addContent(loadOnStartupElements.getParentElement().getChildren()
+                 .indexOf(loadOnStartupElements), ip);
+         }
+         else
+         {
+             servletElement.addContent(ip);
+         }
+ 
+     }
+ 
+     /**
+      * Get the names of all the servlet init parameters.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @return A list of the parameter names
+      */
+     public static List<String> getServletInitParamNames(WebXml webXml, String theServletName)
+     {
+         return getInitParamNames(webXml, getServlet(webXml, theServletName));
+     }
+ 
+     /**
+      * Get the names of all the servlet init parameters.
+      * 
+      * @param webXml The webXml file to use
+      * @param theElement The element containing the servlet
+      * @return A list of the parameter names
+      */
+     private static List<String> getInitParamNames(WebXml webXml, Element theElement)
+     {
+         List<String> initParamNames = new ArrayList<String>();
+         if (theElement != null)
+         {
+             List<Element> initParamElements =
+                 theElement.getChildren(WebXmlType.INIT_PARAM, theElement.getNamespace());
+             for (Element initParamElement : initParamElements)
+             {
+                 String paramName =
+                     initParamElement.getChildText(WebXmlType.PARAM_NAME, theElement.getNamespace());
+                 if (paramName != null)
+                 {
+                     initParamNames.add(paramName);
+                 }
+             }
+         }
+         return initParamNames;
+     }
+ 
+     /**
+      * Add a security constraint.
+      * 
+      * @param webXml The webXml file to use
+      * @param theWebResourceName The name of the web resource
+      * @param theUrlPattern The URL Pattern
+      * @param theRoles the Roles to Allow
+      */
+     public static void addSecurityConstraint(WebXml webXml, String theWebResourceName,
+         String theUrlPattern, List<String> theRoles)
+     {
+         if (theWebResourceName == null || theUrlPattern == null || theRoles == null)
+         {
+             throw new NullPointerException();
+         }
+         if (hasSecurityConstraint(webXml, theUrlPattern))
+         {
+             throw new IllegalStateException("Security constraint for URL " + "pattern "
+                 + theUrlPattern + " already defined");
+         }
+ 
+         WebXmlElement securityConstraintElement =
+             (WebXmlElement) webXml.getDescriptorType().getTagByName(
+                 WebXmlType.SECURITY_CONSTRAINT).create();
+ 
+         Element webResourceCollectionElement =
+             webXml.getDescriptorType().getTagByName(WebXmlType.WEB_RESOURCE_COLLECTION).create();
+ 
+         webResourceCollectionElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.WEB_RESOURCE_NAME).create().setText(theWebResourceName));
+ 
+         webResourceCollectionElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.URL_PATTERN).create().setText(theUrlPattern));
+ 
+         securityConstraintElement.addContent(webResourceCollectionElement);
+ 
+         Element authConstraintElement = webXml.getDescriptorType().getTagByName(
+             WebXmlType.AUTH_CONSTRAINT).create();
+ 
+         for (String theRole : theRoles)
+         {
+             authConstraintElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.ROLE_NAME).create().setText(theRole));
+         }
+ 
+         securityConstraintElement.addContent(authConstraintElement);
+         webXml.addTag(securityConstraintElement);
+     }
+ 
+     /**
+      * Add a JSP file.
+      * 
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @param theJspFile The name of the JSP file
+      */
+     public static void addJspFile(WebXml webXml, String theServletName, String theJspFile)
+     {
+         if (theServletName == null)
+         {
+             throw new NullPointerException();
+         }
+         if (hasFilter(webXml, theServletName))
+         {
+             throw new IllegalStateException("Servlet '" + theServletName + "' already defined");
+         }
+         WebXmlElement servletElement = (WebXmlElement) webXml.getDescriptorType().getTagByName(
+             WebXmlType.SERVLET).create();
+ 
+         servletElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.SERVLET_NAME).create().setText(theServletName));
+ 
+         servletElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.JSP_FILE).create().setText(theJspFile));
+ 
+         webXml.addTag(servletElement);
+     }
+ 
+     /**
+      * Does the descriptor have a security constraint for a URL?
+      * 
+      * @param webXml The webXml file to use
+      * @param theUrlPattern The URL pattern to query
+      * @return boolean
+      */
+     public static boolean hasSecurityConstraint(WebXml webXml, String theUrlPattern)
+     {
+         return getSecurityConstraint(webXml, theUrlPattern) != null;
+     }
+ 
+     /**
+      * Does the descriptor have a login config?
+      * 
+      * @param webXml The webXml file to use
+      * @return boolean
+      */
+     public static boolean hasLoginConfig(WebXml webXml)
+     {
+         return getLoginConfig(webXml) != null;
+     }
+ 
+     /**
+      * Get the login config.
+      * 
+      * @param webXml The webXml file to use
+      * @return The element containing the login config
+      */
+     private static Element getLoginConfig(WebXml webXml)
+     {
+         return webXml.getTag(WebXmlType.LOGIN_CONFIG);
+     }
+ 
+     /**
+      * Set the login config.
+      * 
+      * @param webXml The webXml file to use
+      * @param theAuthMethod The authorization method
+      * @param theRealmName The realm name
+      */
+     public static void setLoginConfig(WebXml webXml, String theAuthMethod,
+         String theRealmName)
+     {
+         if (theRealmName == null || theAuthMethod == null)
+         {
+             throw new NullPointerException();
+         }
+         DescriptorElement loginConfigElement =
+             webXml.getDescriptorType().getTagByName(
+                 WebXmlType.LOGIN_CONFIG).create();
+         loginConfigElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.AUTH_METHOD).create().setText(theAuthMethod));
+ 
+         loginConfigElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.REALM_NAME).create().setText(theRealmName));
+ 
+         webXml.getRootElement().removeContent(new ElementFilter(WebXmlType.LOGIN_CONFIG));
+         webXml.addTag(loginConfigElement);
+     }
+ 
+     /**
+      * Get the login config authorization method.
+      * 
+      * @param webXml The webXml file to use
+      * @return the auth method
+      */
+     public static String getLoginConfigAuthMethod(WebXml webXml)
+     {
+         DescriptorElement de = (DescriptorElement) getLoginConfig(webXml);
+         return de.getChildText(WebXmlType.AUTH_METHOD, de.getNamespace());
+     }
+ 
+     /**
+      * Get a security constraint by URL.
+      * 
+      * @param webXml The webXml file to use
+      * @param theUrlPattern The URL Pattern
+      * @return Security Constraint
+      */
+     public static SecurityConstraint getSecurityConstraint(WebXml webXml, String theUrlPattern)
+     {
+         if (theUrlPattern == null)
+         {
+             throw new NullPointerException();
+         }
+         List<Element> securityConstraintElements = webXml.getTags(WebXmlType.SECURITY_CONSTRAINT);
+         SecurityConstraint result = null;
+         for (Element securityConstraintElement : securityConstraintElements)
+         {
+             List<Element> webResourceCollectionElements = securityConstraintElement.getChildren(
+                     WebXmlType.WEB_RESOURCE_COLLECTION, securityConstraintElement.getNamespace());
+             if (!webResourceCollectionElements.isEmpty())
+             {
+                 for (Element webResourceCollectionElement : webResourceCollectionElements)
+                 {
+                     String url =
+                         webResourceCollectionElement.getChildText(WebXmlType.URL_PATTERN,
+                             securityConstraintElement.getNamespace());
+ 
+                     if (theUrlPattern.equals(url))
+                     {
+                         if (result != null)
+                         {
+                             throw new IllegalStateException("Security constraint for URL pattern '"
+                                 + theUrlPattern + "' is defined twice");
+                         }
+ 
+                         result = (SecurityConstraint) securityConstraintElement;
+                     }
+                 }
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * Does the role have a security definition?
+      * 
+      * @param webXml The webXml file to use
+      * @param theRoleName The name of the role
+      * @return boolean
+      */
+     public static boolean hasSecurityRole(WebXml webXml, String theRoleName)
+     {
+         return getSecurityRole(webXml, theRoleName) != null;
+     }
+ 
+     /**
+      * Get the security role names.
+      * 
+      * @param webXml The webXml file to use
+      * @return a list of the role names
+      */
+     public static List<String> getSecurityRoleNames(WebXml webXml)
+     {
+         List<String> securityRoleNames = new ArrayList<String>();
+         List<Element> securityRoleElements = webXml.getElements(WebXmlType.SECURITY_ROLE);
+         for (Element securityRoleElement : securityRoleElements)
+         {
+             Element securityRoleName =
+                 securityRoleElement.getChild(WebXmlType.ROLE_NAME,
+                     securityRoleElement.getNamespace());
+ 
+             if (securityRoleName != null)
+             {
+                 securityRoleNames.add(securityRoleName.getText());
+             }
+         }
+         return securityRoleNames;
+     }
+ 
+     /**
+      * Get the security role by name.
+      * 
+      * @param webXml The webXml file to use
+      * @param theRoleName The name of the role
+      * @return Element containing the security role
+      */
+     public static Element getSecurityRole(WebXml webXml, String theRoleName)
+     {
+         if (theRoleName == null)
+         {
+             throw new NullPointerException();
+         }
+         List<Element> securityRoleElements = webXml.getTags(WebXmlType.SECURITY_ROLE);
+         for (Element element : securityRoleElements)
+         {
+             DescriptorElement securityRoleElement = (DescriptorElement) element;
+             if (theRoleName.equals(securityRoleElement.getChildText(
+                 WebXmlType.ROLE_NAME, securityRoleElement.getNamespace())))
+             {
+                 return securityRoleElement;
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * Add an EJB Reference.
+      * 
+      * @param webXml The webXml file to use
+      * @param ref the EJB Reference element to add
+      */
+     public static void addEjbRef(WebXml webXml, EjbRef ref)
+     {
+         DescriptorElement ejbRefElement = webXml.getDescriptorType().getTagByName(
+             WebXmlType.EJB_LOCAL_REF).create();
+ 
+         ejbRefElement.setAttribute("id", ref.getName().replace('/', '_'));
+         ejbRefElement
+             .addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.EJB_REF_NAME).create().setText(ref.getName()));
+         ejbRefElement
+             .addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.EJB_REF_TYPE).create().setText(ref.getType()));
+         if (ref.isLocal())
+         {
+             ejbRefElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.LOCAL_HOME).create().setText(
+                 ref.getEjbHomeInterface()));
+             ejbRefElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.LOCAL).create().setText(
+                 ref.getEjbInterface()));
+         }
+         else
+         {
+             ejbRefElement.addContent(webXml.getDescriptorType().getTagByName(WebXmlType.HOME)
+                     .create().setText(
+                         ref.getEjbHomeInterface()));
+             ejbRefElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.REMOTE).create().setText(
+                 ref.getEjbInterface()));
+         }
+         if (ref.getEjbName() != null)
+         {
+             ejbRefElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.EJB_LINK).create().setText(
+                 ref.getEjbName()));
+         }
+         else if (ref.getJndiName() != null)
+         {
+             for (Descriptor d : webXml.getVendorDescriptors())
+             {
+                 VendorWebAppDescriptor descr = (VendorWebAppDescriptor) d;
+                 descr.addEjbReference(ref);
+             }
+         }
+         else
+         {
+             throw new IllegalStateException("Either ejbName or jndiName must be set.");
+         }
+ 
+         webXml.addTag(ejbRefElement);
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param theRoleName The role name to use
+      */
+     public static void addSecurityRole(WebXml webXml, String theRoleName)
+     {
+         if (theRoleName == null)
+         {
+             throw new NullPointerException();
+         }
+         if (hasSecurityRole(webXml, theRoleName))
+         {
+             throw new IllegalStateException("Security role '" + theRoleName + "' already defined");
+         }
+         Element securityRoleElement = webXml.getDescriptorType().getTagByName(
+             WebXmlType.SECURITY_ROLE).create();
+ 
+         securityRoleElement.addContent(webXml.getDescriptorType()
+                 .getTagByName(WebXmlType.ROLE_NAME).create()
+             .setText(theRoleName));
+ 
+         webXml.getRootElement().addContent(securityRoleElement);
+     }
+ 
+     /**
+      * @param theWebXml The webXml file to use
+      * @param servletName The name of the servlet to get
+      * @return the servlet
+      */
+     public static Servlet getServlet(WebXml theWebXml, String servletName)
+     {
+         return (Servlet) theWebXml.getTagByIdentifier(WebXmlType.SERVLET, servletName);
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @return filter names
+      */
+     public static List<String> getFilterNames(WebXml webXml)
+     {
+         List<Element> items = webXml.getTags(WebXmlType.FILTER);
+ 
+         List<String> result = new ArrayList<String>(items.size());
+         for (Element item : items)
+         {
+             Filter filter = (Filter) item;
+             result.add(filter.getFilterName());
+         }
+         return result;
+     }
+ 
+     /**
+      * @param theWebXml The webXml file to use
+      * @param filterName The name of the filter
+      * @return Filter
+      */
+     public static Filter getFilter(WebXml theWebXml, String filterName)
+     {
+         return (Filter) theWebXml.getTagByIdentifier(WebXmlType.FILTER, filterName);
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the filter
+      * @param theUrlPattern the URL Pattern to add
+      */
+     public static void addFilterMapping(WebXml webXml, String theFilterName,
+         String theUrlPattern)
+     {
+         if (!hasFilter(webXml, theFilterName))
+         {
+             throw new IllegalStateException("Filter '" + theFilterName + "' not defined");
+         }
+         List<FilterMapping> filterMappings =
+             WebXmlUtils.getFilterMappingElements(webXml, theFilterName);
+         DescriptorElement filterMappingElement;
+         if (filterMappings.size() > 0)
+         {
+             filterMappingElement = filterMappings.get(0);
+         }
+         else
+         {
+             filterMappingElement =
+                 webXml.getDescriptorType().getTagByName(WebXmlType.FILTER_MAPPING).create();
+             filterMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.FILTER_NAME).create().setText(theFilterName));
+             webXml.addElement(
+                 filterMappingElement.getTag(), filterMappingElement, webXml.getRootElement());
+         }
+ 
+         filterMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.URL_PATTERN).create().setText(theUrlPattern));
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param theFilterName The name of the filter
+      * @param theDispatcher the dispatcher to add
+      */
+     public static void addFilterDispatcher(WebXml webXml, String theFilterName,
+         String theDispatcher)
+     {
+         if (!hasFilter(webXml, theFilterName))
+         {
+             throw new IllegalStateException("Filter '" + theFilterName + "' not defined");
+         }
+         List<FilterMapping> filterMappings =
+             WebXmlUtils.getFilterMappingElements(webXml, theFilterName);
+         DescriptorElement filterMappingElement;
+         if (filterMappings.size() > 0)
+         {
+             filterMappingElement = filterMappings.get(0);
+         }
+         else
+         {
+             filterMappingElement =
+                 webXml.getDescriptorType().getTagByName(WebXmlType.DISPATCHER).create();
+             filterMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.FILTER_NAME).create().setText(theFilterName));
+             webXml.addElement(
+                 filterMappingElement.getTag(), filterMappingElement, webXml.getRootElement());
+         }
+ 
+         filterMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.DISPATCHER).create().setText(theDispatcher));
+     }
+ 
+     /**
+      * @param theWebXml The webXml file to use
+      * @param servletName The servlet name
+      * @param paramName The parameter Name
+      * @return The value of the init param
+      */
+     public static String getServletInitParam(WebXml theWebXml, String servletName,
+         String paramName)
+     {
+         return getInitParam(theWebXml, getServlet(theWebXml, servletName), paramName);
+     }
+ 
+     /**
+      * @param theWebXml The webXml file to use
+      * @param theElement The element to get the parameter from
+      * @param theParamName The name of the parameter
+      * @return The value of the init param
+      */
+     private static String getInitParam(WebXml theWebXml, Element theElement,
+         String theParamName)
+     {
+         if (theElement != null)
+         {
+             List<Element> initParamElements =
+                 theElement.getChildren(WebXmlType.INIT_PARAM, theElement.getNamespace());
+             for (Element initParamElement : initParamElements)
+             {
+                 String paramName =
+                     initParamElement.getChildText(WebXmlType.PARAM_NAME, theElement.getNamespace());
+                 if (theParamName.equals(paramName))
+                 {
+                     return initParamElement.getChildText(WebXmlType.PARAM_VALUE, theElement
+                             .getNamespace());
+                 }
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @param theRoleName The role name to add
+      */
+     public static void addServletRunAsRoleName(WebXml webXml, String theServletName,
+         String theRoleName)
+     {
+         Element servlet = getServlet(webXml, theServletName);
+         Element runAsElement = webXml.getDescriptorType().getTagByName(WebXmlType.RUN_AS).create();
+ 
+         runAsElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.ROLE_NAME).create().setText(theRoleName));
+ 
+         servlet.addContent(runAsElement);
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param theServletName The name of the servlet
+      * @param theUrlPattern the URL Pattern to add
+      */
+     public static void addServletMapping(WebXml webXml, String theServletName,
+         String theUrlPattern)
+     {
+         if (!hasServlet(webXml, theServletName))
+         {
+             throw new IllegalStateException("Servlet '" + theServletName + "' not defined");
+         }
+         List<ServletMapping> servletMappings =
+             WebXmlUtils.getServletMappingElements(webXml, theServletName);
+         DescriptorElement servletMappingElement;
+         if (servletMappings.size() > 0)
+         {
+             servletMappingElement = servletMappings.get(0);
+         }
+         else
+         {
+             servletMappingElement =
+                 webXml.getDescriptorType().getTagByName(WebXmlType.SERVLET_MAPPING).create();
+             servletMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+                 WebXmlType.SERVLET_NAME).create().setText(theServletName));
+             webXml.addElement(
+                 servletMappingElement.getTag(), servletMappingElement, webXml.getRootElement());
+         }
+ 
+         servletMappingElement.addContent(webXml.getDescriptorType().getTagByName(
+             WebXmlType.URL_PATTERN).create().setText(theUrlPattern));
+     }
+ 
+     /**
+      * @param theWebXml The webXml file to use
+      * @param filterName The name of the filter
+      * @param paramName The name of the parameter
+      * @return the init parameter value
+      */
+     public static String getFilterInitParam(WebXml theWebXml,
+         String filterName, String paramName)
+     {
+         Filter filter =
+             (Filter) theWebXml.getTagByIdentifier(
+                 WebXmlType.FILTER, filterName);
+         if (filter == null)
+         {
+             throw new IllegalStateException("Filter '" + filterName + "' not defined");
+         }
+ 
+         InitParam initParam = filter.getInitParam(paramName);
+         if (initParam == null)
+         {
+             throw new IllegalStateException("Filter '" + filterName
+                     + "' Initialization parameter '" + paramName + "' not defined");
+         }
+ 
+         return initParam.getParamValue();
+     }
+ 
+     /**
+      * @param webXml The webXml file to use
+      * @param filter The filter to add
+      */
+     public static void addFilter(WebXml webXml, Filter filter)
+     {
+         webXml.addTag(filter);
+     }
+ 
+     /**
+      * Add a filter to the descriptor.
+      * 
+      * @param webXml The webXml file to use
+      * @param filterName The servlet name
+      * @param filterClass The servlet class name
+      */
+     public static void addFilter(WebXml webXml, String filterName, String filterClass)
+     {
+         WebXmlTag tag = (WebXmlTag) webXml.getDescriptorType().getTagByName("filter");
+         Filter filter = new Filter(tag, filterName, filterClass);
+         webXml.addTag(filter);
+     }
+ 
+     /**
+      * Adds a new context-param element to the descriptor.
+      * 
+      * @param webXml The webXml containing the descriptor
+      * @param name The context name
+      * @param value The context value
+      */
+     public static void addContextParam(WebXml webXml, String name, String value)
+     {
+         WebXmlTag tag = (WebXmlTag) webXml.getDescriptorType().getTagByName("context-param");
+         ContextParam contextParam = new ContextParam(tag, name, value);
+         webXml.addTag(contextParam);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-20/sources/source-f.html b/htmlReport/ns-20/sources/source-f.html new file mode 100644 index 0000000000..3df9e89d40 --- /dev/null +++ b/htmlReport/ns-20/sources/source-f.html @@ -0,0 +1,346 @@ + + + + + + + + Coverage Report > WebXmlVersion + + + + + + +
+ + +

Coverage Summary for Class: WebXmlVersion (org.codehaus.cargo.module.webapp)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlVersion + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/38) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp;
+ 
+ import org.jdom2.DocType;
+ import org.jdom2.Element;
+ import org.jdom2.Namespace;
+ 
+ /**
+  * Enumerated type that represents the version of the web deployment descriptor.
+  */
+ public final class WebXmlVersion implements Comparable<WebXmlVersion>
+ {
+     /**
+      * Instance for version 2.2.
+      */
+     public static final WebXmlVersion V2_2 = new WebXmlVersion("2.2",
+         "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
+         "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd");
+ 
+     /**
+      * Instance for version 2.3.
+      */
+     public static final WebXmlVersion V2_3 = new WebXmlVersion("2.3",
+         "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",
+         "http://java.sun.com/dtd/web-app_2_3.dtd");
+ 
+     /**
+      * Instance for version 2.4.
+      */
+     public static final WebXmlVersion V2_4 = new WebXmlVersion("2.4",
+         "http://java.sun.com/xml/ns/j2ee");
+ 
+     /**
+      * Instance for version 2.5.
+      */
+     public static final WebXmlVersion V2_5 = new WebXmlVersion("2.5",
+         "http://java.sun.com/xml/ns/javaee");
+ 
+     /**
+      * Instance for version 3.0.
+      */
+     public static final WebXmlVersion V3_0 = new WebXmlVersion("3.0",
+         "http://java.sun.com/xml/ns/javaee");
+ 
+     /**
+      * The system ID of the corresponding document type.
+      */
+     private String systemId;
+ 
+     /**
+      * The version as string.
+      */
+     private String version;
+ 
+     /**
+      * The public ID of the corresponding document type.
+      */
+     private String publicId;
+ 
+     /**
+      * The namespace for tags.
+      */
+     private Namespace namespace;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param theVersion The version as string
+      * @param thePublicId The public ID of the corresponding document type
+      * @param theSystemId The system ID of the corresponding document type
+      */
+     private WebXmlVersion(String theVersion, String thePublicId, String theSystemId)
+     {
+         this.version = theVersion;
+         this.publicId = thePublicId;
+         this.systemId = theSystemId;
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param theVersion The version as string
+      * @param namespaceUri The uri of the namespace
+      */
+     private WebXmlVersion(String theVersion, String namespaceUri)
+     {
+         this.version = theVersion;
+         this.namespace = Namespace.getNamespace(namespaceUri);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int compareTo(WebXmlVersion other)
+     {
+         double thisVersion = this.version == null ? 0 : Double.parseDouble(this.version);
+         double thatVersion =
+             (other == null || other.version == null) ? 0 : Double.parseDouble(other.version);
+         return Double.compare(thisVersion, thatVersion);
+     }
+ 
+     /**
+      * Returns the tag name.
+      * 
+      * @return The tag name
+      */
+     public String getVersion()
+     {
+         return this.version;
+     }
+ 
+     /**
+      * Returns the public ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The public ID
+      */
+     public String getPublicId()
+     {
+         return this.publicId;
+     }
+ 
+     /**
+      * Returns the system ID of the document type corresponding to the descriptor version.
+      * 
+      * @return The system ID
+      */
+     public String getSystemId()
+     {
+         return this.systemId;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getVersion();
+     }
+ 
+     /**
+      * Returns the version corresponding to the given document type.
+      * 
+      * @param theDocType The document type
+      * 
+      * @return The version that matches the document type, or <code>null</code> if the doctype is
+      * not recognized
+      * 
+      * @throws NullPointerException If the document type is <code>null</code>
+      */
+     public static WebXmlVersion valueOf(DocType theDocType) throws NullPointerException
+     {
+         return valueOf(theDocType.getPublicID());
+     }
+ 
+     /**
+      * Returns the version corresponding to the given element.
+      * @param rootElement The element
+      * @return The version that matches the element
+      */
+     public static WebXmlVersion valueOf(Element rootElement)
+     {
+         WebXmlVersion result = null;
+         String value = rootElement.getAttributeValue("version");
+         if (null != value)
+         {
+             switch (value)
+             {
+                 case "2.4":
+                     result = WebXmlVersion.V2_4;
+                     break;
+ 
+                 case "2.5":
+                     result = WebXmlVersion.V2_5;
+                     break;
+ 
+                 case "3.0":
+                     result = WebXmlVersion.V3_0;
+                     break;
+ 
+                 default:
+                     // result remains null
+                     break;
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * Returns the version corresponding to the given public ID.
+      * 
+      * @param thePublicId The public ID
+      * 
+      * @return The version that matches the public ID, or <code>null</code> if the ID is not
+      * recognized
+      */
+     public static WebXmlVersion valueOf(String thePublicId)
+     {
+         WebXmlVersion version = null;
+         if (V2_2.getPublicId().equals(thePublicId))
+         {
+             version = WebXmlVersion.V2_2;
+         }
+         else if (V2_3.getPublicId().equals(thePublicId))
+         {
+             version = WebXmlVersion.V2_3;
+         }
+         return version;
+     }
+ 
+     /**
+      * Return the namespace of this web xml file, or null if none.
+      * @return namespace
+      */
+     public Namespace getNamespace()
+     {
+         return this.namespace;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/index.html b/htmlReport/ns-21/index.html new file mode 100644 index 0000000000..7bc7b2e8fe --- /dev/null +++ b/htmlReport/ns-21/index.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_BLOCK.html b/htmlReport/ns-21/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..dc4cf9be13 --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_BLOCK.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-21/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..738518224c --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_CLASS.html b/htmlReport/ns-21/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..972611d6cb --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_CLASS.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-21/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..84db1b2565 --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_LINE.html b/htmlReport/ns-21/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..2ac378104f --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_LINE.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-21/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..2f0a108f1a --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_METHOD.html b/htmlReport/ns-21/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..137332c1e3 --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_METHOD.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-21/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..f298303ecc --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-21/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..1bf465e75e --- /dev/null +++ b/htmlReport/ns-21/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.elements + + 0% + + + (0/11) + + + + 0% + + + (0/50) + + + + 0% + + + (0/109) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-1.html b/htmlReport/ns-21/sources/source-1.html new file mode 100644 index 0000000000..143d44ec92 --- /dev/null +++ b/htmlReport/ns-21/sources/source-1.html @@ -0,0 +1,152 @@ + + + + + + + + Coverage Report > AuthConstraint + + + + + + +
+ + +

Coverage Summary for Class: AuthConstraint (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AuthConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ 
+ /**
+  */
+ public class AuthConstraint extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag The web xml tag type
+      */
+     public AuthConstraint(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param element that is the system property
+      */
+     // public AuthConstraint()
+     // {
+     // this(WebXmlType.INSTANCE.AUTH_CONSTRAINT);
+     // }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-2.html b/htmlReport/ns-21/sources/source-2.html new file mode 100644 index 0000000000..a87fe5d930 --- /dev/null +++ b/htmlReport/ns-21/sources/source-2.html @@ -0,0 +1,191 @@ + + + + + + + + Coverage Report > ContextParam + + + + + + +
+ + +

Coverage Summary for Class: ContextParam (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ContextParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ 
+ /**
+  * Context Parameter class for accessing context parameters in a <code>web.xml</code> file.
+  */
+ public class ContextParam extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag web xml tag
+      */
+     public ContextParam(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag web xml tag
+      * @param name Name of the parameter
+      * @param value Value for the parameter
+      */
+     public ContextParam(WebXmlTag tag, String name, String value)
+     {
+         this(tag);
+         setParamName(name);
+         setParamValue(value);
+     }
+ 
+     /**
+      * @return String of the parameter name
+      */
+     public String getParamName()
+     {
+         return getChild("param-name", getTag().getTagNamespace()).getText();
+     }
+ 
+     /**
+      * @return String of the parameter value
+      */
+     public String getParamValue()
+     {
+         return getChild("param-value", getTag().getTagNamespace()).getText();
+     }
+ 
+     /**
+      * Set the parameter name.
+      * @param paramName Name of the parameter
+      */
+     public void setParamName(String paramName)
+     {
+         child("param-name").setText(paramName);
+     }
+ 
+     /**
+      * Set the parameter value.
+      * @param paramValue Value for the parameter
+      */
+     public void setParamValue(String paramValue)
+     {
+         child("param-value").setText(paramValue);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-3.html b/htmlReport/ns-21/sources/source-3.html new file mode 100644 index 0000000000..1378ad1e6a --- /dev/null +++ b/htmlReport/ns-21/sources/source-3.html @@ -0,0 +1,227 @@ + + + + + + + + Coverage Report > Filter + + + + + + +
+ + +

Coverage Summary for Class: Filter (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Filter + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class Filter extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * @param tag XML tag definition
+      */
+     public Filter(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * @param tag XML tag definition
+      * @param filterName name of the filter
+      * @param filterClass filter class
+      */
+     public Filter(WebXmlTag tag, String filterName, String filterClass)
+     {
+         super(tag);
+         setFilterName(filterName);
+         setFilterClass(filterClass);
+     }
+ 
+     /**
+      * Get the filter class.
+      * @return filter class
+      */
+     public String getFilterClass()
+     {
+         Element e = child(WebXmlType.FILTER_CLASS);
+         return e.getText();
+     }
+ 
+     /**
+      * Set the filter class.
+      * @param filterClass The classname to use
+      */
+     public void setFilterClass(String filterClass)
+     {
+         Element e = child(WebXmlType.FILTER_CLASS);
+         e.setText(filterClass);
+     }
+ 
+     /**
+      * Get the filter name.
+      * @return The filter name
+      */
+     public String getFilterName()
+     {
+         Element e = child(WebXmlType.FILTER_NAME);
+         return e.getText();
+     }
+ 
+     /**
+      * @param filterName Name of the filter to use
+      */
+     public void setFilterName(String filterName)
+     {
+         Element e = child(WebXmlType.FILTER_NAME);
+         e.setText(filterName);
+     }
+ 
+     /**
+      * @return List of init params
+      */
+     public List<InitParam> getInitParams()
+     {
+         List<Element> children = getChildren("init-param", getTag().getTagNamespace());
+         List<InitParam> result = new ArrayList<InitParam>(children.size());
+         for (Element child : children)
+         {
+             result.add((InitParam) child);
+         }
+         return result;
+     }
+ 
+     /**
+      * @param name Name of the Init param
+      * @return InitParam
+      */
+     public InitParam getInitParam(String name)
+     {
+         for (InitParam initParam : getInitParams())
+         {
+             if (initParam.getParamName().equals(name))
+             {
+                 return initParam;
+             }
+         }
+         return null;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-4.html b/htmlReport/ns-21/sources/source-4.html new file mode 100644 index 0000000000..57cabdabeb --- /dev/null +++ b/htmlReport/ns-21/sources/source-4.html @@ -0,0 +1,221 @@ + + + + + + + + Coverage Report > FilterMapping + + + + + + +
+ + +

Coverage Summary for Class: FilterMapping (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
FilterMapping + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class FilterMapping extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * @param tag Web Xml Tag definition
+      */
+     public FilterMapping(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Get the URL Patterns.
+      * @return URL Patterns
+      */
+     public List<String> getUrlPatterns()
+     {
+         List<Element> e = getChildren(WebXmlType.URL_PATTERN, this.getNamespace());
+         List<String> result = new ArrayList<String>(e.size());
+         for (Element ee : e)
+         {
+             result.add(ee.getText());
+         }
+         return result;
+     }
+ 
+     /**
+      * Add a URL Pattern.
+      * @param urlPattern The URL Pattern
+      */
+     public void addUrlPattern(String urlPattern)
+     {
+         if (!getUrlPatterns().contains(urlPattern))
+         {
+             Element e = child(WebXmlType.URL_PATTERN);
+             e.setText(urlPattern);
+         }
+     }
+ 
+     /**
+      * Get the dispatchers.
+      * @return Dispatchers
+      */
+     public List<String> getDispatchers()
+     {
+         List<Element> e = getChildren(WebXmlType.DISPATCHER, this.getNamespace());
+         List<String> result = new ArrayList<String>(e.size());
+         for (Element ee : e)
+         {
+             result.add(ee.getText());
+         }
+         return result;
+     }
+ 
+     /**
+      * Add a dispatcher.
+      * @param dispatcher The dispatcher
+      */
+     public void addDispatcher(String dispatcher)
+     {
+         if (!getDispatchers().contains(dispatcher))
+         {
+             Element e = child(WebXmlType.DISPATCHER);
+             e.setText(dispatcher);
+         }
+     }
+ 
+     /**
+      * Get the filter name.
+      * @return The filter name
+      */
+     public String getFilterName()
+     {
+         Element e = getChild(WebXmlType.FILTER_NAME, this.getNamespace());
+         return e.getText();
+     }
+ 
+     /**
+      * Set the filter name.
+      * @param filterName The filter name
+      */
+     public void setFilterName(String filterName)
+     {
+         Element e = child(WebXmlType.FILTER_NAME);
+         e.setText(filterName);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-5.html b/htmlReport/ns-21/sources/source-5.html new file mode 100644 index 0000000000..fdb84c3e6c --- /dev/null +++ b/htmlReport/ns-21/sources/source-5.html @@ -0,0 +1,192 @@ + + + + + + + + Coverage Report > InitParam + + + + + + +
+ + +

Coverage Summary for Class: InitParam (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
InitParam + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ 
+ /**
+  * Context Parameter class for accessing context parameters in a <code>web.xml</code> file.
+  */
+ public class InitParam extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag Web XML Tag definition
+      */
+     public InitParam(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag param tag
+      * @param name param name
+      * @param value param value
+      */
+     public InitParam(WebXmlTag tag, String name, String value)
+     {
+         this(tag);
+         setParamName(name);
+         setParamValue(value);
+     }
+ 
+     /**
+      * @return param name
+      */
+     public String getParamName()
+     {
+         return getChild("param-name", getTag().getTagNamespace()).getText();
+     }
+ 
+     /**
+      * 
+      * @return param value
+      */
+     public String getParamValue()
+     {
+         return getChild("param-value", getTag().getTagNamespace()).getText();
+     }
+ 
+     /**
+      * 
+      * @param paramName param name
+      */
+     public void setParamName(String paramName)
+     {
+         child("param-name").setText(paramName);
+     }
+ 
+     /**
+      * 
+      * @param paramValue param value
+      */
+     public void setParamValue(String paramValue)
+     {
+         child("param-value").setText(paramValue);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-6.html b/htmlReport/ns-21/sources/source-6.html new file mode 100644 index 0000000000..fd654c8d1e --- /dev/null +++ b/htmlReport/ns-21/sources/source-6.html @@ -0,0 +1,150 @@ + + + + + + + + Coverage Report > Listener + + + + + + +
+ + +

Coverage Summary for Class: Listener (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Listener + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ 
+ /**
+  * Context Parameter class for accessing context parameters in a <code>web.xml</code> file.
+  */
+ public class Listener extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag web xml tag definition
+      */
+     public Listener(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * @return The listener class.
+      */
+     public String getListenerClass()
+     {
+         return this.getChildText("listener-class", getTag().getTagNamespace());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-7.html b/htmlReport/ns-21/sources/source-7.html new file mode 100644 index 0000000000..3bf53453a1 --- /dev/null +++ b/htmlReport/ns-21/sources/source-7.html @@ -0,0 +1,182 @@ + + + + + + + + Coverage Report > MimeMapping + + + + + + +
+ + +

Coverage Summary for Class: MimeMapping (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MimeMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/9) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class MimeMapping extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * @param tag Web Xml Tag definition
+      */
+     public MimeMapping(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Get the Extension.
+      * @return Extension
+      */
+     public String getExtension()
+     {
+         Element e = child(WebXmlType.EXTENSION);
+         return e.getText();
+     }
+ 
+     /**
+      * Set the Extension.
+      * @param extension The Extension
+      */
+     public void setExtension(String extension)
+     {
+         Element e = child(WebXmlType.EXTENSION);
+         e.setText(extension);
+     }
+ 
+     /**
+      * Get the mime type.
+      * @return The mime type
+      */
+     public String getMimeType()
+     {
+         Element e = child(WebXmlType.MIME_TYPE);
+         return e.getText();
+     }
+ 
+     /**
+      * Set the mime type.
+      * @param mimeType The mime type
+      */
+     public void setMimeType(String mimeType)
+     {
+         Element e = child(WebXmlType.MIME_TYPE);
+         e.setText(mimeType);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-8.html b/htmlReport/ns-21/sources/source-8.html new file mode 100644 index 0000000000..4247451598 --- /dev/null +++ b/htmlReport/ns-21/sources/source-8.html @@ -0,0 +1,141 @@ + + + + + + + + Coverage Report > SecurityConstraint + + + + + + +
+ + +

Coverage Summary for Class: SecurityConstraint (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
SecurityConstraint + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ 
+ /**
+  */
+ public class SecurityConstraint extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag Web XML tag definition
+      */
+     public SecurityConstraint(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-9.html b/htmlReport/ns-21/sources/source-9.html new file mode 100644 index 0000000000..93c09fcd5b --- /dev/null +++ b/htmlReport/ns-21/sources/source-9.html @@ -0,0 +1,193 @@ + + + + + + + + Coverage Report > Servlet + + + + + + +
+ + +

Coverage Summary for Class: Servlet (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Servlet + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/12) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class Servlet extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag tag type
+      */
+     public Servlet(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag webxml tag
+      * @param servletName name of the servlet
+      * @param servletClass class of the servlet
+      */
+     public Servlet(WebXmlTag tag, String servletName, String servletClass)
+     {
+         super(tag);
+         setServletName(servletName);
+         setServletClass(servletClass);
+     }
+ 
+     /**
+      * @return the servletClass
+      */
+     public String getServletClass()
+     {
+         Element e = child(WebXmlType.SERVLET_CLASS);
+         return e.getText();
+     }
+ 
+     /**
+      * @param servletClass the servletClass to set
+      */
+     public void setServletClass(String servletClass)
+     {
+         Element e = child(WebXmlType.SERVLET_CLASS);
+         e.setText(servletClass);
+     }
+ 
+     /**
+      * @return the servletName
+      */
+     public String getServletName()
+     {
+         Element e = child(WebXmlType.SERVLET_NAME);
+         return e.getText();
+     }
+ 
+     /**
+      * @param servletName the servletName to set
+      */
+     public void setServletName(String servletName)
+     {
+         Element e = child(WebXmlType.SERVLET_NAME);
+         e.setText(servletName);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-a.html b/htmlReport/ns-21/sources/source-a.html new file mode 100644 index 0000000000..8d7ef1ac3d --- /dev/null +++ b/htmlReport/ns-21/sources/source-a.html @@ -0,0 +1,193 @@ + + + + + + + + Coverage Report > ServletMapping + + + + + + +
+ + +

Coverage Summary for Class: ServletMapping (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ServletMapping + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class ServletMapping extends WebXmlElement
+ {
+     /**
+      * Constructor.
+      * @param tag Web Xml Tag definition
+      */
+     public ServletMapping(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Get the URL Patterns.
+      * @return URL Patterns
+      */
+     public List<String> getUrlPatterns()
+     {
+         List<Element> e = getChildren(WebXmlType.URL_PATTERN, this.getNamespace());
+         List<String> result = new ArrayList<String>(e.size());
+         for (Element ee : e)
+         {
+             result.add(ee.getText());
+         }
+         return result;
+     }
+ 
+     /**
+      * Add a URL Pattern.
+      * @param urlPattern The URL Pattern
+      */
+     public void addUrlPattern(String urlPattern)
+     {
+         if (!getUrlPatterns().contains(urlPattern))
+         {
+             Element e = child(WebXmlType.URL_PATTERN);
+             e.setText(urlPattern);
+         }
+     }
+ 
+     /**
+      * Get the servlet name.
+      * @return The servlet name
+      */
+     public String getServletName()
+     {
+         Element e = getChild(WebXmlType.SERVLET_NAME, this.getNamespace());
+         return e == null ? null : e.getText();
+     }
+ 
+     /**
+      * Set the servlet name.
+      * @param servletName The servlet name
+      */
+     public void setServletName(String servletName)
+     {
+         Element e = child(WebXmlType.SERVLET_NAME);
+         e.setText(servletName);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-21/sources/source-b.html b/htmlReport/ns-21/sources/source-b.html new file mode 100644 index 0000000000..5d24e019df --- /dev/null +++ b/htmlReport/ns-21/sources/source-b.html @@ -0,0 +1,171 @@ + + + + + + + + Coverage Report > WebXmlElement + + + + + + +
+ + +

Coverage Summary for Class: WebXmlElement (org.codehaus.cargo.module.webapp.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlElement + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.elements;
+ 
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.webapp.WebXmlTag;
+ import org.jdom2.Element;
+ 
+ /**
+  */
+ public class WebXmlElement extends DescriptorElement
+ {
+ 
+     /**
+      * Constructor.
+      * @param tag Web Xml Tag Definition
+      */
+     public WebXmlElement(WebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      * @param tag Web Xml Tag Definition
+      * @param element XML Element
+      */
+     public WebXmlElement(WebXmlTag tag, Element element)
+     {
+         super(tag, element);
+ 
+         this.addContent(element.detach());
+     }
+ 
+     /**
+      * @param string Child name
+      * @return child element
+      */
+     protected Element child(String string)
+     {
+         Element child = this.getChild(string, this.getNamespace());
+         if (child == null)
+         {
+             child = new Element(string, this.getNamespace());
+             this.getChildren().add(child);
+         }
+         return child;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-22/index.html b/htmlReport/ns-22/index.html new file mode 100644 index 0000000000..02bb6fcdeb --- /dev/null +++ b/htmlReport/ns-22/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_BLOCK.html b/htmlReport/ns-22/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..1526a8933d --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-22/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..987426c7c2 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_CLASS.html b/htmlReport/ns-22/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..c2900eecb1 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-22/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..eac320ba05 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_LINE.html b/htmlReport/ns-22/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..03320ff0cf --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-22/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..bf32f97c13 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_METHOD.html b/htmlReport/ns-22/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..a15931fe22 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-22/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..3372f098c3 --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-22/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..8756cad95e --- /dev/null +++ b/htmlReport/ns-22/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.jboss + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.jboss

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.jboss + + 0% + + + (0/5) + + + + 0% + + + (0/15) + + + + 0% + + + (0/48) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-22/sources/source-1.html b/htmlReport/ns-22/sources/source-1.html new file mode 100644 index 0000000000..04156f3529 --- /dev/null +++ b/htmlReport/ns-22/sources/source-1.html @@ -0,0 +1,218 @@ + + + + + + + + Coverage Report > JBossWarArchive + + + + + + +
+ + +

Coverage Summary for Class: JBossWarArchive (org.codehaus.cargo.module.webapp.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.jboss;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.codehaus.cargo.module.JarArchiveIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to a WAR.
+  */
+ public class JBossWarArchive
+ {
+     /**
+      * The file representing either the WAR file or the expanded WAR directory.
+      */
+     private File warFile;
+ 
+     /**
+      * The parsed deployment descriptor.
+      */
+     private JBossWebXml jbossWebXml;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param warFile The web application archive
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     public JBossWarArchive(File warFile)
+         throws IOException, JDOMException
+     {
+         this.warFile = warFile;
+         this.jbossWebXml = parseJBossWebXml();
+     }
+ 
+     /**
+      * @return the parsed <code>WEB-INF/jboss-web.xml</code> descriptor or null if none exists
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private JBossWebXml parseJBossWebXml()
+         throws IOException, JDOMException
+     {
+         JBossWebXml webXml = null;
+ 
+         InputStream in = null;
+         try
+         {
+             // Are we manipulating a WAR file or an expanded WAR directory?
+             if (this.warFile.isDirectory())
+             {
+                 File contextXmlFile = new File(this.warFile, "WEB-INF/jboss-web.xml");
+                 if (contextXmlFile.exists())
+                 {
+                     in = new FileInputStream(contextXmlFile);
+                 }
+             }
+             else
+             {
+                 JarArchive jarArchive = JarArchiveIo.open(this.warFile);
+                 in = jarArchive.getResource("WEB-INF/jboss-web.xml");
+             }
+ 
+             if (in != null)
+             {
+                 webXml = JBossWebXmlIo.parseJBossWebXml(in);
+             }
+         }
+         finally
+         {
+             if (in != null)
+             {
+                 in.close();
+             }
+         }
+ 
+         return webXml;
+     }
+ 
+     /**
+      * Returns the <code>jboss-web.xml</code> deployment descriptor of the web application.
+      * 
+      * @return The parsed deployment descriptor
+      */
+     public JBossWebXml getJBossWebXml()
+     {
+         return this.jbossWebXml;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-22/sources/source-2.html b/htmlReport/ns-22/sources/source-2.html new file mode 100644 index 0000000000..1940cf499b --- /dev/null +++ b/htmlReport/ns-22/sources/source-2.html @@ -0,0 +1,217 @@ + + + + + + + + Coverage Report > JBossWebXml + + + + + + +
+ + +

Coverage Summary for Class: JBossWebXml (org.codehaus.cargo.module.webapp.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.jboss;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.webapp.EjbRef;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a web deployment descriptor <code>jboss-web.xml</code> to
+  * provide convenience methods for easy access and manipulation.
+  */
+ public class JBossWebXml extends AbstractDescriptor implements VendorWebAppDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "jboss-web.xml";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root document element
+      * @param type The document type
+      */
+     public JBossWebXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * @return the context root element found in the <code>jboss-web.xml</code> file or null if not
+      * defined
+      */
+     public String getContextRoot()
+     {
+         String context = getNestedText(
+             getRootElement(), getDescriptorType().getTagByName(JBossWebXmlTag.CONTEXT_ROOT));
+ 
+         // Remove leading slash if there is one.
+         if (context != null && context.startsWith("/"))
+         {
+             context = context.substring(1);
+         }
+ 
+         return context;
+     }
+ 
+     /**
+      * @return the virtual host element found in the <code>jboss-web.xml</code> file or null if not
+      * defined
+      */
+     public String getVirtualHost()
+     {
+         return getNestedText(
+             getRootElement(), getDescriptorType().getTagByName(JBossWebXmlTag.VIRTUAL_HOST));
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addEjbReference(EjbRef ref)
+     {
+         JBossWebXmlTag ejbRefTag = (JBossWebXmlTag) getDescriptorType().getTagByName(
+                 JBossWebXmlTag.EJB_REF);
+         JBossWebXmlTag jndiTag = (JBossWebXmlTag) getDescriptorType().getTagByName(
+                 JBossWebXmlTag.JNDI_NAME);
+         if (ref.isLocal())
+         {
+             ejbRefTag = (JBossWebXmlTag) getDescriptorType().getTagByName(
+                     JBossWebXmlTag.EJB_LOCAL_REF);
+             jndiTag = (JBossWebXmlTag) getDescriptorType().getTagByName(
+                     JBossWebXmlTag.LOCAL_JNDI_NAME);
+         }
+ 
+         Element ejbRefElement = ejbRefTag.create();
+ 
+         ejbRefElement.addContent(createNestedText(getDescriptorType().getTagByName(
+                 JBossWebXmlTag.EJB_REF_NAME), ref.getName()));
+         ejbRefElement.addContent(createNestedText(jndiTag, ref.getJndiName()));
+ 
+         getRootElement().addContent(ejbRefElement);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-22/sources/source-3.html b/htmlReport/ns-22/sources/source-3.html new file mode 100644 index 0000000000..0e43838050 --- /dev/null +++ b/htmlReport/ns-22/sources/source-3.html @@ -0,0 +1,163 @@ + + + + + + + + Coverage Report > JBossWebXmlIo + + + + + + +
+ + +

Coverage Summary for Class: JBossWebXmlIo (org.codehaus.cargo.module.webapp.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.jboss;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading JBoss web context descriptor.
+  */
+ public class JBossWebXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Constructor.
+      * 
+      * @param factory Descriptor Type
+      */
+     protected JBossWebXmlIo(DescriptorType factory)
+     {
+         super(factory);
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param theInput The input stream
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the XML parser was not correctly configured
+      */
+     public static JBossWebXml parseJBossWebXml(InputStream theInput)
+         throws IOException, JDOMException
+     {
+         return (JBossWebXml) JBossWebXmlType.getInstance().
+               getDescriptorIo().parseXml(theInput);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-22/sources/source-4.html b/htmlReport/ns-22/sources/source-4.html new file mode 100644 index 0000000000..7f7ff09b39 --- /dev/null +++ b/htmlReport/ns-22/sources/source-4.html @@ -0,0 +1,192 @@ + + + + + + + + Coverage Report > JBossWebXmlTag + + + + + + +
+ + +

Coverage Summary for Class: JBossWebXmlTag (org.codehaus.cargo.module.webapp.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.jboss;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various top-level tags in a JBoss web deployment descriptor as a typesafe
+  * enumeration.
+  */
+ public final class JBossWebXmlTag extends DescriptorTag
+ {
+     /**
+      * Element name 'context-root'.
+      */
+     public static final String CONTEXT_ROOT = "context-root";
+ 
+     /**
+      * Element name 'virtual-host'.
+      */
+     public static final String VIRTUAL_HOST = "virtual-host";
+ 
+     /**
+      * Element name 'ejb-ref'.
+      */
+     public static final String EJB_REF = "ejb-ref";
+ 
+     /**
+      * Element name 'ejb-local-ref'.
+      */
+     public static final String EJB_LOCAL_REF = "ejb-local-ref";
+ 
+     /**
+      * Element name 'ejb-ref-name'.
+      */
+     public static final String EJB_REF_NAME = "ejb-ref-name";
+ 
+     /**
+      * Element name 'jndi-name'.
+      */
+     public static final String JNDI_NAME = "jndi-name";
+ 
+     /**
+      * Element name 'local-jndi-name'.
+      */
+     public static final String LOCAL_JNDI_NAME = "local-jndi-name";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected JBossWebXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, null, isMultipleAllowed, null, null);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected JBossWebXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-22/sources/source-5.html b/htmlReport/ns-22/sources/source-5.html new file mode 100644 index 0000000000..992921a212 --- /dev/null +++ b/htmlReport/ns-22/sources/source-5.html @@ -0,0 +1,171 @@ + + + + + + + + Coverage Report > JBossWebXmlType + + + + + + +
+ + +

Coverage Summary for Class: JBossWebXmlType (org.codehaus.cargo.module.webapp.jboss)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JBossWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.jboss;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class JBossWebXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static JBossWebXmlType instance = new JBossWebXmlType();
+ 
+     /**
+      * All the tags in this type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private JBossWebXmlTag[] tags =
+         new JBossWebXmlTag[] {
+             new JBossWebXmlTag(this, JBossWebXmlTag.CONTEXT_ROOT, false),
+             new JBossWebXmlTag(this, JBossWebXmlTag.VIRTUAL_HOST, false),
+             new JBossWebXmlTag(this, JBossWebXmlTag.EJB_LOCAL_REF),
+             new JBossWebXmlTag(this, JBossWebXmlTag.EJB_REF),
+             new JBossWebXmlTag(this, JBossWebXmlTag.EJB_REF_NAME),
+             new JBossWebXmlTag(this, JBossWebXmlTag.JNDI_NAME),
+             new JBossWebXmlTag(this, JBossWebXmlTag.LOCAL_JNDI_NAME)
+         };
+ 
+     /**
+      * Protected Constructor.
+      */
+     protected JBossWebXmlType()
+     {
+         super(null, JBossWebXml.class, new Dtd("http://www.jboss.org/j2ee/dtd/jboss-web.dtd"));
+         setDescriptorIo(new JBossWebXmlIo(this));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static JBossWebXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-23/index.html b/htmlReport/ns-23/index.html new file mode 100644 index 0000000000..261ea0db11 --- /dev/null +++ b/htmlReport/ns-23/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_BLOCK.html b/htmlReport/ns-23/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..780761ad55 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-23/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..bf683f951a --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_CLASS.html b/htmlReport/ns-23/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..5371d462cd --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-23/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..e7286fba74 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_LINE.html b/htmlReport/ns-23/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..27ae071c40 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-23/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..c0ef278f26 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_METHOD.html b/htmlReport/ns-23/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..dd08cae6f0 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-23/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..654ffd312e --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-23/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..38764828e1 --- /dev/null +++ b/htmlReport/ns-23/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.merge + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.merge

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.merge + + 0% + + + (0/5) + + + + 0% + + + (0/43) + + + + 0% + + + (0/283) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-23/sources/source-1.html b/htmlReport/ns-23/sources/source-1.html new file mode 100644 index 0000000000..c98627cd81 --- /dev/null +++ b/htmlReport/ns-23/sources/source-1.html @@ -0,0 +1,227 @@ + + + + + + + + Coverage Report > ArchiveResourceMerger + + + + + + +
+ + +

Coverage Summary for Class: ArchiveResourceMerger (org.codehaus.cargo.module.webapp.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ArchiveResourceMerger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.merge;
+ 
+ import java.io.File;
+ import java.io.FileOutputStream;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.codehaus.cargo.module.merge.MergeException;
+ import org.codehaus.cargo.module.merge.MergeProcessor;
+ 
+ /**
+  * Class to store merging operations.
+  */
+ public class ArchiveResourceMerger
+ {
+     /**
+      * Merge processor itself.
+      */
+     private MergeProcessor next;
+ 
+     /**
+      * The resource being merged.
+      */
+     private String resource;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param resource name of the resource path
+      * @param next the processor
+      */
+     public ArchiveResourceMerger(String resource, MergeProcessor next)
+     {
+         this.next = next;
+         this.resource = resource;
+     }
+ 
+     /**
+      * Add an item into the merge.
+      * 
+      * @param mergeItem the item
+      * @throws MergeException if a problem
+      */
+     public void addMergeItem(Object mergeItem) throws MergeException
+     {
+         try
+         {
+             JarArchive jar = (JarArchive) mergeItem;
+ 
+             InputStream is = jar.getResource(this.resource);
+             if (is != null)
+             {
+                 this.next.addMergeItem(is);
+             }
+             // If it isn't present, then it doesn't matter, it won't
+             // get merged.
+         }
+         catch (Exception ex)
+         {
+             throw new MergeException("Problem when fetching merge item from War Archive",
+                 ex);
+         }
+ 
+     }
+ 
+     /**
+      * Execute the merge into the assembly directory.
+      * 
+      * @param assembleDir the directory to save to
+      * @throws MergeException if a problem
+      */
+     public void execute(File assembleDir) throws MergeException
+     {
+         try (InputStream is = (InputStream) this.next.performMerge())
+         {
+             // If we get back nothing, then none of the source files
+             // had this resource to do the merge.
+             if (is == null)
+             {
+                 return;
+             }
+ 
+             File outputFile = new File(assembleDir.getAbsolutePath() + File.separator
+                 + this.resource);
+ 
+             // Make sure the directory actually exists
+             outputFile.getParentFile().mkdir();
+ 
+             try (FileOutputStream fos = new FileOutputStream(outputFile))
+             {
+                 byte[] buffer = new byte[1024];
+                 int count;
+                 while ((count = is.read(buffer)) > 0)
+                 {
+                     fos.write(buffer, 0, count);
+                 }
+             }
+         }
+         catch (Exception e)
+         {
+             throw new MergeException("Problem executing merge", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-23/sources/source-2.html b/htmlReport/ns-23/sources/source-2.html new file mode 100644 index 0000000000..cbc6e26012 --- /dev/null +++ b/htmlReport/ns-23/sources/source-2.html @@ -0,0 +1,183 @@ + + + + + + + + Coverage Report > MergeWarFileDetails + + + + + + +
+ + +

Coverage Summary for Class: MergeWarFileDetails (org.codehaus.cargo.module.webapp.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MergeWarFileDetails + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/6) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.merge;
+ 
+ import java.io.File;
+ import java.io.FileFilter;
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.webapp.WarArchive;
+ 
+ /**
+  * Class to store the war file that is required for saving, together with any options such as lib
+  * files for filtering.
+  */
+ public class MergeWarFileDetails implements FileFilter
+ {
+     /**
+      * War Archive.
+      */
+     private WarArchive warArchive;
+ 
+     /**
+      * List of exclusions.
+      */
+     private List<String> exclusionPatterns = new ArrayList<String>();
+ 
+     /**
+      * Constructor.
+      * @param warArchive War Archive to use
+      */
+     public MergeWarFileDetails(WarArchive warArchive)
+     {
+         this.warArchive = warArchive;
+     }
+ 
+     /**
+      * @return War Archive
+      */
+     public WarArchive getWarFile()
+     {
+         return warArchive;
+     }
+ 
+     /**
+      * Add a file or library exclusion pattern.
+      * @param pattern Exclusion Pattern
+      */
+     public void addExclusionPattern(String pattern)
+     {
+         this.exclusionPatterns.add(pattern);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean accept(File pathname)
+     {
+         return true;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-23/sources/source-3.html b/htmlReport/ns-23/sources/source-3.html new file mode 100644 index 0000000000..f554e1e9ab --- /dev/null +++ b/htmlReport/ns-23/sources/source-3.html @@ -0,0 +1,455 @@ + + + + + + + + Coverage Report > MergedWarArchive + + + + + + +
+ + +

Coverage Summary for Class: MergedWarArchive (org.codehaus.cargo.module.webapp.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MergedWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/17) + + + + 0% + + + (0/85) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.merge;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.codehaus.cargo.module.merge.MergeException;
+ import org.codehaus.cargo.module.merge.MergeProcessor;
+ import org.codehaus.cargo.module.webapp.WarArchive;
+ import org.codehaus.cargo.module.webapp.WebXml;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.JarUtils;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Subclass representing the merged WAR file.
+  */
+ public class MergedWarArchive implements WarArchive
+ {
+     /**
+      * War files making up this merged war, or type MergeWarFileDetails.
+      */
+     private List<MergeWarFileDetails> warFiles;
+ 
+     /**
+      * Extra JAR files to appear in WEB-INF/lib.
+      */
+     private List<File> jarFiles;
+ 
+     /**
+      * Whether the JAR files contained WEB-INF/lib should be merged.
+      */
+     private boolean mergeJarFiles = true;
+ 
+     /**
+      * The merged web xml, once generated.
+      */
+     private WebXml mergedWebXml;
+ 
+     /**
+      * Additional processors to apply.
+      */
+     private List<ArchiveResourceMerger> mergeProcessors;
+ 
+     /**
+      * The Web XML Merger class.
+      */
+     private WebXmlMerger webXmlMerger;
+ 
+     /**
+      * Constructor.
+      */
+     MergedWarArchive()
+     {
+         this.warFiles = new ArrayList<MergeWarFileDetails>();
+         this.jarFiles = new ArrayList<File>();
+         this.mergeProcessors = new ArrayList<ArchiveResourceMerger>();
+     }
+ 
+     /**
+      * @return the first war file in the merge list
+      */
+     protected WarArchive firstWarFile()
+     {
+         return this.warFiles.get(0).getWarFile();
+     }
+ 
+     /**
+      * @param path in the path to merge to
+      * @param merger in the processor to add
+      */
+     public void addProcessor(String path, MergeProcessor merger)
+     {
+         this.mergeProcessors.add(new ArchiveResourceMerger(path, merger));
+     }
+ 
+     /**
+      * @param warFile in a warfile to add to the merge
+      */
+     void add(WarArchive warFile)
+     {
+         this.warFiles.add(new MergeWarFileDetails(warFile));
+     }
+ 
+     /**
+      * @param jarFile is a jar file to add to the merge.
+      */
+     void addJar(File jarFile)
+     {
+         this.jarFiles.add(jarFile);
+     }
+ 
+     /**
+      * Get the web XML merger.
+      * 
+      * @return the WebXml merger
+      * @throws IOException on an IO Exception
+      * @throws JDOMException on a XML Parse Exception
+      */
+     public WebXmlMerger getWebXmlMerger() throws IOException,
+         JDOMException
+     {
+         if (this.webXmlMerger == null)
+         {
+             // TODO: consider cloning the web.xml instead of in-place editing
+             this.webXmlMerger = new WebXmlMerger(firstWarFile().getWebXml());
+         }
+ 
+         return this.webXmlMerger;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public WebXml getWebXml() throws IOException,
+         JDOMException
+     {
+         if (this.mergedWebXml == null)
+         {
+             // The merger is based on the first WAR file
+             WebXmlMerger wxm = getWebXmlMerger();
+ 
+             // Merge the rest of web.xml files
+             for (int cnt = 1; cnt < this.warFiles.size(); cnt++)
+             {
+                 MergeWarFileDetails details = this.warFiles.get(cnt);
+                 WarArchive wa = details.getWarFile();
+                 wxm.merge(wa.getWebXml());
+             }
+ 
+             this.mergedWebXml = wxm.getResult();
+         }
+         return this.mergedWebXml;
+     }
+ 
+     /**
+      * @param assembleDir in the directory to output the merge data to
+      * @throws MergeException when there is a problem
+      * @throws IOException if an IO exception
+      */
+     protected void executeMergeProcessors(File assembleDir) throws MergeException, IOException
+     {
+         for (ArchiveResourceMerger processor : this.mergeProcessors)
+         {
+             for (MergeWarFileDetails details : this.warFiles)
+             {
+                 WarArchive wa = details.getWarFile();
+ 
+                 processor.addMergeItem(wa);
+             }
+ 
+             processor.execute(assembleDir);
+         }
+ 
+     }
+ 
+     /**
+      * Here we do actual merge and store resulting war file into the new location. {@inheritDoc}
+      */
+     @Override
+     public void store(File warFile) throws MergeException, IOException, JDOMException
+     {
+         DefaultFileHandler fileHandler = new DefaultFileHandler();
+ 
+         // Create place for merge
+         String assembleDir = fileHandler.createUniqueTmpDirectory();
+ 
+         // Do actual merge
+         merge(assembleDir);
+ 
+         // Create a jar file
+         new JarUtils().createJarFromDirectory(assembleDir, warFile);
+ 
+         // Delete temp directory.
+         fileHandler.delete(assembleDir);
+     }
+ 
+     /**
+      * Here we write combined archive file structure out into the new location.
+      * @param assembleDir target directory to write to
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      * @throws MergeException If one of merge processors fails
+      */
+     public void merge(String assembleDir) throws MergeException, IOException, JDOMException
+     {
+         DefaultFileHandler fileHandler = new DefaultFileHandler();
+ 
+         // 1: Merge together the web XML items
+         WebXml mergedWebXml = getWebXml();
+ 
+         // 2. Expand everything in order somewhere temporary
+         expandToPath(assembleDir);
+ 
+         if (!mergeJarFiles)
+         {
+             File f = new File(assembleDir);
+             File webInfLib = new File(f, "WEB-INF/lib");
+             File[] files = webInfLib.listFiles();
+             for (File file : files)
+             {
+                 if (!file.isDirectory() && file.getName().toLowerCase().endsWith(".jar"))
+                 {
+                     fileHandler.delete(file.getAbsolutePath());
+                 }
+             }
+         }
+ 
+         copyJars(assembleDir);
+ 
+         // (over)write the web-inf configs
+         AbstractDescriptorIo.writeAll(mergedWebXml, fileHandler.append(new File(assembleDir)
+             .getAbsolutePath(), File.separator + "WEB-INF"));
+ 
+         executeMergeProcessors(new File(assembleDir));
+     }
+ 
+     /**
+      * @param assembleDir directory to copy JAR files to
+      */
+     private void copyJars(String assembleDir)
+     {
+         FileHandler fileHandler = new DefaultFileHandler();
+ 
+         File f = new File(assembleDir);
+         File webInfLib = new File(f, "WEB-INF/lib");
+         fileHandler.mkdirs(webInfLib.getAbsolutePath());
+         for (File sourceFile : this.jarFiles)
+         {
+             fileHandler.copyFile(sourceFile.getAbsolutePath(), new File(webInfLib, sourceFile
+                     .getName()).getAbsolutePath());
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean containsClass(String theClassName) throws IOException
+     {
+         for (MergeWarFileDetails details : this.warFiles)
+         {
+             WarArchive wa = details.getWarFile();
+ 
+             if (wa.containsClass(theClassName))
+             {
+                 return true;
+             }
+         }
+         return false;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String findResource(String theName) throws IOException
+     {
+         for (MergeWarFileDetails details : this.warFiles)
+         {
+             WarArchive wa = details.getWarFile();
+ 
+             String res = wa.findResource(theName);
+             if (res != null)
+             {
+                 return res;
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public InputStream getResource(String thePath) throws IOException
+     {
+         for (MergeWarFileDetails details : this.warFiles)
+         {
+             WarArchive wa = details.getWarFile();
+             InputStream is = wa.getResource(thePath);
+             if (is != null)
+             {
+                 return is;
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<String> getResources(String thePath) throws IOException
+     {
+         List<String> results = new ArrayList<String>();
+         for (MergeWarFileDetails details : this.warFiles)
+         {
+             WarArchive wa = details.getWarFile();
+             results.addAll(wa.getResources(thePath));
+         }
+         return results;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void expandToPath(String path) throws IOException
+     {
+         for (MergeWarFileDetails details : this.warFiles)
+         {
+             WarArchive wa = details.getWarFile();
+             wa.expandToPath(path);
+         }
+     }
+ 
+     /**
+      * Control whether to also merge the JAR files.
+      * 
+      * @param mergeJarFiles true if we do (default)
+      */
+     public void mergeJarFiles(boolean mergeJarFiles)
+     {
+         this.mergeJarFiles = mergeJarFiles;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-23/sources/source-4.html b/htmlReport/ns-23/sources/source-4.html new file mode 100644 index 0000000000..b06730346e --- /dev/null +++ b/htmlReport/ns-23/sources/source-4.html @@ -0,0 +1,240 @@ + + + + + + + + Coverage Report > WarArchiveMerger + + + + + + +
+ + +

Coverage Summary for Class: WarArchiveMerger (org.codehaus.cargo.module.webapp.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WarArchiveMerger + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.merge;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ 
+ import org.codehaus.cargo.module.merge.MergeException;
+ import org.codehaus.cargo.module.merge.MergeProcessor;
+ import org.codehaus.cargo.module.webapp.WarArchive;
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class for merging two War Archives into each other.
+  */
+ public class WarArchiveMerger implements MergeProcessor
+ {
+ 
+     /**
+      * The result that we are building up.
+      */
+     private MergedWarArchive result;
+ 
+     /**
+      * Constructor Class for merging War archives together.
+      */
+     public WarArchiveMerger()
+     {
+         this.result = new MergedWarArchive();
+     }
+ 
+     /**
+      * Add a merging processor that merges specified items witin the war files.
+      * 
+      * @param path in the path to merge to
+      * @param merger in the merger
+      */
+     public void addMergeProcessor(String path, MergeProcessor merger)
+     {
+         if (path == null || merger == null)
+         {
+             throw new NullPointerException();
+         }
+         this.result.addProcessor(path, merger);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addMergeItem(Object mergeItem) throws MergeException
+     {
+         if (mergeItem instanceof WarArchive)
+         {
+             this.result.add((WarArchive) mergeItem);
+         }
+         else if (mergeItem instanceof File)
+         {
+             this.result.addJar((File) mergeItem);
+         }
+         else
+         {
+             throw new MergeException(
+                     "WarArchiveMerger cannot merge things that are not WarArchives or files");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Object performMerge()
+     {
+         WarArchive merge = this.result;
+         this.result = new MergedWarArchive();
+         return merge;
+     }
+ 
+     /**
+      * Perform the archive merge, using the specified file as the output destination.
+      * 
+      * @param targetFile The target file to output to.
+      * @throws JDOMException If a JDOM exception occurs
+      * @throws IOException If an IO exception occurs
+      */
+     public void performMerge(File targetFile) throws IOException, JDOMException
+     {
+         WarArchive output = (WarArchive) performMerge();
+         output.store(targetFile);
+     }
+ 
+     /**
+      * Control whether the merge should include JAR files.
+      * 
+      * @param doMergeJarFiles true if we do (default)
+      */
+     public void setMergeJarFiles(boolean doMergeJarFiles)
+     {
+         this.result.mergeJarFiles(doMergeJarFiles);
+     }
+ 
+     /**
+      * Get the class used for web xml merging.
+      * 
+      * @return the Web XML Merger
+      */
+     public WebXmlMerger getWebXmlMerger()
+     {
+         try
+         {
+             return this.result.getWebXmlMerger();
+         }
+         catch (Exception ex)
+         {
+             throw new CargoException("Exception getting web xml merger", ex);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-23/sources/source-5.html b/htmlReport/ns-23/sources/source-5.html new file mode 100644 index 0000000000..4b7b25c1a8 --- /dev/null +++ b/htmlReport/ns-23/sources/source-5.html @@ -0,0 +1,509 @@ + + + + + + + + Coverage Report > WebXmlMerger + + + + + + +
+ + +

Coverage Summary for Class: WebXmlMerger (org.codehaus.cargo.module.webapp.merge)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/12) + + + + 0% + + + (0/150) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.merge;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.Descriptor;
+ import org.codehaus.cargo.module.XmlMerger;
+ import org.codehaus.cargo.module.merge.DescriptorMergerByTag;
+ import org.codehaus.cargo.module.merge.MergeException;
+ import org.codehaus.cargo.module.merge.tagstrategy.MergeStrategy;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.codehaus.cargo.module.webapp.WebXml;
+ import org.codehaus.cargo.module.webapp.WebXmlType;
+ import org.codehaus.cargo.module.webapp.WebXmlUtils;
+ import org.codehaus.cargo.module.webapp.WebXmlVersion;
+ import org.codehaus.cargo.module.webapp.elements.MimeMapping;
+ import org.codehaus.cargo.util.CargoException;
+ import org.jdom2.Element;
+ 
+ /**
+  * Helper class that can merge two web deployment descriptors.
+  */
+ public class WebXmlMerger extends XmlMerger
+ {
+     /**
+      * The original, authorative descriptor onto which the merges are performed.
+      */
+     private WebXml webXml;
+ 
+     /**
+      * Our merger.
+      */
+     private DescriptorMergerByTag descriptorMergerByTag;
+ 
+     /**
+      * Constructor.
+      */
+     public WebXmlMerger()
+     {
+         descriptorMergerByTag = new DescriptorMergerByTag();
+ 
+         // Default behaviours
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.LOGIN_CONFIG, DescriptorMergerByTag.OVERWRITE);
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.FILTER, DescriptorMergerByTag.IGNORE);
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.FILTER_MAPPING, DescriptorMergerByTag.IGNORE);
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.SERVLET, DescriptorMergerByTag.IGNORE);
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.SERVLET_MAPPING, DescriptorMergerByTag.IGNORE);
+         descriptorMergerByTag.setStrategy(
+             WebXmlType.MIME_MAPPING, DescriptorMergerByTag.IGNORE);
+ 
+         addMerger(descriptorMergerByTag);
+     }
+ 
+     /**
+      * Constructor.
+      * @param base Descriptor to use
+      */
+     public WebXmlMerger(Descriptor base)
+     {
+         this();
+         init(base);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void init(Descriptor base)
+     {
+         this.webXml = (WebXml) base;
+         descriptorMergerByTag.setDescriptorType(base.getDescriptorType());
+         super.init(base);
+     }
+ 
+     /**
+      * Set the merging strategy for a particular tag.
+      * 
+      * @param tag Tag to set
+      * @param strategy Strategy to use
+      */
+     public void setMergeStrategy(String tag, MergeStrategy strategy)
+     {
+         descriptorMergerByTag.setStrategy(tag, strategy);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void merge(Descriptor theMerge)
+     {
+         try
+         {
+             WebXml theMergeWebXml = (WebXml) theMerge;
+             checkServletVersions(theMergeWebXml);
+ 
+             super.merge(theMerge);
+ 
+             WebXmlVersion version = this.webXml.getVersion();
+             if (version == null || WebXmlVersion.V2_3.compareTo(version) <= 0)
+             {
+                 mergeFilters(theMergeWebXml);
+             }
+             mergeServlets(theMergeWebXml);
+ 
+             mergeSecurityRoles(theMergeWebXml);
+ 
+             mergeMimeMappings(theMergeWebXml);
+         }
+         catch (Exception e)
+         {
+             throw new MergeException("Exception merging web.xml files", e);
+         }
+     }
+ 
+     /**
+      * Retrieves merged descriptor.
+      * @return WebXml object
+      */
+     public WebXml getResult()
+     {
+         return this.webXml;
+     }
+ 
+     /**
+      * Get the vendor web app descriptor out of the web xml.
+      * 
+      * @param theWebXml in the web xml
+      * @param clazz the class of vendor descriptor
+      * @return the VendorWebAppDescriptor, or null if it does not exist in theWebXml
+      */
+     protected VendorWebAppDescriptor getVendorWebAppDescriptor(WebXml theWebXml, Class clazz)
+     {
+         for (Descriptor d : theWebXml.getVendorDescriptors())
+         {
+             VendorWebAppDescriptor descriptor = (VendorWebAppDescriptor) d;
+             if (clazz.isInstance(descriptor))
+             {
+                 return descriptor;
+             }
+         }
+         return null;
+     }
+ 
+     /**
+      * Checks the versions of the servlet API in each descriptor, and logs a warning if a mismatch
+      * might result in the loss of definitions.
+      * 
+      * @param theWebXml The descriptor that will be merged with the original
+      */
+     protected final void checkServletVersions(WebXml theWebXml)
+     {
+         if (this.webXml.getVersion() != null
+             && this.webXml.getVersion().compareTo(theWebXml.getVersion()) < 0)
+         {
+             getLogger().warn("Merging elements from a version " + theWebXml.getVersion()
+                 + " descriptor into a version " + this.webXml.getVersion()
+                 + ", some elements may be skipped", this.getClass().getName());
+         }
+     }
+ 
+     /**
+      * Merges the filter definitions from the specified descriptor into the original descriptor.
+      * 
+      * @param theWebXml The descriptor that contains the filter definitions that are to be merged
+      * into the original descriptor
+      */
+     protected final void mergeFilters(WebXml theWebXml)
+     {
+         try
+         {
+             List<String> filterNames = WebXmlUtils.getFilterNames(theWebXml);
+             int count = 0;
+             for (String filterName : filterNames)
+             {
+                 if (!WebXmlUtils.hasFilter(this.webXml, filterName))
+                 {
+                     WebXmlUtils.addFilter(this.webXml,
+                         WebXmlUtils.getFilter(theWebXml, filterName));
+                 }
+                 else
+                 {
+                     // merge the parameters
+                     List<String> existingInitParams =
+                         WebXmlUtils.getFilterInitParamNames(this.webXml, filterName);
+                     List<String> filterInitParamNames =
+                         WebXmlUtils.getFilterInitParamNames(theWebXml, filterName);
+                     for (String paramName : filterInitParamNames)
+                     {
+                         if (!existingInitParams.contains(paramName))
+                         {
+                             String paramValue =
+                                 WebXmlUtils.getFilterInitParam(theWebXml, filterName, paramName);
+                             WebXmlUtils.addFilterInitParam(
+                                 this.webXml, filterName, paramName, paramValue);
+                         }
+                     }
+                 }
+                 // merge the URL patterns
+                 List<String> existingFilterMappings =
+                     WebXmlUtils.getFilterMappings(this.webXml, filterName);
+                 List<String> filterMappings =
+                     WebXmlUtils.getFilterMappings(theWebXml, filterName);
+                 for (String urlPattern : filterMappings)
+                 {
+                     if (!existingFilterMappings.contains(urlPattern))
+                     {
+                         WebXmlUtils.addFilterMapping(this.webXml, filterName, urlPattern);
+                     }
+                 }
+                 WebXmlVersion version = this.webXml.getVersion();
+                 if (version == null || WebXmlVersion.V2_4.compareTo(version) <= 0)
+                 {
+                     // merge the dispatchers
+                     List<String> existingFilterDispatchers =
+                         WebXmlUtils.getFilterDispatchers(this.webXml, filterName);
+                     List<String> filterDispatchers =
+                         WebXmlUtils.getFilterDispatchers(theWebXml, filterName);
+                     for (String dispatcher : filterDispatchers)
+                     {
+                         if (!existingFilterDispatchers.contains(dispatcher))
+                         {
+                             WebXmlUtils.addFilterDispatcher(this.webXml, filterName, dispatcher);
+                         }
+                     }
+                 }
+                 count++;
+             }
+             getLogger().debug("Merged " + count + " filter definition"
+                 + (count != 1 ? "s " : " ") + "into the descriptor",
+                     this.getClass().getName());
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Exception merging filter definitions", e);
+         }
+     }
+ 
+     /**
+      * Merges the servlet definitions from the specified descriptor into the original descriptor.
+      * 
+      * @param theWebXml The descriptor that contains the servlet definitions that are to be merged
+      * into the original descriptor
+      * @throws CargoException if there is any merge problem
+      */
+     protected final void mergeServlets(WebXml theWebXml) throws CargoException
+     {
+         try
+         {
+             List<String> servletNames = WebXmlUtils.getServletNames(theWebXml);
+             int count = 0;
+             for (String servletName : servletNames)
+             {
+                 if (!WebXmlUtils.hasServlet(this.webXml, servletName))
+                 {
+                     WebXmlUtils.addServlet(this.webXml,
+                         WebXmlUtils.getServlet(theWebXml, servletName));
+                 }
+                 else
+                 {
+                     // merge the parameters
+                     List<String> existingInitParams =
+                         WebXmlUtils.getServletInitParamNames(this.webXml, servletName);
+                     List<String> servletInitParamNames =
+                         WebXmlUtils.getServletInitParamNames(theWebXml, servletName);
+                     for (String paramName : servletInitParamNames)
+                     {
+                         if (!existingInitParams.contains(paramName))
+                         {
+                             String paramValue =
+                                 WebXmlUtils.getServletInitParam(theWebXml, servletName, paramName);
+                             WebXmlUtils.addServletInitParam(
+                                 this.webXml, servletName, paramName, paramValue);
+                         }
+                     }
+                     String roleName =
+                         WebXmlUtils.getServletRunAsRoleName(theWebXml, servletName);
+                     if (roleName != null)
+                     {
+                         WebXmlUtils.addServletRunAsRoleName(this.webXml, servletName, roleName);
+                     }
+                 }
+                 // merge the mappings
+                 List<String> existingServletMappings =
+                     WebXmlUtils.getServletMappings(this.webXml, servletName);
+                 List<String> servletMappings =
+                     WebXmlUtils.getServletMappings(theWebXml, servletName);
+                 for (String urlPattern : servletMappings)
+                 {
+                     if (!existingServletMappings.contains(urlPattern))
+                     {
+                         WebXmlUtils.addServletMapping(this.webXml, servletName, urlPattern);
+                     }
+                 }
+                 count++;
+             }
+             getLogger().debug("Merged " + count + " servlet definition"
+                 + (count != 1 ? "s " : " ") + "into the descriptor",
+                     this.getClass().getName());
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Exception merging servlet definitions", e);
+         }
+     }
+ 
+     /**
+      * Merges the security roles from the provided descriptor into the original descriptor.
+      * 
+      * @param theWebXml The descriptor that contains the security roles that are to be merged into
+      * the original descriptor
+      */
+     protected final void mergeSecurityRoles(WebXml theWebXml)
+     {
+         List<String> securityRoleNames = WebXmlUtils.getSecurityRoleNames(theWebXml);
+         int count = 0;
+         for (String securityRoleName : securityRoleNames)
+         {
+             if (!WebXmlUtils.hasSecurityRole(this.webXml, securityRoleName))
+             {
+                 WebXmlUtils.addSecurityRole(this.webXml, securityRoleName);
+             }
+         }
+         if (count > 0)
+         {
+             getLogger().debug("Merged " + count + " security roles into the descriptor",
+                 this.getClass().getName());
+         }
+     }
+ 
+     /**
+      * Merges the servlet definitions from the specified descriptor into the original descriptor.
+      * 
+      * @param theWebXml The descriptor that contains the filter definitions that are to be merged
+      * into the original descriptor
+      */
+     protected final void mergeMimeMappings(WebXml theWebXml)
+     {
+         int count = 0;
+ 
+         List<Element> srcItems = webXml.getTags(WebXmlType.MIME_MAPPING);
+         List<Element> targetItems = theWebXml.getTags(WebXmlType.MIME_MAPPING);
+ 
+         for (Element targetItem : targetItems)
+         {
+             boolean foundItem = false;
+ 
+             MimeMapping targetMimeMapping = (MimeMapping) targetItem;
+ 
+             for (Element srcItem : srcItems)
+             {
+                 MimeMapping srcMimeMapping = (MimeMapping) srcItem;
+ 
+                 if (targetMimeMapping.getExtension().equals(srcMimeMapping.getExtension()))
+                 {
+                     foundItem = true;
+                     break;
+                 }
+             }
+ 
+             if (!foundItem)
+             {
+                 MimeMapping mimeMappingElement = (MimeMapping) webXml.getDescriptorType().
+                     getTagByName(WebXmlType.MIME_MAPPING).create();
+ 
+                 mimeMappingElement.setExtension(targetMimeMapping.getExtension());
+                 mimeMappingElement.setMimeType(targetMimeMapping.getMimeType());
+ 
+                 this.webXml.addElement(mimeMappingElement.getTag(), mimeMappingElement,
+                     this.webXml.getRootElement());
+                 this.webXml.addTag(mimeMappingElement);
+             }
+         }
+ 
+         getLogger().debug("Merged " + count + " mime mapping definition"
+             + (count != 1 ? "s " : " ") + "into the descriptor",
+                 this.getClass().getName());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-24/index.html b/htmlReport/ns-24/index.html new file mode 100644 index 0000000000..bffd72bba5 --- /dev/null +++ b/htmlReport/ns-24/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_BLOCK.html b/htmlReport/ns-24/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..534012d89b --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-24/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..eea514968f --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_CLASS.html b/htmlReport/ns-24/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..812bc215c1 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-24/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..69a174bfe0 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_LINE.html b/htmlReport/ns-24/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..f73e87ad00 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-24/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..a87586abc1 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_METHOD.html b/htmlReport/ns-24/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..c58028a1e0 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-24/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..5e5d1d8a77 --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-24/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..b7d6b22ecd --- /dev/null +++ b/htmlReport/ns-24/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.orion + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.orion

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.orion + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/16) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-24/sources/source-1.html b/htmlReport/ns-24/sources/source-1.html new file mode 100644 index 0000000000..98b34eb460 --- /dev/null +++ b/htmlReport/ns-24/sources/source-1.html @@ -0,0 +1,178 @@ + + + + + + + + Coverage Report > OrionWebXml + + + + + + +
+ + +

Coverage Summary for Class: OrionWebXml (org.codehaus.cargo.module.webapp.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/8) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.orion;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.webapp.EjbRef;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a oracle web deployment descriptor
+  * <code>orion-web.xml</code> to provide convenience methods for easy access and manipulation.
+  */
+ public class OrionWebXml extends AbstractDescriptor implements VendorWebAppDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "orion-web.xml";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root document element
+      * @param type The document descriptor type
+      */
+     public OrionWebXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ 
+     /**
+      * Adds a ejb reference description to orion-web.xml.
+      * @param ref reference to add
+      */
+     @Override
+     public void addEjbReference(EjbRef ref)
+     {
+         Element ejbRefElement = new Element("ejb-ref-mapping");
+         ejbRefElement.setAttribute("name", ref.getName());
+         ejbRefElement.setAttribute("location", ref.getJndiName());
+         addElement(
+             new DescriptorTag(OrionWebXmlType.getInstance(), "ejb-ref-mapping", true),
+                 ejbRefElement, getRootElement());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-24/sources/source-2.html b/htmlReport/ns-24/sources/source-2.html new file mode 100644 index 0000000000..cc9e05b28a --- /dev/null +++ b/htmlReport/ns-24/sources/source-2.html @@ -0,0 +1,170 @@ + + + + + + + + Coverage Report > OrionWebXmlIo + + + + + + +
+ + +

Coverage Summary for Class: OrionWebXmlIo (org.codehaus.cargo.module.webapp.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.orion;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Oracle web deployment descriptor.
+  */
+ public class OrionWebXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Protected constructor.
+      */
+     protected OrionWebXmlIo()
+     {
+         super(OrionWebXmlType.getInstance());
+     }
+ 
+     /**
+      * Constructor.
+      * @param type Document descriptor type
+      */
+     public OrionWebXmlIo(DescriptorType type)
+     {
+         super(type);
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws JDOMException If the input could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static OrionWebXml parseOrionXml(InputStream input) throws
+         IOException, JDOMException
+     {
+         OrionWebXmlIo io = new OrionWebXmlIo();
+         return (OrionWebXml) io.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-24/sources/source-3.html b/htmlReport/ns-24/sources/source-3.html new file mode 100644 index 0000000000..9dfd950fce --- /dev/null +++ b/htmlReport/ns-24/sources/source-3.html @@ -0,0 +1,157 @@ + + + + + + + + Coverage Report > OrionWebXmlType + + + + + + +
+ + +

Coverage Summary for Class: OrionWebXmlType (org.codehaus.cargo.module.webapp.orion)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
OrionWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.orion;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class OrionWebXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Single instance.
+      */
+     private static OrionWebXmlType instance = new OrionWebXmlType();
+ 
+     /**
+      * Protected Constructor.
+      */
+     protected OrionWebXmlType()
+     {
+         super(null, OrionWebXml.class, new Dtd(
+             "http://www.oracle.com/technology/ias/dtds/orion-web-9_04.dtd"));
+         setDescriptorIo(new OrionWebXmlIo(this));
+     }
+ 
+     /**
+      * Get Static Singleton instance.
+      * @return OrionWebXmlType
+      */
+     public static OrionWebXmlType getInstance()
+     {
+         return instance;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-25/index.html b/htmlReport/ns-25/index.html new file mode 100644 index 0000000000..c9bc0a7da1 --- /dev/null +++ b/htmlReport/ns-25/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_BLOCK.html b/htmlReport/ns-25/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..b7148f27bb --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-25/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..612eab2739 --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_CLASS.html b/htmlReport/ns-25/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..2899a27e24 --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-25/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ee073e2b2e --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_LINE.html b/htmlReport/ns-25/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..fe686f0ac9 --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-25/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..af0efeef5c --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_METHOD.html b/htmlReport/ns-25/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..0dcd6c2466 --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-25/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..7093dc84dd --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-25/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..adfe4a6195 --- /dev/null +++ b/htmlReport/ns-25/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin + + 0% + + + (0/5) + + + + 0% + + + (0/17) + + + + 0% + + + (0/33) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-25/sources/source-1.html b/htmlReport/ns-25/sources/source-1.html new file mode 100644 index 0000000000..dbdcef7dad --- /dev/null +++ b/htmlReport/ns-25/sources/source-1.html @@ -0,0 +1,237 @@ + + + + + + + + Coverage Report > ResinWebXml + + + + + + +
+ + +

Coverage Summary for Class: ResinWebXml (org.codehaus.cargo.module.webapp.resin)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResinWebXml + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.webapp.EjbRef;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a web deployment descriptor <code>resin-web.xml</code> to
+  * provide convenience methods for easy access and manipulation.
+  */
+ public class ResinWebXml extends AbstractDescriptor implements VendorWebAppDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "resin-web.xml";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The descriptor root element
+      * @param type The descriptor type
+      */
+     public ResinWebXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * Adds a ejb reference.
+      * 
+      * @param ref reference to add
+      */
+     @Override
+     public void addEjbReference(EjbRef ref)
+     {
+         // This file doesn't have EJB references in it
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ 
+     /**
+      * Get the system properties.
+      * 
+      * @return the system properties
+      */
+     public List<Element> getSystemProperties()
+     {
+         return getTags(ResinWebXmlTag.SYSTEM_PROPERTY);
+     }
+ 
+     /**
+      * Get the resource references.
+      * 
+      * @return the resource refs
+      */
+     public List<Element> getResourceRefs()
+     {
+         return getTags(ResinWebXmlTag.RESOURCE_REFERENCE);
+     }
+ 
+     /**
+      * Get the jndi links.
+      * 
+      * @return the jndi links
+      */
+     public List<Element> getJndiLinks()
+     {
+         return getTags(ResinWebXmlTag.JNDI_LINK);
+     }
+ 
+     /**
+      * Get the session config element.
+      * 
+      * @return session config element
+      */
+     public Element getSessionConfig()
+     {
+         List<Element> elements = getElements(ResinWebXmlTag.SESSION_CONFIG);
+         if (elements.isEmpty())
+         {
+             return null;
+         }
+ 
+         return elements.get(0);
+     }
+ 
+     /**
+      * Get the directory servlet.
+      * 
+      * @return directory servlet element
+      */
+     public Element getDirectoryServlet()
+     {
+         List<Element> elements = getElements(ResinWebXmlTag.DIRECTORY_SERVLET);
+         if (elements.isEmpty())
+         {
+             return null;
+         }
+ 
+         return elements.get(0);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-25/sources/source-2.html b/htmlReport/ns-25/sources/source-2.html new file mode 100644 index 0000000000..7eaa53a5f1 --- /dev/null +++ b/htmlReport/ns-25/sources/source-2.html @@ -0,0 +1,161 @@ + + + + + + + + Coverage Report > ResinWebXmlIo + + + + + + +
+ + +

Coverage Summary for Class: ResinWebXmlIo (org.codehaus.cargo.module.webapp.resin)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResinWebXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Resin web deployment descriptor.
+  */
+ public class ResinWebXmlIo extends AbstractDescriptorIo
+ {
+ 
+     /**
+      * Protected constructor.
+      */
+     protected ResinWebXmlIo()
+     {
+         super(ResinWebXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws JDOMException If the input could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static ResinWebXml parseResinXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         ResinWebXmlIo io = new ResinWebXmlIo();
+         return (ResinWebXml) io.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-25/sources/source-3.html b/htmlReport/ns-25/sources/source-3.html new file mode 100644 index 0000000000..8cf1ff70ea --- /dev/null +++ b/htmlReport/ns-25/sources/source-3.html @@ -0,0 +1,175 @@ + + + + + + + + Coverage Report > ResinWebXmlMerger + + + + + + +
+ + +

Coverage Summary for Class: ResinWebXmlMerger (org.codehaus.cargo.module.webapp.resin)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResinWebXmlMerger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin;
+ 
+ import org.codehaus.cargo.module.XmlMerger;
+ import org.codehaus.cargo.module.merge.DescriptorMergerByTag;
+ 
+ /**
+  * Class to manage the merging of two resin web descriptors.
+  */
+ public class ResinWebXmlMerger extends XmlMerger
+ {
+     /**
+      * The original, authorative descriptor onto which the merges are performed.
+      */
+     private ResinWebXml webXml;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param theWebXml The original descriptor
+      */
+     public ResinWebXmlMerger(ResinWebXml theWebXml)
+     {
+         if (theWebXml == null)
+         {
+             throw new IllegalArgumentException("Must pass a resin web xml");
+         }
+         this.webXml = theWebXml;
+ 
+         DescriptorMergerByTag dmt = new DescriptorMergerByTag();
+ 
+         // Default behaviours
+         dmt.setDefaultStrategyIfNoneSpecified(DescriptorMergerByTag.OVERWRITE);
+ 
+         addMerger(dmt);
+     }
+ 
+     /**
+      * Merges the merge descriptor with the original descriptor.
+      * 
+      * @param theMergeWebXml The descriptor to merge in
+      */
+     public void merge(ResinWebXml theMergeWebXml)
+     {
+         if (theMergeWebXml == null)
+         {
+             throw new IllegalArgumentException("Must pass a resin web xml");
+         }
+ 
+         super.merge(theMergeWebXml);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-25/sources/source-4.html b/htmlReport/ns-25/sources/source-4.html new file mode 100644 index 0000000000..85837bfc06 --- /dev/null +++ b/htmlReport/ns-25/sources/source-4.html @@ -0,0 +1,182 @@ + + + + + + + + Coverage Report > ResinWebXmlTag + + + + + + +
+ + +

Coverage Summary for Class: ResinWebXmlTag (org.codehaus.cargo.module.webapp.resin)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResinWebXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various top-level tags in a Resin context web deployment descriptor as a typesafe
+  * enumeration.
+  */
+ public final class ResinWebXmlTag extends DescriptorTag
+ {
+     /**
+      * Attribute name 'path'.
+      */
+     public static final String SYSTEM_PROPERTY = "system-property";
+ 
+     /**
+      * Elements of resource-ref.
+      */
+     public static final String RESOURCE_REFERENCE = "resource-ref";
+ 
+     /**
+      * Elements of session-config.
+      */
+     public static final String SESSION_CONFIG = "session-config";
+ 
+     /**
+      * Elements of directory-servlet.
+      */
+     public static final String DIRECTORY_SERVLET = "directory-servlet";
+ 
+     /**
+      * Elements of jndi-link.
+      */
+     public static final String JNDI_LINK = "jndi-link";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected ResinWebXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected ResinWebXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-25/sources/source-5.html b/htmlReport/ns-25/sources/source-5.html new file mode 100644 index 0000000000..ee8ac11ea5 --- /dev/null +++ b/htmlReport/ns-25/sources/source-5.html @@ -0,0 +1,167 @@ + + + + + + + + Coverage Report > ResinWebXmlType + + + + + + +
+ + +

Coverage Summary for Class: ResinWebXmlType (org.codehaus.cargo.module.webapp.resin)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResinWebXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ 
+ /**
+  */
+ public class ResinWebXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static ResinWebXmlType instance = new ResinWebXmlType();
+ 
+     /**
+      * List of tags in this descriptor.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private ResinWebXmlTag[] tags =
+         new ResinWebXmlTag[] {
+             new ResinWebXmlTag(this, "system-property", true),
+             new ResinWebXmlTag(this, "resource-ref", true),
+             new ResinWebXmlTag(this, "session-config", true),
+             new ResinWebXmlTag(this, "directory-servlet", true),
+             new ResinWebXmlTag(this, "jndi-link", true)
+         };
+ 
+     /**
+      * Protected Constructor.
+      */
+     protected ResinWebXmlType()
+     {
+         super(null, ResinWebXml.class, null);
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static ResinWebXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-26/index.html b/htmlReport/ns-26/index.html new file mode 100644 index 0000000000..60ecc2ad72 --- /dev/null +++ b/htmlReport/ns-26/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_BLOCK.html b/htmlReport/ns-26/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..b00c8bc49a --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-26/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..3e800dd117 --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_CLASS.html b/htmlReport/ns-26/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..51ea6490a1 --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-26/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..1e6fc24c6a --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_LINE.html b/htmlReport/ns-26/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..e0d42a3fe3 --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-26/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..4d60881824 --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_METHOD.html b/htmlReport/ns-26/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..23bdac449d --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-26/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..fa7cce9c0f --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-26/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..83f0a9e4c7 --- /dev/null +++ b/htmlReport/ns-26/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.resin.elements + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.resin.elements

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.resin.elements + + 0% + + + (0/3) + + + + 0% + + + (0/12) + + + + 0% + + + (0/21) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-26/sources/source-1.html b/htmlReport/ns-26/sources/source-1.html new file mode 100644 index 0000000000..0bf6dc02bf --- /dev/null +++ b/htmlReport/ns-26/sources/source-1.html @@ -0,0 +1,170 @@ + + + + + + + + Coverage Report > JndiLink + + + + + + +
+ + +

Coverage Summary for Class: JndiLink (org.codehaus.cargo.module.webapp.resin.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JndiLink + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/6) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin.elements;
+ 
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlTag;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  * Wrapper Class representing a resin-web.xml JNDI link.
+  */
+ public class JndiLink extends DescriptorElement
+ {
+     /**
+      * Constructor.
+      * 
+      * @param tag Resin Web Xml Tag
+      */
+     public JndiLink(ResinWebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      */
+     public JndiLink()
+     {
+         this((ResinWebXmlTag) ResinWebXmlType.getInstance().getTagByName(
+             ResinWebXmlTag.JNDI_LINK));
+     }
+ 
+     /**
+      * @return JNDI name.
+      */
+     public String getElementId()
+     {
+         Element child = getChild("jndi-name");
+ 
+         // Check there was one
+         if (child == null)
+         {
+             return null;
+         }
+ 
+         return child.getText();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-26/sources/source-2.html b/htmlReport/ns-26/sources/source-2.html new file mode 100644 index 0000000000..ddd8f9d03c --- /dev/null +++ b/htmlReport/ns-26/sources/source-2.html @@ -0,0 +1,190 @@ + + + + + + + + Coverage Report > ResourceRef + + + + + + +
+ + +

Coverage Summary for Class: ResourceRef (org.codehaus.cargo.module.webapp.resin.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResourceRef + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin.elements;
+ 
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlTag;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlType;
+ import org.jdom2.Element;
+ 
+ /**
+  * Wrapper class representing a resin-web resource-ref entry.
+  */
+ public class ResourceRef extends DescriptorElement
+ {
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag Resin Web Xml Tag
+      */
+     public ResourceRef(ResinWebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      */
+     public ResourceRef()
+     {
+         this((ResinWebXmlTag) ResinWebXmlType.getInstance().getTagByName(
+             ResinWebXmlTag.RESOURCE_REFERENCE));
+     }
+ 
+     /**
+      * @return Resource reference name.
+      */
+     public String getElementId()
+     {
+         Element child = getChild("res-ref-name");
+ 
+         // Check there was one
+         if (child == null)
+         {
+             return null;
+         }
+ 
+         return child.getText();
+     }
+ 
+     /**
+      * Get the resource type that this is (eg JNDI).
+      * 
+      * @return the res-type value
+      */
+     public String getType()
+     {
+         Element child = getChild("res-type");
+ 
+         // Check there was one
+         if (child == null)
+         {
+             return null;
+         }
+ 
+         return child.getText();
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-26/sources/source-3.html b/htmlReport/ns-26/sources/source-3.html new file mode 100644 index 0000000000..6df81b19a3 --- /dev/null +++ b/htmlReport/ns-26/sources/source-3.html @@ -0,0 +1,184 @@ + + + + + + + + Coverage Report > SystemProperty + + + + + + +
+ + +

Coverage Summary for Class: SystemProperty (org.codehaus.cargo.module.webapp.resin.elements)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
SystemProperty + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.resin.elements;
+ 
+ import org.codehaus.cargo.module.DescriptorElement;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlTag;
+ import org.codehaus.cargo.module.webapp.resin.ResinWebXmlType;
+ import org.jdom2.Attribute;
+ 
+ /**
+  * Wrapper Class representing a resin-web.xml system property.
+  */
+ public class SystemProperty extends DescriptorElement
+ {
+ 
+     /**
+      * Constructor.
+      * 
+      * @param tag Resin Web XML Tag type
+      */
+     public SystemProperty(ResinWebXmlTag tag)
+     {
+         super(tag);
+     }
+ 
+     /**
+      * Constructor.
+      */
+     public SystemProperty()
+     {
+         this((ResinWebXmlTag) ResinWebXmlType.getInstance().getTagByName(
+             ResinWebXmlTag.SYSTEM_PROPERTY));
+     }
+ 
+     /**
+      * @return System property name.
+      */
+     public String getElementId()
+     {
+         return ((Attribute) getAttributes().get(0)).getName();
+     }
+ 
+     /**
+      * Get the system property value.
+      * 
+      * @return the value
+      */
+     @Override
+     public String getValue()
+     {
+         return ((Attribute) getAttributes().get(0)).getValue();
+     }
+ 
+     /**
+      * Set the system property value.
+      * 
+      * @param value to be set
+      */
+     public void setValue(String value)
+     {
+         ((Attribute) getAttributes().get(0)).setValue(value);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-27/index.html b/htmlReport/ns-27/index.html new file mode 100644 index 0000000000..a94535921b --- /dev/null +++ b/htmlReport/ns-27/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_BLOCK.html b/htmlReport/ns-27/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..39f3ae78a3 --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-27/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..b2e48d3557 --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_CLASS.html b/htmlReport/ns-27/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..4b0e636936 --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-27/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ad70797ad7 --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_LINE.html b/htmlReport/ns-27/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..3cc099f83c --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-27/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..4f05ec003e --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_METHOD.html b/htmlReport/ns-27/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..59fd52815b --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-27/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..258eadd25d --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-27/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..46874b2362 --- /dev/null +++ b/htmlReport/ns-27/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.tomcat + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.tomcat

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.tomcat + + 0% + + + (0/5) + + + + 0% + + + (0/14) + + + + 0% + + + (0/45) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-27/sources/source-1.html b/htmlReport/ns-27/sources/source-1.html new file mode 100644 index 0000000000..6355457526 --- /dev/null +++ b/htmlReport/ns-27/sources/source-1.html @@ -0,0 +1,224 @@ + + + + + + + + Coverage Report > TomcatContextXml + + + + + + +
+ + +

Coverage Summary for Class: TomcatContextXml (org.codehaus.cargo.module.webapp.tomcat)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TomcatContextXml + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.tomcat;
+ 
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.jdom2.Attribute;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a web deployment descriptor
+  * <code>META-INF/context.xml</code> to provide convenience methods for easy access and
+  * manipulation.
+  */
+ public class TomcatContextXml extends AbstractDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "jboss-web.xml";
+ 
+     /**
+      * Specifies the order in which the top-level elements must appear in the descriptor, according
+      * to the DTD.
+      */
+     // private static final TomcatContextXmlTag[] ELEMENT_ORDER =
+     // {
+     // TomcatContextXmlTag.CONTEXT_PATH
+     // };
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root element of the context
+      * @param type the document descriptor type
+      */
+     public TomcatContextXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * @return the context path element found in the <code>context.xml</code> file (available in the
+      * <code>path</code> attribute) or null if not defined
+      */
+     public String getPath()
+     {
+         Attribute attr = getRootElement().getAttribute(TomcatContextXmlTag.CONTEXT_PATH);
+         if (attr == null)
+         {
+             return null;
+         }
+ 
+         String path = attr.getValue();
+ 
+         // An empty path string means a path not defined.
+         if (path.isEmpty())
+         {
+             path = null;
+         }
+         else
+         {
+             // Remove leading slash if there is one.
+             if (path.startsWith("/"))
+             {
+                 path = path.substring(1);
+             }
+         }
+ 
+         return path;
+     }
+ 
+     /**
+      * Gets all the parameters that match XPath "<code>Context/Parameter</code>".
+      * 
+      * @return Always non-null (but possibly empty) map keyed by
+      * <code>Context/Parameter/@name</code> and value is <code>Context/Parameter/@value</code>
+      */
+     public Map<Attribute, Attribute> getParameters()
+     {
+         Map<Attribute, Attribute> r = new HashMap<Attribute, Attribute>();
+         List<Element> elements = getElements(TomcatContextXmlTag.PARAMETER);
+         for (Element element : elements)
+         {
+             r.put(element.getAttribute("name"), element.getAttribute("value"));
+         }
+ 
+         return r;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-27/sources/source-2.html b/htmlReport/ns-27/sources/source-2.html new file mode 100644 index 0000000000..cf47afcf0c --- /dev/null +++ b/htmlReport/ns-27/sources/source-2.html @@ -0,0 +1,160 @@ + + + + + + + + Coverage Report > TomcatContextXmlIo + + + + + + +
+ + +

Coverage Summary for Class: TomcatContextXmlIo (org.codehaus.cargo.module.webapp.tomcat)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TomcatContextXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.tomcat;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Tomcat web deployment descriptor.
+  */
+ public class TomcatContextXmlIo extends AbstractDescriptorIo
+ {
+     /**
+      * Constructor.
+      */
+     protected TomcatContextXmlIo()
+     {
+         super(TomcatContextXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws IOException If an I/O error occurs
+      * @throws JDOMException If the input could not be parsed
+      */
+     public static TomcatContextXml parseTomcatConfigXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         TomcatContextXmlIo io = new TomcatContextXmlIo();
+         return (TomcatContextXml) io.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-27/sources/source-3.html b/htmlReport/ns-27/sources/source-3.html new file mode 100644 index 0000000000..03fd17ce57 --- /dev/null +++ b/htmlReport/ns-27/sources/source-3.html @@ -0,0 +1,167 @@ + + + + + + + + Coverage Report > TomcatContextXmlTag + + + + + + +
+ + +

Coverage Summary for Class: TomcatContextXmlTag (org.codehaus.cargo.module.webapp.tomcat)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TomcatContextXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.tomcat;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various top-level tags in a Tomcat context web deployment descriptor as a typesafe
+  * enumeration.
+  */
+ public final class TomcatContextXmlTag extends DescriptorTag
+ {
+     /**
+      * Attribute name 'path'.
+      */
+     public static final String CONTEXT_PATH = "path";
+ 
+     /**
+      * Element name 'Parameter'.
+      */
+     public static final String PARAMETER = "Parameter";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected TomcatContextXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected TomcatContextXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-27/sources/source-4.html b/htmlReport/ns-27/sources/source-4.html new file mode 100644 index 0000000000..41e1f88f59 --- /dev/null +++ b/htmlReport/ns-27/sources/source-4.html @@ -0,0 +1,165 @@ + + + + + + + + Coverage Report > TomcatContextXmlType + + + + + + +
+ + +

Coverage Summary for Class: TomcatContextXmlType (org.codehaus.cargo.module.webapp.tomcat)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TomcatContextXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.tomcat;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class TomcatContextXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static TomcatContextXmlType instance = new TomcatContextXmlType();
+ 
+     /**
+      * All the tags for the descriptor type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private TomcatContextXmlTag[] tags =
+         new TomcatContextXmlTag[] {
+             new TomcatContextXmlTag(this, "path", false),
+             new TomcatContextXmlTag(this, "Parameter", true)
+         };
+ 
+     /**
+      * Protected constructor.
+      */
+     protected TomcatContextXmlType()
+     {
+         super(null, TomcatContextXml.class, new Dtd("file:sample/tomcat-context.dtd"));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static TomcatContextXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-27/sources/source-5.html b/htmlReport/ns-27/sources/source-5.html new file mode 100644 index 0000000000..ea7e752965 --- /dev/null +++ b/htmlReport/ns-27/sources/source-5.html @@ -0,0 +1,218 @@ + + + + + + + + Coverage Report > TomcatWarArchive + + + + + + +
+ + +

Coverage Summary for Class: TomcatWarArchive (org.codehaus.cargo.module.webapp.tomcat)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TomcatWarArchive + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/19) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.tomcat;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.JarArchive;
+ import org.codehaus.cargo.module.JarArchiveIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Class that encapsulates access to a WAR.
+  */
+ public class TomcatWarArchive
+ {
+     /**
+      * The file representing either the WAR file or the expanded WAR directory.
+      */
+     private String warFile;
+ 
+     /**
+      * The parsed deployment descriptor.
+      */
+     private TomcatContextXml tomcatContextXml;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param warFile The web application archive
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     public TomcatWarArchive(String warFile)
+         throws IOException, JDOMException
+     {
+         this.warFile = warFile;
+         this.tomcatContextXml = parseTomcatContextXml();
+     }
+ 
+     /**
+      * @return the parsed <code>META-INF/context.xml</code> descriptor or null if none exists
+      * @throws IOException If there was a problem reading the deployment descriptor in the WAR
+      * @throws JDOMException If the deployment descriptor of the WAR could not be parsed
+      */
+     private TomcatContextXml parseTomcatContextXml()
+         throws IOException, JDOMException
+     {
+         TomcatContextXml context = null;
+ 
+         InputStream in = null;
+         try
+         {
+             // Are we manipulating a WAR file or an expanded WAR directory?
+             if (new File(this.warFile).isDirectory())
+             {
+                 File contextXmlFile = new File(this.warFile, "META-INF/context.xml");
+                 if (contextXmlFile.exists())
+                 {
+                     in = new FileInputStream(contextXmlFile);
+                 }
+             }
+             else
+             {
+                 JarArchive jarArchive = JarArchiveIo.open(new File(this.warFile));
+                 in = jarArchive.getResource("META-INF/context.xml");
+             }
+ 
+             if (in != null)
+             {
+                 context = TomcatContextXmlIo.parseTomcatConfigXml(in);
+             }
+         }
+         finally
+         {
+             if (in != null)
+             {
+                 in.close();
+             }
+         }
+ 
+         return context;
+     }
+ 
+     /**
+      * Returns the <code>META-INF/context.xml</code> deployment descriptor of the web application.
+      * 
+      * @return The parsed deployment descriptor, or <code>null</code> if no such file exists.
+      */
+     public TomcatContextXml getTomcatContextXml()
+     {
+         return this.tomcatContextXml;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-28/index.html b/htmlReport/ns-28/index.html new file mode 100644 index 0000000000..ed55209d2f --- /dev/null +++ b/htmlReport/ns-28/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_BLOCK.html b/htmlReport/ns-28/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..3f3fc88f79 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-28/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..3e5dbfd304 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_CLASS.html b/htmlReport/ns-28/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..4eff340ddf --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-28/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..268758e6ae --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_LINE.html b/htmlReport/ns-28/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..850a7adcf3 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-28/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..55798cd82a --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_METHOD.html b/htmlReport/ns-28/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..1d31086170 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-28/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..dd17000331 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-28/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..006932df52 --- /dev/null +++ b/htmlReport/ns-28/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.weblogic + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.weblogic

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.weblogic + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/23) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-28/sources/source-1.html b/htmlReport/ns-28/sources/source-1.html new file mode 100644 index 0000000000..875ad3941f --- /dev/null +++ b/htmlReport/ns-28/sources/source-1.html @@ -0,0 +1,194 @@ + + + + + + + + Coverage Report > WeblogicXml + + + + + + +
+ + +

Coverage Summary for Class: WeblogicXml (org.codehaus.cargo.module.webapp.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicXml + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.weblogic;
+ 
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.webapp.EjbRef;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.jdom2.Element;
+ 
+ /**
+  * Encapsulates the DOM representation of a weblogic web deployment descriptor
+  * <code>weblogic.xml</code> to provide convenience methods for easy access and manipulation.
+  */
+ public class WeblogicXml extends AbstractDescriptor implements VendorWebAppDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "weblogic.xml";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The document root element
+      * @param type The descriptor type
+      */
+     public WeblogicXml(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * @return weblogic.xml
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ 
+     /**
+      * Adds a ejb reference description to the weblogic.xml.
+      * @param ref the reference to add
+      */
+     @Override
+     public void addEjbReference(EjbRef ref)
+     {
+         Element refDescr;
+         List<Element> referenceDescriptors = getElements(WeblogicXmlTag.REFERENCE_DESCRIPTOR);
+         if (referenceDescriptors.isEmpty())
+         {
+             refDescr =
+                 new Element(WeblogicXmlTag.REFERENCE_DESCRIPTOR);
+             refDescr = addElement(getDescriptorType().getTagByName(
+                 WeblogicXmlTag.REFERENCE_DESCRIPTOR), refDescr, getRootElement());
+         }
+         else
+         {
+             refDescr = referenceDescriptors.get(0);
+         }
+ 
+         Element ejbRefElement = new Element(WeblogicXmlTag.EJB_REFERENCE_DESCRIPTION);
+         ejbRefElement.addContent(createNestedText(
+             getDescriptorType().getTagByName(WeblogicXmlTag.EJB_REF_NAME), ref.getName()));
+         ejbRefElement.addContent(createNestedText(
+             getDescriptorType().getTagByName(WeblogicXmlTag.JNDI_NAME), ref.getJndiName()));
+         addElement(getDescriptorType().getTagByName(
+             WeblogicXmlTag.EJB_REFERENCE_DESCRIPTION), ejbRefElement, refDescr);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-28/sources/source-2.html b/htmlReport/ns-28/sources/source-2.html new file mode 100644 index 0000000000..5ca47fb55e --- /dev/null +++ b/htmlReport/ns-28/sources/source-2.html @@ -0,0 +1,161 @@ + + + + + + + + Coverage Report > WeblogicXmlIo + + + + + + +
+ + +

Coverage Summary for Class: WeblogicXmlIo (org.codehaus.cargo.module.webapp.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicXmlIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.weblogic;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading WebLogic web deployment descriptor.
+  */
+ public class WeblogicXmlIo extends AbstractDescriptorIo
+ {
+ 
+     /**
+      * Constructor.
+      */
+     protected WeblogicXmlIo()
+     {
+         super(WeblogicXmlType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws JDOMException If the input could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static WeblogicXml parseWeblogicXml(InputStream input)
+         throws IOException, JDOMException
+     {
+         WeblogicXmlIo io = new WeblogicXmlIo();
+         return (WeblogicXml) io.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-28/sources/source-3.html b/htmlReport/ns-28/sources/source-3.html new file mode 100644 index 0000000000..fc26c980a7 --- /dev/null +++ b/htmlReport/ns-28/sources/source-3.html @@ -0,0 +1,294 @@ + + + + + + + + Coverage Report > WeblogicXmlTag + + + + + + +
+ + +

Coverage Summary for Class: WeblogicXmlTag (org.codehaus.cargo.module.webapp.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicXmlTag + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.weblogic;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ 
+ /**
+  * Represents the various top-level tags in a web deployment descriptor as a typesafe enumeration.
+  */
+ public class WeblogicXmlTag extends DescriptorTag
+ {
+     /**
+      * Element name 'description'.
+      */
+     public static final String DESCRIPTION = "description";
+ 
+     /**
+      * Element name 'weblogic-version'.
+      */
+     public static final String WEBLOGIC_VERSION = "weblogic-version";
+ 
+     /**
+      * Element name 'security-role-assignment'.
+      */
+     public static final String SECURITY_ROLE_ASSIGNMENT =
+         "security-role-assignment";
+ 
+     /**
+      * Element name 'run-as-role-assignment'.
+      */
+     public static final String RUN_AS_ROLE_ASSIGNMENT =
+         "run-as-role-assignment";
+ 
+     /**
+      * Element name 'reference-descriptor'.
+      */
+     public static final String REFERENCE_DESCRIPTOR =
+         "reference-descriptor";
+ 
+     /**
+      * Element name 'session-descriptor'.
+      */
+     public static final String SESSION_DESCRIPTOR =
+         "session-descriptor";
+ 
+     /**
+      * Element name 'jsp-descriptor'.
+      */
+     public static final String JSP_DESCRIPTOR = "jsp-descriptor";
+ 
+     /**
+      * Element name 'auth-filter'.
+      */
+     public static final String AUTH_FILTER = "auth-filter";
+ 
+     /**
+      * Element name 'container-descriptor'.
+      */
+     public static final String CONTAINER_DESCRIPTOR =
+         "container-descriptor";
+ 
+     /**
+      * Element name 'charset-params'.
+      */
+     public static final String CHARSET_PARAMS = "charset-params";
+ 
+     /**
+      * Element name 'virtual-directory-mapping'.
+      */
+     public static final String VIRTUAL_DIRECTORY_MAPPING =
+         "virtual-directory-mapping";
+ 
+     /**
+      * Element name 'url-match-map'.
+      */
+     public static final String URL_MATCH_MAP = "url-match-map";
+ 
+     /**
+      * Element name 'preprocessor'.
+      */
+     public static final String PREPROCESSOR = "preprocessor";
+ 
+     /**
+      * Element name 'preprocessor-mapping'.
+      */
+     public static final String PREPROCESSOR_MAPPING =
+         "preprocessor-mapping";
+ 
+     /**
+      * Element name 'security-permission'.
+      */
+     public static final String SECURITY_PERMISSION =
+         "security-permission";
+ 
+     /**
+      * Element name 'context-root'.
+      */
+     public static final String CONTEXT_ROOT = "context-root";
+ 
+     /**
+      * Element name 'wl-dispatch-policy'.
+      */
+     public static final String WL_DISPATCH_POLICY =
+         "wl-dispatch-policy";
+ 
+     /**
+      * Element name 'servlet-descriptor'.
+      */
+     public static final String SERVLET_DESCRIPTOR =
+         "servlet-descriptor";
+ 
+     /**
+      * Element name 'init-as'.
+      */
+     public static final String INIT_AS = "init-as";
+ 
+     /**
+      * Element name 'destroy-as'.
+      */
+     public static final String DESTROY_AS = "destroy-as";
+ 
+     /**
+      * Element name 'resource-description'.
+      */
+     public static final String RESOURCE_DESCRIPTION =
+         "resource-description";
+ 
+     /**
+      * Element name 'resource-env-description'.
+      */
+     public static final String RESOURCE_ENV_DESCRIPTION =
+         "resource-env-description";
+ 
+     /**
+      * Element name 'ejb-reference-description'.
+      */
+     public static final String EJB_REFERENCE_DESCRIPTION =
+         "ejb-reference-description";
+ 
+     /**
+      * Element name 'ejb-ref-name'.
+      */
+     public static final String EJB_REF_NAME = "ejb-ref-name";
+ 
+     /**
+      * Element name 'jndi-name'.
+      */
+     public static final String JNDI_NAME = "jndi-name";
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      * @param isMultipleAllowed Whether the element may occur multiple times in the descriptor
+      */
+     protected WeblogicXmlTag(DescriptorType type, String tagName, boolean isMultipleAllowed)
+     {
+         super(type, tagName, isMultipleAllowed);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param type Descriptor type
+      * @param tagName The tag name of the element
+      */
+     protected WeblogicXmlTag(DescriptorType type, String tagName)
+     {
+         this(type, tagName, true);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-28/sources/source-4.html b/htmlReport/ns-28/sources/source-4.html new file mode 100644 index 0000000000..85837e21dd --- /dev/null +++ b/htmlReport/ns-28/sources/source-4.html @@ -0,0 +1,188 @@ + + + + + + + + Coverage Report > WeblogicXmlType + + + + + + +
+ + +

Coverage Summary for Class: WeblogicXmlType (org.codehaus.cargo.module.webapp.weblogic)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WeblogicXmlType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.weblogic;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ import org.codehaus.cargo.module.Dtd;
+ 
+ /**
+  */
+ public class WeblogicXmlType extends AbstractDescriptorType
+ {
+     /**
+      * Static instance.
+      */
+     private static WeblogicXmlType instance = new WeblogicXmlType();
+ 
+     /**
+      * Tags for this document type.<br>
+      * The warning <i>value of the field is not used</i> is irrelevant: the
+      * <code>DescriptorTag</code> constructor performs the registrations.
+      */
+     private WeblogicXmlTag[] tags = new WeblogicXmlTag[] {
+         new WeblogicXmlTag(this, "description"),
+         new WeblogicXmlTag(this, "weblogic-version"),
+         new WeblogicXmlTag(this, "security-role-assignment"),
+         new WeblogicXmlTag(this, "run-as-role-assignment"),
+         new WeblogicXmlTag(this, "reference-descriptor"),
+         new WeblogicXmlTag(this, "session-descriptor"),
+         new WeblogicXmlTag(this, "jsp-descriptor"),
+         new WeblogicXmlTag(this, "auth-filter"),
+         new WeblogicXmlTag(this, "container-descriptor"),
+         new WeblogicXmlTag(this, "charset-params"),
+         new WeblogicXmlTag(this, "virtual-directory-mapping"),
+         new WeblogicXmlTag(this, "url-match-map"),
+         new WeblogicXmlTag(this, "preprocessor"),
+         new WeblogicXmlTag(this, "preprocessor-mapping"),
+         new WeblogicXmlTag(this, "security-permission"),
+         new WeblogicXmlTag(this, "context-root"),
+         new WeblogicXmlTag(this, "wl-dispatch-policy"),
+         new WeblogicXmlTag(this, "servlet-descriptor"),
+         new WeblogicXmlTag(this, "init-as"),
+         new WeblogicXmlTag(this, "destroy-as"),
+         new WeblogicXmlTag(this, "resource-description"),
+         new WeblogicXmlTag(this, "resource-env-description"),
+         new WeblogicXmlTag(this, "ejb-reference-description"),
+         new WeblogicXmlTag(this, "ejb-ref-name"),
+         new WeblogicXmlTag(this, "jndi-name")
+     };
+ 
+     /**
+      * Constructor.
+      */
+     protected WeblogicXmlType()
+     {
+         super(null, WeblogicXml.class, new Dtd(
+             "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd"));
+     }
+ 
+     /**
+      * Get the static instance.
+      * @return The instance
+      */
+     public static WeblogicXmlType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-29/index.html b/htmlReport/ns-29/index.html new file mode 100644 index 0000000000..5eef90a907 --- /dev/null +++ b/htmlReport/ns-29/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_BLOCK.html b/htmlReport/ns-29/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..3519181477 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-29/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..8adda07f4b --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_CLASS.html b/htmlReport/ns-29/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..3b6ba4f84d --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-29/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ebee91c878 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_LINE.html b/htmlReport/ns-29/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..a17535425e --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-29/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..3a176ce106 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_METHOD.html b/htmlReport/ns-29/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..ee96cb1a29 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-29/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..d1fc303432 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-29/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..312c134359 --- /dev/null +++ b/htmlReport/ns-29/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.module.webapp.websphere + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.module.webapp.websphere

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.module.webapp.websphere + + 0% + + + (0/4) + + + + 0% + + + (0/10) + + + + 0% + + + (0/35) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-29/sources/source-1.html b/htmlReport/ns-29/sources/source-1.html new file mode 100644 index 0000000000..d3bffdbe8c --- /dev/null +++ b/htmlReport/ns-29/sources/source-1.html @@ -0,0 +1,192 @@ + + + + + + + + Coverage Report > IbmWebBndXmi + + + + + + +
+ + +

Coverage Summary for Class: IbmWebBndXmi (org.codehaus.cargo.module.webapp.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmi + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/14) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.websphere;
+ 
+ import java.util.Random;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptor;
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.DescriptorType;
+ import org.codehaus.cargo.module.webapp.EjbRef;
+ import org.codehaus.cargo.module.webapp.VendorWebAppDescriptor;
+ import org.jdom2.Element;
+ import org.jdom2.Namespace;
+ 
+ /**
+  * Encapsulates the DOM representation of a websphere web deployment descriptor
+  * <code>ibm-web-bnd.xmi</code> to provide convenience methods for easy access and manipulation.
+  */
+ public class IbmWebBndXmi extends AbstractDescriptor implements VendorWebAppDescriptor
+ {
+     /**
+      * File name of this descriptor.
+      */
+     private static final String FILE_NAME = "ibm-web-bnd.xmi";
+ 
+     /**
+      * Random instance for generating xml ids.
+      */
+     private Random random = new Random();
+ 
+     /**
+      * Constructor.
+      * 
+      * @param rootElement The root document element
+      * @param type The descriptor type
+      */
+     public IbmWebBndXmi(Element rootElement, DescriptorType type)
+     {
+         super(rootElement, type);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getFileName()
+     {
+         return FILE_NAME;
+     }
+ 
+     /**
+      * Adds a ejb reference description to the websphere web deployment descriptor.
+      * @param ref the reference to add
+      */
+     @Override
+     public void addEjbReference(EjbRef ref)
+     {
+         Element ejbRefBindingsElement = new Element("ejbRefBindings");
+         String id = "EjbRefBinding_" + this.random.nextLong();
+         Namespace namespace = Namespace.getNamespace("xmi", "http://www.omg.org/XMI");
+         ejbRefBindingsElement.setAttribute("id", id, namespace);
+         ejbRefBindingsElement.setAttribute("jndiName", ref.getJndiName());
+         Element bindingEjbRef = new Element("bindingEjbRef");
+         bindingEjbRef.setAttribute("href", "WEB-INF/web.xml#" + ref.getName().replace('/', '_'));
+         ejbRefBindingsElement.getContent().add(bindingEjbRef);
+ 
+         addElement(new DescriptorTag(
+             IbmWebBndXmiType.getInstance(), "ejbRefBindings", true), ejbRefBindingsElement,
+             getRootElement());
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-29/sources/source-2.html b/htmlReport/ns-29/sources/source-2.html new file mode 100644 index 0000000000..b5a47298d6 --- /dev/null +++ b/htmlReport/ns-29/sources/source-2.html @@ -0,0 +1,172 @@ + + + + + + + + Coverage Report > IbmWebBndXmiGrammar + + + + + + +
+ + +

Coverage Summary for Class: IbmWebBndXmiGrammar (org.codehaus.cargo.module.webapp.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiGrammar + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/15) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.websphere;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.module.DescriptorTag;
+ import org.codehaus.cargo.module.Grammar;
+ 
+ /**
+  * Grammar for a websphere web application descriptor.
+  */
+ public class IbmWebBndXmiGrammar implements Grammar
+ {
+     /**
+      * Name of the root tag.
+      */
+     private static final String ROOT = "WebAppBinding";
+ 
+     /**
+      * Name with namespace of the root tag.
+      */
+     private static final String ROOT_NAMESPACE =
+         "com.ibm.ejs.models.base.bindings.webappbnd:WebAppBinding";
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<DescriptorTag> getElementOrder(String tagName)
+     {
+         List<DescriptorTag> elementOrder = null;
+         if (tagName.equals(ROOT) || tagName.equals(ROOT_NAMESPACE))
+         {
+             elementOrder = new ArrayList<DescriptorTag>();
+             elementOrder.add(new DescriptorTag(
+                 IbmWebBndXmiType.getInstance(), "virtualHostName", true));
+             elementOrder.add(new DescriptorTag(
+                 IbmWebBndXmiType.getInstance(), "webapp", true));
+             elementOrder.add(new DescriptorTag(
+                 IbmWebBndXmiType.getInstance(), "resRefBindings", true));
+             elementOrder.add(new DescriptorTag(
+                 IbmWebBndXmiType.getInstance(), "ejbRefBindings", true));
+             elementOrder.add(new DescriptorTag(
+                 IbmWebBndXmiType.getInstance(), "resourceEnvRefBindings", true));
+         }
+ 
+         return elementOrder;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-29/sources/source-3.html b/htmlReport/ns-29/sources/source-3.html new file mode 100644 index 0000000000..808283476d --- /dev/null +++ b/htmlReport/ns-29/sources/source-3.html @@ -0,0 +1,160 @@ + + + + + + + + Coverage Report > IbmWebBndXmiIo + + + + + + +
+ + +

Coverage Summary for Class: IbmWebBndXmiIo (org.codehaus.cargo.module.webapp.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiIo + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.websphere;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorIo;
+ import org.jdom2.JDOMException;
+ 
+ /**
+  * Provides convenience methods for reading Websphere web deployment descriptor.
+  */
+ public class IbmWebBndXmiIo extends AbstractDescriptorIo
+ {
+     /**
+      * Constructor.
+      */
+     protected IbmWebBndXmiIo()
+     {
+         super(IbmWebBndXmiType.getInstance());
+     }
+ 
+     /**
+      * Parses a deployment descriptor provided as input stream.
+      * 
+      * @param input The input stream
+      * @return The parsed descriptor
+      * @throws JDOMException If the input could not be parsed
+      * @throws IOException If an I/O error occurs
+      */
+     public static IbmWebBndXmi parseIbmWebBndXmi(InputStream input)
+         throws IOException, JDOMException
+     {
+         IbmWebBndXmiIo io = new IbmWebBndXmiIo();
+         return (IbmWebBndXmi) io.parseXml(input);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-29/sources/source-4.html b/htmlReport/ns-29/sources/source-4.html new file mode 100644 index 0000000000..87b1c484d2 --- /dev/null +++ b/htmlReport/ns-29/sources/source-4.html @@ -0,0 +1,152 @@ + + + + + + + + Coverage Report > IbmWebBndXmiType + + + + + + +
+ + +

Coverage Summary for Class: IbmWebBndXmiType (org.codehaus.cargo.module.webapp.websphere)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
IbmWebBndXmiType + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.module.webapp.websphere;
+ 
+ import org.codehaus.cargo.module.AbstractDescriptorType;
+ 
+ /**
+  */
+ public class IbmWebBndXmiType extends AbstractDescriptorType
+ {
+     /**
+      * Instance variable.
+      */
+     private static IbmWebBndXmiType instance = new IbmWebBndXmiType();
+ 
+     /**
+      * Protected constructor.
+      */
+     protected IbmWebBndXmiType()
+     {
+         super(null, IbmWebBndXmi.class, new IbmWebBndXmiGrammar());
+     }
+ 
+     /**
+      * @return static singleton instance
+      */
+     public static IbmWebBndXmiType getInstance()
+     {
+         return instance;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/index.html b/htmlReport/ns-2a/index.html new file mode 100644 index 0000000000..41c2ecfc1a --- /dev/null +++ b/htmlReport/ns-2a/index.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_BLOCK.html b/htmlReport/ns-2a/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..eb8dfaf157 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_BLOCK.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2a/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..723c14a5de --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_CLASS.html b/htmlReport/ns-2a/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..44d3e7ebe8 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_CLASS.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2a/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..935c6c8e85 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_LINE.html b/htmlReport/ns-2a/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..fff90831a5 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_LINE.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2a/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..2785ce4c64 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_METHOD.html b/htmlReport/ns-2a/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..3642b9d2f2 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_METHOD.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2a/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..b86da26cb3 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2a/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..6038abc7b7 --- /dev/null +++ b/htmlReport/ns-2a/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util + + 21.4% + + + (3/14) + + + + 26.7% + + + (31/116) + + + + 24.2% + + + (154/637) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
XmlReplacement + + 0% + + + (0/2) + + + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
FileHandler + + 50% + + + (1/2) + + + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
DefaultFileHandler + + 50% + + + (1/2) + + + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-1.html b/htmlReport/ns-2a/sources/source-1.html new file mode 100644 index 0000000000..2491c45adc --- /dev/null +++ b/htmlReport/ns-2a/sources/source-1.html @@ -0,0 +1,207 @@ + + + + + + + + Coverage Report > CargoException + + + + + + +
+ + +

Coverage Summary for Class: CargoException (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
CargoException + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 33.3% + + + (4/12) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.PrintStream;
+ import java.io.PrintWriter;
+ 
+ /**
+  * Base exception class for all Cargo classes.
+  */
+ public class CargoException extends RuntimeException
+ {
+     /**
+      * Original exception which caused this exception.
+      */
+     private final Throwable originalThrowable;
+ 
+     /**
+      * @param message the exception message
+      */
+     public CargoException(String message)
+     {
+         super(message);
+         this.originalThrowable = null;
+     }
+ 
+     /**
+      * @param message the exception message
+      * @param throwable the exception to wrap
+      */
+     public CargoException(String message, Throwable throwable)
+     {
+         super(message, throwable);
+         this.originalThrowable = throwable;
+     }
+ 
+     /**
+      * @return the wrapped exception
+      */
+     public Throwable getOriginalThrowable()
+     {
+         return this.originalThrowable;
+     }
+ 
+     /**
+      * Print the full stack trace, including the original exception.
+      */
+     @Override
+     public void printStackTrace()
+     {
+         printStackTrace(System.err);
+     }
+ 
+     /**
+      * Print the full stack trace, including the original exception.
+      * 
+      * @param ps the byte stream in which to print the stack trace
+      */
+     @Override
+     public void printStackTrace(PrintStream ps)
+     {
+         super.printStackTrace(ps);
+ 
+         if (getOriginalThrowable() != null)
+         {
+             getOriginalThrowable().printStackTrace(ps);
+         }
+     }
+ 
+     /**
+      * Print the full stack trace, including the original exception.
+      * 
+      * @param pw the character stream in which to print the stack trace
+      */
+     @Override
+     public void printStackTrace(PrintWriter pw)
+     {
+         super.printStackTrace(pw);
+ 
+         if (getOriginalThrowable() != null)
+         {
+             getOriginalThrowable().printStackTrace(pw);
+         }
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-2.html b/htmlReport/ns-2a/sources/source-2.html new file mode 100644 index 0000000000..e979e7f338 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-2.html @@ -0,0 +1,1223 @@ + + + + + + + + Coverage Report > DefaultFileHandler + + + + + + +
+ + +

Coverage Summary for Class: DefaultFileHandler (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
DefaultFileHandler + + 71.8% + + + (28/39) + + + + 40.4% + + + (149/369) + +
DefaultFileHandler$1 + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Total + + 70% + + + (28/40) + + + + 40.3% + + + (149/370) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.BufferedReader;
+ import java.io.BufferedWriter;
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileNotFoundException;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.io.OutputStream;
+ import java.io.OutputStreamWriter;
+ import java.io.Reader;
+ import java.io.Writer;
+ import java.net.MalformedURLException;
+ import java.net.URL;
+ import java.nio.charset.Charset;
+ import java.nio.charset.StandardCharsets;
+ import java.nio.file.Path;
+ import java.util.ArrayList;
+ import java.util.Enumeration;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Random;
+ import java.util.jar.JarEntry;
+ import java.util.jar.JarFile;
+ 
+ import javax.xml.xpath.XPath;
+ import javax.xml.xpath.XPathConstants;
+ import javax.xml.xpath.XPathExpression;
+ import javax.xml.xpath.XPathFactory;
+ 
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ 
+ import org.codehaus.cargo.util.log.LoggedObject;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * File operations that are performed in Cargo. All file operations must use this class.
+  */
+ public class DefaultFileHandler extends LoggedObject implements FileHandler
+ {
+     /**
+      * Default file buffer size.
+      */
+     public static final int FILE_BUFFER_SIZE = 256 * 1024;
+ 
+     /**
+      * Counter for creating unique temp directories.
+      */
+     private static int uniqueNameCounter = -1;
+ 
+     /**
+      * Sanitize a given name to turn it into a safe file name, removing for example leading or
+      * trailing slashes, as well as intermediate parent path jumps.
+      * @param filename name to sanitize
+      * @param logger Logger to log when sanitization happens (optional)
+      * @return sanitized name
+      */
+     public static String sanitizeFilename(String filename, Logger logger)
+     {
+         String sanitizedFilename = filename.replace('\\', '/');
+ 
+         if (sanitizedFilename.startsWith("/"))
+         {
+             if (logger != null)
+             {
+                 logger.debug("File name [" + filename
+                     + "] has trailing slashes, removing for the sanitized file name",
+                         DefaultFileHandler.class.getName());
+             }
+             sanitizedFilename = sanitizedFilename.replaceAll("^\\/+", "");
+         }
+ 
+         if (sanitizedFilename.endsWith("/"))
+         {
+             if (logger != null)
+             {
+                 logger.debug("File name [" + filename
+                     + "] has ending slashes, removing for the sanitized file name",
+                         DefaultFileHandler.class.getName());
+             }
+             sanitizedFilename = sanitizedFilename.replaceAll("\\/+$", "");
+         }
+ 
+         while (sanitizedFilename.contains("/../"))
+         {
+             if (logger != null)
+             {
+                 logger.debug("File name [" + filename
+                     + "] has intermediate /../, replacing with single /",
+                         DefaultFileHandler.class.getName());
+             }
+             sanitizedFilename = sanitizedFilename.replace("/../", "/");
+         }
+ 
+         while (sanitizedFilename.contains("//"))
+         {
+             if (logger != null)
+             {
+                 logger.debug("File name [" + filename
+                     + "] has intermediate //, replacing with single /",
+                         DefaultFileHandler.class.getName());
+             }
+             sanitizedFilename = sanitizedFilename.replace("//", "/");
+         }
+ 
+         return sanitizedFilename.trim();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyFile(String source, String target)
+     {
+         this.copyFile(source, target, false);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyFile(String source, String target, boolean overwrite)
+     {
+         File sourceFile = new File(source);
+         if (!sourceFile.isFile())
+         {
+             throw new CargoException("Source file [" + source + "] is not a file");
+         }
+         File targetFile = new File(target);
+         if (targetFile.isFile() && !overwrite)
+         {
+             getLogger().debug("Skipping copy of existing binary file [" + target + "]",
+                 this.getClass().getName());
+         }
+         else
+         {
+             if (!targetFile.getParentFile().exists())
+             {
+                 this.mkdirs(targetFile.getParentFile().getAbsolutePath());
+             }
+             if (targetFile.isDirectory())
+             {
+                 targetFile = new File(this.append(target, getName(source)));
+             }
+ 
+             try (InputStream in = new FileInputStream(sourceFile);
+                 FileOutputStream out = new FileOutputStream(targetFile))
+             {
+                 this.copy(in, out);
+             }
+             catch (IOException e)
+             {
+                 throw new CargoException("Failed to copy source file [" + source + "] to ["
+                     + targetFile + "]", e);
+             }
+ 
+             long size = targetFile.length();
+             String unit = "bytes";
+             if (size > 1024)
+             {
+                 size = size / 1024;
+                 unit = "KB";
+             }
+             else if (size > 1024)
+             {
+                 size = size / 1024;
+                 unit = "MB";
+             }
+             getLogger().debug("Copied binary file [" + source + "] to [" + target + "] (" + size
+                 + " " + unit + ")", this.getClass().getName());
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyFile(
+         String source, String target, Map<String, String> replacements, Charset encoding)
+     {
+         try (BufferedReader fileReader =
+                 new BufferedReader(this.newReader(this.getInputStream(source), encoding));
+                 BufferedWriter out = new BufferedWriter(this.newWriter(target, encoding)))
+         {
+             String line;
+             while ((line = fileReader.readLine()) != null)
+             {
+                 if (line.isEmpty())
+                 {
+                     out.newLine();
+                 }
+                 else
+                 {
+                     if (replacements != null)
+                     {
+                         for (Map.Entry<String, String> replacement : replacements.entrySet())
+                         {
+                             String replacementKey = "@" + replacement.getKey() + "@";
+                             line = line.replace(replacementKey, replacement.getValue());
+                         }
+                     }
+                     out.write(line);
+                     out.newLine();
+                 }
+             }
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Failed to copy source file [" + source + "] to [" + target
+                     + "] with replacements", e);
+         }
+ 
+         long size = getSize(target);
+         String unit = "bytes";
+         if (size > 1024)
+         {
+             size = size / 1024;
+             unit = "KB";
+         }
+         else if (size > 1024)
+         {
+             size = size / 1024;
+             unit = "MB";
+         }
+         getLogger().debug("Copied text file [" + source + "] to [" + target + "] (" + size + " "
+             + unit + "), encoding " + encoding, this.getClass().getName());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyDirectory(String source, String target)
+     {
+         this.copyDirectory(source, target, null);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyDirectory(String source, String target, List<String> excludes)
+     {
+         File sourceDirectory = new File(source);
+         if (!sourceDirectory.isDirectory())
+         {
+             throw new CargoException("Source [" + source + "] is not a directory");
+         }
+ 
+         File targetDirectory = new File(target);
+         if (!targetDirectory.isDirectory())
+         {
+             targetDirectory.mkdirs();
+         }
+         if (!targetDirectory.isDirectory())
+         {
+             throw new CargoException("Target directory [" + target + "] cannot be created");
+         }
+ 
+         for (File sourceDirectoryContent : sourceDirectory.listFiles())
+         {
+             String sourcePath = sourceDirectoryContent.getAbsolutePath();
+             String subtarget = this.append(target, sourceDirectoryContent.getName());
+ 
+             boolean included = true;
+             if (excludes != null)
+             {
+                 for (String exclude : excludes)
+                 {
+                     if (exclude.endsWith("/**"))
+                     {
+                         if (sourceDirectoryContent.isDirectory())
+                         {
+                             if (sourceDirectoryContent.getName().equals(
+                                 exclude.substring(0, exclude.length() - 3)))
+                             {
+                                 // Content of the directory should be ignored,
+                                 // nevertheless an (empty) target directory should be kept
+                                 this.mkdirs(subtarget);
+ 
+                                 included = false;
+                                 break;
+                             }
+                         }
+                     }
+                     else if (exclude.startsWith("**/"))
+                     {
+                         if (sourceDirectoryContent.isFile())
+                         {
+                             if (sourceDirectoryContent.getName().endsWith(exclude.substring(3)))
+                             {
+                                 included = false;
+                                 break;
+                             }
+                         }
+                     }
+                     else if (exclude.contains("*") || exclude.contains("/"))
+                     {
+                         throw new CargoException("Unsupported exclusion filter: " + exclude);
+                     }
+                 }
+             }
+             if (included)
+             {
+                 if (sourceDirectoryContent.isDirectory())
+                 {
+                     // For subdirectories, only add file exclusions into the list
+                     List<String> updatedExcludes = null;
+                     if (excludes != null)
+                     {
+                         for (String exclude : excludes)
+                         {
+                             if (exclude.startsWith("**/"))
+                             {
+                                 if (updatedExcludes == null)
+                                 {
+                                     updatedExcludes = new ArrayList<String>();
+                                     updatedExcludes.add(exclude);
+                                 }
+                             }
+                         }
+                     }
+ 
+                     this.copyDirectory(sourcePath, subtarget, updatedExcludes);
+                 }
+                 else
+                 {
+                     this.copyFile(sourcePath, subtarget);
+                 }
+             }
+         }
+ 
+         getLogger().debug("Copied directory [" + source + "] to [" + target + "] with exclusions ["
+             + excludes + "]", this.getClass().getName());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copyDirectory(
+         String source, String target, Map<String, String> replacements, Charset encoding)
+     {
+         File sourceDirectory = new File(source);
+         if (!sourceDirectory.isDirectory())
+         {
+             throw new CargoException("Source [" + source + "] is not a directory");
+         }
+ 
+         File targetDirectory = new File(target);
+         if (!targetDirectory.isDirectory())
+         {
+             targetDirectory.mkdirs();
+         }
+         if (!targetDirectory.isDirectory())
+         {
+             throw new CargoException("Target directory [" + target + "] cannot be created");
+         }
+ 
+         for (File sourceDirectoryContent : sourceDirectory.listFiles())
+         {
+             File targetFile = new File(targetDirectory, sourceDirectoryContent.getName());
+             if (sourceDirectoryContent.isFile())
+             {
+                 if (replacements == null)
+                 {
+                     this.copyFile(
+                         sourceDirectoryContent.getAbsolutePath(), targetFile.getAbsolutePath());
+                 }
+                 else
+                 {
+                     this.copyFile(sourceDirectoryContent.getAbsolutePath(),
+                         targetFile.getAbsolutePath(), replacements, encoding);
+                 }
+             }
+             else
+             {
+                 this.copyDirectory(sourceDirectoryContent.getAbsolutePath(),
+                     targetFile.getAbsolutePath(), replacements, encoding);
+             }
+         }
+ 
+         getLogger().debug("Copied directory [" + source + "] to [" + target
+             + "] with replacements [" + replacements + "]", this.getClass().getName());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void explode(String war, String exploded)
+     {
+         if (exists(exploded))
+         {
+             delete(exploded);
+         }
+ 
+         Path explodedPath = new File(exploded).toPath();
+         try (JarFile archive = new JarFile(new File(war).getAbsoluteFile()))
+         {
+             Enumeration e = archive.entries();
+             while (e.hasMoreElements())
+             {
+                 JarEntry j = (JarEntry) e.nextElement();
+                 String dst = this.append(exploded,
+                     DefaultFileHandler.sanitizeFilename(j.getName(), getLogger()));
+ 
+                 if (j.isDirectory())
+                 {
+                     this.mkdirs(dst);
+                     continue;
+                 }
+ 
+                 this.mkdirs(getParent(dst));
+ 
+                 try (InputStream in = archive.getInputStream(j);
+                     FileOutputStream out = new FileOutputStream(dst))
+                 {
+                     this.copy(in, out);
+                 }
+             }
+         }
+         catch (IOException e)
+         {
+             try
+             {
+                 delete(exploded);
+             }
+             catch (Exception ignored)
+             {
+                 // Ignored
+             }
+ 
+             throw new CargoException(
+                 "Failed to extract file [" + war + "] to [" + exploded + "]", e);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String createDirectory(String parentDir, String name)
+     {
+         File dir = new File(parentDir, name);
+         this.mkdirs(dir.getAbsolutePath());
+         if (!dir.isDirectory() || !dir.exists())
+         {
+             throw new CargoException("Couldn't create directory " + dir.getAbsolutePath());
+         }
+         return dir.getPath();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void copy(InputStream in, OutputStream out, int bufSize)
+     {
+         try
+         {
+             byte[] buf = new byte[bufSize];
+             int length;
+             while ((length = in.read(buf)) != -1)
+             {
+                 out.write(buf, 0, length);
+             }
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Failed to copy input stream [" + in.toString()
+                 + "] to output stream [" + out.toString() + "]", e);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}. The default buffer size is {@link DefaultFileHandler#FILE_BUFFER_SIZE}.
+      */
+     @Override
+     public void copy(InputStream in, OutputStream out)
+     {
+         this.copy(in, out, DefaultFileHandler.FILE_BUFFER_SIZE);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void replaceInFile(String file, Map<String, String> replacements, Charset encoding)
+         throws CargoException
+     {
+         replaceInFile(file, replacements, encoding, false);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void replaceInFile(String file, Map<String, String> replacements, Charset encoding,
+         boolean ignoreNonExistingProperties) throws CargoException
+     {
+         String fileContents = readTextFile(file, encoding);
+ 
+         for (Map.Entry<String, String> replacement : replacements.entrySet())
+         {
+             if (!fileContents.contains(replacement.getKey()))
+             {
+                 String message = "File " + file + " does not contain replacement key "
+                     + replacement.getKey();
+ 
+                 if (ignoreNonExistingProperties)
+                 {
+                     getLogger().debug(message, this.getClass().getName());
+                     continue;
+                 }
+                 else
+                 {
+                     throw new CargoException(message);
+                 }
+             }
+ 
+             fileContents = fileContents.replace(replacement.getKey(), replacement.getValue());
+         }
+ 
+         writeTextFile(file, fileContents, encoding);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void replaceInXmlFile(XmlReplacement... xmlReplacements) throws CargoException
+     {
+         Map<String, Map<XmlReplacementDetails, String>> replacements =
+             new HashMap<String, Map<XmlReplacementDetails, String>>();
+ 
+         for (XmlReplacement xmlReplacement : xmlReplacements)
+         {
+             Map<XmlReplacementDetails, String> replacementDetails =
+                 replacements.get(xmlReplacement.getFile());
+             if (replacementDetails == null)
+             {
+                 replacementDetails = new HashMap<XmlReplacementDetails, String>();
+                 replacements.put(xmlReplacement.getFile(), replacementDetails);
+             }
+ 
+             XmlReplacementDetails xmlReplacementDetails = new XmlReplacementDetails(
+                 xmlReplacement.getXpathExpression(), xmlReplacement.getAttributeName(),
+                     xmlReplacement.getReplacementBehavior());
+             replacementDetails.put(xmlReplacementDetails, xmlReplacement.getValue());
+         }
+ 
+         for (Map.Entry<String, Map<XmlReplacementDetails, String>> replacement
+             : replacements.entrySet())
+         {
+             replaceInXmlFile(replacement.getKey(), replacement.getValue());
+         }
+     }
+ 
+     /**
+      * Replaces using a map of XML replacements in a given file.
+      * 
+      * @param file File to replace in.
+      * @param replacements Map containing XML replacements.
+      * @throws CargoException If anything fails, most notably if one of the replacements does not
+      * exist in the file.
+      */
+     private void replaceInXmlFile(String file, Map<XmlReplacementDetails, String> replacements)
+         throws CargoException
+     {
+         XmlUtils domUtils = new XmlUtils(this);
+         Document doc = domUtils.loadXmlFromFile(file);
+ 
+         try
+         {
+             XPathFactory xPathFactory = XPathFactory.newInstance();
+             XPath xPath = xPathFactory.newXPath();
+ 
+             for (Map.Entry<XmlReplacementDetails, String> replacement : replacements.entrySet())
+             {
+                 String expression = replacement.getKey().getXpathExpression();
+                 String attributeName = replacement.getKey().getAttributeName();
+ 
+                 XPathExpression xPathExpr = xPath.compile(expression);
+ 
+                 Node node = (Node) xPathExpr.evaluate(doc, XPathConstants.NODE);
+ 
+                 if (node == null)
+                 {
+                     String message = "Node " + expression + " not found in file " + file;
+ 
+                     XmlReplacement.ReplacementBehavior replacementBehavior =
+                             replacement.getKey().getReplacementBehavior();
+                     switch (replacementBehavior)
+                     {
+                         case IGNORE_IF_NON_EXISTING:
+                             getLogger().debug(message, this.getClass().getName());
+                             continue;
+ 
+                         case THROW_EXCEPTION:
+                             throw new CargoException(message);
+ 
+                         case ADD_MISSING_NODES:
+                             node = new MissingXmlElementAppender(doc, expression).append();
+                             break;
+ 
+                         default:
+                             throw new IllegalStateException("Unknown ReplacementBehavior ["
+                                 + replacementBehavior + "]");
+                     }
+                 }
+ 
+                 if (attributeName != null)
+                 {
+                     Node attribute = node.getAttributes().getNamedItem(attributeName);
+ 
+                     if (attribute == null)
+                     {
+                         ((Element) node).setAttribute(attributeName, replacement.getValue());
+                     }
+                     else
+                     {
+                         attribute.setNodeValue(replacement.getValue());
+                     }
+                 }
+                 else
+                 {
+                     node.setTextContent(replacement.getValue());
+                 }
+             }
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Cannot modify XML document " + file, e);
+         }
+ 
+         domUtils.saveXml(doc, file);
+ 
+         getLogger().debug("Performed XML replacements in [" + file + "]",
+             this.getClass().getName());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getTmpPath(String name)
+     {
+         return new File(new File(System.getProperty("java.io.tmpdir"), "cargo"), name).getPath();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public synchronized String createUniqueTmpDirectory()
+     {
+         if (uniqueNameCounter == -1)
+         {
+             uniqueNameCounter = new Random().nextInt() & 0xffff;
+         }
+         File tmpDir;
+         do
+         {
+             uniqueNameCounter++;
+             tmpDir = new File(this.getTmpPath(Integer.toString(uniqueNameCounter)));
+         }
+         while (tmpDir.exists());
+         tmpDir.deleteOnExit();
+         this.mkdirs(tmpDir.getAbsolutePath());
+ 
+         getLogger().debug("Created unique temporary directory [" + tmpDir + "]",
+             this.getClass().getName());
+ 
+         return tmpDir.getPath();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void delete(String path)
+     {
+         File pathAsFile = new File(path);
+         if (pathAsFile.isDirectory())
+         {
+             File[] children = pathAsFile.listFiles();
+             for (File element : children)
+             {
+                 delete(element.getPath());
+             }
+         }
+         pathAsFile.delete();
+ 
+         getLogger().debug("Deleted file [" + path + "]", this.getClass().getName());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public long getSize(String file)
+     {
+         File fileObject = new File(file).getAbsoluteFile();
+         if (!fileObject.isFile())
+         {
+             throw new CargoException("File [" + file + "] is not a file");
+         }
+         return fileObject.length();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public InputStream getInputStream(String file)
+     {
+         InputStream is;
+         try
+         {
+             is = new FileInputStream(new File(file).getAbsoluteFile());
+         }
+         catch (FileNotFoundException e)
+         {
+             throw new CargoException("Failed to find file [" + file + "]", e);
+         }
+         return is;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public OutputStream getOutputStream(String file)
+     {
+         String parent = getParent(file);
+         if (parent != null)
+         {
+             this.mkdirs(parent);
+         }
+ 
+         OutputStream os;
+         try
+         {
+             os = new FileOutputStream(file);
+         }
+         catch (FileNotFoundException e)
+         {
+             throw new CargoException("Failed to open output stream for file [" + file + "]", e);
+         }
+         return os;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String append(String path, String suffixToAppend)
+     {
+         String result;
+         if (!path.endsWith("/") && !path.endsWith("\\"))
+         {
+             if (path.contains("\\"))
+             {
+                 result = path + "\\" + suffixToAppend;
+             }
+             else
+             {
+                 result = path + "/" + suffixToAppend;
+             }
+         }
+         else
+         {
+             result = path + suffixToAppend;
+         }
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void mkdirs(String path)
+     {
+         File pathFile = new File(path);
+         boolean success = false;
+ 
+         for (int i = 0; i < 3 && !success; i++)
+         {
+             // mkdirs() return false when the directory already exists so test for existence first
+             if (pathFile.isFile())
+             {
+                 throw new CargoException("Path [" + pathFile + "] is a file and not a directory");
+             }
+             else if (pathFile.isDirectory())
+             {
+                 success = true;
+ 
+                 getLogger().debug("Directory [" + pathFile + "] exists",
+                     this.getClass().getName());
+             }
+             else
+             {
+                 getLogger().debug("Creating directory [" + pathFile + "] and parents",
+                     this.getClass().getName());
+ 
+                 success = pathFile.mkdirs();
+             }
+         }
+ 
+         if (!success)
+         {
+             throw new CargoException("Failed to create folders for path [" + path + "]");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getParent(String path)
+     {
+         return new File(path).getParent();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean exists(String path)
+     {
+         // Security note: Uncontrolled data used in path expression not relevant, we don't output
+         return new File(path).exists();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void createFile(String file)
+     {
+         String parent = getParent(file);
+         if (!isDirectory(parent))
+         {
+             mkdirs(parent);
+         }
+ 
+         try
+         {
+             // If the file already exists, createNewFile() returns false but we ignore it as
+             // we're just happy the file has been created in both cases.
+             new File(file).createNewFile();
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Failed to create file [" + file + "]", e);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isDirectoryEmpty(String dir)
+     {
+         File directory = new File(dir);
+         if (!directory.isDirectory())
+         {
+             throw new CargoException("Path [" + dir + "] does not exist or is not a directory");
+         }
+         return directory.list().length == 0;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getName(String file)
+     {
+         return new File(file).getName();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getURL(String path)
+     {
+         URL result;
+         try
+         {
+             result = new File(path).toURI().toURL();
+         }
+         catch (MalformedURLException e)
+         {
+             throw new CargoException("Failed to return URL for [" + path + "]", e);
+         }
+         return result.toString();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isDirectory(String path)
+     {
+         return new File(path).isDirectory();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String[] getChildren(String directory)
+     {
+         return getChildren(directory, null);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String[] getChildren(String directory, List<String> filters)
+     {
+         List<String> results = new ArrayList<String>();
+ 
+         // Note: we use listFiles() instead of list() because list() returns relative paths only
+         // and we need to return full paths.
+         File[] files = new File(directory).listFiles();
+         for (int i = 0; i < files.length; i++)
+         {
+             if (filters != null)
+             {
+                 for (String filter : filters)
+                 {
+                     if (filter.contains("/"))
+                     {
+                         throw new CargoException("Unsupported file filter: " + filter);
+                     }
+                     else if (filter.startsWith("*"))
+                     {
+                         if (files[i].getName().endsWith(filter.substring(1)))
+                         {
+                             results.add(files[i].getPath());
+                         }
+                     }
+                     else if (filter.contains("*"))
+                     {
+                         throw new CargoException("Unsupported file filter: " + filter);
+                     }
+                     else if (files[i].getName().equals(filter))
+                     {
+                         results.add(files[i].getPath());
+                     }
+                 }
+             }
+             else
+             {
+                 results.add(files[i].getPath());
+             }
+         }
+ 
+         return results.toArray(new String[results.size()]);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getAbsolutePath(String path)
+     {
+         File file = new File(path);
+         if (!file.isAbsolute())
+         {
+             file = new File(System.getProperty("user.dir"), file.getPath());
+         }
+         return file.getAbsolutePath();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String readTextFile(String file, Charset encoding)
+     {
+         try (BufferedReader in =
+             new BufferedReader(this.newReader(this.getInputStream(file), encoding)))
+         {
+             String str;
+             StringBuilder out = new StringBuilder();
+             while ((str = in.readLine()) != null)
+             {
+                 if (out.length() > 0)
+                 {
+                     out.append(System.getProperty("line.separator"));
+                 }
+                 out.append(str);
+             }
+             return out.toString();
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Failed to read text from file: " + file, e);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void writeTextFile(String file, String content, Charset encoding)
+     {
+         try (Writer writer = this.newWriter(file, encoding))
+         {
+             writer.write(content);
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Cannot write file" + file, e);
+         }
+ 
+         getLogger().debug("Wrote text file [" + file + "], encoding " + encoding,
+             this.getClass().getName());
+     }
+ 
+     /**
+      * @param is The input stream to wrap, must not be {@code null}.
+      * @param encoding The character encoding, may be {@code null}.
+      * @return The reader, never {@code null}.
+      * @throws IOException If the reader could not be opened.
+      */
+     private Reader newReader(InputStream is, Charset encoding) throws IOException
+     {
+         if (encoding == null)
+         {
+             return new InputStreamReader(is, StandardCharsets.UTF_8);
+         }
+         else
+         {
+             return new InputStreamReader(is, encoding);
+         }
+     }
+ 
+     /**
+      * @param file The file to open, must not be {@code null}.
+      * @param encoding The character encoding, may be {@code null}.
+      * @return The writer, never {@code null}.
+      * @throws IOException If the writer could not be opened.
+      */
+     private Writer newWriter(String file, Charset encoding) throws IOException
+     {
+         String parent = getParent(file);
+         if (!isDirectory(parent))
+         {
+             this.mkdirs(parent);
+         }
+ 
+         if (encoding == null)
+         {
+             return new OutputStreamWriter(getOutputStream(file), StandardCharsets.UTF_8);
+         }
+         else
+         {
+             return new OutputStreamWriter(getOutputStream(file), encoding);
+         }
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-3.html b/htmlReport/ns-2a/sources/source-3.html new file mode 100644 index 0000000000..7bb04abf2a --- /dev/null +++ b/htmlReport/ns-2a/sources/source-3.html @@ -0,0 +1,248 @@ + + + + + + + + Coverage Report > DefaultXmlFileBuilder + + + + + + +
+ + +

Coverage Summary for Class: DefaultXmlFileBuilder (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DefaultXmlFileBuilder + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.util.Map;
+ 
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ import org.w3c.dom.NodeList;
+ 
+ /**
+  * {@inheritDoc} This implementation uses the {@link XmlUtils} class to manipulate XML files.
+  */
+ public class DefaultXmlFileBuilder implements XmlFileBuilder
+ {
+ 
+     /**
+      * used to access more sophisticated XML utility functions.
+      */
+     private XmlUtils xmlUtil;
+ 
+     /**
+      * the name of the file we are to load or save.
+      */
+     private String path;
+ 
+     /**
+      * representation of the document in progress.
+      */
+     private Document document;
+ 
+     /**
+      * creates the instance, which will use the specified @{link FileHandler fileHandler} to read or
+      * write the xml file.
+      * 
+      * @param fileHandler used for file i/o.
+      */
+     public DefaultXmlFileBuilder(FileHandler fileHandler)
+     {
+         xmlUtil = new XmlUtils(fileHandler);
+     }
+ 
+     /**
+      * creates the instance, which will use the specified @{link FileHandler fileHandler} to read or
+      * write the xml file.
+      * 
+      * @param fileHandler used for file i/o.
+      * @param namespaceAware true if builder should be namespace aware.
+      */
+     public DefaultXmlFileBuilder(FileHandler fileHandler, boolean namespaceAware)
+     {
+         xmlUtil = new XmlUtils(fileHandler, namespaceAware);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setFile(String path)
+     {
+         this.path = path;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void insertElementsUnderXPath(String elementsToParse, String xpath)
+     {
+         Element parent = xmlUtil.selectElementMatchingXPath(xpath, document.getDocumentElement());
+ 
+         StringBuilder nested = new StringBuilder();
+         nested.append("<parent>");
+         nested.append(elementsToParse);
+         nested.append("</parent>");
+         Element nestedElements = xmlUtil.parseIntoElement(nested.toString());
+         NodeList children = nestedElements.getChildNodes();
+         for (int i = 0; i < children.getLength(); i++)
+         {
+             Node child = children.item(i);
+             Node clone = parent.getOwnerDocument().importNode(child, true);
+             parent.appendChild(clone);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void insertElementUnderXPath(Element elementToInsert, String xpath)
+     {
+         Element parent = xmlUtil.selectElementMatchingXPath(xpath, document.getDocumentElement());
+ 
+         Node clone = parent.getOwnerDocument().importNode(elementToInsert, true);
+         parent.appendChild(clone);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Document loadFile()
+     {
+         this.document = xmlUtil.loadXmlFromFile(path);
+         return this.document;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void writeFile()
+     {
+         xmlUtil.saveXml(document, path);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setNamespaces(Map<String, String> namespaces)
+     {
+         xmlUtil.setNamespaces(namespaces);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-4.html b/htmlReport/ns-2a/sources/source-4.html new file mode 100644 index 0000000000..261b48f9d4 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-4.html @@ -0,0 +1,177 @@ + + + + + + + + Coverage Report > ElementNotFoundException + + + + + + +
+ + +

Coverage Summary for Class: ElementNotFoundException (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ElementNotFoundException + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import org.w3c.dom.Element;
+ 
+ /**
+  * Exception raised when an XPath search returns no results.
+  */
+ public class ElementNotFoundException extends RuntimeException
+ {
+ 
+     /**
+      * XPath query that failed to match.
+      */
+     private final String xpath;
+ 
+     /**
+      * Base element for search.
+      */
+     private final Element searched;
+ 
+     /**
+      * Constructor that provides a default message based on the XPath and element search.
+      * 
+      * @param xpath query that failed
+      * @param searched context under which the query failed to match
+      */
+     public ElementNotFoundException(String xpath, Element searched)
+     {
+         super("XPath: " + xpath + " not found in element: " + searched.getNodeName());
+         this.xpath = xpath;
+         this.searched = searched;
+     }
+ 
+     /**
+      * Getter that returns the XML Element which didn't match on the given XPath.
+      * 
+      * @return context of the XPath query.
+      */
+     public Element getSearched()
+     {
+         return searched;
+     }
+ 
+     /**
+      * Getter for the XPath that didn't match.
+      * 
+      * @return the XPath query that failed
+      */
+     public String getXpath()
+     {
+         return xpath;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-5.html b/htmlReport/ns-2a/sources/source-5.html new file mode 100644 index 0000000000..b12b3de753 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-5.html @@ -0,0 +1,547 @@ + + + + + + + + Coverage Report > FileHandler + + + + + + +
+ + +

Coverage Summary for Class: FileHandler (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
FileHandler + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
FileHandler$XmlReplacementDetails + + 0% + + + (0/7) + + + + 0% + + + (0/16) + +
Total + + 12.5% + + + (1/8) + + + + 5.9% + + + (1/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.nio.charset.Charset;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * File operations that are performed in Cargo. All file operations must use this interface. This
+  * interface is also useful for unit testing as it's possible to create a mock implementation of it
+  * to prevent actual file operations from happening.
+  */
+ public interface FileHandler extends Loggable
+ {
+ 
+     /**
+      * New line character.
+      */
+     String NEW_LINE = System.getProperty("line.separator");
+ 
+     /**
+      * Represents details of an XML replacement.
+      */
+     class XmlReplacementDetails
+     {
+         /**
+          * XPath expression.
+          */
+         private String xpathExpression;
+ 
+         /**
+          * XML attribute name.
+          */
+         private String attributeName;
+ 
+         /**
+          * Behavior if XPath expression doesn't match anything.
+          */
+         private XmlReplacement.ReplacementBehavior replacementBehavior;
+ 
+         /**
+          * String form.
+          */
+         private String toString;
+ 
+         /**
+          * Saves the attributes for this XML replacement.
+          * @param xpathExpression XPath expression.
+          * @param attributeName XML attribute name.
+          * @param replacementBehavior Behavior if XPath expression doesn't match anything.
+          */
+         public XmlReplacementDetails(String xpathExpression, String attributeName,
+             XmlReplacement.ReplacementBehavior replacementBehavior)
+         {
+             this.xpathExpression = xpathExpression;
+             this.attributeName = attributeName;
+             this.replacementBehavior = replacementBehavior;
+             this.toString = "XmlReplacement[xpathExpression='" + xpathExpression
+                 + "',attributeName='" + attributeName + "']";
+         }
+ 
+         /**
+          * @return XPath expression.
+          */
+         public String getXpathExpression()
+         {
+             return xpathExpression;
+         }
+ 
+         /**
+          * @return XML attribute name.
+          */
+         public String getAttributeName()
+         {
+             return attributeName;
+         }
+ 
+         /**
+          * @return ReplacementBehavior
+          */
+         public XmlReplacement.ReplacementBehavior getReplacementBehavior()
+         {
+             return replacementBehavior;
+         }
+ 
+         /**
+          * {@inheritDoc}
+          */
+         @Override
+         public String toString()
+         {
+             return toString;
+         }
+ 
+         /**
+          * {@inheritDoc}
+          */
+         @Override
+         public boolean equals(Object obj)
+         {
+             if (obj == null)
+             {
+                 return false;
+             }
+             if (getClass() != obj.getClass())
+             {
+                 return false;
+             }
+ 
+             final XmlReplacementDetails other = (XmlReplacementDetails) obj;
+             return this.toString.equals(other.toString);
+         }
+ 
+         /**
+          * {@inheritDoc}
+          */
+         @Override
+         public int hashCode()
+         {
+             return this.toString.hashCode();
+         }
+     }
+ 
+     /**
+      * Copy a file from a source to a destination. If destination file already exists, it is not
+      * overwritten.
+      * 
+      * @param source the file to copy from. Must not be <code>null</code>.
+      * @param target the file to copy to. Must not be <code>null</code>.
+      */
+     void copyFile(String source, String target);
+ 
+     /**
+      * Copy a file from a source to a destination specifying if source files may overwrite newer
+      * destination files.
+      * 
+      * @param source the file to copy from. Must not be <code>null</code>.
+      * @param target the file to copy to. Must not be <code>null</code>.
+      * @param overwrite to overwrite the file if it already exists.
+      */
+     void copyFile(String source, String target, boolean overwrite);
+ 
+     /**
+      * Copy a file from a source to a destination using token replacement.
+      * 
+      * @param source the file to copy from. Must not be <code>null</code>
+      * @param target the file to copy to. Must not be <code>null</code>
+      * @param replacements the token replacements to use. Must not be <code>null</code>
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      */
+     void copyFile(
+         String source, String target, Map<String, String> replacements, Charset encoding);
+ 
+     /**
+      * Copy a directory from a source to a destination.
+      * 
+      * @param source the directory to copy from. Must not be <code>null</code>.
+      * @param target the directory to copy to. Must not be <code>null</code>.
+      */
+     void copyDirectory(String source, String target);
+ 
+     /**
+      * Copy a directory from a source to a destination specifying files to be excluded.
+      * 
+      * @param source the directory to copy from. Must not be <code>null</code>.
+      * @param target the directory to copy to. Must not be <code>null</code>.
+      * @param excludes the list of files to be excluded, can be <code>null</code>.
+      * Each entry in the list is an <a
+      * href="http://ant.apache.org/manual/dirtasks.html#patterns">Ant file pattern</a>.
+      */
+     void copyDirectory(String source, String target, List<String> excludes);
+ 
+     /**
+      * Copy a directory from a source to a destination using a token replacement.
+      * 
+      * @param source the directory to copy from. Must not be <code>null</code>
+      * @param target the directory to copy to. Must not be <code>null</code>
+      * @param replacements the token replacements to use. Must not be <code>null</code>
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      */
+     void copyDirectory(
+         String source, String target, Map<String, String> replacements, Charset encoding);
+ 
+     /**
+      * Extracts a war file into a directory.
+      * 
+      * @param war the War archive to be extracted.
+      * @param exploded the directory that receives files.
+      */
+     void explode(String war, String exploded);
+ 
+     /**
+      * Convenience method for creating a new directory inside another one. If the directory already
+      * exists, it will return the already created directory.
+      * 
+      * @param parentDir The directory in which the new directory should be created
+      * @param name The name of the directory to create
+      * @return The new directory
+      */
+     String createDirectory(String parentDir, String name);
+ 
+     /**
+      * Copies data from an InputStream to an OutputStream.
+      * 
+      * @param in InputStream to copy data from
+      * @param out OutputStream to copy data to
+      * @param bufSize size of the copy buffer
+      */
+     void copy(InputStream in, OutputStream out, int bufSize);
+ 
+     /**
+      * Copies data from an InputStream to an OutputStream using a default buffer size.
+      * 
+      * @param in InputStream to copy data from
+      * @param out OutputStream to copy data to
+      */
+     void copy(InputStream in, OutputStream out);
+ 
+     /**
+      * Replaces using a map of replacements in a given file.
+      * 
+      * @param file File to replace in.
+      * @param replacements Map containing replacements.
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      * @throws CargoException If anything fails, most notably if one of the replacements does not
+      * exist in the file.
+      */
+     void replaceInFile(String file, Map<String, String> replacements, Charset encoding)
+         throws CargoException;
+ 
+     /**
+      * Replaces using a map of replacements in a given file.
+      * 
+      * @param file File to replace in.
+      * @param replacements Map containing replacements.
+      * @param ignoreNonExistingProperties Whether to ignore if one of the keys cannot be found.
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      * @throws CargoException If anything fails, most notably if one of the replacements does not
+      * exist in the file.
+      */
+     void replaceInFile(String file, Map<String, String> replacements, Charset encoding,
+         boolean ignoreNonExistingProperties) throws CargoException;
+ 
+     /**
+      * Replaces using a map of XML replacements in a given file.
+      * 
+      * @param xmlReplacements Array of XML replacements.
+      * @throws CargoException If anything fails, most notably if one of the replacements does not
+      * exist in the file.
+      */
+     void replaceInXmlFile(XmlReplacement... xmlReplacements)
+         throws CargoException;
+ 
+     /**
+      * Compute the location of a temporary directory.
+      * 
+      * @param name The name of the directory to compute inside the tmp directory
+      * @return the location of the computed temporary directory
+      */
+     String getTmpPath(String name);
+ 
+     /**
+      * Creates a unique temporary directory.
+      * 
+      * @return the newly created temporary directory
+      */
+     String createUniqueTmpDirectory();
+ 
+     /**
+      * Deletes a file or directory, removing any children as appropriate.
+      * 
+      * @param path the path to the file or directory to remove
+      */
+     void delete(String path);
+ 
+     /**
+      * @param file the file for which to get the size
+      * @return long Size of the file, in bytes
+      */
+     long getSize(String file);
+ 
+     /**
+      * @param file the file for which to get an InputStream for
+      * @return an InputStream pointing to the file
+      */
+     InputStream getInputStream(String file);
+ 
+     /**
+      * @param file the file for which to get an OutputStream for
+      * @return an OutputStream pointing to the file
+      */
+     OutputStream getOutputStream(String file);
+ 
+     /**
+      * Append a suffix path to an existing path.
+      * 
+      * @param path the path to append to
+      * @param suffixToAppend the suffix to append to the path
+      * @return the new full path
+      */
+     String append(String path, String suffixToAppend);
+ 
+     /**
+      * Create directories for the passed path.
+      * 
+      * @param path the path for which to create all directories leading to it
+      */
+     void mkdirs(String path);
+ 
+     /**
+      * @param path the path for which to return its parent
+      * @return the parent path of the passed path
+      */
+     String getParent(String path);
+ 
+     /**
+      * @param path the path to check the existence for
+      * @return true if the path exists or false otherwise
+      */
+     boolean exists(String path);
+ 
+     /**
+      * Create a file.
+      * 
+      * @param file the file to create
+      */
+     void createFile(String file);
+ 
+     /**
+      * @param dir the directory to check
+      * @return true if the passed directory is empty
+      */
+     boolean isDirectoryEmpty(String dir);
+ 
+     /**
+      * @param path the path to verify
+      * @return true if the path passed is a directory or false otherwise
+      */
+     boolean isDirectory(String path);
+ 
+     /**
+      * @param file the file name for which to return the file name
+      * @return the file name (without path)
+      */
+     String getName(String file);
+ 
+     /**
+      * @param path the path for which to return the URL
+      * @return the URL for the passed path
+      */
+     String getURL(String path);
+ 
+     /**
+      * @param directory the directory for which to return all children
+      * @return the children of the passed directory
+      */
+     String[] getChildren(String directory);
+ 
+     /**
+      * @param directory the directory for which to return all children
+      * @param filters any filters to apply when listing, can be <code>null</code>
+      * Each entry in the list is an <a
+      * href="http://ant.apache.org/manual/dirtasks.html#patterns">Ant file pattern</a>.
+      * @return the children of the passed directory
+      */
+     String[] getChildren(String directory, List<String> filters);
+ 
+     /**
+      * gets the absolute path from a file that may be relative to the current directory.
+      * 
+      * @param path - what to extract the file path from
+      * @return - absolute path to the file
+      */
+     String getAbsolutePath(String path);
+ 
+     /**
+      * @param file the file for which to load into a String object.
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      * @return a String with the file's contents.
+      */
+     String readTextFile(String file, Charset encoding);
+ 
+     /**
+      * @param file the file in which to write the String object.
+      * @param content String to write into the file.
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      */
+     void writeTextFile(String file, String content, Charset encoding);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-6.html b/htmlReport/ns-2a/sources/source-6.html new file mode 100644 index 0000000000..9813868562 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-6.html @@ -0,0 +1,234 @@ + + + + + + + + Coverage Report > JarUtils + + + + + + +
+ + +

Coverage Summary for Class: JarUtils (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JarUtils + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/29) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.util.jar.JarEntry;
+ import java.util.jar.JarOutputStream;
+ import java.util.zip.ZipFile;
+ 
+ /**
+  * Some utility classes for manipulating JAR files.
+  */
+ public final class JarUtils
+ {
+     /**
+      * Create a jar file from a particular directory.
+      * 
+      * @param root in the root directory
+      * @param directory in the directory we are adding
+      * @param jarStream the jar stream to be added to
+      * @throws IOException on IOException
+      */
+     protected void createJarFromDirectory(File root, File directory, JarOutputStream jarStream)
+         throws IOException
+     {
+         byte[] buffer = new byte[40960];
+         int bytesRead;
+ 
+         File[] filesToAdd = directory.listFiles();
+ 
+         for (File fileToAdd : filesToAdd)
+         {
+             if (fileToAdd.isDirectory())
+             {
+                 createJarFromDirectory(root, fileToAdd, jarStream);
+             }
+             else
+             {
+                 try (FileInputStream addFile = new FileInputStream(fileToAdd))
+                 {
+                     // Create a jar entry and add it to the temp jar.
+                     String entryName = fileToAdd.getPath().substring(root.getPath().length() + 1);
+ 
+                     // If we leave these entries as '\'s, then the resulting zip file won't be
+                     // expandable on Unix operating systems like OSX, because it is possible to
+                     // have filenames with \s in them - so it's impossible to determine that this
+                     // is actually a directory.
+                     entryName = entryName.replace('\\', '/');
+                     JarEntry entry = new JarEntry(entryName);
+                     jarStream.putNextEntry(entry);
+ 
+                     // Read the file and write it to the jar.
+                     while ((bytesRead = addFile.read(buffer)) != -1)
+                     {
+                         jarStream.write(buffer, 0, bytesRead);
+                     }
+                     jarStream.closeEntry();
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Create a JAR file from a directory, recursing through children.
+      * 
+      * @param directory in directory source
+      * @param outputJar in file to output the jar data to
+      * @return out File that was generated
+      * @throws IOException when there is an I/O exception
+      */
+     public File createJarFromDirectory(String directory, File outputJar)
+         throws IOException
+     {
+         if (!outputJar.getParentFile().exists())
+         {
+             outputJar.getParentFile().mkdirs();
+         }
+         try (JarOutputStream jarStream = new JarOutputStream(new FileOutputStream(outputJar)))
+         {
+             File dir = new File(directory);
+             createJarFromDirectory(dir, dir, jarStream);
+         }
+         return outputJar;
+     }
+ 
+     /**
+      * Search through JAR file to check if it contains specified class.
+      * 
+      * @param jarFile JAR file to be searched.
+      * @param classToBeFound Class which we look for (including package).
+      * @return True if JAR file contains specified class.
+      * @throws IOException when there is an I/O exception
+      */
+     public boolean containsClass(String jarFile, String classToBeFound) throws IOException
+     {
+         boolean result = false;
+ 
+         String dataSourceClass = classToBeFound.replace('.', '/') + ".class";
+ 
+         try (ZipFile zip = new ZipFile(jarFile))
+         {
+             if (zip.getEntry(dataSourceClass) != null)
+             {
+                 result = true;
+             }
+         }
+ 
+         return result;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-7.html b/htmlReport/ns-2a/sources/source-7.html new file mode 100644 index 0000000000..4edfff9e99 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-7.html @@ -0,0 +1,282 @@ + + + + + + + + Coverage Report > MissingXmlElementAppender + + + + + + +
+ + +

Coverage Summary for Class: MissingXmlElementAppender (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MissingXmlElementAppender + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/42) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ 
+ import javax.xml.xpath.XPath;
+ import javax.xml.xpath.XPathConstants;
+ import javax.xml.xpath.XPathExpression;
+ import javax.xml.xpath.XPathExpressionException;
+ import javax.xml.xpath.XPathFactory;
+ import java.util.Arrays;
+ import java.util.Iterator;
+ import java.util.LinkedList;
+ import java.util.List;
+ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+ 
+ /**
+  * This class detects missing nodes of a DOM document based on an XPath expression and
+  * appends the missing branch.
+  */
+ public class MissingXmlElementAppender
+ {
+     /**
+      * Document that may have missing nodes
+      */
+     private final Document document;
+ 
+     /**
+      * XPath, split up into path elements
+      */
+     private final LinkedList<String> expressionNodes = new LinkedList<String>();
+ 
+     /**
+      * 
+      * @param document Document that may have missing nodes
+      * @param xPathString XPath that needs to be present in the document
+      */
+     public MissingXmlElementAppender(Document document, String xPathString)
+     {
+         this.document = document;
+ 
+         String regex = "/(?=(?:[^']*'[^']*')*[^']*$)";
+         this.expressionNodes.addAll(Arrays.asList(xPathString.split(regex)));
+     }
+ 
+     /**
+      * Getter
+      * @return documnet given via the constructor
+      */
+     public Document getDocument()
+     {
+         return document;
+     }
+ 
+     /**
+      * Appends the missing nodes.
+      * 
+      * @return the common node of document and XPath
+      * @throws XPathExpressionException if anything goes wrong
+      */
+     public Node append() throws XPathExpressionException
+     {
+         LinkedList<String> missingNodes = new LinkedList<String>();
+         Node evaluate = getMostCommonNode(missingNodes);
+ 
+         if (evaluate != null && !missingNodes.isEmpty())
+         {
+             evaluate = appendMissingElements(missingNodes, evaluate);
+         }
+ 
+         return evaluate;
+     }
+ 
+     /**
+      * Find the common node of the given document and the XPath.
+      * Based on this node the hierarchy will be appended.
+      * 
+      * @param missingNodes as a side effect the node elements are collected
+      * @return common node of the given document and the XPath
+      * @throws XPathExpressionException if anything goes wrong
+      */
+     private Node getMostCommonNode(LinkedList<String> missingNodes) throws XPathExpressionException
+     {
+         XPath xPath = XPathFactory.newInstance().newXPath();
+ 
+         Object evaluate;
+         do
+         {
+             String expression = toXPathString(expressionNodes);
+             XPathExpression xPathExpression = xPath.compile(expression);
+             evaluate = xPathExpression.evaluate(document, XPathConstants.NODE);
+ 
+             if (evaluate == null)
+             {
+                 String lastNode = expressionNodes.removeLast();
+                 missingNodes.addFirst(lastNode);
+             }
+         }
+         while (evaluate == null && !expressionNodes.isEmpty());
+ 
+         if (evaluate != null)
+         {
+             return (Node) evaluate;
+         }
+         return null;
+     }
+ 
+     /**
+      * Assemble a XPath string based on a list of elements
+      * @param expressionNodes split up XPath elements
+      * @return XPath string
+      */
+     private String toXPathString(List<String> expressionNodes)
+     {
+         StringBuilder stringBuilder = new StringBuilder();
+         for (Iterator<String> iterator = expressionNodes.iterator(); iterator.hasNext();)
+         {
+             String expressionNode = iterator.next();
+             stringBuilder.append(expressionNode);
+             if (iterator.hasNext())
+             {
+                 stringBuilder.append("/");
+             }
+         }
+         return stringBuilder.toString();
+     }
+ 
+     /**
+      * Adds the elements of missingNodes as element hierarchy to the node
+      * @param missingNodes collected list of the missing elements
+      * @param node target of the additions
+      * @return the last node added to the document
+      */
+     private Node appendMissingElements(List<String> missingNodes, Node node)
+     {
+         Pattern elementOnlyPattern = Pattern.compile("([^\\[]+)\\[.+");
+         Node result = node;
+ 
+         for (String missingNode : missingNodes)
+         {
+             if (!missingNode.startsWith("@"))
+             {
+                 Matcher matcher = elementOnlyPattern.matcher(missingNode);
+                 if (matcher.matches())
+                 {
+                     missingNode = matcher.group(1);
+                 }
+ 
+                 Element newElement = document.createElement(missingNode);
+                 result.appendChild(newElement);
+                 result = newElement;
+             }
+         }
+ 
+         return result;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-8.html b/htmlReport/ns-2a/sources/source-8.html new file mode 100644 index 0000000000..18f0013f54 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-8.html @@ -0,0 +1,199 @@ + + + + + + + + Coverage Report > NamespaceContextImpl + + + + + + +
+ + +

Coverage Summary for Class: NamespaceContextImpl (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
NamespaceContextImpl + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/13) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.util.HashMap;
+ import java.util.Iterator;
+ import java.util.Map;
+ 
+ import javax.xml.XMLConstants;
+ import javax.xml.namespace.NamespaceContext;
+ 
+ /**
+  * Context map for XPath. Used for mapping between prefixes and XML namespaces.
+  */
+ public class NamespaceContextImpl implements NamespaceContext
+ {
+ 
+     /**
+      * Map of prefixes with XML namespaces.
+      */
+     private Map<String, String> namespaces;
+ 
+     /**
+      * Constructor.
+      */
+     public NamespaceContextImpl()
+     {
+         namespaces = new HashMap<String, String>();
+     }
+ 
+     /**
+      * @return Map of prefixes with XML namespaces.
+      */
+     public Map<String, String> getNamespaces()
+     {
+         return namespaces;
+     }
+ 
+     /**
+      * @param namespaces Map of prefixes with XML namespaces.
+      */
+     public void setNamespaces(Map<String, String> namespaces)
+     {
+         this.namespaces = namespaces;
+     }
+ 
+     @Override
+     public String getNamespaceURI(String prefix)
+     {
+         if (namespaces.containsKey(prefix))
+         {
+             return namespaces.get(prefix);
+         }
+         else
+         {
+             return XMLConstants.NULL_NS_URI;
+         }
+     }
+ 
+     @Override
+     public String getPrefix(String namespaceURI)
+     {
+         for (Map.Entry<String, String> entry : namespaces.entrySet())
+         {
+             if (namespaceURI.equals(entry.getValue()))
+             {
+                 return entry.getKey();
+             }
+         }
+         return XMLConstants.DEFAULT_NS_PREFIX;
+     }
+ 
+     @Override
+     public Iterator<String> getPrefixes(String namespaceURI)
+     {
+         throw new UnsupportedOperationException();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-9.html b/htmlReport/ns-2a/sources/source-9.html new file mode 100644 index 0000000000..50dad2a1d1 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-9.html @@ -0,0 +1,349 @@ + + + + + + + + Coverage Report > XmlReplacement + + + + + + +
+ + +

Coverage Summary for Class: XmlReplacement (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
XmlReplacement + + 0% + + + (0/15) + + + + 0% + + + (0/26) + +
XmlReplacement$ReplacementBehavior + + 0% + + + (0/2) + + + + 0% + + + (0/4) + +
Total + + 0% + + + (0/17) + + + + 0% + + + (0/30) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ /**
+  * XML replacement for the {@link FileHandler}.
+  */
+ public class XmlReplacement
+ {
+     /**
+      * Define how the XmlReplacement behaves XPath expression doesn't match anything.
+      */
+     public enum ReplacementBehavior
+     {
+         /**
+          * Continue, if the XPath can't be found
+          */
+         IGNORE_IF_NON_EXISTING,
+ 
+         /**
+          * Throw exception, if the XPath can't be found
+          */
+         THROW_EXCEPTION,
+ 
+         /**
+          * Add missing nodes, if the XPath only matches on any upper level
+          */
+         ADD_MISSING_NODES;
+     }
+ 
+     /**
+      * File name.
+      */
+     private String file;
+ 
+     /**
+      * XPath expression.
+      */
+     private String xpathExpression;
+ 
+     /**
+      * XML attribute name.
+      */
+     private String attributeName;
+ 
+     /**
+      * Behavior if XPath expression doesn't match anything.
+      */
+     private ReplacementBehavior replacementBehavior = ReplacementBehavior.THROW_EXCEPTION;
+ 
+     /**
+      * Value or property name.
+      */
+     private String value;
+ 
+     /**
+      * Empty constructor.
+      */
+     public XmlReplacement()
+     {
+         // Nothing
+     }
+ 
+     /**
+      * Saves the attributes for this XML replacement.
+      * 
+      * @param file File name.
+      * @param xpathExpression XPath expression.
+      * @param attributeName XML attribute name.
+      * @param replacementBehavior Behavior if XPath expression doesn't match anything.
+      * @param value Value or property name.
+      */
+     public XmlReplacement(String file, String xpathExpression, String attributeName,
+         ReplacementBehavior replacementBehavior, String value)
+     {
+         this.file = file;
+         this.xpathExpression = xpathExpression;
+         this.attributeName = attributeName;
+         this.replacementBehavior = replacementBehavior;
+         this.value = value;
+     }
+ 
+     /**
+      * @return File name.
+      */
+     public String getFile()
+     {
+         return file;
+     }
+ 
+     /**
+      * @param file File name.
+      */
+     public void setFile(String file)
+     {
+         this.file = file;
+     }
+ 
+     /**
+      * @return XPath expression.
+      */
+     public String getXpathExpression()
+     {
+         return xpathExpression;
+     }
+ 
+     /**
+      * @param xpathExpression XPath expression.
+      */
+     public void setXpathExpression(String xpathExpression)
+     {
+         this.xpathExpression = xpathExpression;
+     }
+ 
+     /**
+      * @return XML attribute name.
+      */
+     public String getAttributeName()
+     {
+         return attributeName;
+     }
+ 
+     /**
+      * @param attributeName XML attribute name.
+      */
+     public void setAttributeName(String attributeName)
+     {
+         this.attributeName = attributeName;
+     }
+ 
+     /**
+      * @return Behavior if XPath expression doesn't match anything.
+      */
+     public ReplacementBehavior getReplacementBehavior()
+     {
+         return replacementBehavior;
+     }
+ 
+     /**
+      * @param replacementBehavior Behavior if XPath expression doesn't match anything.
+      */
+     public void setReplacementBehavior(ReplacementBehavior replacementBehavior)
+     {
+         this.replacementBehavior = replacementBehavior;
+     }
+ 
+     /**
+      * @return Value or property name.
+      */
+     public String getValue()
+     {
+         return value;
+     }
+ 
+     /**
+      * @param value Value or property name.
+      */
+     public void setValue(String value)
+     {
+         this.value = value;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return "XmlReplacement[fileName='" + file
+             + "',xpathExpression='" + xpathExpression
+             + "',attributeName='" + attributeName
+             + "',value='" + value + "']";
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object obj)
+     {
+         if (obj == null)
+         {
+             return false;
+         }
+         if (getClass() != obj.getClass())
+         {
+             return false;
+         }
+ 
+         final XmlReplacement other = (XmlReplacement) obj;
+         return this.toString().equals(other.toString());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.toString().hashCode();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-a.html b/htmlReport/ns-2a/sources/source-a.html new file mode 100644 index 0000000000..806dc39c42 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-a.html @@ -0,0 +1,433 @@ + + + + + + + + Coverage Report > XmlUtils + + + + + + +
+ + +

Coverage Summary for Class: XmlUtils (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
XmlUtils + + 0% + + + (0/1) + + + + 0% + + + (0/15) + + + + 0% + + + (0/75) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.nio.charset.StandardCharsets;
+ import java.util.ArrayList;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import javax.xml.parsers.DocumentBuilder;
+ import javax.xml.parsers.DocumentBuilderFactory;
+ import javax.xml.parsers.ParserConfigurationException;
+ import javax.xml.transform.Transformer;
+ import javax.xml.transform.TransformerFactory;
+ import javax.xml.transform.dom.DOMSource;
+ import javax.xml.transform.stream.StreamResult;
+ import javax.xml.xpath.XPathConstants;
+ import javax.xml.xpath.XPathExpression;
+ import javax.xml.xpath.XPathFactory;
+ import javax.xml.xpath.XPath;
+ 
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.NodeList;
+ import org.w3c.dom.ls.DOMImplementationLS;
+ import org.w3c.dom.ls.LSSerializer;
+ 
+ /**
+  * This class offers utility methods for handling XML files.
+  */
+ public class XmlUtils
+ {
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * XML document builder.
+      */
+     private DocumentBuilder builder;
+ 
+     /**
+      * XPath.
+      */
+     private XPath xPath;
+ 
+     /**
+      * XML namespaces map.
+      */
+     private NamespaceContextImpl namespaceContext;
+ 
+     /**
+      * True if XmlUtils should be namespace aware.
+      */
+     private boolean namespaceAware;
+ 
+     /**
+      * default constructor will assign no namespaces and use a default file handler.
+      */
+     public XmlUtils()
+     {
+         this(new DefaultFileHandler());
+     }
+ 
+     /**
+      * default constructor will assign no namespaces and use a default file handler.
+      * 
+      * @param namespaceAware true if XmlUtils should be namespace aware.
+      */
+     public XmlUtils(boolean namespaceAware)
+     {
+         this(new DefaultFileHandler(), namespaceAware);
+     }
+ 
+     /**
+      * constructor will assign no namespaces.
+      * 
+      * @param fileHandler used to read and write xml files.
+      */
+     public XmlUtils(FileHandler fileHandler)
+     {
+         this(fileHandler, false);
+     }
+ 
+     /**
+      * constructor will assign no namespaces.
+      * 
+      * @param fileHandler used to read and write xml files.
+      * @param namespaceAware true if XmlUtils should be namespace aware.
+      */
+     public XmlUtils(FileHandler fileHandler, boolean namespaceAware)
+     {
+         this.fileHandler = fileHandler;
+         this.namespaceContext = new NamespaceContextImpl();
+         this.namespaceAware = namespaceAware;
+         XPathFactory xPathFactory = XPathFactory.newInstance();
+         this.xPath = xPathFactory.newXPath();
+         this.xPath.setNamespaceContext(namespaceContext);
+         DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+         domFactory.setNamespaceAware(namespaceAware);
+         // Do not load remote DTDS as remote servers sometimes become unreachable
+         try
+         {
+             domFactory.setFeature(
+                 "http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
+             domFactory.setFeature(
+                 "http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+         }
+         catch (AbstractMethodError | ParserConfigurationException ignored)
+         {
+             // Ignored
+         }
+         try
+         {
+             this.builder = domFactory.newDocumentBuilder();
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Cannot create XML DOM builder", e);
+         }
+     }
+ 
+     /**
+      * The following will search the given element for the specified XPath and return a list of
+      * nodes that match.
+      * 
+      * @param xpath - selection criteria
+      * @param toSearch - element to start the search at
+      * @return List of matching elements
+      */
+     public List<Element> selectElementsMatchingXPath(String xpath, Element toSearch)
+     {
+         NodeList nodelist;
+         try
+         {
+             String xpathWithoutNamespace = xpath;
+             Map<String, String> namespaces = namespaceContext.getNamespaces();
+             if (namespaces != null && !namespaces.isEmpty() && !namespaceAware)
+             {
+                 for (Map.Entry<String, String> namespace : namespaces.entrySet())
+                 {
+                     String key = namespace.getKey() + ":";
+                     while (xpathWithoutNamespace.contains(key))
+                     {
+                         xpathWithoutNamespace = xpathWithoutNamespace.replace(key, "");
+                     }
+                 }
+             }
+             XPathExpression xPathExpr = xPath.compile(xpathWithoutNamespace);
+             nodelist = (NodeList) xPathExpr.evaluate(toSearch, XPathConstants.NODESET);
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Cannot evaluate XPath: " + xpath, e);
+         }
+         List<Element> result = new ArrayList<Element>(nodelist.getLength());
+         for (int i = 0; i < nodelist.getLength(); i++)
+         {
+             result.add((Element) nodelist.item(i));
+         }
+         return result;
+     }
+ 
+     /**
+      * The following will search the given element for the specified XPath and return any node that
+      * matches.
+      * 
+      * @param xpath - selection criteria
+      * @param toSearch - element to start the search at
+      * @return a matching element
+      */
+     public Element selectElementMatchingXPath(String xpath, Element toSearch)
+     {
+         List<Element> results = selectElementsMatchingXPath(xpath, toSearch);
+         if (results.isEmpty())
+         {
+             throw new ElementNotFoundException(xpath, toSearch);
+         }
+         Element match = results.get(0);
+         return match;
+     }
+ 
+     /**
+      * read the specified file into a Document.
+      * 
+      * @param sourceFile file to read
+      * @return Document corresponding with sourceFile
+      */
+     public Document loadXmlFromFile(String sourceFile)
+     {
+         if (!getFileHandler().exists(sourceFile))
+         {
+             throw new CargoException("Cannot find file: " + sourceFile);
+         }
+         if (getFileHandler().isDirectory(sourceFile))
+         {
+             throw new CargoException("The destination is a directory: " + sourceFile);
+         }
+         try (InputStream is = getFileHandler().getInputStream(sourceFile))
+         {
+             return this.builder.parse(is);
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Cannot parse XML file " + sourceFile, e);
+         }
+     }
+ 
+     /**
+      * write the xml document to disk, rethrowing checked exceptions as runtime.
+      * 
+      * @param document document to write to disk
+      * @param filename where to write the document
+      */
+     public void saveXml(Document document, String filename)
+     {
+         try (OutputStream os = getFileHandler().getOutputStream(filename))
+         {
+             TransformerFactory tFactory = TransformerFactory.newInstance();
+             Transformer transformer = tFactory.newTransformer();
+             transformer.transform(new DOMSource(document), new StreamResult(os));
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Cannot modify XML file " + filename, e);
+         }
+     }
+ 
+     /**
+      * @return the Cargo file utility class
+      */
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the Cargo file utility class to use. This method is useful for unit
+      * testing with Mock objects as it can be passed a test file handler that doesn't perform any
+      * real file action.
+      */
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * @param namespaces the namespaces to set
+      */
+     public void setNamespaces(Map<String, String> namespaces)
+     {
+         this.namespaceContext.setNamespaces(namespaces);
+     }
+ 
+     /**
+      * @return the namespaces
+      */
+     public Map<String, String> getNamespaces()
+     {
+         return namespaceContext.getNamespaces();
+     }
+ 
+     /**
+      * parse the passed string into an {@link Element Element} object.
+      * 
+      * @param elementToParse string to parse
+      * @return result of parsing
+      */
+     public Element parseIntoElement(String elementToParse)
+     {
+         try
+         {
+             Document parsed = this.builder.parse(
+                 new ByteArrayInputStream(elementToParse.getBytes(StandardCharsets.UTF_8)));
+             return parsed.getDocumentElement();
+         }
+         catch (Exception e)
+         {
+             throw new CargoException("Could not parse element: " + elementToParse);
+         }
+     }
+ 
+     /**
+      * Creates a new, blank XML document.
+      * 
+      * @return New, blank XML document.
+      */
+     public Document createDocument()
+     {
+         return builder.newDocument();
+     }
+ 
+     /**
+      * Output an XML node as string, without the XML header.
+      * 
+      * @param node Node to output.
+      * @return String representation of node.
+      */
+     public String toString(Element node)
+     {
+         DOMImplementationLS implementation =
+             (DOMImplementationLS) node.getOwnerDocument().getImplementation();
+         LSSerializer serializer = implementation.createLSSerializer();
+         serializer.getDomConfig().setParameter("format-pretty-print", true);
+         serializer.getDomConfig().setParameter("xml-declaration", false);
+         return serializer.writeToString(node);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-b.html b/htmlReport/ns-2a/sources/source-b.html new file mode 100644 index 0000000000..8ecdcf1f05 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-b.html @@ -0,0 +1,203 @@ + + + + + + + + Coverage Report > ZipCompressor + + + + + + +
+ + +

Coverage Summary for Class: ZipCompressor (org.codehaus.cargo.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ZipCompressor + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/21) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.util.zip.ZipEntry;
+ import java.util.zip.ZipOutputStream;
+ 
+ /**
+  * Utility for compressing ZIP files.
+  */
+ public class ZipCompressor
+ {
+     /**
+      * File handler.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * Saves the file handler.
+      * @param fileHandler File handler.
+      */
+     public ZipCompressor(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * Compress a directory into a ZIP file.
+      * @param sourceDirectory Source directory.
+      * @param targetFile Target ZIP file.
+      * @throws IOException If any I/O exception occurs.
+      */
+     public void compress(String sourceDirectory, String targetFile) throws IOException
+     {
+         try (ZipOutputStream zipFile =
+             new ZipOutputStream(this.fileHandler.getOutputStream(targetFile)))
+         {
+             this.compressDirectory(sourceDirectory, sourceDirectory, zipFile);
+         }
+     }
+ 
+     /**
+      * Compress a (sub)directory into a ZIP file.
+      * @param currentDirectory Current directory being compressed.
+      * @param startDirectory Source directory where compression started from (for the recursion).
+      * @param zipFile ZIP file stream to write into.
+      * @throws IOException If any I/O exception occurs.
+      */
+     private void compressDirectory(String currentDirectory, String startDirectory,
+         ZipOutputStream zipFile) throws IOException
+     {
+         for (String child : this.fileHandler.getChildren(currentDirectory))
+         {
+             String childPath = child.replace(startDirectory, "").replace('\\', '/');
+             if (childPath.startsWith("/"))
+             {
+                 childPath = childPath.substring(1);
+             }
+ 
+             if (this.fileHandler.isDirectory(child))
+             {
+                 // In ZIP terminology, en entry is a directory when its name ends with a /
+                 childPath = childPath + '/';
+                 ZipEntry entry = new ZipEntry(childPath);
+                 zipFile.putNextEntry(entry);
+ 
+                 this.compressDirectory(child, startDirectory, zipFile);
+             }
+             else
+             {
+                 ZipEntry entry = new ZipEntry(childPath);
+                 zipFile.putNextEntry(entry);
+                 try (InputStream content = this.fileHandler.getInputStream(child))
+                 {
+                     this.fileHandler.copy(content, zipFile);
+                 }
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2a/sources/source-c.html b/htmlReport/ns-2a/sources/source-c.html new file mode 100644 index 0000000000..15598b0888 --- /dev/null +++ b/htmlReport/ns-2a/sources/source-c.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > XmlFileBuilder + + + + + + +
+ + +

Coverage Summary for Class: XmlFileBuilder (org.codehaus.cargo.util)

+ + + + + + + + + +
Class
XmlFileBuilder
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util;
+ 
+ import java.util.Map;
+ 
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ 
+ /**
+  * This interface intends to remove hard-bindings to a specific xml api.<br>
+  * <br>
+  * Implementations of this interface will: 1. optionally load a file 2. insert some elements into
+  * the current document 3. write the file to disk
+  */
+ public interface XmlFileBuilder
+ {
+ 
+     /**
+      * sets the name of the file we will read and write.
+      * 
+      * @param path - where the xml file will be read from or written to.
+      */
+     void setFile(String path);
+ 
+     /**
+      * assign prefix to namespace mappings used for xpath and other xml operations. Leave alone, or
+      * set to null, if you have no namespaces.
+      * 
+      * @param namespaces - key is prefix value is url
+      */
+     void setNamespaces(Map<String, String> namespaces);
+ 
+     /**
+      * load the current xml file into a Document.
+      * 
+      * @return loaded file, represented as a Document.
+      */
+     Document loadFile();
+ 
+     /**
+      * this will parse one or more elements from elementToParse and insert them under the xpath.
+      * note: elementsToParse may not be well formed, but only in one way. The elements may be
+      * missing a parent. Example: the following is acceptable by this method elementsToParse =
+      * &lt;child1 /&gt; &lt;child2 /&gt; xpath = //parent In this case, both elements child1 and
+      * child2 would be placed under the first match for parent. s
+      * 
+      * @param elementsToParse String containing one or more elements in textual format
+      * @param xpath where to place the above elements.
+      */
+     void insertElementsUnderXPath(String elementsToParse, String xpath);
+ 
+     /**
+      * This will take element from elementToInsert and insert it under the xpath.
+      * 
+      * @param elementToInsert Element to insert
+      * @param xpath where to place the above element.
+      */
+     void insertElementUnderXPath(Element elementToInsert, String xpath);
+ 
+     /**
+      * write the current xml to disk.
+      */
+     void writeFile();
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2b/index.html b/htmlReport/ns-2b/index.html new file mode 100644 index 0000000000..ba6b2abd60 --- /dev/null +++ b/htmlReport/ns-2b/index.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_BLOCK.html b/htmlReport/ns-2b/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..a19a002f50 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_BLOCK.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2b/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..d93fa3e111 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_CLASS.html b/htmlReport/ns-2b/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..9a7aaef674 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_CLASS.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2b/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..ced1f0dcc7 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_LINE.html b/htmlReport/ns-2b/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..346784b855 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_LINE.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2b/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..3872c822a6 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_METHOD.html b/htmlReport/ns-2b/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..58ccf4278e --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_METHOD.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2b/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..131eb638c7 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2b/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..7c67a93d52 --- /dev/null +++ b/htmlReport/ns-2b/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.internal.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.internal.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.internal.log + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2b/sources/source-1.html b/htmlReport/ns-2b/sources/source-1.html new file mode 100644 index 0000000000..8485cd3588 --- /dev/null +++ b/htmlReport/ns-2b/sources/source-1.html @@ -0,0 +1,224 @@ + + + + + + + + Coverage Report > AbstractLogger + + + + + + +
+ + +

Coverage Summary for Class: AbstractLogger (org.codehaus.cargo.util.internal.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractLogger + + 100% + + + (1/1) + + + + 87.5% + + + (7/8) + + + + 72.7% + + + (8/11) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.internal.log;
+ 
+ import org.codehaus.cargo.util.log.LogLevel;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Base clas for all Loggers.
+  */
+ public abstract class AbstractLogger implements Logger
+ {
+     /**
+      * The logging level. See #LogLevel
+      */
+     private LogLevel level = LogLevel.INFO;
+ 
+     /**
+      * @param level the logging level above which the logger will log
+      */
+     public AbstractLogger(LogLevel level)
+     {
+         this.level = level;
+     }
+ 
+     /**
+      * Default logging level is WARN.
+      */
+     public AbstractLogger()
+     {
+         // Do nothing. The default logging level is then WARN.
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setLevel(LogLevel level)
+     {
+         this.level = level;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public LogLevel getLevel()
+     {
+         return this.level;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void warn(String message, String category)
+     {
+         log(LogLevel.WARN, message, category);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void info(String message, String category)
+     {
+         log(LogLevel.INFO, message, category);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void debug(String message, String category)
+     {
+         log(LogLevel.DEBUG, message, category);
+     }
+ 
+     /**
+      * Common method for all severity levels. Verifies that the logging level is correct for logging
+      * the current message.
+      * 
+      * @param level the log level (aka severity) of the message
+      * @param message the message to log
+      * @param category the log category
+      */
+     private void log(LogLevel level, String message, String category)
+     {
+         if (getLevel().compareTo(level) >= 0)
+         {
+             doLog(level, message, category);
+         }
+     }
+ 
+     /**
+      * Common method for all severity levels.
+      * 
+      * @param level the log level (aka severity) of the message
+      * @param message the message to log
+      * @param category the log category
+      */
+     protected abstract void doLog(LogLevel level, String message, String category);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/index.html b/htmlReport/ns-2c/index.html new file mode 100644 index 0000000000..60083b03e2 --- /dev/null +++ b/htmlReport/ns-2c/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_BLOCK.html b/htmlReport/ns-2c/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..91a8987cec --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2c/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..dc04a81685 --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_CLASS.html b/htmlReport/ns-2c/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..43dd5bc107 --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2c/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..638ee4a1b6 --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_LINE.html b/htmlReport/ns-2c/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..80d2c88f7d --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2c/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..22e868254e --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_METHOD.html b/htmlReport/ns-2c/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..0847472698 --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2c/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..3d5cd6a86a --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2c/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..f9d5a57408 --- /dev/null +++ b/htmlReport/ns-2c/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.util.log + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.util.log

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.util.log + + 60% + + + (3/5) + + + + 44.4% + + + (8/18) + + + + 31.6% + + + (18/57) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-1.html b/htmlReport/ns-2c/sources/source-1.html new file mode 100644 index 0000000000..f90fe85acf --- /dev/null +++ b/htmlReport/ns-2c/sources/source-1.html @@ -0,0 +1,208 @@ + + + + + + + + Coverage Report > FileLogger + + + + + + +
+ + +

Coverage Summary for Class: FileLogger (org.codehaus.cargo.util.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
FileLogger + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/20) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ import java.io.BufferedOutputStream;
+ import java.io.File;
+ import java.io.FileNotFoundException;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
+ import java.io.OutputStream;
+ import java.nio.charset.StandardCharsets;
+ import java.text.DateFormat;
+ import java.text.SimpleDateFormat;
+ import java.util.Date;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.internal.log.AbstractLogger;
+ 
+ /**
+  * File implementation which sends logged messages to a file.
+  */
+ public class FileLogger extends AbstractLogger
+ {
+     /**
+      * The OutputStream to log to.
+      */
+     private OutputStream output;
+ 
+     /**
+      * Date format used when logging to the file.
+      */
+     private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS");
+ 
+     /**
+      * @param file the file to log to
+      * @param append if true the file is appended to insted of being erased
+      */
+     public FileLogger(File file, boolean append)
+     {
+         try
+         {
+             File parent = file.getParentFile();
+             if (!parent.isDirectory())
+             {
+                 parent.mkdirs();
+             }
+             FileOutputStream fileOutputStream = new FileOutputStream(file, append);
+             this.output = new BufferedOutputStream(fileOutputStream);
+         }
+         catch (FileNotFoundException e)
+         {
+             throw new CargoException("Failed to create file [" + file + "]", e);
+         }
+     }
+ 
+     /**
+      * @param file the file to log to
+      * @param append if true the file is appended to insted of being erased
+      */
+     public FileLogger(String file, boolean append)
+     {
+         this(new File(file), append);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void doLog(LogLevel level, String message, String category)
+     {
+         final String formattedCategory = category.length() > 20
+             ? category.substring(category.length() - 20) : category;
+ 
+         final String msg = "[" + this.format.format(new Date()) + "]"
+             + "[" + level.getLevel() + "][" + formattedCategory + "] " + message + "\n";
+         try
+         {
+             this.output.write(msg.getBytes(StandardCharsets.UTF_8));
+             this.output.flush();
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Failed to write log message ["
+                 + msg + "]", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-2.html b/htmlReport/ns-2c/sources/source-2.html new file mode 100644 index 0000000000..62cc76872a --- /dev/null +++ b/htmlReport/ns-2c/sources/source-2.html @@ -0,0 +1,275 @@ + + + + + + + + Coverage Report > LogLevel + + + + + + +
+ + +

Coverage Summary for Class: LogLevel (org.codehaus.cargo.util.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
LogLevel + + 100% + + + (1/1) + + + + 37.5% + + + (3/8) + + + + 41.4% + + + (12/29) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Definition of logging levels for Cargo's logs. A WARN level means only warnings are logged. An
+  * INFO level means warnings and infos are logged. A DEBUG level means warnings, info and debug
+  * messages are logged.
+  * 
+  * <p>
+  * Note: There's no ERROR log level as all errors result in an exception being raised.
+  * </p>
+  */
+ public final class LogLevel implements Comparable<LogLevel>
+ {
+     /**
+      * Represents a warning logging level.
+      */
+     public static final LogLevel WARN = new LogLevel("warn", 0);
+ 
+     /**
+      * Represents an info logging level.
+      */
+     public static final LogLevel INFO = new LogLevel("info", 1);
+ 
+     /**
+      * Represents a debug logging level.
+      */
+     public static final LogLevel DEBUG = new LogLevel("debug", 2);
+ 
+     /**
+      * Log level.
+      */
+     private String level;
+ 
+     /**
+      * Volume of the logs that will be output.
+      */
+     private int logVolume;
+ 
+     /**
+      * @param level the internal representation of the logging level. For example: "warn", "info" or
+      * "debug".
+      * @param logVolume the volume of logs that will be output. High numbers have higher volumes.
+      * This is an internal feature that allows us to have a simple {@link #compareTo(Object)}
+      * algorithm.
+      */
+     private LogLevel(String level, int logVolume)
+     {
+         this.level = level;
+         this.logVolume = logVolume;
+     }
+ 
+     /**
+      * Transform a log level represented as a string into a {@link LogLevel} object.
+      * 
+      * @param levelAsString the string to transform
+      * @return the {@link LogLevel} object
+      */
+     public static LogLevel toLevel(String levelAsString)
+     {
+         LogLevel level;
+         if (levelAsString.equalsIgnoreCase(INFO.getLevel()))
+         {
+             level = INFO;
+         }
+         else if (levelAsString.equalsIgnoreCase(WARN.getLevel()))
+         {
+             level = WARN;
+         }
+         else if (levelAsString.equalsIgnoreCase(DEBUG.getLevel()))
+         {
+             level = DEBUG;
+         }
+         else
+         {
+             throw new CargoException("Invalid log level [" + levelAsString
+                 + "]. Valid values are \"debug\", \"info\" and \"warn\".");
+         }
+ 
+         return level;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object != null && object instanceof LogLevel)
+         {
+             LogLevel level = (LogLevel) object;
+             if (level.getLevel().equals(getLevel()))
+             {
+                 result = true;
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.level.hashCode();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int compareTo(LogLevel level)
+     {
+         int result;
+ 
+         if (this.logVolume == level.logVolume)
+         {
+             result = 0;
+         }
+         else if (this.logVolume > level.logVolume)
+         {
+             result = 1;
+         }
+         else
+         {
+             result = -1;
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * @return the log level
+      */
+     public String getLevel()
+     {
+         return this.level;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getLevel();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-3.html b/htmlReport/ns-2c/sources/source-3.html new file mode 100644 index 0000000000..7061ea707f --- /dev/null +++ b/htmlReport/ns-2c/sources/source-3.html @@ -0,0 +1,153 @@ + + + + + + + + Coverage Report > LoggedObject + + + + + + +
+ + +

Coverage Summary for Class: LoggedObject (org.codehaus.cargo.util.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
LoggedObject + + 100% + + + (1/1) + + + + 100% + + + (3/3) + + + + 100% + + + (4/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ /**
+  * Helper class for implementing {@link Loggable} methods.
+  */
+ public class LoggedObject implements Loggable
+ {
+     /**
+      * The log used for logging.
+      */
+     private Logger log = new NullLogger();
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         this.log = logger;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Logger getLogger()
+     {
+         return this.log;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-4.html b/htmlReport/ns-2c/sources/source-4.html new file mode 100644 index 0000000000..df1d57eb4e --- /dev/null +++ b/htmlReport/ns-2c/sources/source-4.html @@ -0,0 +1,141 @@ + + + + + + + + Coverage Report > NullLogger + + + + + + +
+ + +

Coverage Summary for Class: NullLogger (org.codehaus.cargo.util.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
NullLogger + + 100% + + + (1/1) + + + + 100% + + + (2/2) + + + + 100% + + + (2/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ import org.codehaus.cargo.util.internal.log.AbstractLogger;
+ 
+ /**
+  * Null implementation which does nothing with log messages.
+  */
+ public class NullLogger extends AbstractLogger
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void doLog(LogLevel level, String message, String category)
+     {
+         // Do nothing
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-5.html b/htmlReport/ns-2c/sources/source-5.html new file mode 100644 index 0000000000..6fbba0ed8f --- /dev/null +++ b/htmlReport/ns-2c/sources/source-5.html @@ -0,0 +1,141 @@ + + + + + + + + Coverage Report > SimpleLogger + + + + + + +
+ + +

Coverage Summary for Class: SimpleLogger (org.codehaus.cargo.util.log)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
SimpleLogger + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ import org.codehaus.cargo.util.internal.log.AbstractLogger;
+ 
+ /**
+  * Simple implementation which sends log messages to the console (stdout).
+  */
+ public class SimpleLogger extends AbstractLogger
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void doLog(LogLevel level, String message, String category)
+     {
+         System.out.println("[" + level.getLevel() + "][" + category + "] " + message);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-6.html b/htmlReport/ns-2c/sources/source-6.html new file mode 100644 index 0000000000..1dda34ebb2 --- /dev/null +++ b/htmlReport/ns-2c/sources/source-6.html @@ -0,0 +1,134 @@ + + + + + + + + Coverage Report > Logger + + + + + + +
+ + +

Coverage Summary for Class: Logger (org.codehaus.cargo.util.log)

+ + + + + + + + + +
Class
Logger
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ /**
+  * Simple interface for logging and tracing. The reason we don't use commons-logging or some other
+  * logging library is because Cargo is a framework. As such we don't want to force the user to
+  * include an additional library and more importantly we want to remain open so that applications
+  * using Cargo will be able to adapt it to their favorite logging system, whatever that is.
+  */
+ public interface Logger
+ {
+     /**
+      * @param level the logging level above which the logger will log
+      */
+     void setLevel(LogLevel level);
+ 
+     /**
+      * @return the logging level above which the logger will log
+      */
+     LogLevel getLevel();
+ 
+     /**
+      * Logger informational messages.
+      * 
+      * @param message the message to log
+      * @param category the log category (usually this is the full name of the class being logged but
+      * it can be anything)
+      */
+     void info(String message, String category);
+ 
+     /**
+      * Logger warning messages.
+      * 
+      * @param message the message to log
+      * @param category the log category (usually this is the full name of the class being logged but
+      * it can be anything)
+      */
+     void warn(String message, String category);
+ 
+     /**
+      * Logger debug messages.
+      * 
+      * @param message the message to log
+      * @param category the log category (usually this is the full name of the class being logged but
+      * it can be anything)
+      */
+     void debug(String message, String category);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2c/sources/source-7.html b/htmlReport/ns-2c/sources/source-7.html new file mode 100644 index 0000000000..04d256a72e --- /dev/null +++ b/htmlReport/ns-2c/sources/source-7.html @@ -0,0 +1,104 @@ + + + + + + + + Coverage Report > Loggable + + + + + + +
+ + +

Coverage Summary for Class: Loggable (org.codehaus.cargo.util.log)

+ + + + + + + + + +
Class
Loggable
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.util.log;
+ 
+ /**
+  * All classes that want to perform logging must implement this interface.
+  */
+ public interface Loggable
+ {
+     /**
+      * @param logger the log implementation to use for logging
+      */
+     void setLogger(Logger logger);
+ 
+     /**
+      * @return the logger used
+      */
+     Logger getLogger();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2d/index.html b/htmlReport/ns-2d/index.html new file mode 100644 index 0000000000..cf5a79422e --- /dev/null +++ b/htmlReport/ns-2d/index.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_BLOCK.html b/htmlReport/ns-2d/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..235b70d27d --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_BLOCK.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2d/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..97756b7cec --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_CLASS.html b/htmlReport/ns-2d/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..f89618bcd4 --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_CLASS.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2d/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..eb88a3cc01 --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_LINE.html b/htmlReport/ns-2d/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..1ed1f01cdc --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_LINE.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2d/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..7771233f3c --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_METHOD.html b/htmlReport/ns-2d/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..bbbfa81c93 --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_METHOD.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2d/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..ff657f1177 --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2d/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..8479896cce --- /dev/null +++ b/htmlReport/ns-2d/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.startup + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.startup

+ + + + + + + +
Package
org.codehaus.cargo.container.startup
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2d/sources/source-1.html b/htmlReport/ns-2d/sources/source-1.html new file mode 100644 index 0000000000..190bf18682 --- /dev/null +++ b/htmlReport/ns-2d/sources/source-1.html @@ -0,0 +1,101 @@ + + + + + + + + Coverage Report > ContainerMonitor + + + + + + +
+ + +

Coverage Summary for Class: ContainerMonitor (org.codehaus.cargo.container.startup)

+ + + + + + + + + +
Class
ContainerMonitor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.startup;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * Monitor used for checking of container status.
+  */
+ public interface ContainerMonitor extends Loggable
+ {
+     /**
+      * @return true if container is running.
+      */
+     boolean isRunning();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2e/index.html b/htmlReport/ns-2e/index.html new file mode 100644 index 0000000000..0fb3f56cd3 --- /dev/null +++ b/htmlReport/ns-2e/index.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_BLOCK.html b/htmlReport/ns-2e/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..dc5909cc10 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_BLOCK.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-2e/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..dd5f5f8eac --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_CLASS.html b/htmlReport/ns-2e/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..7eda6bdb09 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_CLASS.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-2e/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..d9f8e96424 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_LINE.html b/htmlReport/ns-2e/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..e8726e6701 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_LINE.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-2e/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..9d1f9f3619 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_METHOD.html b/htmlReport/ns-2e/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..7017975b33 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_METHOD.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-2e/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..2142de2924 --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-2e/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..a2848f8ffa --- /dev/null +++ b/htmlReport/ns-2e/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,68 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.builder + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.builder

+ + + + + + + +
Package
org.codehaus.cargo.container.configuration.builder
+ +
+
+ + + + + +
+Class
+ +
+ + + + + + diff --git a/htmlReport/ns-2e/sources/source-1.html b/htmlReport/ns-2e/sources/source-1.html new file mode 100644 index 0000000000..5da2a206cb --- /dev/null +++ b/htmlReport/ns-2e/sources/source-1.html @@ -0,0 +1,139 @@ + + + + + + + + Coverage Report > ConfigurationEntryType + + + + + + +
+ + +

Coverage Summary for Class: ConfigurationEntryType (org.codehaus.cargo.container.configuration.builder)

+ + + + + + + + + +
Class
ConfigurationEntryType
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.builder;
+ 
+ /**
+  * Represents the type of a resource, such as a <code>javax.sql.DataSource</code>.
+  */
+ public interface ConfigurationEntryType
+ {
+     /**
+      * Standard DataSource, most often used by application code directly.
+      */
+     String DATASOURCE = "javax.sql.DataSource";
+ 
+     /**
+      * ConnectionPool DataSource, used by frameworks who manage their own database connections.
+      */
+     String CONNECTIONPOOL_DATASOURCE = "javax.sql.ConnectionPoolDataSource";
+ 
+     /**
+      * XADataSource, typically used to configure DataSource objects.
+      */
+     String XA_DATASOURCE = "javax.sql.XADataSource";
+ 
+     /**
+      * Driver, typically used to configure DataSource objects.
+      */
+     String JDBC_DRIVER = "java.sql.Driver";
+ 
+     /**
+      * Used to obtain connections to outgoing and incoming mail resources.
+      */
+     String MAIL_SESSION = "javax.mail.Session";
+ 
+     /**
+      * object which can be used for sending email using SMTP.
+      */
+     String MIMETYPE_DATASOURCE = "javax.mail.internet.MimePartDataSource";
+ 
+     /**
+      * JMS queue.
+      */
+     String JMS_QUEUE = "javax.jms.Queue";
+ 
+     /**
+      * JMS topic.
+      */
+     String JMS_TOPIC = "javax.jms.Topic";
+ 
+     /**
+      * JMS connection factory.
+      */
+     String JMS_CONNECTION_FACTORY = "javax.jms.ConnectionFactory";
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-2e/sources/source-2.html b/htmlReport/ns-2e/sources/source-2.html new file mode 100644 index 0000000000..ce8835a11c --- /dev/null +++ b/htmlReport/ns-2e/sources/source-2.html @@ -0,0 +1,115 @@ + + + + + + + + Coverage Report > ConfigurationBuilder + + + + + + +
+ + +

Coverage Summary for Class: ConfigurationBuilder (org.codehaus.cargo.container.configuration.builder)

+ + + + + + + + + +
Class
ConfigurationBuilder
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.builder;
+ 
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ 
+ /**
+  * Builds String representations a Resource configuration. These may be JSON or XML or Properties
+  * that the <code>Container</code> will know what to do with.
+  */
+ public interface ConfigurationBuilder
+ {
+     /**
+      * Detects the type of the <code>Resource</code> and creates an appropriate configuration.
+      * 
+      * @param resource the Resource you wish to build a configuration entry for.
+      * @return the container-specific representation of this configuration.
+      */
+     String toConfigurationEntry(Resource resource);
+ 
+     /**
+      * Detects the type of the <code>DataSource</code> and creates an appropriate configuration.
+      * 
+      * @param ds the DataSource you wish to build a configuration entry for.
+      * @return the container-specific representation of this configuration.
+      */
+     String toConfigurationEntry(DataSource ds);
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-3/index.html b/htmlReport/ns-3/index.html new file mode 100644 index 0000000000..1704b5544b --- /dev/null +++ b/htmlReport/ns-3/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_BLOCK.html b/htmlReport/ns-3/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..03ab9d4a0b --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..2e9dde8112 --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_CLASS.html b/htmlReport/ns-3/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..465ceb197b --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..24b2103180 --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_LINE.html b/htmlReport/ns-3/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..9d4f965d30 --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..7e9b6aff4b --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_METHOD.html b/htmlReport/ns-3/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..fdf0524f40 --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..9702987bab --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..22bf1517fe --- /dev/null +++ b/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.entry + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.entry

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.entry + + 100% + + + (2/2) + + + + 77.8% + + + (28/36) + + + + 86.1% + + + (62/72) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-3/sources/source-1.html b/htmlReport/ns-3/sources/source-1.html new file mode 100644 index 0000000000..7fa94efc63 --- /dev/null +++ b/htmlReport/ns-3/sources/source-1.html @@ -0,0 +1,501 @@ + + + + + + + + Coverage Report > DataSource + + + + + + +
+ + +

Coverage Summary for Class: DataSource (org.codehaus.cargo.container.configuration.entry)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DataSource + + 100% + + + (1/1) + + + + 66.7% + + + (16/24) + + + + 82.5% + + + (47/57) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.entry;
+ 
+ import java.util.Arrays;
+ import java.util.Properties;
+ 
+ import org.codehaus.cargo.container.configuration.builder.ConfigurationEntryType;
+ import org.codehaus.cargo.container.property.TransactionSupport;
+ 
+ /**
+  * A Datasource is a representation of a JDBC datasource. If supported by the container, this
+  * property is used to setup a datasource.
+  */
+ public class DataSource
+ {
+     /**
+      * (typically <code>java:comp/env</code>).
+      */
+     private String jndiLocation;
+ 
+     /**
+      * <code>javax.sql.XADataSource</code> or <code>javax.sql.Driver</code>.
+      * 
+      * @see org.codehaus.cargo.container.configuration.builder.ConfigurationEntryType
+      */
+     private String connectionType;
+ 
+     /**
+      * transaction support of the datasource ex. <code>XA_TRANSACTION</code>
+      */
+     private TransactionSupport transactionSupport;
+ 
+     /**
+      * The class name of the Driver. Example: <code>org.hsqldb.jdbcDriver</code>.
+      */
+     private String driverClass;
+ 
+     /**
+      * The url of the driver.
+      */
+     private String url;
+ 
+     /**
+      * The username.
+      */
+     private String username;
+ 
+     /**
+      * The password.
+      */
+     private String password;
+ 
+     /**
+      * id used in configuration files.
+      */
+     private String id;
+ 
+     /**
+      * extra properties passed to the jdbc driver.
+      */
+     private Properties connectionProperties;
+ 
+     /**
+      * initializes connectionProperties to a new object.
+      */
+     public DataSource()
+     {
+         connectionProperties = new Properties();
+     }
+ 
+     /**
+      * Constructor containing default DataSource construction rules.
+      * 
+      * @param jndiLocation Where to bind this DataSource (typically <code>java:comp/env</code>).
+      * @param connectionType What to use to get a connection from the database.
+      *      <code>javax.sql.XADataSource</code> or <code>javax.sql.Driver</code>.
+      * @param transactionSupport Transaction support of the datasource ex.
+      *      <code>XA_TRANSACTION</code>
+      * @param driverClass The class name of the Driver or XADataSource. Example:
+      *      <code>org.hsqldb.jdbcDriver</code>.
+      * @param url The url of the driver.
+      * @param username The user to connect to the database with.
+      * @param password The password to {@link #username}.
+      * @param id Id used in configuration files.
+      * @param connectionProperties Extra properties passed to the jdbc driver.
+      */
+     public DataSource(String jndiLocation, String connectionType,
+             TransactionSupport transactionSupport, String driverClass, String url,
+             String username, String password, String id, Properties connectionProperties)
+     {
+         // Can also be implemented as Builder pattern to avoid null parameters.
+         this.jndiLocation = jndiLocation;
+         this.connectionType = createConnectionType(connectionType);
+         this.transactionSupport =
+             createTransactionSupport(transactionSupport, this.connectionType);
+         this.driverClass = driverClass;
+         this.url = url;
+         this.username = username;
+         this.password = password;
+ 
+         if (id == null && jndiLocation != null)
+         {
+             this.id = createIdFromJndiLocation(jndiLocation);
+         }
+         else
+         {
+             this.id = id;
+         }
+ 
+         this.connectionProperties = connectionProperties;
+         setCredentialsIfInsideDriverProperties();
+     }
+ 
+     /**
+      * @param jndiLocation where to bind this DataSource (typically <code>java:comp/env</code>).
+      */
+     public void setJndiLocation(String jndiLocation)
+     {
+         this.jndiLocation = jndiLocation;
+     }
+ 
+     /**
+      * @param connectionType what to use to get a connection from the database.
+      * <code>javax.sql.XADataSource</code> or <code>javax.sql.Driver</code>.
+      */
+     public void setConnectionType(String connectionType)
+     {
+         this.connectionType = connectionType;
+     }
+ 
+     /**
+      * @param transactionSupport transaction support of the datasource ex.
+      * <code>XA_TRANSACTION</code>
+      */
+     public void setTransactionSupport(TransactionSupport transactionSupport)
+     {
+         this.transactionSupport = transactionSupport;
+     }
+ 
+     /**
+      * @param driverClass The class name of the Driver or XADataSource. Example:
+      * <code>org.hsqldb.jdbcDriver</code>.
+      */
+     public void setDriverClass(String driverClass)
+     {
+         this.driverClass = driverClass;
+     }
+ 
+     /**
+      * @param url The url of the driver.
+      */
+     public void setUrl(String url)
+     {
+         this.url = url;
+     }
+ 
+     /**
+      * @param username the user to connect to the database with
+      */
+     public void setUsername(String username)
+     {
+         this.username = username;
+     }
+ 
+     /**
+      * @param password the password to {@link #username}
+      */
+     public void setPassword(String password)
+     {
+         this.password = password;
+     }
+ 
+     /**
+      * @param id id used in configuration files.
+      */
+     public void setId(String id)
+     {
+         this.id = id;
+     }
+ 
+     /**
+      * @param connectionProperties extra properties passed to the jdbc driver.
+      */
+     public void setConnectionProperties(Properties connectionProperties)
+     {
+         this.connectionProperties = connectionProperties;
+     }
+ 
+     /**
+      * The String used to identify this datasource in configuration files.
+      * 
+      * @return the datasource id
+      */
+     public String getId()
+     {
+         return this.id;
+     }
+ 
+     /**
+      * The JNDI location that this datasource should be bound do (in the config file). Note that
+      * many application servers may prepend a context (typically <code>java:comp/env</code>) to this
+      * context.
+      * 
+      * @return the JNDI location
+      */
+     public String getJndiLocation()
+     {
+         return this.jndiLocation;
+     }
+ 
+     /**
+      * The type of the data source (typically <code>javax.sql.XADataSource</code> or
+      * <code>javax.sql.DataSource</code>).
+      * 
+      * @return the datasource type.
+      */
+     public String getConnectionType()
+     {
+         return this.connectionType;
+     }
+ 
+     /**
+      * The transaction support of the underlying connections, if <code>javax.xml.DataSource</code>.
+      * 
+      * @return transactional support of the DataSource
+      */
+     public TransactionSupport getTransactionSupport()
+     {
+         return transactionSupport;
+     }
+ 
+     /**
+      * The class name of the Driver or XADataSource. Example: <code>org.hsqldb.jdbcDriver</code>.
+      * 
+      * @return the class name of the JDBC driver
+      */
+     public String getDriverClass()
+     {
+         return this.driverClass;
+     }
+ 
+     /**
+      * Extra properties passed to the JDBC Driver.
+      * 
+      * @return Extra properties passed to the JDBC Driver.
+      */
+     public Properties getConnectionProperties()
+     {
+         return this.connectionProperties;
+     }
+ 
+     /**
+      * The url to connect to the database. Example: <code>jdbc:hsqldb:database/jiradb</code>.
+      * 
+      * @return the url to connect to the database
+      */
+     public String getUrl()
+     {
+         return this.url;
+     }
+ 
+     /**
+      * The username to use when connecting to the database.
+      * 
+      * @return the username (eg 'sa')
+      */
+     public String getUsername()
+     {
+         return this.username;
+     }
+ 
+     /**
+      * The password to use when connecting to the database.
+      * 
+      * @return the password to use to connect to the database
+      */
+     public String getPassword()
+     {
+         return this.password;
+     }
+ 
+     /**
+      * Create valid connection type based on input value.
+      * 
+      * @param connectionType Connection type value to be converted.
+      * @return Valid connection type.
+      */
+     private String createConnectionType(String connectionType)
+     {
+         if (null == connectionType)
+         {
+             return ConfigurationEntryType.JDBC_DRIVER;
+         }
+         else
+         {
+             switch (connectionType)
+             {
+                 case ConfigurationEntryType.XA_DATASOURCE:
+                     return ConfigurationEntryType.XA_DATASOURCE;
+                 case ConfigurationEntryType.DATASOURCE:
+                     return ConfigurationEntryType.DATASOURCE;
+                 default:
+                     return ConfigurationEntryType.JDBC_DRIVER;
+             }
+         }
+     }
+ 
+     /**
+      * Create valid transaction support value based on input values.
+      * 
+      * @param transactionSupport Configured transaction support.
+      * @param connectionType Valid connection type.
+      * @return Valid transaction support.
+      */
+     private TransactionSupport createTransactionSupport(TransactionSupport transactionSupport,
+             String connectionType)
+     {
+         if (TransactionSupport.XA_TRANSACTION.equals(transactionSupport)
+             || ConfigurationEntryType.XA_DATASOURCE.equals(connectionType))
+         {
+             return TransactionSupport.XA_TRANSACTION;
+         }
+         else if (TransactionSupport.LOCAL_TRANSACTION.equals(transactionSupport))
+         {
+             return TransactionSupport.LOCAL_TRANSACTION;
+         }
+         else
+         {
+             return TransactionSupport.NO_TRANSACTION;
+         }
+     }
+ 
+     /**
+      * Get a string name for the configuration of this datasource. This should be XML and filesystem
+      * friendly. For example, the String returned will have no slashes or punctuation, and be as
+      * short as possible.
+      * 
+      * @param jndiLocation used to construct the id
+      * @return a string that can be used to name this configuration
+      */
+     private String createIdFromJndiLocation(String jndiLocation)
+     {
+         // using indexOf to avoid introducing a regex package dependency. when we move
+         // to jdk 5+, this can be more easily performed with regex.
+ 
+         int[] delimeters =
+             new int[] {
+                 // jndi locations are organized by dots or slashes. In JBoss, it could have a colon
+                 jndiLocation.lastIndexOf('/'), jndiLocation.lastIndexOf('.'),
+                 jndiLocation.lastIndexOf(':')};
+         Arrays.sort(delimeters);
+ 
+         int highestIndex = delimeters[2];
+ 
+         // highestIndex could be -1, or a location of a character we don't want. In either case, we
+         // want to increase it by one
+         return jndiLocation.substring(highestIndex + 1);
+     }
+ 
+     /**
+      * if the enclosed driver properties object is set, and also contains the user and password
+      * properties, set the corresponding member values.
+      */
+     private void setCredentialsIfInsideDriverProperties()
+     {
+         if (getConnectionProperties() != null)
+         {
+             if (getConnectionProperties().containsKey("user"))
+             {
+                 setUsername(getConnectionProperties().getProperty("user"));
+             }
+ 
+             if (getConnectionProperties().containsKey("password"))
+             {
+                 setPassword(getConnectionProperties().getProperty("password"));
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-3/sources/source-2.html b/htmlReport/ns-3/sources/source-2.html new file mode 100644 index 0000000000..78acd2b66f --- /dev/null +++ b/htmlReport/ns-3/sources/source-2.html @@ -0,0 +1,274 @@ + + + + + + + + Coverage Report > Resource + + + + + + +
+ + +

Coverage Summary for Class: Resource (org.codehaus.cargo.container.configuration.entry)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Resource + + 100% + + + (1/1) + + + + 100% + + + (12/12) + + + + 100% + + + (15/15) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.entry;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ import java.util.Set;
+ 
+ /**
+  * Represents a resource, such as a datasource.
+  */
+ public class Resource
+ {
+ 
+     /**
+      * Resource name.
+      */
+     private String name;
+ 
+     /**
+      * Resource Type.
+      */
+     private String type;
+ 
+     /**
+      * Resource Implementation class.
+      */
+     private String className;
+ 
+     /**
+      * id used in configuration files.
+      */
+     private String id;
+ 
+     /**
+      * Resource parameters.
+      */
+     private Map<String, String> parameters;
+ 
+     /**
+      * 
+      * @param name Name of resource (e.g. jdbc/myConnection).
+      * @param type Type of resource (e.g. javax.sql.DataSource).
+      */
+     public Resource(String name, String type)
+     {
+         this.name = name;
+         this.type = type;
+         parameters = new HashMap<String, String>();
+     }
+ 
+     /**
+      * @return The resource name
+      */
+     public String getName()
+     {
+         return name;
+     }
+ 
+     /**
+      * @return The resource Type
+      */
+     public String getType()
+     {
+         return type;
+     }
+ 
+     /**
+      * Set a resource parameter. I.e. this relates in tomcat to &lt;ResourceParams...&gt;
+      * &lt;parameter&gt; &lt;name&gt;key&lt;/name&gt; &lt;value&gt;value&lt;/name&gt;
+      * &lt;/parameter&gt; ... &lt;/ResourceParams&gt;
+      * 
+      * @param name Name of the value to set.
+      * @param value Value to set.
+      */
+     public void setParameter(String name, String value)
+     {
+         parameters.put(name, value);
+     }
+ 
+     /**
+      * Get a stored parameter. Returns null if no parameter stored by this name.
+      * 
+      * @param name Name of parameter.
+      * @return Value of parameter.
+      */
+     public String getParameter(String name)
+     {
+         return parameters.get(name);
+     }
+ 
+     /**
+      * @return A <code>Set</code> with all parameters.
+      */
+     public Set<String> getParameterNames()
+     {
+         return parameters.keySet();
+     }
+ 
+     /**
+      * Set parameters.
+      * 
+      * @param parameters The parameters to set.
+      */
+     public void setParameters(Map<String, String> parameters)
+     {
+         this.parameters = parameters;
+     }
+ 
+     /**
+      * Get parameters.
+      * 
+      * @return parameters The parameters for this resource.
+      */
+     public Map<String, String> getParameters()
+     {
+         return parameters;
+     }
+ 
+     /**
+      * @param className the className to set
+      */
+     public void setClassName(String className)
+     {
+         this.className = className;
+     }
+ 
+     /**
+      * @return the className
+      */
+     public String getClassName()
+     {
+         return className;
+     }
+ 
+     /**
+      * @param id id used in configuration files.
+      */
+     public void setId(String id)
+     {
+         this.id = id;
+     }
+ 
+     /**
+      * The String used to identify this resource in configuration files.
+      * 
+      * @return the resource id
+      */
+     public String getId()
+     {
+         return this.id;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-3/sources/source-3.html b/htmlReport/ns-3/sources/source-3.html new file mode 100644 index 0000000000..04fa91348e --- /dev/null +++ b/htmlReport/ns-3/sources/source-3.html @@ -0,0 +1,110 @@ + + + + + + + + Coverage Report > DataSourceSupport + + + + + + +
+ + +

Coverage Summary for Class: DataSourceSupport (org.codehaus.cargo.container.configuration.entry)

+ + + + + + + + + +
Class
DataSourceSupport
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.entry;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ 
+ /**
+  * Designates support of DataSource configuration.
+  */
+ public interface DataSourceSupport
+ {
+     /**
+      * @param ds the DataSource configuration you wish to install on the container.
+      * @param container the container whose configuration you wish to affect.
+      */
+     void configure(DataSource ds, LocalContainer container);
+ 
+     /**
+      * Configure the DataSources defined for this configuration.
+      * 
+      * @param container the container whose configuration you wish to affect.
+      */
+     void configureDataSources(LocalContainer container);
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-3/sources/source-4.html b/htmlReport/ns-3/sources/source-4.html new file mode 100644 index 0000000000..e4884b2b52 --- /dev/null +++ b/htmlReport/ns-3/sources/source-4.html @@ -0,0 +1,112 @@ + + + + + + + + Coverage Report > ResourceSupport + + + + + + +
+ + +

Coverage Summary for Class: ResourceSupport (org.codehaus.cargo.container.configuration.entry)

+ + + + + + + + + +
Class
ResourceSupport
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.entry;
+ 
+ import org.codehaus.cargo.container.LocalContainer;
+ 
+ /**
+  * Designates a {@link LocalContainer container} supports {@link Resource resource} configuration.
+  * The operations in this interface should not depend on prior state and should be able to be called
+  * multiple times.
+  */
+ public interface ResourceSupport
+ {
+     /**
+      * @param ds the Resource configuration you wish to install on the container.
+      * @param container the container whose configuration you wish to affect.
+      */
+     void configure(Resource ds, LocalContainer container);
+ 
+     /**
+      * Configure the Resources defined for this configuration.
+      * 
+      * @param container the container whose configuration you wish to affect.
+      */
+     void configureResources(LocalContainer container);
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-4/index.html b/htmlReport/ns-4/index.html new file mode 100644 index 0000000000..3ec2ed8669 --- /dev/null +++ b/htmlReport/ns-4/index.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_BLOCK.html b/htmlReport/ns-4/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..fc1050196c --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_BLOCK.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..b9533428db --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_CLASS.html b/htmlReport/ns-4/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..40ce657378 --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_CLASS.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..0a9f9d55a2 --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_LINE.html b/htmlReport/ns-4/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..cdbf158cb0 --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_LINE.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..a07d0fb00d --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_METHOD.html b/htmlReport/ns-4/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..abf91dfa2e --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_METHOD.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..5153c2da59 --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..f8586fd86e --- /dev/null +++ b/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,197 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.configuration.script + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.configuration.script

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.configuration.script + + 0% + + + (0/3) + + + + 0% + + + (0/9) + + + + 0% + + + (0/46) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-4/sources/source-1.html b/htmlReport/ns-4/sources/source-1.html new file mode 100644 index 0000000000..1b517c2d78 --- /dev/null +++ b/htmlReport/ns-4/sources/source-1.html @@ -0,0 +1,220 @@ + + + + + + + + Coverage Report > AbstractResourceScriptCommand + + + + + + +
+ + +

Coverage Summary for Class: AbstractResourceScriptCommand (org.codehaus.cargo.container.configuration.script)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractResourceScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/17) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.script;
+ 
+ import java.io.IOException;
+ import java.nio.charset.StandardCharsets;
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.configuration.Configuration;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.internal.util.ResourceUtils;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * Implementation of general functionality for configuration script commands.
+  */
+ public abstract class AbstractResourceScriptCommand extends AbstractScriptCommand
+ {
+ 
+     /**
+      * Path to configuration script resources.
+      */
+     private String resourcePath;
+ 
+     /**
+      * Resource utility class.
+      */
+     private ResourceUtils resourceUtils;
+ 
+     /**
+      * Sets configuration containing all needed information for building configuration scripts.
+      * 
+      * @param configuration Container configuration.
+      * @param resourcePath Path to configuration script resources.
+      */
+     public AbstractResourceScriptCommand(Configuration configuration, String resourcePath)
+     {
+         super(configuration);
+ 
+         this.resourcePath = resourcePath;
+         this.resourceUtils = new ResourceUtils();
+     }
+ 
+     /**
+      * @return Filtered script.
+      */
+     @Override
+     public String readScript()
+     {
+         Map<String, String> replacements =
+             new HashMap<String, String>(getConfiguration().getProperties());
+         addConfigurationScriptProperties(replacements);
+ 
+         String resourceName = resourcePath + getScriptRelativePath();
+         try
+         {
+             return resourceUtils.readResource(
+                 resourceName, replacements, StandardCharsets.UTF_8) + FileHandler.NEW_LINE;
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Error while reading resource [" + resourceName + "] ", e);
+         }
+     }
+ 
+     /**
+      * @return Relative path to resource being read.
+      */
+     protected abstract String getScriptRelativePath();
+ 
+     /**
+      * Add custom properties needed for configuration script filtering.
+      * 
+      * @param propertiesMap Map of additional custom properties.
+      */
+     protected void addConfigurationScriptProperties(Map<String, String> propertiesMap)
+     {
+     };
+ 
+     /**
+      * @param type Resource type.
+      * @return Resource of defined type.
+      */
+     protected Resource findResource(String type)
+     {
+         Resource foundResource = null;
+         for (Resource resource : ((LocalConfiguration) getConfiguration()).getResources())
+         {
+             if (type.equals(resource.getType()))
+             {
+                 foundResource = resource;
+             }
+         }
+         return foundResource;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-4/sources/source-2.html b/htmlReport/ns-4/sources/source-2.html new file mode 100644 index 0000000000..94282d0c42 --- /dev/null +++ b/htmlReport/ns-4/sources/source-2.html @@ -0,0 +1,165 @@ + + + + + + + + Coverage Report > AbstractScriptCommand + + + + + + +
+ + +

Coverage Summary for Class: AbstractScriptCommand (org.codehaus.cargo.container.configuration.script)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.script;
+ 
+ import org.codehaus.cargo.container.configuration.Configuration;
+ 
+ /**
+  * Implementation of general functionality for configuration script commands.
+  */
+ public abstract class AbstractScriptCommand implements ScriptCommand
+ {
+ 
+     /**
+      * Container configuration.
+      */
+     private Configuration configuration;
+ 
+     /**
+      * Sets configuration containing all needed information for building configuration scripts.
+      * 
+      * @param configuration Container configuration.
+      */
+     public AbstractScriptCommand(Configuration configuration)
+     {
+         this.configuration = configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isApplicable()
+     {
+         return true;
+     }
+ 
+     /**
+      * @return Container configuration.
+      */
+     protected Configuration getConfiguration()
+     {
+         return configuration;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-4/sources/source-3.html b/htmlReport/ns-4/sources/source-3.html new file mode 100644 index 0000000000..f986c2727c --- /dev/null +++ b/htmlReport/ns-4/sources/source-3.html @@ -0,0 +1,215 @@ + + + + + + + + Coverage Report > FileScriptCommand + + + + + + +
+ + +

Coverage Summary for Class: FileScriptCommand (org.codehaus.cargo.container.configuration.script)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
FileScriptCommand + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/25) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.script;
+ 
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.nio.charset.StandardCharsets;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.configuration.Configuration;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * Implementation of general functionality for existing script files.
+  */
+ public class FileScriptCommand extends AbstractScriptCommand
+ {
+ 
+     /**
+      * Path to configuration script file.
+      */
+     private String filePath;
+ 
+     /**
+      * File handler class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * Sets configuration containing all needed information for building configuration scripts.
+      * 
+      * @param configuration Container configuration.
+      * @param filePath Path to configuration script file.
+      */
+     public FileScriptCommand(Configuration configuration, String filePath)
+     {
+         super(configuration);
+ 
+         this.filePath = filePath;
+         this.fileHandler = new DefaultFileHandler();
+         this.fileHandler.setLogger(configuration.getLogger());
+     }
+ 
+     /**
+      * @return Filtered script.
+      */
+     @Override
+     public String readScript()
+     {
+         try (InputStream resource = this.fileHandler.getInputStream(this.filePath))
+         {
+             try (BufferedReader in =
+                 new BufferedReader(new InputStreamReader(resource, StandardCharsets.UTF_8)))
+             {
+                 String line;
+                 StringBuilder out = new StringBuilder();
+                 while ((line = in.readLine()) != null)
+                 {
+                     if (line.isEmpty())
+                     {
+                         out.append(FileHandler.NEW_LINE);
+                     }
+                     else
+                     {
+                         if (out.length() > 0)
+                         {
+                             out.append(FileHandler.NEW_LINE);
+                         }
+                         out.append(line);
+                     }
+                 }
+                 String output = out.toString();
+                 Map<String, String> replacements = getConfiguration().getProperties();
+                 if (replacements != null)
+                 {
+                     for (Map.Entry<String, String> replacement : replacements.entrySet())
+                     {
+                         String replacementKey = "@" + replacement.getKey() + "@";
+                         output = output.replace(replacementKey, replacement.getValue());
+                     }
+                 }
+                 return output;
+             }
+         }
+         catch (IOException e)
+         {
+             throw new CargoException("Error while reading file [" + filePath + "] ", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-4/sources/source-4.html b/htmlReport/ns-4/sources/source-4.html new file mode 100644 index 0000000000..a26faa7722 --- /dev/null +++ b/htmlReport/ns-4/sources/source-4.html @@ -0,0 +1,107 @@ + + + + + + + + Coverage Report > ScriptCommand + + + + + + +
+ + +

Coverage Summary for Class: ScriptCommand (org.codehaus.cargo.container.configuration.script)

+ + + + + + + + + +
Class
ScriptCommand
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.configuration.script;
+ 
+ /**
+  * General interface for configuration script commands.
+  */
+ public interface ScriptCommand
+ {
+     /**
+      * @return Filtered script representing this command.
+      */
+     String readScript();
+ 
+     /**
+      * Method used for checking if script command can be applied - if it has
+      * all needed parameters set.
+      * 
+      * @return True if script command can be applied with existing parameters.
+      */
+     boolean isApplicable();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/index.html b/htmlReport/ns-5/index.html new file mode 100644 index 0000000000..e51acdc4ab --- /dev/null +++ b/htmlReport/ns-5/index.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_BLOCK.html b/htmlReport/ns-5/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..74d1cc3b71 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_BLOCK.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..9ee485a3b9 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_CLASS.html b/htmlReport/ns-5/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..4152d74888 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_CLASS.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..75662283d1 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_LINE.html b/htmlReport/ns-5/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..98d92af7b4 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_LINE.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..54986907c0 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_METHOD.html b/htmlReport/ns-5/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..0dbd66cc18 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_METHOD.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..86371cd076 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..babfd4e629 --- /dev/null +++ b/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployable + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployable

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployable + + 36.4% + + + (4/11) + + + + 43.6% + + + (17/39) + + + + 46.6% + + + (55/118) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-1.html b/htmlReport/ns-5/sources/source-1.html new file mode 100644 index 0000000000..73c3b97557 --- /dev/null +++ b/htmlReport/ns-5/sources/source-1.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > AOP + + + + + + +
+ + +

Coverage Summary for Class: AOP (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AOP + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps a AOP (JBoss AOP Archive) file that will be deployed in the container.
+  */
+ public class AOP extends AbstractDeployable
+ {
+     /**
+      * @param aop the location of the JBoss AOP Archive being wrapped.
+      */
+     public AOP(String aop)
+     {
+         super(aop);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.AOP;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-2.html b/htmlReport/ns-5/sources/source-2.html new file mode 100644 index 0000000000..407f7d92f2 --- /dev/null +++ b/htmlReport/ns-5/sources/source-2.html @@ -0,0 +1,150 @@ + + + + + + + + Coverage Report > Bundle + + + + + + +
+ + +

Coverage Summary for Class: Bundle (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
Bundle + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps an OSGi Bundle file that will be deployed in the container.
+  */
+ public class Bundle extends AbstractDeployable
+ {
+     /**
+      * @param location the location of the OSGi Bundle being wrapped. This must point to an OSGi
+      * Bundle JAR file.
+      */
+     public Bundle(String location)
+     {
+         super(location);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.BUNDLE;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-3.html b/htmlReport/ns-5/sources/source-3.html new file mode 100644 index 0000000000..362060db9d --- /dev/null +++ b/htmlReport/ns-5/sources/source-3.html @@ -0,0 +1,150 @@ + + + + + + + + Coverage Report > DeployableException + + + + + + +
+ + +

Coverage Summary for Class: DeployableException (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DeployableException + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ 
+ /**
+  * Exception thrown when a container encounters a problem with a deployable.
+  */
+ public class DeployableException extends ContainerException
+ {
+ 
+     /**
+      * @param message the exception message
+      */
+     public DeployableException(String message)
+     {
+         super(message);
+     }
+ 
+     /**
+      * @param message the exception message
+      * @param throwable the exception to wrap
+      */
+     public DeployableException(String message, Throwable throwable)
+     {
+         super(message, throwable);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-4.html b/htmlReport/ns-5/sources/source-4.html new file mode 100644 index 0000000000..50d6d7b374 --- /dev/null +++ b/htmlReport/ns-5/sources/source-4.html @@ -0,0 +1,278 @@ + + + + + + + + Coverage Report > DeployableType + + + + + + +
+ + +

Coverage Summary for Class: DeployableType (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DeployableType + + 100% + + + (1/1) + + + + 85.7% + + + (6/7) + + + + 61.1% + + + (22/36) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ /**
+  * Type of Depoyable. Can be WAR, EAR, EXPANDED_WAR, etc.
+  */
+ public final class DeployableType
+ {
+     /**
+      * The WAR deployable type.
+      */
+     public static final DeployableType WAR = new DeployableType("war");
+ 
+     /**
+      * The EAR deployable type.
+      */
+     public static final DeployableType EAR = new DeployableType("ear");
+ 
+     /**
+      * The EJB deployable type.
+      */
+     public static final DeployableType EJB = new DeployableType("ejb");
+ 
+     /**
+      * The SAR deployable type.
+      */
+     public static final DeployableType SAR = new DeployableType("sar");
+ 
+     /**
+      * The RAR deployable type.
+      */
+     public static final DeployableType RAR = new DeployableType("rar");
+ 
+     /**
+      * The File deployable type.
+      */
+     public static final DeployableType FILE = new DeployableType("file");
+ 
+     /**
+      * The OSGi Bundle deployable type.
+      */
+     public static final DeployableType BUNDLE = new DeployableType("bundle");
+ 
+     /**
+      * The HAR deployable type.
+      */
+     public static final DeployableType HAR = new DeployableType("har");
+ 
+     /**
+      * The AOP deployable type.
+      */
+     public static final DeployableType AOP = new DeployableType("aop");
+ 
+     /**
+      * A unique id that identifies a deployable type.
+      */
+     private String type;
+ 
+     /**
+      * @param type A unique id that identifies a deployable type
+      */
+     private DeployableType(String type)
+     {
+         this.type = type;
+     }
+ 
+     /**
+      * Transform a type represented as a string into a {@link DeployableType} object.
+      * 
+      * @param typeAsString the string to transform
+      * @return the {@link DeployableType} object
+      */
+     public static DeployableType toType(String typeAsString)
+     {
+         DeployableType type;
+ 
+         if (typeAsString.equalsIgnoreCase(WAR.type))
+         {
+             type = WAR;
+         }
+         else if (typeAsString.equalsIgnoreCase(EAR.type))
+         {
+             type = EAR;
+         }
+         else if (typeAsString.equalsIgnoreCase(EJB.type))
+         {
+             type = EJB;
+         }
+         else if (typeAsString.equalsIgnoreCase(SAR.type))
+         {
+             type = SAR;
+         }
+         else if (typeAsString.equalsIgnoreCase(RAR.type))
+         {
+             type = RAR;
+         }
+         else if (typeAsString.equalsIgnoreCase(FILE.type))
+         {
+             type = FILE;
+         }
+         else if (typeAsString.equalsIgnoreCase(BUNDLE.type))
+         {
+             type = BUNDLE;
+         }
+         else
+         {
+             type = new DeployableType(typeAsString);
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object instanceof DeployableType)
+         {
+             DeployableType type = (DeployableType) object;
+             if (type.type.equalsIgnoreCase(this.type))
+             {
+                 result = true;
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.type.hashCode();
+     }
+ 
+     /**
+      * @return the deployable type
+      */
+     public String getType()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return this.type;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-5.html b/htmlReport/ns-5/sources/source-5.html new file mode 100644 index 0000000000..b9bd1c932b --- /dev/null +++ b/htmlReport/ns-5/sources/source-5.html @@ -0,0 +1,236 @@ + + + + + + + + Coverage Report > EAR + + + + + + +
+ + +

Coverage Summary for Class: EAR (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EAR + + 100% + + + (1/1) + + + + 33.3% + + + (2/6) + + + + 7.7% + + + (2/26) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployablewithSettableName;
+ import org.codehaus.cargo.module.application.ApplicationXml;
+ import org.codehaus.cargo.module.application.DefaultEarArchive;
+ import org.codehaus.cargo.module.application.EarArchive;
+ 
+ /**
+  * Wraps an EAR file that will be deployed in the container.
+  */
+ public class EAR extends AbstractDeployablewithSettableName
+ {
+     /**
+      * List of webapps that have been found during parsing inside the wrapped EAR.
+      */
+     private Map<String, String> webapps;
+ 
+     /**
+      * @param ear the location of the EAR being wrapped.
+      */
+     public EAR(String ear)
+     {
+         super(ear);
+     }
+ 
+     /**
+      * Parse the EAR to find out the web apps it contains.
+      */
+     private void parseWebApps()
+     {
+         if (this.webapps == null)
+         {
+             Map<String, String> webapps = new HashMap<String, String>();
+             try
+             {
+                 EarArchive ear = new DefaultEarArchive(getFile());
+                 ApplicationXml applicationXml = ear.getApplicationXml();
+                 for (String webUri : applicationXml.getWebModuleUris())
+                 {
+                     String context = applicationXml.getWebModuleContextRoot(webUri);
+ 
+                     if (context == null)
+                     {
+                         // The application.xml does not define a <context-root>
+                         // element. This is wrong!
+                         throw new ContainerException("Your application.xml must define a "
+                             + "<context-root> element in the <web> module definition.");
+                     }
+ 
+                     // Remove leading "/" if there is one.
+                     if (context.startsWith("/"))
+                     {
+                         context = context.substring(1);
+                     }
+ 
+                     getLogger().debug("Found Web URI [" + webUri + "], context [" + context + "]",
+                         this.getClass().getName());
+ 
+                     webapps.put(context, webUri);
+                 }
+             }
+             catch (Exception e)
+             {
+                 throw new ContainerException("Failed to parse webapps from [" + getFile()
+                     + "] EAR.", e);
+             }
+             this.webapps = webapps;
+         }
+     }
+ 
+     /**
+      * @return the list of Web contexts of all WAR files contained in the wrapped EAR
+      */
+     public synchronized List<String> getWebContexts()
+     {
+         parseWebApps();
+         return new ArrayList<String>(this.webapps.keySet());
+     }
+ 
+     /**
+      * @return the list of Web URIs of all WAR files contained in the wrapped EAR
+      */
+     public synchronized List<String> getWebUris()
+     {
+         parseWebApps();
+         return new ArrayList<String>(this.webapps.values());
+     }
+ 
+     /**
+      * @param context the context for which we want to find out the web URI
+      * @return the web URI for the WAR matching the context passed as parameter
+      */
+     public synchronized String getWebUri(String context)
+     {
+         parseWebApps();
+         return this.webapps.get(context);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.EAR;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-6.html b/htmlReport/ns-5/sources/source-6.html new file mode 100644 index 0000000000..a8f2d5b668 --- /dev/null +++ b/htmlReport/ns-5/sources/source-6.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > EJB + + + + + + +
+ + +

Coverage Summary for Class: EJB (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
EJB + + 100% + + + (1/1) + + + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps an EJB JAR file that will be deployed in the container.
+  */
+ public class EJB extends AbstractDeployable
+ {
+     /**
+      * @param ejb the location of the EJB being wrapped. This must point to an EJB JAR file.
+      */
+     public EJB(String ejb)
+     {
+         super(ejb);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.EJB;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-7.html b/htmlReport/ns-5/sources/source-7.html new file mode 100644 index 0000000000..d5f783f88c --- /dev/null +++ b/htmlReport/ns-5/sources/source-7.html @@ -0,0 +1,153 @@ + + + + + + + + Coverage Report > File + + + + + + +
+ + +

Coverage Summary for Class: File (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
File + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps a file that will be deployed into the container. The file type can be used to deploy an
+  * generic file or directory to the containers deploy directory.
+  */
+ public class File extends AbstractDeployable
+ {
+ 
+     /**
+      * Constructor.
+      * @param file The file name
+      */
+     public File(String file)
+     {
+         super(file);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.FILE;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-8.html b/htmlReport/ns-5/sources/source-8.html new file mode 100644 index 0000000000..8f631edf11 --- /dev/null +++ b/htmlReport/ns-5/sources/source-8.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > HAR + + + + + + +
+ + +

Coverage Summary for Class: HAR (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
HAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps a HAR (Hibernate Archive) file that will be deployed in the container.
+  */
+ public class HAR extends AbstractDeployable
+ {
+     /**
+      * @param har the location of the HAR being wrapped.
+      */
+     public HAR(String har)
+     {
+         super(har);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.HAR;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-9.html b/htmlReport/ns-5/sources/source-9.html new file mode 100644 index 0000000000..21deef268a --- /dev/null +++ b/htmlReport/ns-5/sources/source-9.html @@ -0,0 +1,150 @@ + + + + + + + + Coverage Report > RAR + + + + + + +
+ + +

Coverage Summary for Class: RAR (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
RAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployablewithSettableName;
+ 
+ /**
+  * Wraps a RAR file that will be deployed in the container.
+  */
+ public class RAR extends AbstractDeployablewithSettableName
+ {
+     /**
+      * @param rar the location of the RAR being wrapped.
+      */
+     public RAR(String rar)
+     {
+         super(rar);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.RAR;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-a.html b/htmlReport/ns-5/sources/source-a.html new file mode 100644 index 0000000000..23b970f115 --- /dev/null +++ b/htmlReport/ns-5/sources/source-a.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > SAR + + + + + + +
+ + +

Coverage Summary for Class: SAR (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
SAR + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ 
+ /**
+  * Wraps a SAR file that will be deployed in the container.
+  */
+ public class SAR extends AbstractDeployable
+ {
+ 
+     /**
+      * @param sar the location of the SAR being wrapped.
+      */
+     public SAR(String sar)
+     {
+         super(sar);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.SAR;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-b.html b/htmlReport/ns-5/sources/source-b.html new file mode 100644 index 0000000000..9bf1a7e5b2 --- /dev/null +++ b/htmlReport/ns-5/sources/source-b.html @@ -0,0 +1,313 @@ + + + + + + + + Coverage Report > WAR + + + + + + +
+ + +

Coverage Summary for Class: WAR (org.codehaus.cargo.container.deployable)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
WAR + + 100% + + + (1/1) + + + + 80% + + + (8/10) + + + + 75% + + + (30/40) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import java.util.ArrayList;
+ import java.util.Collections;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.container.spi.deployable.AbstractDeployable;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ 
+ /**
+  * Wraps a WAR file that will be deployed in the container. The root context for this WAR is taken
+  * from the name of the WAR file (without the extension).
+  */
+ public class WAR extends AbstractDeployable
+ {
+     /**
+      * The web context parsed from the name of the WAR file.
+      */
+     private String context;
+ 
+     /**
+      * Additional classpath entries for the web application that usually reside outside of the WAR
+      * file to facilitate rapid development without fully assembling the WAR file.
+      */
+     private List<String> extraClasspath;
+ 
+     /**
+      * @param war the location of the WAR being wrapped. This must point to either a WAR file or an
+      * expanded WAR directory.
+      */
+     public WAR(String war)
+     {
+         super(war);
+         this.extraClasspath = new ArrayList<String>();
+     }
+ 
+     /**
+      * @param context the context name to use when deploying this WAR. If not specified by the user,
+      * then the default context name is computed from the name of WAR itself (without the file
+      * extension).
+      */
+     public synchronized void setContext(String context)
+     {
+         // Ensure the context is well-formed by removing any extra leading or ending "/".
+         String wellFormedContext = context.trim();
+         while (wellFormedContext.contains("//"))
+         {
+             wellFormedContext = wellFormedContext.replace("//", "/");
+         }
+         while (wellFormedContext.startsWith("/"))
+         {
+             wellFormedContext = wellFormedContext.substring(1);
+         }
+         while (wellFormedContext.endsWith("/"))
+         {
+             wellFormedContext = wellFormedContext.substring(0, wellFormedContext.length() - 1);
+         }
+         this.context = wellFormedContext;
+     }
+ 
+     /**
+      * Extract the context name from the WAR file name (without the file extension). For example if
+      * the WAR is named <code>test.war</code> then the context name is <code>test</code>.
+      */
+     private void parseContext()
+     {
+         if (this.context == null)
+         {
+             String ctx = getFileHandler().getName(getFile());
+             int warIndex = ctx.toLowerCase().lastIndexOf(".war");
+             if (warIndex >= 0)
+             {
+                 ctx = ctx.substring(0, warIndex);
+             }
+ 
+             getLogger().debug("Parsed web context = [" + ctx + "]", this.getClass().getName());
+ 
+             setContext(ctx);
+         }
+     }
+ 
+     /**
+      * @return the context name, either the computed name derived from the WAR file name or the name
+      * defined by the user. Note that this method doesn't return any leading "/" before the context
+      * name.
+      */
+     public synchronized String getContext()
+     {
+         parseContext();
+         return this.context;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public DeployableType getType()
+     {
+         return DeployableType.WAR;
+     }
+ 
+     /**
+      * Sets additional classpath entries for the web application that usually reside outside of the
+      * WAR file to facilitate rapid development without fully assembling the WAR file. In general,
+      * this feature is meant for use with exploded WARs and as such is usually not supported for
+      * non-expanded WARs. If this method is use with tomcat container, the configuration must set
+      * TomcatPropertySet#COPY_WARS to false
+      * 
+      * @param classpath The additional classpath entries for the web application, may be
+      *            {@code null}.
+      */
+     public synchronized void setExtraClasspath(String[] classpath)
+     {
+         this.extraClasspath.clear();
+         if (classpath != null)
+         {
+             Collections.addAll(this.extraClasspath, classpath);
+         }
+     }
+ 
+     /**
+      * Gets additional classpath entries for the web application that usually reside outside of the
+      * WAR file to facilitate rapid development without fully assembling the WAR file.
+      * 
+      * @return The additional classpath entries for the web application, never {@code null}.
+      */
+     public synchronized String[] getExtraClasspath()
+     {
+         return this.extraClasspath.toArray(new String[this.extraClasspath.size()]);
+     }
+ 
+     /**
+      * Returns the name of this deployable. For WAR file it is its context.
+      * @return the name of this deployable
+      */
+     @Override
+     public String getName()
+     {
+         return getContext();
+     }
+ 
+     /**
+      * Similar to {@link #getFilename()}, without the <code>.war</code> extension.
+      * @return The file or directory name for this WAR, taking into account the context.
+      */
+     public String getBaseFilename()
+     {
+         String baseFilename = this.getContext();
+ 
+         // First check for ROOT here, before sanitizing, in case the / path was set "normally"
+         if (baseFilename == null || baseFilename.trim().isEmpty() || baseFilename.matches("/+"))
+         {
+             getLogger().info(
+                 "The WAR file has its context set to / and will therefore be "
+                     + "deployed as ROOT.war", this.getClass().getName());
+             baseFilename = "ROOT";
+         }
+         else
+         {
+             baseFilename = DefaultFileHandler.sanitizeFilename(baseFilename, getLogger());
+         }
+ 
+         // Also check for ROOT after sanitizing file name
+         if (baseFilename.trim().isEmpty() || baseFilename.matches("/+"))
+         {
+             getLogger().info(
+                 "The WAR file has its sanitized context set to [" + baseFilename
+                     + "] and will therefore be deployed as ROOT.war", this.getClass().getName());
+             baseFilename = "ROOT";
+         }
+ 
+         return baseFilename;
+     }
+ 
+     /**
+      * {@inheritDoc}<br>
+      * <br>
+      * Value is calculated based on the WAR context and whether it is expanded or not.
+      */
+     @Override
+     public String getFilename()
+     {
+         String filename = getBaseFilename();
+         if (!this.isExpanded())
+         {
+             filename = filename + ".war";
+         }
+         return filename;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-5/sources/source-c.html b/htmlReport/ns-5/sources/source-c.html new file mode 100644 index 0000000000..dfc1a12a5e --- /dev/null +++ b/htmlReport/ns-5/sources/source-c.html @@ -0,0 +1,125 @@ + + + + + + + + Coverage Report > Deployable + + + + + + +
+ + +

Coverage Summary for Class: Deployable (org.codehaus.cargo.container.deployable)

+ + + + + + + + + +
Class
Deployable
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployable;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * A deployable is a file archive to be deployed in a container (eg WAR, EAR, etc).
+  */
+ public interface Deployable extends Loggable
+ {
+     /**
+      * @return the file representing the archive to deploy
+      */
+     String getFile();
+ 
+     /**
+      * @return the deployable's type (war, ear, etc)
+      */
+     DeployableType getType();
+ 
+     /**
+      * @return If the deployable is a directory or not
+      */
+     boolean isExpanded();
+ 
+     /**
+      * @return The name of this deployable.
+      * See CARGO-1352.
+      */
+     String getName();
+ 
+     /**
+      * Deployable file name, taking into account the {@link #getName()}, including any
+      * deployable-specific aspects of it, and the escaping in order to avoid unwanted file system
+      * actions (for example, ensuring the file name contains no slashes).
+      * @return The file or directory name for this deployable.
+      */
+     String getFilename();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/index.html b/htmlReport/ns-6/index.html new file mode 100644 index 0000000000..999184f2ae --- /dev/null +++ b/htmlReport/ns-6/index.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_BLOCK.html b/htmlReport/ns-6/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..3bdefeacca --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_BLOCK.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..9732c49c01 --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_CLASS.html b/htmlReport/ns-6/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..26e39ea6ac --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_CLASS.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..14ebb64e1b --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_LINE.html b/htmlReport/ns-6/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..afa978cf59 --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_LINE.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..15e96d4dbd --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_METHOD.html b/htmlReport/ns-6/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..d0de49258c --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_METHOD.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..5df8423620 --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..cd6313fc62 --- /dev/null +++ b/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,224 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.deployer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.deployer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.deployer + + 0% + + + (0/4) + + + + 0% + + + (0/25) + + + + 0% + + + (0/101) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-1.html b/htmlReport/ns-6/sources/source-1.html new file mode 100644 index 0000000000..ef611d608f --- /dev/null +++ b/htmlReport/ns-6/sources/source-1.html @@ -0,0 +1,203 @@ + + + + + + + + Coverage Report > AbstractDeployableMonitor + + + + + + +
+ + +

Coverage Summary for Class: AbstractDeployableMonitor (org.codehaus.cargo.container.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/13) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Common properties and configuration for deployable monitors.
+  */
+ public abstract class AbstractDeployableMonitor extends LoggedObject implements DeployableMonitor
+ {
+     /**
+      * List of {@link DeployableMonitorListener} that we will notify when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed or undeployed.
+      */
+     private List<DeployableMonitorListener> listeners;
+ 
+     /**
+      * The timeout after which we stop waiting for deployment.
+      */
+     private long timeout;
+ 
+     /**
+      * Constructor with default 20s timeout.
+      */
+     public AbstractDeployableMonitor()
+     {
+         this(20000L);
+     }
+ 
+     /**
+      * @param timeout the timeout after which we stop monitoring the deployment
+      */
+     public AbstractDeployableMonitor(long timeout)
+     {
+         this.listeners = new ArrayList<DeployableMonitorListener>();
+         this.timeout = timeout;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void registerListener(DeployableMonitorListener listener)
+     {
+         this.listeners.add(listener);
+     }
+ 
+     /**
+      * Notify listeners that deployable is deployed/undeployed.
+      * @param isDeployed True is deployable is deployed, false otherwise.
+      */
+     protected void notifyListeners(boolean isDeployed)
+     {
+         for (DeployableMonitorListener listener : listeners)
+         {
+             getLogger().debug("Notifying monitor listener [" + listener + "]",
+                 this.getClass().getName());
+ 
+             if (isDeployed)
+             {
+                 listener.deployed();
+             }
+             else
+             {
+                 listener.undeployed();
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public long getTimeout()
+     {
+         return this.timeout;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-2.html b/htmlReport/ns-6/sources/source-2.html new file mode 100644 index 0000000000..1c03d71a35 --- /dev/null +++ b/htmlReport/ns-6/sources/source-2.html @@ -0,0 +1,282 @@ + + + + + + + + Coverage Report > DeployerType + + + + + + +
+ + +

Coverage Summary for Class: DeployerType (org.codehaus.cargo.container.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DeployerType + + 0% + + + (0/1) + + + + 0% + + + (0/10) + + + + 0% + + + (0/32) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.ContainerType;
+ 
+ /**
+  * Type of Deployer. Can be a installed, embedded or remote.
+  */
+ public final class DeployerType
+ {
+     /**
+      * A deployer type to deploy to an installed local container.
+      */
+     public static final DeployerType INSTALLED = new DeployerType("installed");
+ 
+     /**
+      * A deployer type to deploy to a remote container.
+      */
+     public static final DeployerType REMOTE = new DeployerType("remote");
+ 
+     /**
+      * A deployer type to deploy to an embedded local container.
+      */
+     public static final DeployerType EMBEDDED = new DeployerType("embedded");
+ 
+     /**
+      * A unique id that identifies a deployer's type.
+      */
+     private String type;
+ 
+     /**
+      * @param type A unique id that identifies a deployer's type
+      */
+     private DeployerType(String type)
+     {
+         this.type = type;
+     }
+ 
+     /**
+      * Transform a type represented as a string into a {@link DeployerType} object.
+      * 
+      * @param typeAsString the string to transform
+      * @return the {@link DeployerType} object
+      */
+     public static DeployerType toType(String typeAsString)
+     {
+         DeployerType type;
+ 
+         if (typeAsString.equalsIgnoreCase(INSTALLED.type))
+         {
+             type = INSTALLED;
+         }
+         else if (typeAsString.equalsIgnoreCase(REMOTE.type))
+         {
+             type = REMOTE;
+         }
+         else if (typeAsString.equalsIgnoreCase(EMBEDDED.type))
+         {
+             type = EMBEDDED;
+         }
+         else
+         {
+             type = new DeployerType(typeAsString);
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * Converts a {@link ContainerType} to the corresponding {@link DeployerType}.
+      * 
+      * @param containerType the container type to be converted.
+      * @return the deployer type
+      */
+     public static DeployerType toType(ContainerType containerType)
+     {
+         DeployerType type;
+ 
+         if (containerType == ContainerType.EMBEDDED)
+         {
+             type = EMBEDDED;
+         }
+         else if (containerType == ContainerType.INSTALLED)
+         {
+             type = INSTALLED;
+         }
+         else if (containerType == ContainerType.REMOTE)
+         {
+             type = REMOTE;
+         }
+         else
+         {
+             throw new ContainerException("Cannot find a deployer matching container type ["
+                 + containerType + "]");
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object instanceof DeployerType)
+         {
+             DeployerType type = (DeployerType) object;
+             if (type.type.equalsIgnoreCase(this.type))
+             {
+                 result = true;
+             }
+         }
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.type.hashCode();
+     }
+ 
+     /**
+      * @return the deployer's type
+      */
+     public String getType()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * @return true if the deployer type is a local type (installed or embedded)
+      */
+     public boolean isLocal()
+     {
+         return this == INSTALLED || this == EMBEDDED;
+     }
+ 
+     /**
+      * @return true if the deployer type is a remote type
+      */
+     public boolean isRemote()
+     {
+         return this == REMOTE;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-3.html b/htmlReport/ns-6/sources/source-3.html new file mode 100644 index 0000000000..fd57b1d252 --- /dev/null +++ b/htmlReport/ns-6/sources/source-3.html @@ -0,0 +1,231 @@ + + + + + + + + Coverage Report > URLDeployableMonitor + + + + + + +
+ + +

Coverage Summary for Class: URLDeployableMonitor (org.codehaus.cargo.container.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
URLDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/23) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import java.net.URL;
+ 
+ import org.codehaus.cargo.container.internal.util.HttpUtils;
+ 
+ /**
+  * Monitor that verifies if a {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+  * by pinging a URL provided by the user.
+  */
+ public class URLDeployableMonitor extends AbstractDeployableMonitor
+ {
+     /**
+      * The URL to ping.
+      */
+     private URL pingURL;
+ 
+     /**
+      * Useful HTTP methods (specifically the ping method).
+      */
+     private HttpUtils httpUtils = new HttpUtils();
+ 
+     /**
+      * String that must be contained in the HTTP response.
+      */
+     private String contains;
+ 
+     /**
+      * @param pingURL the URL to be pinged and which will tell when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+      */
+     public URLDeployableMonitor(URL pingURL)
+     {
+         super();
+         this.pingURL = pingURL;
+     }
+ 
+     /**
+      * @param pingURL the URL to be pinged and which will tell when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+      * @param timeout the timeout after which we stop monitoring the deployment
+      */
+     public URLDeployableMonitor(URL pingURL, long timeout)
+     {
+         super(timeout);
+         this.pingURL = pingURL;
+     }
+ 
+     /**
+      * @param pingURL the URL to be pinged and which will tell when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+      * @param timeout the timeout after which we stop monitoring the deployment
+      * @param contains a string that must be contained
+      */
+     public URLDeployableMonitor(URL pingURL, long timeout, String contains)
+     {
+         super(timeout);
+         this.pingURL = pingURL;
+         this.contains = contains;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getDeployableName()
+     {
+         return this.pingURL.toString();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void monitor()
+     {
+         getLogger().debug("Checking URL [" + this.pingURL + "] for status using a timeout of ["
+             + getTimeout() + "] ms...", this.getClass().getName());
+ 
+         // We check if the deployable is servicing requests by pinging a URL specified by the user
+         HttpUtils.HttpResult result = new HttpUtils.HttpResult();
+         boolean isDeployed = this.httpUtils.ping(this.pingURL, result, getTimeout());
+         if (isDeployed && this.contains != null)
+         {
+             if (result.responseBody != null)
+             {
+                 isDeployed = result.responseBody.contains(this.contains);
+             }
+             else
+             {
+                 isDeployed = false;
+             }
+         }
+ 
+         String msg = "URL [" + this.pingURL + "] is ";
+         if (isDeployed)
+         {
+             msg += "responding...";
+         }
+         else
+         {
+             msg += "not responding: " + result.responseCode + " " + result.responseMessage;
+         }
+         getLogger().debug(msg, this.getClass().getName());
+ 
+         notifyListeners(isDeployed);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-4.html b/htmlReport/ns-6/sources/source-4.html new file mode 100644 index 0000000000..3aeb292e42 --- /dev/null +++ b/htmlReport/ns-6/sources/source-4.html @@ -0,0 +1,250 @@ + + + + + + + + Coverage Report > UrlPathDeployableMonitor + + + + + + +
+ + +

Coverage Summary for Class: UrlPathDeployableMonitor (org.codehaus.cargo.container.deployer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
UrlPathDeployableMonitor + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/33) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import java.net.MalformedURLException;
+ import java.net.URL;
+ 
+ import org.codehaus.cargo.container.configuration.Configuration;
+ import org.codehaus.cargo.container.internal.util.HttpUtils;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ import org.codehaus.cargo.util.CargoException;
+ 
+ /**
+  * Monitor that verifies if a {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+  * by pinging a URL constructed from  URL path (provided by the user) and other parameters
+  * provided by container configuration.
+  */
+ public class UrlPathDeployableMonitor extends AbstractDeployableMonitor
+ {
+     /**
+      * Container configuration which carry informations about host, port....
+      */
+     private Configuration configuration;
+ 
+     /**
+      * The URL path of deployable to be pinged.
+      */
+     private String pingUrlPath;
+ 
+     /**
+      * Useful HTTP methods (specifically the ping method).
+      */
+     private HttpUtils httpUtils = new HttpUtils();
+ 
+     /**
+      * @param configuration container configuration
+      * @param pingUrlPath the URL path to be pinged and which will tell when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+      */
+     public UrlPathDeployableMonitor(Configuration configuration, String pingUrlPath)
+     {
+         super();
+         this.configuration = configuration;
+         this.pingUrlPath = pingUrlPath;
+     }
+ 
+     /**
+      * @param configuration container configuration
+      * @param pingUrlPath the URL path to be pinged and which will tell when the
+      * {@link org.codehaus.cargo.container.deployable.Deployable} is deployed
+      * @param timeout the timeout after which we stop monitoring the deployment
+      */
+     public UrlPathDeployableMonitor(Configuration configuration, String pingUrlPath, long timeout)
+     {
+         super(timeout);
+         this.configuration = configuration;
+         this.pingUrlPath = pingUrlPath;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getDeployableName()
+     {
+         return pingUrlPath;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void monitor()
+     {
+         URL pingUrl = constructPingUrl();
+ 
+         getLogger().debug("Checking URL [" + pingUrl + "] for status using a timeout of ["
+             + getTimeout() + "] ms...", this.getClass().getName());
+ 
+         // We check if the deployable is servicing requests by pinging a URL specified by the user
+         HttpUtils.HttpResult results = new HttpUtils.HttpResult();
+         boolean isDeployed = this.httpUtils.ping(pingUrl, results, getTimeout());
+ 
+         String msg = "URL [" + pingUrl + "] is ";
+         if (isDeployed)
+         {
+             msg += "responding...";
+         }
+         else
+         {
+             msg += "not responding: " + results.responseCode + " " + results.responseMessage;
+         }
+         getLogger().debug(msg, this.getClass().getName());
+ 
+         notifyListeners(isDeployed);
+     }
+ 
+     /**
+      * @return URL where we can check status of deployable.
+      */
+     private URL constructPingUrl()
+     {
+         URL deployableUrl = null;
+ 
+         String protocolProperty = configuration.getPropertyValue(GeneralPropertySet.PROTOCOL);
+         String hostnameProperty = configuration.getPropertyValue(GeneralPropertySet.HOSTNAME);
+         String portProperty = configuration.getPropertyValue(ServletPropertySet.PORT);
+         String offsetProperty = configuration.getPropertyValue(GeneralPropertySet.PORT_OFFSET);
+ 
+         int port = Integer.parseInt(portProperty);
+         if (offsetProperty != null)
+         {
+             int offset = Integer.parseInt(offsetProperty);
+             port += offset;
+         }
+ 
+         try
+         {
+             deployableUrl = new URL(protocolProperty, hostnameProperty, port, pingUrlPath);
+         }
+         catch (MalformedURLException e)
+         {
+             throw new CargoException("Unable to construct deployable URL.", e);
+         }
+ 
+         return deployableUrl;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-5.html b/htmlReport/ns-6/sources/source-5.html new file mode 100644 index 0000000000..ada09ed697 --- /dev/null +++ b/htmlReport/ns-6/sources/source-5.html @@ -0,0 +1,122 @@ + + + + + + + + Coverage Report > DeployableMonitor + + + + + + +
+ + +

Coverage Summary for Class: DeployableMonitor (org.codehaus.cargo.container.deployer)

+ + + + + + + + + +
Class
DeployableMonitor
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * Monitor the deployment status of a {@link org.codehaus.cargo.container.deployable.Deployable}.
+  */
+ public interface DeployableMonitor extends Loggable
+ {
+     /**
+      * @return a string identifying the deployable that is monitored
+      */
+     String getDeployableName();
+ 
+     /**
+      * Register a listener that we will warn about the deployment status of the associated
+      * {@link org.codehaus.cargo.container.deployable.Deployable}.
+      * 
+      * @param listener the listener to register
+      */
+     void registerListener(DeployableMonitorListener listener);
+ 
+     /**
+      * Check the deployment status of the associated
+      * {@link org.codehaus.cargo.container.deployable.Deployable} and tell the registered
+      * {@link DeployableMonitorListener} about the status.
+      */
+     void monitor();
+ 
+     /**
+      * @return the timeout after which we stop monitoring the
+      * {@link org.codehaus.cargo.container.deployable.Deployable}
+      */
+     long getTimeout();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-6.html b/htmlReport/ns-6/sources/source-6.html new file mode 100644 index 0000000000..d3b7f5fcc6 --- /dev/null +++ b/htmlReport/ns-6/sources/source-6.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage Report > DeployableMonitorListener + + + + + + +
+ + +

Coverage Summary for Class: DeployableMonitorListener (org.codehaus.cargo.container.deployer)

+ + + + + + + + + +
Class
DeployableMonitorListener
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ /**
+  * Listener that is triggered when the deployment status of a
+  * {@link org.codehaus.cargo.container.deployable.Deployable} changes.
+  */
+ public interface DeployableMonitorListener
+ {
+     /**
+      * The {@link org.codehaus.cargo.container.deployable.Deployable} has finished deploying.
+      */
+     void deployed();
+ 
+     /**
+      * The {@link org.codehaus.cargo.container.deployable.Deployable} has finished undeploying.
+      */
+     void undeployed();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-6/sources/source-7.html b/htmlReport/ns-6/sources/source-7.html new file mode 100644 index 0000000000..57f0b763da --- /dev/null +++ b/htmlReport/ns-6/sources/source-7.html @@ -0,0 +1,197 @@ + + + + + + + + Coverage Report > Deployer + + + + + + +
+ + +

Coverage Summary for Class: Deployer (org.codehaus.cargo.container.deployer)

+ + + + + + + + + +
Class
Deployer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.deployer;
+ 
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * API to manage all deployment aspects of {@link Deployable}: deploy, undeploy, start, stop and
+  * restart.
+  */
+ public interface Deployer extends Loggable
+ {
+     /**
+      * Deploy a {@link Deployable} to the running container and make it available for requests.
+      * 
+      * @param deployable the {@link Deployable} to deploy
+      */
+     void deploy(Deployable deployable);
+ 
+     /**
+      * Deploy a {@link Deployable} to the running container and make it available for requests.
+      * Waits for the {@link Deployable} to be fully deployed before returning.
+      * 
+      * @param deployable the {@link Deployable} to deploy
+      * @param monitor the monitor that checks for deployment status
+      */
+     void deploy(Deployable deployable, DeployableMonitor monitor);
+ 
+     /**
+      * Undeploy a {@link Deployable} from the running container. The service becomes unavailable for
+      * requests.
+      * 
+      * @param deployable the {@link Deployable} to undeploy
+      */
+     void undeploy(Deployable deployable);
+ 
+     /**
+      * Undeploy a {@link Deployable} to the running container. Waits for the {@link Deployable} to
+      * be fully undeployed before returning.
+      * 
+      * @param deployable the {@link Deployable} to deploy
+      * @param monitor the monitor that checks for deployment status
+      */
+     void undeploy(Deployable deployable, DeployableMonitor monitor);
+ 
+     /**
+      * <p>
+      * Redeploy a {@link Deployable} already deployed to the running container. The service becomes
+      * available for requests.
+      * <p>
+      * Note that this method will be unsupported by the {@link Deployer}s based on the
+      * {@link org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer}.
+      * @param deployable the {@link Deployable} to redeploy
+      * @see Deployer#deploy(Deployable)
+      * @see Deployer#undeploy(Deployable)
+      */
+     void redeploy(Deployable deployable);
+ 
+     /**
+      * <p>
+      * Redeploy a {@link Deployable} already deployed to the running container. The service becomes
+      * available for requests.
+      * <p>
+      * Note that this method will be unsupported by the {@link Deployer}s based on the
+      * {@link org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer}.
+      * @param deployable the {@link Deployable} to redeploy
+      * @param monitor the monitor that checks for deployment status
+      * @see Deployer#deploy(Deployable)
+      * @see Deployer#undeploy(Deployable)
+      */
+     void redeploy(Deployable deployable, DeployableMonitor monitor);
+ 
+     /**
+      * Starts a {@link Deployable} that is already deployed in the running container but that is not
+      * servicing requests.
+      * 
+      * @param deployable the {@link Deployable} to start
+      */
+     void start(Deployable deployable);
+ 
+     /**
+      * Starts a {@link Deployable} that is already deployed in the running container but that is not
+      * servicing requests.
+      * 
+      * @param deployable the {@link Deployable} to start
+      * @param monitor the monitor that checks for start status
+      */
+     void start(Deployable deployable, DeployableMonitor monitor);
+ 
+     /**
+      * Stop a {@link Deployable} that is already deployed in the running container in order to
+      * prevent it from servicing requests.
+      * 
+      * @param deployable the {@link Deployable} to stop
+      */
+     void stop(Deployable deployable);
+ 
+     /**
+      * Stop a {@link Deployable} that is already deployed in the running container in order to
+      * prevent it from servicing requests.
+      * 
+      * @param deployable the {@link Deployable} to stop
+      * @param monitor the monitor that checks for stop status
+      */
+     void stop(Deployable deployable, DeployableMonitor monitor);
+ 
+     /**
+      * @return the deployer's type (local, remote, etc)
+      */
+     DeployerType getType();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-7/index.html b/htmlReport/ns-7/index.html new file mode 100644 index 0000000000..664ad85a69 --- /dev/null +++ b/htmlReport/ns-7/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_BLOCK.html b/htmlReport/ns-7/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..1a8bd22fdb --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..e59b54e205 --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_CLASS.html b/htmlReport/ns-7/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..a318f01efc --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..6560f0bba7 --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_LINE.html b/htmlReport/ns-7/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..8dbc3296ed --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..7d0f8d4247 --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_METHOD.html b/htmlReport/ns-7/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..6d96176ffd --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..b5f9f468ec --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..d70d2a7800 --- /dev/null +++ b/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.installer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.installer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.installer + + 66.7% + + + (2/3) + + + + 64.9% + + + (24/37) + + + + 62.3% + + + (177/284) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
Proxy + + 50% + + + (1/2) + + + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-7/sources/source-1.html b/htmlReport/ns-7/sources/source-1.html new file mode 100644 index 0000000000..c73f464e88 --- /dev/null +++ b/htmlReport/ns-7/sources/source-1.html @@ -0,0 +1,438 @@ + + + + + + + + Coverage Report > Proxy + + + + + + +
+ + +

Coverage Summary for Class: Proxy (org.codehaus.cargo.container.installer)

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
Proxy + + 61.5% + + + (8/13) + + + + 56.3% + + + (49/87) + +
Proxy$1
Proxy$ProxyAuthenticator + + 0% + + + (0/3) + + + + 0% + + + (0/4) + +
Total + + 50% + + + (8/16) + + + + 53.8% + + + (49/91) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.installer;
+ 
+ import java.net.Authenticator;
+ import java.net.PasswordAuthentication;
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Nested Ant element to specify proxy properties.
+  */
+ public class Proxy extends LoggedObject
+ {
+     /**
+      * @see #getHost()
+      */
+     private String host;
+ 
+     /**
+      * @see #getPort()
+      */
+     private int port = 80;
+ 
+     /**
+      * @see #getUser()
+      */
+     private String user;
+ 
+     /**
+      * @see #getPassword()
+      */
+     private String password;
+ 
+     /**
+      * @see #getExcludeHosts()
+      */
+     private String excludeHosts = "";
+ 
+     /**
+      * @param host the proxy host
+      */
+     public void setHost(String host)
+     {
+         this.host = host;
+     }
+ 
+     /**
+      * @return the proxy host
+      */
+     public String getHost()
+     {
+         return this.host;
+     }
+ 
+     /**
+      * @param port the proxy port. Defaults to 80 if not set
+      */
+     public void setPort(int port)
+     {
+         this.port = port;
+     }
+ 
+     /**
+      * @return the proxy port or 80 if not set
+      */
+     public int getPort()
+     {
+         return this.port;
+     }
+ 
+     /**
+      * @param user the user for authenticating proxies
+      */
+     public void setUser(String user)
+     {
+         this.user = user;
+     }
+ 
+     /**
+      * @return the user for authenticating proxies
+      */
+     public String getUser()
+     {
+         return this.user;
+     }
+ 
+     /**
+      * @param password the password for authenticating proxies
+      */
+     public void setPassword(String password)
+     {
+         this.password = password;
+     }
+ 
+     /**
+      * @return the password for authenticating proxies
+      */
+     public String getPassword()
+     {
+         return this.password;
+     }
+ 
+     /**
+      * List of hosts which should be connected too directly and not through the proxy server. The
+      * value can be a list of hosts, each seperated by a |, and in addition a wildcard character (*)
+      * can be used for matching. For example: -Dhttp.nonProxyHosts="*.foo.com|localhost".
+      * 
+      * @param proxyExcludeHosts list of hosts that do not go through the proxy
+      */
+     public void setExcludeHosts(String proxyExcludeHosts)
+     {
+         this.excludeHosts = proxyExcludeHosts;
+     }
+ 
+     /**
+      * @return the list of hosts which should be connected too directly and not through the proxy
+      * server
+      * @see #setExcludeHosts(String)
+      */
+     public String getExcludeHosts()
+     {
+         return this.excludeHosts;
+     }
+ 
+     /**
+      * Set the Java system properties related to proxies.
+      * 
+      * @return Previous proxy properties, to be used when {@link Proxy#clear(java.util.Map)} is
+      * called.
+      */
+     public Map<String, String> configure()
+     {
+         Map<String, String> previousProperties = new HashMap<String, String>();
+ 
+         if (getHost() != null && !getHost().trim().isEmpty())
+         {
+             getLogger().debug("host : " + getHost(), this.getClass().getName());
+             getLogger().debug("port : " + getPort(), this.getClass().getName());
+             getLogger().debug("excludeHosts : " + getExcludeHosts(), this.getClass().getName());
+             getLogger().debug("user : " + getUser(), this.getClass().getName());
+ 
+             String host = getHost().trim();
+             String port = Integer.toString(getPort());
+ 
+             previousProperties.put("http.proxyHost", System.setProperty("http.proxyHost", host));
+             previousProperties.put("http.proxyPort", System.setProperty("http.proxyPort", port));
+             previousProperties.put("https.proxyHost", System.setProperty("https.proxyHost", host));
+             previousProperties.put("https.proxyPort", System.setProperty("https.proxyPort", port));
+             previousProperties.put("ftp.proxyHost", System.setProperty("ftp.proxyHost", host));
+             previousProperties.put("ftp.proxyPort", System.setProperty("ftp.proxyPort", port));
+ 
+             if (getExcludeHosts() != null && !getExcludeHosts().trim().isEmpty())
+             {
+                 String excludedHosts = getExcludeHosts().trim();
+ 
+                 previousProperties.put("http.nonProxyHosts",
+                     System.setProperty("http.nonProxyHosts", excludedHosts));
+                 previousProperties.put("https.nonProxyHosts",
+                     System.setProperty("https.nonProxyHosts", excludedHosts));
+                 previousProperties.put("ftp.nonProxyHosts",
+                     System.setProperty("ftp.nonProxyHosts", excludedHosts));
+             }
+             else
+             {
+                 previousProperties.put("http.nonProxyHosts",
+                     System.clearProperty("http.nonProxyHosts"));
+                 previousProperties.put("https.nonProxyHosts",
+                     System.clearProperty("https.nonProxyHosts"));
+                 previousProperties.put("ftp.nonProxyHosts",
+                     System.clearProperty("ftp.nonProxyHosts"));
+             }
+ 
+             if (getUser() != null && !getUser().trim().isEmpty())
+             {
+                 String user = getUser().trim();
+ 
+                 previousProperties.put("http.proxyUser",
+                     System.setProperty("http.proxyUser", user));
+                 previousProperties.put("https.proxyUser",
+                     System.setProperty("https.proxyUser", user));
+                 previousProperties.put("ftp.proxyUser",
+                     System.setProperty("ftp.proxyUser", user));
+ 
+                 String password;
+                 if (getPassword() != null && !getPassword().trim().isEmpty())
+                 {
+                     password = getPassword().trim();
+ 
+                     previousProperties.put("http.proxyPassword",
+                         System.setProperty("http.proxyPassword", password));
+                     previousProperties.put("https.proxyPassword",
+                         System.setProperty("https.proxyPassword", password));
+                     previousProperties.put("ftp.proxyPassword",
+                         System.setProperty("ftp.proxyPassword", password));
+                 }
+                 else
+                 {
+                     password = "";
+ 
+                     previousProperties.put("http.proxyPassword",
+                         System.clearProperty("http.proxyPassword"));
+                     previousProperties.put("https.proxyPassword",
+                         System.clearProperty("https.proxyPassword"));
+                     previousProperties.put("ftp.proxyPassword",
+                         System.clearProperty("ftp.proxyPassword"));
+                 }
+ 
+                 Authenticator.setDefault(new ProxyAuthenticator(user, password));
+             }
+             else
+             {
+                 previousProperties.put("http.proxyUser",
+                     System.clearProperty("http.proxyUser"));
+                 previousProperties.put("https.proxyUser",
+                     System.clearProperty("https.proxyUser"));
+                 previousProperties.put("ftp.proxyUser",
+                     System.clearProperty("ftp.proxyUser"));
+ 
+                 previousProperties.put("http.proxyPassword",
+                     System.clearProperty("http.proxyPassword"));
+                 previousProperties.put("https.proxyPassword",
+                     System.clearProperty("https.proxyPassword"));
+                 previousProperties.put("ftp.proxyPassword",
+                     System.clearProperty("ftp.proxyPassword"));
+             }
+         }
+ 
+         return previousProperties;
+     }
+ 
+     /**
+      * Clear all proxy settings.
+      * 
+      * @param previousProperties Previous proxy properties, as returned by
+      * {@link Proxy#configure()}.
+      */
+     public void clear(Map<String, String> previousProperties)
+     {
+         if (previousProperties != null)
+         {
+             for (Map.Entry<String, String> previousProperty : previousProperties.entrySet())
+             {
+                 if (previousProperty.getValue() != null)
+                 {
+                     System.setProperty(previousProperty.getKey(), previousProperty.getValue());
+                 }
+                 else
+                 {
+                     System.clearProperty(previousProperty.getKey());
+                 }
+             }
+             Authenticator.setDefault(null);
+         }
+     }
+ 
+     /**
+      * Authenticator for the Proxy.
+      */
+     private static final class ProxyAuthenticator extends Authenticator
+     {
+         /**
+          * Authentication using a username/password.
+          */
+         private PasswordAuthentication authentication;
+ 
+         /**
+          * @param user the username
+          * @param password the password
+          */
+         private ProxyAuthenticator(String user, String password)
+         {
+             this.authentication = new PasswordAuthentication(user, password.toCharArray());
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see java.net.Authenticator#getPasswordAuthentication()
+          */
+         @Override
+         protected PasswordAuthentication getPasswordAuthentication()
+         {
+             return this.authentication;
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-7/sources/source-2.html b/htmlReport/ns-7/sources/source-2.html new file mode 100644 index 0000000000..239441b102 --- /dev/null +++ b/htmlReport/ns-7/sources/source-2.html @@ -0,0 +1,703 @@ + + + + + + + + Coverage Report > ZipURLInstaller + + + + + + +
+ + +

Coverage Summary for Class: ZipURLInstaller (org.codehaus.cargo.container.installer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ZipURLInstaller + + 100% + + + (1/1) + + + + 76.2% + + + (16/21) + + + + 66.3% + + + (128/193) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.installer;
+ 
+ import java.io.BufferedInputStream;
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.net.HttpURLConnection;
+ import java.net.URL;
+ import java.net.URLConnection;
+ import java.nio.charset.StandardCharsets;
+ import java.util.Base64;
+ import java.util.Map;
+ 
+ import org.apache.commons.compress.archivers.ArchiveEntry;
+ import org.apache.commons.compress.archivers.ArchiveInputStream;
+ import org.apache.commons.compress.archivers.ArchiveStreamFactory;
+ import org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry;
+ import org.apache.commons.compress.archivers.sevenz.SevenZFile;
+ import org.apache.commons.compress.compressors.CompressorException;
+ import org.apache.commons.compress.compressors.CompressorStreamFactory;
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Installs a compressed container file from a URL to a location on your local disk.<br>
+  * <br>
+  * Though the name of this class is <code>ZipURLInstaller</code>, all formats supported by
+  * <a href="https://commons.apache.org/proper/commons-compress/"
+  * target="_blank">commons-compress</a> are supported.
+  */
+ public class ZipURLInstaller extends LoggedObject implements Installer
+ {
+     /**
+      * URL where the compressed container is located.
+      */
+     private URL remoteLocation;
+ 
+     /**
+      * Destination directory where the compressed container install will be downloaded.
+      */
+     private String downloadDir;
+ 
+     /**
+      * Destination directory where the compressed container install will be extracted.
+      */
+     private String extractDir;
+ 
+     /**
+      * Proxy settings to use when downloading distributions.
+      */
+     private Proxy proxy;
+ 
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * @param remoteLocation URL where the compressed container is located
+      */
+     public ZipURLInstaller(URL remoteLocation)
+     {
+         this(remoteLocation, null, null);
+     }
+ 
+     /**
+      * @param remoteLocation URL where the compressed container is located
+      * @param downloadDir directory where the compressed container install will be downloaded.
+      * @param extractDir directory where the compressed container install will be extracted.
+      */
+     public ZipURLInstaller(URL remoteLocation, String downloadDir, String extractDir)
+     {
+         this.remoteLocation = remoteLocation;
+         this.downloadDir = downloadDir;
+         this.extractDir = extractDir;
+         this.fileHandler = new DefaultFileHandler();
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * {@inheritDoc}
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         this.fileHandler.setLogger(logger);
+     }
+ 
+     /**
+      * @param downloadDir the destination directory where the compressed container install will be
+      * downloaded.
+      */
+     public void setDownloadDir(String downloadDir)
+     {
+         this.downloadDir = downloadDir;
+     }
+ 
+     /**
+      * @param extractDir the destination directory where the compressed container install will be
+      * installed.
+      */
+     public void setExtractDir(String extractDir)
+     {
+         this.extractDir = extractDir;
+     }
+ 
+     /**
+      * @return The destination directory where the compressed container install will be downloaded.
+      */
+     public String getDownloadDir()
+     {
+         if (this.downloadDir == null)
+         {
+             return getFileHandler().getTmpPath("installs");
+         }
+         else
+         {
+             return this.downloadDir;
+         }
+     }
+ 
+     /**
+      * @return The destination file where the compressed container install will be downloaded.
+      */
+     public String getDownloadFile()
+     {
+         return getFileHandler().append(getDownloadDir(), getSourceFileName());
+     }
+ 
+     /**
+      * @return The destination directory where the compressed container install will be extracted.
+      */
+     public String getExtractDir()
+     {
+         String extractDir;
+ 
+         if (this.extractDir == null)
+         {
+             extractDir = getFileHandler().getTmpPath("installs");
+         }
+         else
+         {
+             extractDir = this.extractDir;
+         }
+ 
+         String name = getSourceFileName();
+ 
+         int dotPos = name.lastIndexOf(".");
+         if (dotPos > -1)
+         {
+             name = name.substring(0, dotPos);
+         }
+         if (name.endsWith(".tar"))
+         {
+             name = name.substring(0, name.length() - 4);
+         }
+ 
+         return getFileHandler().append(extractDir, name);
+     }
+ 
+     /**
+      * @return the file utility class to use for performing all file I/O.
+      */
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the file utility class to use for performing all file I/O.
+      */
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * @see Installer#install()
+      */
+     @Override
+     public void install()
+     {
+         if (!isAlreadyExtracted())
+         {
+             getLogger().debug("Container [" + getSourceFileName() + "] is not yet installed.",
+                 this.getClass().getName());
+ 
+             String targetFile = getFileHandler().append(getDownloadDir(), getSourceFileName());
+             if (getFileHandler().isDirectory(targetFile))
+             {
+                 throw new ContainerException(
+                     "Target file [" + targetFile + "] already exists as a directory, either "
+                         + "delete it or change the ZipURLInstaller target folder or file name");
+             }
+             if (!getFileHandler().exists(targetFile))
+             {
+                 getLogger().debug("Container [" + getSourceFileName() + "] is not yet downloaded.",
+                     this.getClass().getName());
+ 
+                 download();
+             }
+ 
+             try
+             {
+                 getLogger().debug("Container [" + getSourceFileName()
+                     + "] is downloaded, now unpacking.", this.getClass().getName());
+ 
+                 unpack();
+             }
+             catch (Exception e)
+             {
+                 getLogger().debug("Container [" + getSourceFileName() + "] is broken.",
+                     this.getClass().getName());
+ 
+                 getFileHandler().delete(targetFile);
+                 download();
+                 try
+                 {
+                     getLogger().debug("As the container was broken, also deleting ["
+                         + getExtractDir() + "] before extraction.", this.getClass().getName());
+                     getFileHandler().delete(getExtractDir());
+ 
+                     unpack();
+                 }
+                 catch (Exception ee)
+                 {
+                     throw new ContainerException(
+                         "Failed to unpack [" + getSourceFileName() + "]", ee);
+                 }
+             }
+ 
+             getLogger().debug("Container [" + getSourceFileName()
+                 + "] is unpacked, now registering.", this.getClass().getName());
+ 
+             registerInstallation();
+         }
+         else
+         {
+             getLogger().debug("Container [" + getSourceFileName() + "] is already installed",
+                 this.getClass().getName());
+             getLogger().debug("Using container installation dir [" + getExtractDir() + "]",
+                 getClass().getName());
+         }
+     }
+ 
+     /**
+      * Create timestamp file to register that the installation has been successful. This allows to
+      * prevent installing again next time. If the remote URL changes, then the container will be
+      * reinstalled.
+      */
+     public void registerInstallation()
+     {
+         try
+         {
+             getFileHandler().writeTextFile(getFileHandler().append(getExtractDir(), ".cargo"),
+                 "Do not remove this file", StandardCharsets.UTF_8);
+         }
+         catch (Exception e)
+         {
+             // Failed to write timestamp. Too bad.
+             // The application will be installed again next time.
+         }
+     }
+ 
+     /**
+      * @return true if the container has already been downloaded, false otherwise
+      */
+     public boolean isAlreadyDownloaded()
+     {
+         boolean isDownloaded = false;
+         String targetFile = getFileHandler().append(getDownloadDir(), getSourceFileName());
+         if (getFileHandler().exists(targetFile))
+         {
+             isDownloaded = true;
+         }
+ 
+         return isDownloaded;
+     }
+ 
+     /**
+      * @return true if the container has already been extracted, false otherwise
+      */
+     public boolean isAlreadyExtracted()
+     {
+         boolean isExtracted = false;
+         String timestampFile = getFileHandler().append(getExtractDir(), ".cargo");
+         if (getFileHandler().exists(timestampFile))
+         {
+             isExtracted = true;
+         }
+ 
+         return isExtracted;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getHome()
+     {
+         String home;
+ 
+         if (!isAlreadyExtracted())
+         {
+             throw new ContainerException("Failed to get container installation home as the "
+                 + "container has not yet been installed. Please call install() first.");
+         }
+ 
+         String targetDir = getExtractDir();
+         String[] files = getFileHandler().getChildren(targetDir);
+         int nbDirectories = 0;
+         String foundDirectory = null;
+         for (String file : files)
+         {
+             if (getFileHandler().isDirectory(file)
+                 && !"PaxHeaders.X".equals(getFileHandler().getName(file)))
+             {
+                 nbDirectories++;
+                 foundDirectory = file;
+             }
+         }
+ 
+         // If the unpacking has revealed only 1 directory, then it's the home dir. Otherwise, it
+         // means the packing of the compressed files did not have a root dir.
+         if (nbDirectories != 1)
+         {
+             home = targetDir;
+         }
+         else
+         {
+             home = foundDirectory;
+         }
+ 
+         return home;
+     }
+ 
+     /**
+      * Unpacks the compressed file containing the container files.
+      * @throws Exception If the compressed file is broken
+      */
+     private void unpack() throws Exception
+     {
+         String source = getFileHandler().append(getDownloadDir(), getSourceFileName());
+         getLogger().info(
+             "Installing container [" + source + "] in [" + getExtractDir() + "]",
+                 getClass().getName());
+ 
+         if (source.endsWith(".7z"))
+         {
+             SevenZFile sevenZFile = new SevenZFile(new File(source));
+             SevenZArchiveEntry sevenZEntry;
+             while ((sevenZEntry = sevenZFile.getNextEntry()) != null)
+             {
+                 String destinationEntry =
+                     getFileHandler().append(getExtractDir(),
+                         DefaultFileHandler.sanitizeFilename(sevenZEntry.getName(), getLogger()));
+                 if (sevenZEntry.isDirectory())
+                 {
+                     getFileHandler().mkdirs(destinationEntry);
+                 }
+                 else
+                 {
+                     String parent = getFileHandler().getParent(destinationEntry);
+                     if (!getFileHandler().isDirectory(parent))
+                     {
+                         getFileHandler().mkdirs(parent);
+                     }
+                     try (OutputStream destinationFileOutputStream =
+                         getFileHandler().getOutputStream(destinationEntry))
+                     {
+                         byte[] sevenZContent = new byte[DefaultFileHandler.FILE_BUFFER_SIZE];
+                         int length;
+                         while ((length = sevenZFile.read(sevenZContent)) != -1)
+                         {
+                             destinationFileOutputStream.write(sevenZContent, 0, length);
+                         }
+                     }
+                 }
+             }
+         }
+         else
+         {
+             try (BufferedInputStream sourceInputStream =
+                 new BufferedInputStream(getFileHandler().getInputStream(source)))
+             {
+                 boolean compressedStream;
+                 try
+                 {
+                     CompressorStreamFactory.detect(sourceInputStream);
+                     compressedStream = true;
+                 }
+                 catch (CompressorException e)
+                 {
+                     // Source is not a compressed stream
+                     compressedStream = false;
+                 }
+ 
+                 if (compressedStream)
+                 {
+                     CompressorStreamFactory csf = new CompressorStreamFactory();
+                     try (BufferedInputStream decompressedInputStream =
+                         new BufferedInputStream(
+                             csf.createCompressorInputStream(sourceInputStream)))
+                     {
+                         unpackStream(decompressedInputStream);
+                     }
+                 }
+                 else
+                 {
+                     unpackStream(sourceInputStream);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Handles the unpacking of the stream.
+      * @param sourceInputStream Source input stream, must be decompressed (if TAR.GZ for example).
+      * @throws Exception If the compressed file is broken
+      */
+     private void unpackStream(InputStream sourceInputStream) throws Exception
+     {
+         ArchiveStreamFactory asf = new ArchiveStreamFactory();
+         try (ArchiveInputStream dearchivedInputStream =
+             asf.createArchiveInputStream(sourceInputStream))
+         {
+             ArchiveEntry archiveEntry;
+             while ((archiveEntry = dearchivedInputStream.getNextEntry()) != null)
+             {
+                 String destinationEntry =
+                     getFileHandler().append(getExtractDir(),
+                         DefaultFileHandler.sanitizeFilename(archiveEntry.getName(), getLogger()));
+                 if (archiveEntry.isDirectory())
+                 {
+                     getFileHandler().mkdirs(destinationEntry);
+                 }
+                 else
+                 {
+                     String parent = getFileHandler().getParent(destinationEntry);
+                     if (!getFileHandler().isDirectory(parent))
+                     {
+                         getFileHandler().mkdirs(parent);
+                     }
+                     try (OutputStream destinationFileOutputStream =
+                         getFileHandler().getOutputStream(destinationEntry))
+                     {
+                         getFileHandler().copy(dearchivedInputStream, destinationFileOutputStream);
+                     }
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Downloads the compressed file containing the container files.
+      */
+     public void download()
+     {
+         // Try once with the proxy settings on (if set up by the user) and if it doesn't work,
+         // try again with the previous proxy settings
+         Map<String, String> previousProperties = null;
+         try
+         {
+             if (this.proxy != null)
+             {
+                 previousProperties = this.proxy.configure();
+             }
+             doDownload();
+         }
+         catch (Exception e)
+         {
+             if (this.proxy != null)
+             {
+                 try
+                 {
+                     this.proxy.clear(previousProperties);
+                     doDownload();
+                 }
+                 catch (Exception ee)
+                 {
+                     throw new ContainerException(
+                         "Failed to download [" + this.remoteLocation + "]", ee);
+                 }
+             }
+             else
+             {
+                 throw new ContainerException(
+                     "Failed to download [" + this.remoteLocation + "]", e);
+             }
+         }
+         finally
+         {
+             if (this.proxy != null)
+             {
+                 this.proxy.clear(previousProperties);
+             }
+         }
+     }
+ 
+     /**
+      * Perform the actual HTTP download.
+      * @throws IOException if any I/O exception occurs (with the URL connection or file streams)
+      */
+     protected void doDownload() throws IOException
+     {
+         String downloadDir = getDownloadDir();
+         if (!getFileHandler().exists(downloadDir))
+         {
+             getFileHandler().mkdirs(downloadDir);
+         }
+         String target = getFileHandler().append(downloadDir, getSourceFileName());
+ 
+         getLogger().info("Downloading container from [" + this.remoteLocation + "] to ["
+             + target + "]", getClass().getName());
+ 
+         final URLConnection connection = this.remoteLocation.openConnection();
+         connection.addRequestProperty("Accept", "*/*");
+         connection.addRequestProperty("Accept-Encoding", "identity");
+ 
+         connection.setUseCaches(false);
+         if (connection instanceof HttpURLConnection)
+         {
+             HttpURLConnection httpConnection = (HttpURLConnection) connection;
+             httpConnection.setInstanceFollowRedirects(true);
+ 
+             String userInfo = this.remoteLocation.getUserInfo();
+             if (userInfo != null)
+             {
+                 connection.setRequestProperty("Authorization", "Basic "
+                     + Base64.getEncoder().encodeToString(
+                         userInfo.getBytes(StandardCharsets.UTF_8)));
+             }
+         }
+ 
+         try (InputStream httpStream = connection.getInputStream();
+             OutputStream fileStream = getFileHandler().getOutputStream(target))
+         {
+             getFileHandler().copy(httpStream, fileStream);
+         }
+ 
+         final long remoteTimestamp = connection.getLastModified();
+         if (remoteTimestamp != 0)
+         {
+             File targetFile = new File(target);
+             targetFile.setLastModified(remoteTimestamp);
+         }
+     }
+ 
+     /**
+      * @return the name of the source compressed file (without the path)
+      */
+     protected String getSourceFileName()
+     {
+         int slashPos = this.remoteLocation.getPath().lastIndexOf('/');
+         String name = this.remoteLocation.getPath();
+         if (slashPos > -1)
+         {
+             name = this.remoteLocation.getPath().substring(slashPos + 1);
+         }
+ 
+         return name;
+     }
+ 
+     /**
+      * Sets proxy details.
+      * 
+      * @param proxy the proxy configuration to set
+      */
+     public void setProxy(Proxy proxy)
+     {
+         this.proxy = proxy;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-7/sources/source-3.html b/htmlReport/ns-7/sources/source-3.html new file mode 100644 index 0000000000..a4cc769858 --- /dev/null +++ b/htmlReport/ns-7/sources/source-3.html @@ -0,0 +1,108 @@ + + + + + + + + Coverage Report > Installer + + + + + + +
+ + +

Coverage Summary for Class: Installer (org.codehaus.cargo.container.installer)

+ + + + + + + + + +
Class
Installer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.installer;
+ 
+ import org.codehaus.cargo.util.log.Loggable;
+ 
+ /**
+  * Installs a container.
+  */
+ public interface Installer extends Loggable
+ {
+     /**
+      * Installs the container.
+      */
+     void install();
+ 
+     /**
+      * @return the directory where the container has been installed. Note that we're returning a
+      * String instead of a File because we want to leave the possibility of using URIs for
+      * specifying the home location.
+      */
+     String getHome();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-8/index.html b/htmlReport/ns-8/index.html new file mode 100644 index 0000000000..bed2a48af3 --- /dev/null +++ b/htmlReport/ns-8/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_BLOCK.html b/htmlReport/ns-8/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..79c29a2560 --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..0001771c52 --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_CLASS.html b/htmlReport/ns-8/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..7672f0ff5a --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..fcf25fa21f --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_LINE.html b/htmlReport/ns-8/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..739f8c20fa --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..e0d68964df --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_METHOD.html b/htmlReport/ns-8/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..c846a35256 --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..a011721829 --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..fb55267031 --- /dev/null +++ b/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal + + 0% + + + (0/2) + + + + 0% + + + (0/4) + + + + 0% + + + (0/10) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-8/sources/source-1.html b/htmlReport/ns-8/sources/source-1.html new file mode 100644 index 0000000000..afa045f797 --- /dev/null +++ b/htmlReport/ns-8/sources/source-1.html @@ -0,0 +1,150 @@ + + + + + + + + Coverage Report > J2EEContainerCapability + + + + + + +
+ + +

Coverage Summary for Class: J2EEContainerCapability (org.codehaus.cargo.container.internal)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
J2EEContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal;
+ 
+ import org.codehaus.cargo.container.ContainerCapability;
+ import org.codehaus.cargo.container.deployable.DeployableType;
+ 
+ /**
+  * Capability for J2EE containers.
+  */
+ public class J2EEContainerCapability implements ContainerCapability
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean supportsDeployableType(DeployableType type)
+     {
+         boolean supported = false;
+ 
+         if (type == DeployableType.WAR || type == DeployableType.EAR
+                 || type == DeployableType.FILE)
+         {
+             supported = true;
+         }
+ 
+         return supported;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-8/sources/source-2.html b/htmlReport/ns-8/sources/source-2.html new file mode 100644 index 0000000000..1caf670b92 --- /dev/null +++ b/htmlReport/ns-8/sources/source-2.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > ServletContainerCapability + + + + + + +
+ + +

Coverage Summary for Class: ServletContainerCapability (org.codehaus.cargo.container.internal)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ServletContainerCapability + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal;
+ 
+ import org.codehaus.cargo.container.ContainerCapability;
+ import org.codehaus.cargo.container.deployable.DeployableType;
+ 
+ /**
+  * Capability for Servlet containers.
+  */
+ public class ServletContainerCapability implements ContainerCapability
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean supportsDeployableType(DeployableType type)
+     {
+         boolean supported = false;
+ 
+         if (type == DeployableType.WAR)
+         {
+             supported = true;
+         }
+ 
+         return supported;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-8/sources/source-3.html b/htmlReport/ns-8/sources/source-3.html new file mode 100644 index 0000000000..5dfe1bdedb --- /dev/null +++ b/htmlReport/ns-8/sources/source-3.html @@ -0,0 +1,157 @@ + + + + + + + + Coverage Report > SpawnedContainer + + + + + + +
+ + +

Coverage Summary for Class: SpawnedContainer (org.codehaus.cargo.container.internal)

+ + + + + + + + + +
Class
SpawnedContainer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal;
+ 
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.spi.jvm.JvmLauncherFactory;
+ 
+ /**
+  * All methods that a container that is spawned must implement.
+  */
+ public interface SpawnedContainer
+ {
+     /**
+      * @param classpath the extra classpath that is added to the container's classpath when it is
+      * started.
+      */
+     void setExtraClasspath(String[] classpath);
+ 
+     /**
+      * @param location the extra classpath that is added to the container's classpath when it is
+      * started.
+      */
+     void addExtraClasspath(String location);
+ 
+     /**
+      * @return the extra classpath that is added to the container's classpath when it is started.
+      */
+     String[] getExtraClasspath();
+ 
+     /**
+      * @param classpath the shared classpath that is shared by the container applications.
+      */
+     void setSharedClasspath(String[] classpath);
+ 
+     /**
+      * @param location the shared classpath that is added to the container's classpath when it is
+      * started.
+      */
+     void addSharedClasspath(String location);
+ 
+     /**
+      * @return the extra classpath that is shared by the container applications.
+      */
+     String[] getSharedClasspath();
+ 
+     /**
+      * @param properties the System properties to set in the container executing VM.
+      */
+     void setSystemProperties(Map<String, String> properties);
+ 
+     /**
+      * @return the System properties to set in the container executing VM.
+      */
+     Map<String, String> getSystemProperties();
+ 
+     /**
+      * Sets the factory used to spawn the container JVM.
+      * 
+      * @param jvmLauncherFactory The factory used to spawn the container JVM, must not be
+      * {@code null}.
+      */
+     void setJvmLauncherFactory(JvmLauncherFactory jvmLauncherFactory);
+ 
+     /**
+      * Gets the factory used to spawn the container JVM.
+      * 
+      * @return The factory used to spawn the container JVM, never {@code null}.
+      */
+     JvmLauncherFactory getJvmLauncherFactory();
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-8/sources/source-4.html b/htmlReport/ns-8/sources/source-4.html new file mode 100644 index 0000000000..e77f1a811b --- /dev/null +++ b/htmlReport/ns-8/sources/source-4.html @@ -0,0 +1,153 @@ + + + + + + + + Coverage Report > RunnableContainer + + + + + + +
+ + +

Coverage Summary for Class: RunnableContainer (org.codehaus.cargo.container.internal)

+ + + + + + + + + +
Class
RunnableContainer
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal;
+ 
+ /**
+  * All methods that a container that can be started/stopped must implement.
+  */
+ public interface RunnableContainer
+ {
+     /**
+      * Starts the container. It blocks until the container is fully started unless it doesn't start
+      * before the timeout period in which case an exception will be thrown.
+      */
+     void start();
+ 
+     /**
+      * Stops the container. It blocks until the container is fully stopped unless it doesn't stop
+      * before the timeout period in which case an exception will be thrown.
+      */
+     void stop();
+ 
+     /**
+      * Restarts the container. It blocks until the container is fully stopped (if it not already
+      * is) and then blocks until the container is fully started unless it doesn't start before the
+      * timeout period in which case an exception will be thrown.
+      */
+     void restart();
+ 
+     /**
+      * @param output the file to which the container's output will be logged to. Note that we're
+      * passing a String instead of a File because we want to leave the possibility of using URIs for
+      * specifying the home location.
+      */
+     void setOutput(String output);
+ 
+     /**
+      * @return the file to which the container's output will be logged to. Note that we're returning
+      * a String instead of a File because we want to leave the possibility of using URIs for
+      * specifying the home location.
+      */
+     String getOutput();
+ 
+     /**
+      * @param timeout the timeout (in ms) after which we consider the container cannot be started or
+      * stopped.
+      */
+     void setTimeout(long timeout);
+ 
+     /**
+      * @return the timeout (in ms) after which we consider the container cannot be started or or
+      * stopped.
+      */
+     long getTimeout();
+ 
+     /**
+      * Sets whether output of the container should be appended to an existing file, or the existing
+      * file should be truncated.
+      * 
+      * @param shouldAppend Whether output should be appended to or not
+      */
+     void setAppend(boolean shouldAppend);
+ 
+     /**
+      * @return true if the output of the container should be appended to the output file or false
+      * otherwise
+      */
+     boolean isAppend();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/index.html b/htmlReport/ns-9/index.html new file mode 100644 index 0000000000..4ed639f08b --- /dev/null +++ b/htmlReport/ns-9/index.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_BLOCK.html b/htmlReport/ns-9/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..3b8f893a62 --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_BLOCK.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..aeafbe5d51 --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_CLASS.html b/htmlReport/ns-9/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..746d9414bd --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_CLASS.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..729f2adb17 --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_LINE.html b/htmlReport/ns-9/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..93f7634830 --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_LINE.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..3f309563b0 --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_METHOD.html b/htmlReport/ns-9/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..80f78c27fb --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_METHOD.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..9516643c0f --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..346e89e54a --- /dev/null +++ b/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http + + 30% + + + (3/10) + + + + 10% + + + (5/50) + + + + 6.9% + + + (20/290) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
HttpRequest + + 60% + + + (3/5) + + + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-1.html b/htmlReport/ns-9/sources/source-1.html new file mode 100644 index 0000000000..313ef1e98a --- /dev/null +++ b/htmlReport/ns-9/sources/source-1.html @@ -0,0 +1,194 @@ + + + + + + + + Coverage Report > HttpFileRequest + + + + + + +
+ + +

Coverage Summary for Class: HttpFileRequest (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
HttpFileRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/15) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.io.BufferedOutputStream;
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.net.HttpURLConnection;
+ import java.net.URL;
+ 
+ /**
+  * HTTP request which puts the content of a file as output.
+  */
+ public class HttpFileRequest extends HttpRequest
+ {
+     /**
+      * File to be put as output.
+      */
+     private File file;
+ 
+     /**
+      * @param url URL to be called.
+      * @param file File to be put as output.
+      * @see HttpRequest#HttpRequest(java.net.URL)
+      */
+     public HttpFileRequest(URL url, File file)
+     {
+         super(url);
+         this.file = file;
+     }
+ 
+     /**
+      * @param url URL to be called.
+      * @param file File to be put as output.
+      * @param timeout Request timeout.
+      * @see HttpRequest#HttpRequest(java.net.URL, long)
+      */
+     public HttpFileRequest(URL url, File file, long timeout)
+     {
+         super(url, timeout);
+         this.file = file;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void writeOutputStream(HttpURLConnection connection) throws IOException
+     {
+         connection.setRequestProperty("Content-Type", "application/octet-stream");
+         connection.setDoOutput(true);
+         connection.setChunkedStreamingMode(BUFFER_CHUNK_SIZE);
+ 
+         try (InputStream fileInputStream = new FileInputStream(this.file);
+             OutputStream outputStream = connection.getOutputStream();
+             BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream))
+         {
+             int n;
+             byte[] bytes = new byte[BUFFER_CHUNK_SIZE];
+             while ((n = fileInputStream.read(bytes)) != -1)
+             {
+                 outputStream.write(bytes, 0, n);
+             }
+             outputStream.flush();
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-2.html b/htmlReport/ns-9/sources/source-2.html new file mode 100644 index 0000000000..b47544199d --- /dev/null +++ b/htmlReport/ns-9/sources/source-2.html @@ -0,0 +1,215 @@ + + + + + + + + Coverage Report > HttpFormRequest + + + + + + +
+ + +

Coverage Summary for Class: HttpFormRequest (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
HttpFormRequest + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/26) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.io.File;
+ import java.io.IOException;
+ import java.net.HttpURLConnection;
+ import java.net.URL;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.internal.http.writer.MultipartFormWriter;
+ import org.codehaus.cargo.container.internal.http.writer.UrlEncodedFormWriter;
+ 
+ /**
+  * HTTP request which posts a form represented as a child of {@link FormContentType}.
+  */
+ public class HttpFormRequest extends HttpRequest
+ {
+ 
+     /**
+      * Form data to be sent by HTTP form request.
+      */
+     private FormContentType formData;
+ 
+     /**
+      * @param url URL to be called.
+      * @param formData Form data to be sent by HTTP form request.
+      * @see HttpRequest#HttpRequest(URL)
+      */
+     public HttpFormRequest(URL url, FormContentType formData)
+     {
+         super(url);
+         this.formData = formData;
+     }
+ 
+     /**
+      * @param url URL to be called.
+      * @param formData Form data to be sent by HTTP form request.
+      * @param timeout Request timeout.
+      * @see HttpRequest#HttpRequest(URL, long)
+      */
+     public HttpFormRequest(URL url, FormContentType formData, long timeout)
+     {
+         super(url, timeout);
+         this.formData = formData;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void writeOutputStream(HttpURLConnection connection) throws IOException
+     {
+         connection.setRequestProperty("Content-Type", formData.getContentType());
+         connection.setDoOutput(true);
+ 
+         if (formData instanceof MultipartFormContentType)
+         {
+             MultipartFormContentType multipartFormData = (MultipartFormContentType) formData;
+             connection.setChunkedStreamingMode(BUFFER_CHUNK_SIZE);
+ 
+             try (MultipartFormWriter writer =
+                 new MultipartFormWriter(multipartFormData, connection.getOutputStream()))
+             {
+                 for (Map.Entry<String, String> entry
+                     : multipartFormData.getFormContents().entrySet())
+                 {
+                     writer.writeField(entry.getKey(), entry.getValue());
+                 }
+ 
+                 for (Map.Entry<String, File> entry : multipartFormData.getFormFiles().entrySet())
+                 {
+                     writer.writeFile(entry.getKey(), entry.getValue());
+                 }
+             }
+         }
+         else
+         {
+             UrlEncodedFormWriter urlEncodedFormWriter = new UrlEncodedFormWriter();
+ 
+             for (Map.Entry<String, String> entry : formData.getFormContents().entrySet())
+             {
+                 urlEncodedFormWriter.addField(entry.getKey(), entry.getValue());
+             }
+ 
+             connection.setRequestProperty("Content-Length",
+                 String.valueOf(urlEncodedFormWriter.getLength()));
+             urlEncodedFormWriter.write(connection.getOutputStream());
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-3.html b/htmlReport/ns-9/sources/source-3.html new file mode 100644 index 0000000000..fc2ea5df2b --- /dev/null +++ b/htmlReport/ns-9/sources/source-3.html @@ -0,0 +1,930 @@ + + + + + + + + Coverage Report > HttpRequest + + + + + + +
+ + +

Coverage Summary for Class: HttpRequest (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
HttpRequest + + 18.8% + + + (3/16) + + + + 7.7% + + + (16/208) + +
HttpRequest$1
HttpRequest$NonceCounter + + 50% + + + (1/2) + + + + 33.3% + + + (3/9) + +
HttpRequest$NonceCounter$1 + + 50% + + + (1/2) + + + + 50% + + + (1/2) + +
HttpRequest$PermissiveHostnameVerifier + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
HttpRequest$PermissiveTrustManager + + 0% + + + (0/4) + + + + 0% + + + (0/4) + +
Total + + 19.2% + + + (5/26) + + + + 8.9% + + + (20/225) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.io.BufferedWriter;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.io.OutputStream;
+ import java.io.OutputStreamWriter;
+ import java.net.HttpURLConnection;
+ import java.net.URL;
+ import java.nio.charset.Charset;
+ import java.nio.charset.StandardCharsets;
+ import java.security.KeyManagementException;
+ import java.security.MessageDigest;
+ import java.security.NoSuchAlgorithmException;
+ import java.util.Base64;
+ import java.util.HashMap;
+ import java.util.LinkedHashMap;
+ import java.util.Map;
+ 
+ import javax.net.ssl.HostnameVerifier;
+ import javax.net.ssl.HttpsURLConnection;
+ import javax.net.ssl.SSLContext;
+ import javax.net.ssl.SSLSession;
+ import javax.net.ssl.TrustManager;
+ import javax.net.ssl.X509TrustManager;
+ 
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * HTTP(S) request class.
+  */
+ public class HttpRequest extends LoggedObject
+ {
+     /**
+      * Size of the buffers / chunks used when sending files to the HTTP server.<br>
+      * <br>
+      * When trying to upload large amount of data the internal connection buffer can become too
+      * large and exceed the heap size, leading to an {@link OutOfMemoryError}. This was fixed in
+      * JDK 1.5 by introducing {@link HttpURLConnection#setChunkedStreamingMode(int)}.<br>
+      * <br>
+      * As per <a href="https://codehaus-cargo.atlassian.net/browse/CARGO-1418">CARGO-1418</a>, use
+      * a sensible chunk size for fast links.
+      */
+     protected static final int BUFFER_CHUNK_SIZE = 256 * 1024;
+ 
+     /**
+      * cache of nonce values seen
+      */
+     private static final NonceCounter NONCE_COUNTER = new NonceCounter();
+ 
+     /**
+      * URL to be called.
+      */
+     private URL url;
+ 
+     /**
+      * Request timeout.
+      */
+     private long timeout;
+ 
+     /**
+      * Username to use.
+      */
+     private String username;
+ 
+     /**
+      * Password to use.
+      */
+     private String password;
+ 
+     /**
+      * Request header map.
+      */
+     private Map<String, String> requestProperties;
+ 
+     /**
+      * String request body.
+      */
+     private String requestBody;
+ 
+     /**
+      * Constructor.
+      * 
+      * @param url URL to be called.
+      */
+     public HttpRequest(URL url)
+     {
+         this(url, 0);
+     }
+ 
+     /**
+      * Constructor.
+      * 
+      * @param url URL to be called.
+      * @param timeout Request timeout.
+      */
+     public HttpRequest(URL url, long timeout)
+     {
+         this.url = url;
+         this.timeout = timeout;
+         this.requestProperties = new HashMap<String, String>();
+     }
+ 
+     /**
+      * @param propertyName Name of request header property.
+      * @param propertyValue Value of request header property.
+      */
+     public void addRequestProperty(String propertyName, String propertyValue)
+     {
+         this.requestProperties.put(propertyName, propertyValue);
+     }
+ 
+     /**
+      * @param requestBody String request body to set.
+      */
+     public void setRequestBody(String requestBody)
+     {
+         this.requestBody = requestBody;
+     }
+ 
+     /**
+      * Set HTTP authentication.
+      * 
+      * @param username User name.
+      * @param password Password.
+      */
+     public void setAuthentication(final String username, final String password)
+     {
+         this.username = username;
+         this.password = password;
+     }
+ 
+     /**
+      * @return Result of HTTP GET call of this connection.
+      * @throws IOException If connecting to the server fails.
+      */
+     public HttpResult get() throws IOException
+     {
+         return connect("GET", null);
+     }
+ 
+     /**
+      * @return Result of HTTP POST call of this connection.
+      * @throws IOException If connecting to the server fails.
+      */
+     public HttpResult post() throws IOException
+     {
+         return connect("POST", null);
+     }
+ 
+     /**
+      * @return Result of HTTP PUT call of this connection.
+      * @throws IOException If connecting to the server fails.
+      */
+     public HttpResult put() throws IOException
+     {
+         return connect("PUT", null);
+     }
+ 
+     /**
+      * @return Result of HTTP DELETE call of this connection.
+      * @throws IOException If connecting to the server fails.
+      */
+     public HttpResult delete() throws IOException
+     {
+         return connect("DELETE", null);
+     }
+ 
+     /**
+      * Connect to server and execute defined HTTP method call.
+      * 
+      * @param httpMethod HTTP method to be called.
+      * @param digestData HTTP Digest authentication data, if available
+      * @return the HTTP(S) result containing -1 as response code if no connection could be
+      * established
+      * @throws IOException If connecting to the server fails.
+      */
+     private HttpResult connect(String httpMethod, String digestData) throws IOException
+     {
+         getLogger().debug(
+             "Calling [" + url + "] with timeout " + this.timeout, this.getClass().getName());
+ 
+         HttpURLConnection connection = null;
+         try
+         {
+             if (url.getProtocol().equalsIgnoreCase("https"))
+             {
+                 TrustManager[] trustAll = {new PermissiveTrustManager()};
+                 SSLContext sc = SSLContext.getInstance("SSL");
+                 sc.init(null, trustAll, new java.security.SecureRandom());
+                 HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ 
+                 connection = (HttpsURLConnection) url.openConnection();
+ 
+                 HostnameVerifier verifyAll = new PermissiveHostnameVerifier();
+                 ((HttpsURLConnection) connection).setHostnameVerifier(verifyAll);
+             }
+             else
+             {
+                 connection = (HttpURLConnection) url.openConnection();
+             }
+ 
+             connection.setRequestMethod(httpMethod);
+ 
+             connection.setAllowUserInteraction(false);
+             connection.setDoInput(true);
+             connection.setUseCaches(false);
+             if (timeout != 0)
+             {
+                 connection.setReadTimeout((int) timeout);
+                 connection.setConnectTimeout((int) timeout);
+             }
+             // Do not forcibly close the connection, rather have it kept alive for efficient HTTP
+             // resource pooling in case of multiple requests to the same server
+             // connection.setRequestProperty("Connection", "close");
+ 
+             if (digestData != null)
+             {
+                 connection.setRequestProperty("Authorization", digestData);
+                 getLogger().debug("Set Digest authentication", this.getClass().getName());
+             }
+             else
+             {
+                 String userInfo = url.getUserInfo();
+                 if (userInfo != null)
+                 {
+                     userInfo = Base64.getEncoder().encodeToString(
+                         userInfo.getBytes(StandardCharsets.UTF_8));
+                     connection.setRequestProperty("Authorization", "Basic " + userInfo);
+ 
+                     getLogger().debug("Set Basic authentication based on URL user information",
+                         this.getClass().getName());
+                 }
+                 else if (this.username != null && !this.username.isEmpty())
+                 {
+                     StringBuilder sb = new StringBuilder();
+                     sb.append(username).append(':');
+                     if (password != null)
+                     {
+                         sb.append(password);
+                     }
+                     userInfo = Base64.getEncoder().encodeToString(
+                         sb.toString().getBytes(StandardCharsets.UTF_8));
+                     connection.setRequestProperty("Authorization", "Basic " + userInfo);
+ 
+                     getLogger().debug("Set Basic authentication based on username/password",
+                         this.getClass().getName());
+                 }
+             }
+ 
+             // Add optional request properties specified by the caller
+             if (requestProperties != null)
+             {
+                 for (Map.Entry<String, String> requestProperty : requestProperties.entrySet())
+                 {
+                     String key = requestProperty.getKey();
+                     String value = requestProperty.getValue();
+ 
+                     connection.setRequestProperty(key, value);
+ 
+                     getLogger().debug("Added property [" + key + "] = [" + value + "]",
+                         this.getClass().getName());
+                 }
+             }
+ 
+             getLogger().debug("Sending request and writing to output stream if necessary",
+                 this.getClass().getName());
+             try
+             {
+                 writeOutputStream(connection);
+             }
+             catch (IOException e)
+             {
+                 // CARGO-1569: When there is a need for Digest authentication, certain versions of
+                 // WildFly aggressively close the unauthenticated stream before the
+                 // writeOutputStream method finishes, which in turn causes an IOException
+                 if (connection.getResponseCode() != 401)
+                 {
+                     throw e;
+                 }
+                 String wwwAuthenticate = connection.getHeaderField("WWW-Authenticate");
+                 if (wwwAuthenticate == null || !wwwAuthenticate.startsWith("Digest "))
+                 {
+                     throw e;
+                 }
+             }
+ 
+             int responseCode = connection.getResponseCode();
+             getLogger().debug("Got response code [" + responseCode + "]",
+                 this.getClass().getName());
+ 
+             if (responseCode == 401)
+             {
+                 String wwwAuthenticate = connection.getHeaderField("WWW-Authenticate");
+                 if (digestData == null && wwwAuthenticate != null
+                     && wwwAuthenticate.startsWith("Digest "))
+                 {
+                     getLogger().debug("Server requests Digest authentication",
+                         getClass().getName());
+ 
+                     String realm = extractHeaderComponent(wwwAuthenticate, "realm");
+                     String qop = extractHeaderComponent(wwwAuthenticate, "qop");
+                     String nonce = extractHeaderComponent(wwwAuthenticate, "nonce");
+                     String opaque = extractHeaderComponent(wwwAuthenticate, "opaque");
+                     String algorithm = extractHeaderComponent(wwwAuthenticate, "algorithm");
+ 
+                     if (realm == null)
+                     {
+                         HttpResult result = new HttpResult();
+                         result.setResponseCode(-1);
+                         result.setResponseMessage(
+                             "The server requested a Digest authentication but the realm is not "
+                                 + "provided");
+                         return result;
+                     }
+                     else if (nonce == null)
+                     {
+                         HttpResult result = new HttpResult();
+                         result.setResponseCode(-1);
+                         result.setResponseMessage(
+                             "The server requested a Digest authentication but the nonce is not "
+                                 + "provided");
+                         return result;
+                     }
+                     if (qop != null && !"auth".equals(qop))
+                     {
+                         HttpResult result = new HttpResult();
+                         result.setResponseCode(-1);
+                         result.setResponseMessage(
+                             "The server requested a Digest authentication but the qop is set to ["
+                                 + qop + "] instead of [auth]");
+                         return result;
+                     }
+                     if (algorithm == null)
+                     {
+                         algorithm = "MD5";
+                     }
+                     MessageDigest digest = MessageDigest.getInstance(algorithm);
+ 
+                     String ha1 = this.username + ":" + realm + ":" + this.password;
+                     byte[] hash = digest.digest(ha1.getBytes(StandardCharsets.UTF_8));
+                     StringBuilder sb = new StringBuilder();
+                     for (byte hashByte : hash)
+                     {
+                         sb.append(String.format("%02x", hashByte));
+                     }
+                     ha1 = sb.toString();
+ 
+                     String uri;
+                     String uriPath = url.getPath();
+                     String uriQuery = url.getQuery();
+                     if (uriQuery != null)
+                     {
+                         uri = uriPath + "?" + uriQuery;
+                     }
+                     else
+                     {
+                         uri = uriPath;
+                     }
+ 
+                     String ha2 = httpMethod;
+                     ha2 += ":" + uri;
+                     hash = digest.digest(ha2.getBytes(StandardCharsets.UTF_8));
+                     sb = new StringBuilder();
+                     for (byte hashByte : hash)
+                     {
+                         sb.append(String.format("%02x", hashByte));
+                     }
+                     ha2 = sb.toString();
+ 
+                     String nc = NONCE_COUNTER.count(nonce);
+ 
+                     String cnonce =
+                         String.format("%08x", (long) (Math.random() * 4294967295.0));
+                     cnonce = cnonce.substring(cnonce.length() - 8);
+ 
+                     String ha3;
+                     if (qop != null)
+                     {
+                         ha3 = ha1 + ":" + nonce + ":" + nc + ":" + cnonce + ":" + qop + ":" + ha2;
+                     }
+                     else
+                     {
+                         ha3 = ha1 + ":" + nonce + ":" + ha2;
+                     }
+                     hash = digest.digest(ha3.getBytes(StandardCharsets.UTF_8));
+                     sb = new StringBuilder();
+                     for (byte hashByte : hash)
+                     {
+                         sb.append(String.format("%02x", hashByte));
+                     }
+                     ha3 = sb.toString();
+ 
+                     wwwAuthenticate = "Digest username=\"" + this.username + "\", "
+                         + "realm=\"" + realm + "\", "
+                         + "nonce=\"" + nonce + "\", "
+                         + "uri=\"" + uri + "\", "
+                         + "algorithm=" + algorithm + ", "
+                         + "nc=" + nc + ", "
+                         + "cnonce=\"" + cnonce + "\", "
+                         + "response=\"" + ha3 + "\"";
+                     if (qop != null)
+                     {
+                         wwwAuthenticate += ", qop=\"" + qop + "\"";
+                     }
+                     if (opaque != null)
+                     {
+                         wwwAuthenticate += ", opaque=\"" + opaque + "\"";
+                     }
+ 
+                     getLogger().debug("Digest authentication with ha=" + ha1 + ", ha2=" + ha2,
+                         getClass().getName());
+ 
+                     return connect(httpMethod, wwwAuthenticate);
+                 }
+                 else
+                 {
+                     getLogger().debug("Server requests [" + wwwAuthenticate + "] authentication",
+                         getClass().getName());
+                 }
+             }
+ 
+             HttpResult result = new HttpResult();
+             result.setResponseCode(responseCode);
+             result.setResponseMessage(connection.getResponseMessage());
+             result.setResponseBody(readFully(connection));
+             return result;
+         }
+         catch (KeyManagementException | NoSuchAlgorithmException e)
+         {
+             throw new IOException(e);
+         }
+         finally
+         {
+             try
+             {
+                 if (connection != null)
+                 {
+                     connection.disconnect();
+                 }
+             }
+             catch (Throwable ignored)
+             {
+                 // Ignored
+             }
+         }
+     }
+ 
+     /**
+      * If necessary, writes to the output stream of the HTTP URL connection. By default, the
+      * {@link #requestBody} is written as output.
+      * 
+      * @param connection the HTTP URL connection to read from
+      * @exception IOException if an error happens during the connection establishment or write
+      */
+     protected void writeOutputStream(HttpURLConnection connection) throws IOException
+     {
+         if (this.requestBody != null)
+         {
+             connection.setDoOutput(true);
+             try (OutputStream outputStream = connection.getOutputStream();
+                 BufferedWriter httpRequestBodyWriter =
+                     new BufferedWriter(new OutputStreamWriter(outputStream)))
+             {
+                 httpRequestBodyWriter.write(this.requestBody);
+             }
+         }
+         else
+         {
+             connection.connect();
+         }
+     }
+ 
+     /**
+      * Fully reads the input stream from the passed HTTP URL connection to prevent (harmless)
+      * server-side exception.
+      * 
+      * @param connection the HTTP URL connection to read from
+      * @exception IOException if an error happens during the read
+      * @return the HTTP connection response body
+      */
+     private String readFully(HttpURLConnection connection) throws IOException
+     {
+         String responseBody = "";
+ 
+         // Only read if there is data to read ... The problem is that not all servers return a
+         // content-length header. If there is no header getContentLength() returns -1. It seems to
+         // work and it seems that all servers that return no content-length header also do not
+         // block on read() operations!
+         if (connection.getContentLength() != 0)
+         {
+             Charset charset = extractCharset(connection.getContentType());
+ 
+             // try getting data from the input stream for successful response,
+             // otherwise from the error stream
+             int responseCode = connection.getResponseCode();
+             if (responseCode >= 200 && responseCode < 300)
+             {
+                 InputStream in = connection.getInputStream();
+                 if (in != null)
+                 {
+                     responseBody = readStreamData(in, charset);
+                 }
+             }
+             else
+             {
+                 InputStream in = connection.getErrorStream();
+                 if (in != null)
+                 {
+                     responseBody = readStreamData(in, charset);
+                 }
+             }
+         }
+ 
+         return responseBody;
+     }
+ 
+     /**
+      * Extract charset from <code>Content-Type</code> header.
+      * 
+      * @param contentType <code>Content-Type</code> header.
+      * @return Character set extracted, UTF-8 if no valid charset found.
+      */
+     protected static Charset extractCharset(String contentType)
+     {
+         Charset charset = StandardCharsets.UTF_8;
+         if (contentType != null)
+         {
+             int charsetStart = contentType.indexOf("; charset=");
+             if (charsetStart > 0)
+             {
+                 try
+                 {
+                     charset = Charset.forName(contentType.substring(charsetStart + 10));
+                 }
+                 catch (Exception ignored)
+                 {
+                     // Ignore parsing charset
+                 }
+             }
+         }
+         return charset;
+     }
+ 
+     /**
+      * @param stream the stream from which to read data from
+      * @param charset the charset to use when constructing the string
+      * @return the stream data
+      * @throws IOException in case of error
+      */
+     private String readStreamData(InputStream stream, Charset charset) throws IOException
+     {
+         InputStreamReader reader = new InputStreamReader(stream, charset);
+ 
+         StringBuilder sb = new StringBuilder();
+         char[] chars = new char[1024];
+         int n;
+         while ((n = reader.read(chars, 0, chars.length)) != -1)
+         {
+             sb.append(chars, 0, n);
+         }
+ 
+         // See: https://codehaus-cargo.atlassian.net/browse/CARGO-1342
+         String response = sb.toString().replaceAll("\\r\\n?", "\n");
+         if (response.startsWith("HTTP/"))
+         {
+             int httpHeaderBodySeparation = response.indexOf("\n\n");
+             if (httpHeaderBodySeparation != -1)
+             {
+                 String splitResponse = response.substring(httpHeaderBodySeparation + 2);
+                 httpHeaderBodySeparation = splitResponse.indexOf('\n');
+                 if (httpHeaderBodySeparation != -1)
+                 {
+                     response = splitResponse.substring(httpHeaderBodySeparation + 1);
+                 }
+             }
+         }
+ 
+         return response;
+     }
+ 
+     /**
+      * Extract a component of a header.
+      * 
+      * @param header header to extract from
+      * @param component component to extract
+      * @return Extracted component, null if component doesn't exist in header
+      */
+     protected static String extractHeaderComponent(String header, String component)
+     {
+         String fullComponent = component + "=\"";
+         int fullComponentLength = fullComponent.length();
+         int index1 = header.indexOf(fullComponent);
+         if (index1 == -1)
+         {
+             return null;
+         }
+         int index2 = header.indexOf('"', index1 + fullComponentLength);
+         if (index2 == -1)
+         {
+             return null;
+         }
+         return header.substring(index1 + fullComponentLength, index2);
+     }
+ 
+     /**
+      * NonceCounter provides a 1,000 item LRU cache counting
+      * the number of times a nonce has been seen.
+      */
+     private static class NonceCounter
+     {
+         /**
+          * LRU cache size limit.
+          */
+         private final int maxLruCacheSizeLimit = 1000;
+ 
+         /**
+          * Map holds the nonce values and their counts
+          */
+         private Map<String, Integer> nonces;
+ 
+         /**
+          * Nonce counter.
+          */
+         public NonceCounter()
+         {
+             nonces = new LinkedHashMap<String, Integer>(maxLruCacheSizeLimit + 1, .75F, true)
+             {
+                 /**
+                  * {@inheritDoc}
+                  */
+                 @Override
+                 public boolean removeEldestEntry(Map.Entry<String, Integer> eldest)
+                 {
+                     return size() > maxLruCacheSizeLimit;
+                 }
+             };
+         }
+ 
+         /**
+          * Count returns a hexadecimal string counting the number
+          * of times nonce has been seen.  The first value returned
+          * for a nonce is 00000001.
+          * 
+          * @param nonce the nonce value to count
+          * @return formatted nonce value
+          */
+         public synchronized String count(String nonce)
+         {
+             Integer count = nonces.get(nonce);
+             if (count == null)
+             {
+                 count = 1;
+             }
+             else
+             {
+                 count = count + 1;
+             }
+ 
+             nonces.put(nonce, count);
+ 
+             return String.format("%08x", count);
+         }
+     }
+ 
+     /**
+      * A TrustManager that does not validate certificate chains.
+      */
+     private static class PermissiveTrustManager implements X509TrustManager
+     {
+         /**
+          * {@inheritDoc}
+          * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
+          */
+         @Override
+         public java.security.cert.X509Certificate[] getAcceptedIssuers()
+         {
+             return null;
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[],
+          * String)
+          */
+         @Override
+         public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType)
+         {
+             // Method purposefully left empty
+         }
+ 
+         /**
+          * {@inheritDoc}
+          * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[],
+          * String)
+          */
+         @Override
+         public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType)
+         {
+             // Method purposefully left empty
+         }
+     }
+ 
+     /**
+      * A HostnameVerifier that does not care whether the name on the certificate matches the
+      * hostname.
+      */
+     private static class PermissiveHostnameVerifier implements HostnameVerifier
+     {
+         /**
+          * {@inheritDoc}
+          * @see HostnameVerifier#verify
+          */
+         @Override
+         public boolean verify(String hostname, SSLSession session)
+         {
+             return true;
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-4.html b/htmlReport/ns-9/sources/source-4.html new file mode 100644 index 0000000000..fdc1f689be --- /dev/null +++ b/htmlReport/ns-9/sources/source-4.html @@ -0,0 +1,205 @@ + + + + + + + + Coverage Report > HttpResult + + + + + + +
+ + +

Coverage Summary for Class: HttpResult (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/8) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ /**
+  * Set of common HTTP(S) utility methods.
+  */
+ public class HttpResult
+ {
+     /**
+      * The HTTP connection response code (eg 200).
+      */
+     private int responseCode;
+ 
+     /**
+      * The HTTP connection response message (eg "Ok").
+      */
+     private String responseMessage;
+ 
+     /**
+      * The HTTP connection response body.
+      */
+     private String responseBody;
+ 
+     /**
+      * @return Response body of HTTP response.
+      */
+     public String getResponseBody()
+     {
+         return responseBody;
+     }
+ 
+     /**
+      * @param responseBody Response body of HTTP response.
+      */
+     public void setResponseBody(String responseBody)
+     {
+         this.responseBody = responseBody;
+     }
+ 
+     /**
+      * @return HTTP response code.
+      */
+     public int getResponseCode()
+     {
+         return responseCode;
+     }
+ 
+     /**
+      * @param responseCode HTTP response code.
+      */
+     public void setResponseCode(int responseCode)
+     {
+         this.responseCode = responseCode;
+     }
+ 
+     /**
+      * @return HTTP response message.
+      */
+     public String getResponseMessage()
+     {
+         return responseMessage;
+     }
+ 
+     /**
+      * @param responseMessage HTTP response message.
+      */
+     public void setResponseMessage(String responseMessage)
+     {
+         this.responseMessage = responseMessage;
+     }
+ 
+     /**
+      * @return True if HTTP call is successful - its response code is 2xx.
+      */
+     public boolean isSuccessful()
+     {
+         if (responseCode >= 200 && responseCode < 300)
+         {
+             return true;
+         }
+         return false;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-5.html b/htmlReport/ns-9/sources/source-5.html new file mode 100644 index 0000000000..bebc155cae --- /dev/null +++ b/htmlReport/ns-9/sources/source-5.html @@ -0,0 +1,200 @@ + + + + + + + + Coverage Report > MultipartFormContentType + + + + + + +
+ + +

Coverage Summary for Class: MultipartFormContentType (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MultipartFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/6) + + + + 0% + + + (0/9) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.io.File;
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ /**
+  * Represents the content type for a multipart form.
+  */
+ public class MultipartFormContentType extends UrlEncodedFormContentType
+ {
+     /**
+      * Files part of this multipart form.
+      */
+     private final Map<String, File> files = new HashMap<String, File>();
+ 
+     /**
+      * The multipart boundary string.
+      */
+     private String boundary = null;
+ 
+     /**
+      * Constructs a multipart token
+      */
+     public MultipartFormContentType()
+     {
+         this.boundary = createBoundary();
+     }
+ 
+     /**
+      * Creates a boundary string that is highly probable not to be found inside the form data.
+      * 
+      * @return a multipart boundary string
+      */
+     private String createBoundary()
+     {
+         return "----CargoFormBoundary" + Long.toString(System.currentTimeMillis(), 16);
+     }
+ 
+     /**
+      * Gets the content type for this writer.
+      * 
+      * @return the content type string
+      */
+     @Override
+     public String getContentType()
+     {
+         return "multipart/form-data; boundary=" + this.boundary;
+     }
+ 
+     /**
+      * @return the multipart chunk boundary
+      */
+     public String getBoundary()
+     {
+         return boundary;
+     }
+ 
+     /**
+      * Sets a form content file, repeating names (keys) will be overriden.
+      * 
+      * @param key The key name, used as file name
+      * @param file The file
+      */
+     public void setFormFile(String key, File file)
+     {
+         files.put(key, file);
+     }
+ 
+     /**
+      * @return the form file contents map
+      */
+     public Map<String, File> getFormFiles()
+     {
+         return files;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-6.html b/htmlReport/ns-9/sources/source-6.html new file mode 100644 index 0000000000..f3d033c1ba --- /dev/null +++ b/htmlReport/ns-9/sources/source-6.html @@ -0,0 +1,165 @@ + + + + + + + + Coverage Report > UrlEncodedFormContentType + + + + + + +
+ + +

Coverage Summary for Class: UrlEncodedFormContentType (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormContentType + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/5) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ /**
+  * Represents the content type for an url encoded form.
+  */
+ public class UrlEncodedFormContentType implements FormContentType
+ {
+     /**
+      * Form contents part of this multipart form.
+      */
+     private final Map<String, String> contents = new HashMap<String, String>();
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getContentType()
+     {
+         return "application/x-www-form-urlencoded";
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setFormContent(String key, String value)
+     {
+         contents.put(key, value);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Map<String, String> getFormContents()
+     {
+         return contents;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-9/sources/source-7.html b/htmlReport/ns-9/sources/source-7.html new file mode 100644 index 0000000000..e85d9415cb --- /dev/null +++ b/htmlReport/ns-9/sources/source-7.html @@ -0,0 +1,114 @@ + + + + + + + + Coverage Report > FormContentType + + + + + + +
+ + +

Coverage Summary for Class: FormContentType (org.codehaus.cargo.container.internal.http)

+ + + + + + + + + +
Class
FormContentType
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http;
+ 
+ import java.util.Map;
+ 
+ /**
+  * Represents the content type and basic content of a form.
+  */
+ public interface FormContentType
+ {
+     /**
+      * @return the content type of a form
+      */
+     String getContentType();
+ 
+     /**
+      * Sets a form content, repeating names (keys) will be overriden.
+      * 
+      * @param key The key name
+      * @param value The value string for the specified key
+      */
+     void setFormContent(String key, String value);
+ 
+     /**
+      * @return the form contents map
+      */
+     Map<String, String> getFormContents();
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-a/index.html b/htmlReport/ns-a/index.html new file mode 100644 index 0000000000..09d677be30 --- /dev/null +++ b/htmlReport/ns-a/index.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_BLOCK.html b/htmlReport/ns-a/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..d14bbc13c7 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_BLOCK.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..7806b65e71 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_CLASS.html b/htmlReport/ns-a/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..edb4f9b542 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_CLASS.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..38ae214e7a --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_LINE.html b/htmlReport/ns-a/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..cbf1c98883 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_LINE.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..20c440d6ec --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_METHOD.html b/htmlReport/ns-a/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..5d1b266d82 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_METHOD.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..c0bda235dc --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..0047ef3ac6 --- /dev/null +++ b/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,170 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.http.writer + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.http.writer

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.http.writer + + 0% + + + (0/2) + + + + 0% + + + (0/9) + + + + 0% + + + (0/69) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-a/sources/source-1.html b/htmlReport/ns-a/sources/source-1.html new file mode 100644 index 0000000000..1e893716e5 --- /dev/null +++ b/htmlReport/ns-a/sources/source-1.html @@ -0,0 +1,289 @@ + + + + + + + + Coverage Report > MultipartFormWriter + + + + + + +
+ + +

Coverage Summary for Class: MultipartFormWriter (org.codehaus.cargo.container.internal.http.writer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
MultipartFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/53) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http.writer;
+ 
+ import java.io.DataOutputStream;
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ 
+ import org.codehaus.cargo.container.internal.http.MultipartFormContentType;
+ 
+ /**
+  * Represents a form writer capable of sending files and form data as multipart chunks.
+  */
+ public class MultipartFormWriter implements AutoCloseable
+ {
+     /**
+      * The line end characters.
+      */
+     private static final String NEWLINE = "\r\n";
+ 
+     /**
+      * The boundary prefix.
+      */
+     private static final String PREFIX = "--";
+ 
+     /**
+      * The output stream to write to.
+      */
+     private DataOutputStream out = null;
+ 
+     /**
+      * The multipart boundary string.
+      */
+     private String boundary = null;
+ 
+     /**
+      * Attaches to the outputstream and allows writing form data or files to it.
+      * 
+      * @param contentType The form content type
+      * @param os the output stream
+      */
+     public MultipartFormWriter(MultipartFormContentType contentType, OutputStream os)
+     {
+         if (os == null)
+         {
+             throw new IllegalArgumentException("Output stream is required.");
+         }
+         this.out = new DataOutputStream(os);
+         this.boundary = contentType.getBoundary();
+     }
+ 
+     /**
+      * Writes a string field value.
+      * 
+      * @param name the field name (required)
+      * @param value the field value
+      * @throws IOException on input/output errors
+      */
+     public void writeField(String name, String value) throws IOException
+     {
+         if (name == null)
+         {
+             throw new IllegalArgumentException("Name cannot be null or empty.");
+         }
+ 
+         // write boundary
+         out.writeBytes(PREFIX);
+         out.writeBytes(boundary);
+         out.writeBytes(NEWLINE);
+         // write content header
+         out.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"");
+         out.writeBytes(NEWLINE);
+         out.writeBytes(NEWLINE);
+         // write content
+         if (value != null)
+         {
+             out.writeBytes(value);
+         }
+         out.writeBytes(NEWLINE);
+         out.flush();
+     }
+ 
+     /**
+      * Writes a file's contents.
+      * 
+      * @param name the field name
+      * @param file the file (the file must exist)
+      * @throws IOException on input/output errors
+      */
+     public void writeFile(String name, File file) throws IOException
+     {
+         writeFile(name, file, "application/octet-stream");
+     }
+ 
+     /**
+      * Writes a input stream's contents.
+      * 
+      * @param name the field name
+      * @param file the file
+      * @param mimeType The file content type
+      * @throws IOException on input/output errors
+      */
+     public void writeFile(String name, File file, String mimeType) throws IOException
+     {
+         if (name == null || name.trim().isEmpty())
+         {
+             throw new IllegalArgumentException("Name cannot be null");
+         }
+         if (file == null)
+         {
+             throw new IllegalArgumentException("File cannot be null.");
+         }
+         if (!file.exists())
+         {
+             throw new IllegalArgumentException("File does not exist.");
+         }
+         if (file.isDirectory())
+         {
+             throw new IllegalArgumentException("File cannot be a directory.");
+         }
+         if (mimeType == null || mimeType.trim().isEmpty())
+         {
+             throw new IllegalArgumentException("File content type cannot be null");
+         }
+         try (InputStream fileInputStream = new FileInputStream(file))
+         {
+             // write boundary
+             out.writeBytes(PREFIX);
+             out.writeBytes(boundary);
+             out.writeBytes(NEWLINE);
+             // write content header
+             out.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"; filename=\""
+                 + file.getName() + "\"");
+             out.writeBytes(NEWLINE);
+             out.writeBytes("Content-Type: " + mimeType);
+             out.writeBytes(NEWLINE);
+             out.writeBytes(NEWLINE);
+             // write content
+             byte[] data = new byte[1024];
+             int r = 0;
+             while ((r = fileInputStream.read(data, 0, data.length)) != -1)
+             {
+                 out.write(data, 0, r);
+             }
+             out.writeBytes(NEWLINE);
+             out.flush();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void close() throws IOException
+     {
+         // write final boundary
+         out.writeBytes(PREFIX);
+         out.writeBytes(boundary);
+         out.writeBytes(PREFIX);
+         out.writeBytes(NEWLINE);
+         out.flush();
+         out.close();
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-a/sources/source-2.html b/htmlReport/ns-a/sources/source-2.html new file mode 100644 index 0000000000..cf52e283ef --- /dev/null +++ b/htmlReport/ns-a/sources/source-2.html @@ -0,0 +1,204 @@ + + + + + + + + Coverage Report > UrlEncodedFormWriter + + + + + + +
+ + +

Coverage Summary for Class: UrlEncodedFormWriter (org.codehaus.cargo.container.internal.http.writer)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
UrlEncodedFormWriter + + 0% + + + (0/1) + + + + 0% + + + (0/4) + + + + 0% + + + (0/16) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.http.writer;
+ 
+ import java.io.DataOutputStream;
+ import java.io.IOException;
+ import java.io.OutputStream;
+ import java.net.URLEncoder;
+ import java.nio.charset.StandardCharsets;
+ 
+ /**
+  * Represents a form writer that allows writing form fields that are URL encoded.
+  */
+ public class UrlEncodedFormWriter
+ {
+     /**
+      * The buffer that will contain the url encoded form data.
+      */
+     private final StringBuilder formData = new StringBuilder();
+ 
+     /**
+      * Constructs an UrlEncodedFormWriter.
+      */
+     public UrlEncodedFormWriter()
+     {
+     }
+ 
+     /**
+      * Writes a string field value.
+      * 
+      * @param name the field name (required)
+      * @param value the field value
+      * @throws IOException on input/output errors
+      */
+     public void addField(String name, String value) throws IOException
+     {
+         if (name == null)
+         {
+             throw new IllegalArgumentException("Name cannot be null or empty.");
+         }
+ 
+         if (formData.length() > 0)
+         {
+             formData.append("&");
+         }
+ 
+         formData.append(name + "=");
+         if (value != null)
+         {
+             // TODO: URLEncoder.encode(String, Charset) was introduced in Java 10,
+             //       simplify the below code when Codehaus Cargo is on Java 10+
+             formData.append(URLEncoder.encode(value, StandardCharsets.UTF_8.name()));
+         }
+     }
+ 
+     /**
+      * Writes the form data to the output stream.
+      * 
+      * @param os The output stream
+      * @throws IOException on input/output errors
+      */
+     public void write(OutputStream os) throws IOException
+     {
+         if (os == null)
+         {
+             throw new IllegalArgumentException("Output stream is required.");
+         }
+         try (DataOutputStream out = new DataOutputStream(os))
+         {
+             out.writeBytes(formData.toString());
+             out.flush();
+         }
+     }
+ 
+     /**
+      * @return the length of the url encoded form data
+      */
+     public int getLength()
+     {
+         return formData.length();
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/index.html b/htmlReport/ns-b/index.html new file mode 100644 index 0000000000..7c0e34c97f --- /dev/null +++ b/htmlReport/ns-b/index.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_BLOCK.html b/htmlReport/ns-b/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..03d22552d7 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_BLOCK.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..818c18a867 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_CLASS.html b/htmlReport/ns-b/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..f6cd982eda --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_CLASS.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..206cc2b29d --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_LINE.html b/htmlReport/ns-b/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..1140969385 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_LINE.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..887ffbdf57 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_METHOD.html b/htmlReport/ns-b/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..f245da58cf --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_METHOD.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..6437619130 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..dea31a9dd1 --- /dev/null +++ b/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,278 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.internal.util + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.internal.util

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.internal.util + + 71.4% + + + (5/7) + + + + 48.8% + + + (20/41) + + + + 42.7% + + + (82/192) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
HttpUtils + + 50% + + + (1/2) + + + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-1.html b/htmlReport/ns-b/sources/source-1.html new file mode 100644 index 0000000000..093ea14cf7 --- /dev/null +++ b/htmlReport/ns-b/sources/source-1.html @@ -0,0 +1,240 @@ + + + + + + + + Coverage Report > ComplexPropertyUtils + + + + + + +
+ + +

Coverage Summary for Class: ComplexPropertyUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ComplexPropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (4/4) + + + + 100% + + + (31/31) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.StringTokenizer;
+ 
+ /**
+  * Parser used for processing complexly defined properties
+  * like WebSpherePropertySet.EJB_TO_RES_REF_BINDING.
+  */
+ public final class ComplexPropertyUtils
+ {
+ 
+     /**
+      * Constructor.
+      */
+     private ComplexPropertyUtils()
+     {
+     }
+ 
+     /**
+      * Parse provided property using property delimiter | and property value delimiter : .
+      * @param property Property to be parsed.
+      * @return List of properties containing list of property values.
+      */
+     public static List<List<String>> parseProperty(String property)
+     {
+         return parseProperty(property, "|", ":");
+     }
+ 
+     /**
+      * Parse provided property using defined property delimiter and property value delimiter.
+      * @param property Property to be parsed.
+      * @param propertyDelimiter Property delimiter.
+      * @param propertyElementDelimiter Property value delimiter.
+      * @return List of properties containing list of property values.
+      */
+     public static List<List<String>> parseProperty(String property, String propertyDelimiter,
+             String propertyElementDelimiter)
+     {
+         List<List<String>> parsedProperty = new ArrayList<List<String>>();
+ 
+         if (property != null && !property.isEmpty())
+         {
+             StringTokenizer propertyEntries = new StringTokenizer(property, propertyDelimiter);
+             while (propertyEntries.hasMoreTokens())
+             {
+                 String propertyEntry = propertyEntries.nextToken().trim();
+                 if (propertyEntry != null && !propertyEntry.isEmpty())
+                 {
+                     List<String> propertyValueList = new ArrayList<String>();
+                     StringTokenizer propertyValues = new StringTokenizer(propertyEntry,
+                             propertyElementDelimiter);
+ 
+                     while (propertyValues.hasMoreTokens())
+                     {
+                         propertyValueList.add(propertyValues.nextToken().trim());
+                     }
+                     parsedProperty.add(propertyValueList);
+                 }
+             }
+         }
+ 
+         return parsedProperty;
+     }
+ 
+     /**
+      * Parse provided property using defined property delimiter.
+      * @param property Property to be parsed.
+      * @param propertyDelimiter Property delimiter.
+      * @return List of properties containing list of property values.
+      */
+     public static List<String> parseProperty(String property, String propertyDelimiter)
+     {
+         List<String> parsedProperty = new ArrayList<String>();
+ 
+         if (property != null && !property.isEmpty())
+         {
+             StringTokenizer propertyEntries = new StringTokenizer(property, propertyDelimiter);
+             while (propertyEntries.hasMoreTokens())
+             {
+                 String propertyEntry = propertyEntries.nextToken().trim();
+                 if (propertyEntry != null && !propertyEntry.isEmpty())
+                 {
+                     parsedProperty.add(propertyEntry);
+                 }
+             }
+         }
+ 
+         return parsedProperty;
+     }
+ 
+     /**
+      * Convert list of properties to a string representation, based on the specified delimiter.
+      * 
+      * @param toJoin object to serialize as a string
+      * @param delimiter how to separate entries from each other
+      * @return the properties as a string, delimited by the above
+      */
+     public static String joinOnDelimiter(List<String> toJoin, char delimiter)
+     {
+         StringBuilder buf = new StringBuilder();
+ 
+         for (Iterator<String> it = toJoin.iterator(); it.hasNext();)
+         {
+             String value = it.next();
+             buf.append(value);
+             if (it.hasNext())
+             {
+                 buf.append(delimiter);
+             }
+         }
+ 
+         return buf.toString();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-2.html b/htmlReport/ns-b/sources/source-2.html new file mode 100644 index 0000000000..4e97fdc1ff --- /dev/null +++ b/htmlReport/ns-b/sources/source-2.html @@ -0,0 +1,320 @@ + + + + + + + + Coverage Report > HttpUtils + + + + + + +
+ + +

Coverage Summary for Class: HttpUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + + + + + + + + + +
Class + Method, % + + Line, % +
HttpUtils + + 12.5% + + + (1/8) + + + + 3.1% + + + (1/32) + +
HttpUtils$HttpResult + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
Total + + 11.1% + + + (1/9) + + + + 3% + + + (1/33) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ import java.io.IOException;
+ import java.net.URL;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.internal.http.HttpRequest;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Set of common HTTP(S) utility methods.
+  */
+ public class HttpUtils extends LoggedObject
+ {
+     /**
+      * Storage class for the HTTP ping result.
+      */
+     public static class HttpResult
+     {
+         /**
+          * The HTTP connection response code (eg 200).
+          */
+         public int responseCode;
+ 
+         /**
+          * The HTTP connection response message (eg "Ok").
+          */
+         public String responseMessage;
+ 
+         /**
+          * The HTTP connection response body.
+          */
+         public String responseBody;
+     }
+ 
+     /**
+      * @param pingURL the URL to ping
+      * @return true if the URL can be ping or false otherwise
+      */
+     public boolean ping(URL pingURL)
+     {
+         return isAvailable(testConnectivity(pingURL, null, 0L));
+     }
+ 
+     /**
+      * Ping a URL and store the detailed result in a {@link HttpResult} object.
+      * 
+      * @param pingURL the URL to ping
+      * @param result the detailed ping result
+      * @return true if the URL can be ping or false otherwise
+      */
+     public boolean ping(URL pingURL, HttpResult result)
+     {
+         return ping(pingURL, null, result);
+     }
+ 
+     /**
+      * Ping a URL and store the detailed result in a {@link HttpResult} object.
+      * 
+      * @param pingURL the URL to ping
+      * @param result the detailed ping result
+      * @param timeout the timeout to wait for, 0 if waiting to infinity
+      * @return true if the URL can be ping or false otherwise
+      */
+     public boolean ping(URL pingURL, HttpResult result, long timeout)
+     {
+         return ping(pingURL, null, result, timeout);
+     }
+ 
+     /**
+      * Ping a URL and store the detailed result in a {@link HttpResult} object.
+      * 
+      * @param pingURL the URL to ping
+      * @param requestProperties optional request properties to add to the connection (can be null)
+      * @param result the detailed ping result
+      * @return true if the URL can be ping or false otherwise
+      */
+     public boolean ping(URL pingURL, Map<String, String> requestProperties, HttpResult result)
+     {
+         return ping(pingURL, requestProperties, result, 0L);
+     }
+ 
+     /**
+      * Ping a URL and store the detailed result in a {@link HttpResult} object.
+      * 
+      * @param pingURL the URL to ping
+      * @param requestProperties optional request properties to add to the connection (can be null)
+      * @param result the detailed ping result
+      * @param timeout the timeout to wait for, 0 if waiting to infinity
+      * @return true if the URL can be ping or false otherwise
+      */
+     public boolean ping(URL pingURL, Map<String, String> requestProperties, HttpResult result,
+         long timeout)
+     {
+         HttpResult responseResult = testConnectivity(pingURL, requestProperties, timeout);
+         result.responseBody = responseResult.responseBody;
+         result.responseCode = responseResult.responseCode;
+         result.responseMessage = responseResult.responseMessage;
+ 
+         return isAvailable(responseResult);
+     }
+ 
+     /**
+      * Tests whether we are able to connect to the HTTP(S) server identified by the specified URL.
+      * 
+      * @param url the URL to check
+      * @param requestProperties optional request properties to add to the connection (can be null)
+      * @param timeout the timeout in ms, 0 for infinity
+      * @return the HTTP(S) result containing -1 as response code if no connection could be
+      * established
+      */
+     private HttpResult testConnectivity(URL url, Map<String, String> requestProperties,
+         long timeout)
+     {
+         HttpRequest connection = new HttpRequest(url, timeout);
+         connection.setLogger(getLogger());
+ 
+         if (requestProperties != null)
+         {
+             for (Map.Entry<String, String> requestProperty : requestProperties.entrySet())
+             {
+                 String key = requestProperty.getKey();
+                 String value = requestProperty.getValue();
+ 
+                 connection.addRequestProperty(key, value);
+             }
+         }
+ 
+         HttpResult responseResult = new HttpResult();
+         try
+         {
+             org.codehaus.cargo.container.internal.http.HttpResult httpResult = connection.get();
+             responseResult.responseBody = httpResult.getResponseBody();
+             responseResult.responseCode = httpResult.getResponseCode();
+             responseResult.responseMessage = httpResult.getResponseMessage();
+         }
+         catch (IOException e)
+         {
+             responseResult.responseCode = -1;
+             responseResult.responseMessage = e.toString();
+         }
+ 
+         return responseResult;
+     }
+ 
+     /**
+      * Tests whether an HTTP(S) return code corresponds to a valid connection to the test URL or
+      * not. Success is 2xx (successful), 3xx (redirection), 401 (unauthorized) or 403 (forbidden).
+      * 
+      * @param responseResult the detailed HTTP ping result
+      * @return <code>true</code> if the test URL could be called without error, <code>false</code>
+      * otherwise
+      */
+     private boolean isAvailable(HttpResult responseResult)
+     {
+         boolean result;
+         if (responseResult.responseCode >= 200 && responseResult.responseCode < 400
+             || responseResult.responseCode == 401 || responseResult.responseCode == 403)
+         {
+             result = true;
+         }
+         else
+         {
+             result = false;
+         }
+         return result;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-3.html b/htmlReport/ns-b/sources/source-3.html new file mode 100644 index 0000000000..e34cbc96ab --- /dev/null +++ b/htmlReport/ns-b/sources/source-3.html @@ -0,0 +1,247 @@ + + + + + + + + Coverage Report > JdkUtils + + + + + + +
+ + +

Coverage Summary for Class: JdkUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JdkUtils + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 45% + + + (9/20) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ import java.io.File;
+ import java.io.FileNotFoundException;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ 
+ /**
+  * Set of common JDK utility methods.
+  */
+ public final class JdkUtils
+ {
+     /**
+      * Ensures that this utility class cannot be instantiated.
+      */
+     private JdkUtils()
+     {
+     }
+ 
+     /**
+      * Returns the file containing the JDK tools (such as the compiler). This method must not be
+      * called on Mac OSX as there is no tools.jar file on that platform (everything is included in
+      * classes.jar).
+      * 
+      * @return The tools.jar file
+      * @throws FileNotFoundException If the tools.jar file could not be found
+      */
+     public static File getToolsJar() throws FileNotFoundException
+     {
+         String javaHome = System.getProperty("java.home");
+         File toolsJar = getToolsJar(javaHome);
+         if (!toolsJar.isFile())
+         {
+             throw new FileNotFoundException(toolsJar.getAbsolutePath());
+         }
+         return toolsJar;
+     }
+ 
+     /**
+      * Returns the file containing the JDK tools (such as the compiler) for the specified Java
+      * installation. This method must not be called on Mac OSX as there is no {@code tools.jar} file
+      * on that platform (everything is included in {@code classes.jar}).
+      * 
+      * @param javaHome The installation directory of the JRE/JDK for which to locate the JDK tools,
+      *            must not be {@code null}.
+      * @return The absolute (and possibly non-existent) path to the {@code tools.jar} file, never
+      *         {@code null}.
+      */
+     public static File getToolsJar(String javaHome)
+     {
+         File jdkHome = new File(javaHome).getAbsoluteFile();
+         if (jdkHome.getName().equals("jre"))
+         {
+             jdkHome = jdkHome.getParentFile();
+         }
+         File libDir = new File(jdkHome, "lib");
+         File toolsJar = new File(libDir, "tools.jar");
+         return toolsJar;
+     }
+ 
+     /**
+      * Is the user running on a Macintosh OS X system? Heuristic derived from <a
+      * href="http://developer.apple.com/technotes/tn/tn2042.html#Section0_1">Apple Tech Note
+      * 2042</a>.
+      * 
+      * @return true if the user's system is determined to be Mac OS X.
+      */
+     public static boolean isOSX()
+     {
+         return System.getProperty("mrj.version") != null;
+     }
+ 
+     /**
+      * Is the user running on a Windows system?
+      * 
+      * @return true if the user's system is determined to be Windows.
+      */
+     public static boolean isWindows()
+     {
+         return System.getProperty("os.name").startsWith("Windows");
+     }
+ 
+     /**
+      * Get the major Java version.
+      * 
+      * @return Major Java version.
+      */
+     public static int getMajorJavaVersion()
+     {
+         return parseMajorJavaVersion(System.getProperty("java.version"));
+     }
+ 
+     /**
+      * Parse major Java version from a Java version string.
+      * 
+      * @param version Java version string.
+      * @return Major Java version.
+      */
+     public static int parseMajorJavaVersion(String version)
+     {
+         String jvmVersion = version.replaceAll("^\"?(1\\.)?([0-9]+).*", "$2");
+         return Integer.parseInt(jvmVersion);
+     }
+ 
+     /**
+      * Pauses the current thread for the specified amount.
+      * 
+      * @param ms The time to sleep in milliseconds
+      */
+     public static void sleep(long ms)
+     {
+         try
+         {
+             Thread.sleep(ms);
+         }
+         catch (InterruptedException e)
+         {
+             throw new ContainerException("Interruption during sleep", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-4.html b/htmlReport/ns-b/sources/source-4.html new file mode 100644 index 0000000000..7110a02966 --- /dev/null +++ b/htmlReport/ns-b/sources/source-4.html @@ -0,0 +1,152 @@ + + + + + + + + Coverage Report > JythonUtils + + + + + + +
+ + +

Coverage Summary for Class: JythonUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
JythonUtils + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ /**
+  * Set of common utility methods for Jython scripts.
+  */
+ public final class JythonUtils
+ {
+ 
+     /**
+      * Ensures that this utility class cannot be instantiated.
+      */
+     private JythonUtils()
+     {
+     }
+ 
+     /**
+      * Escape special characters for Jython scripts.
+      * 
+      * @param plainText Text to be escaped.
+      * @return Escaped text.
+      */
+     public static String escapeStringLiteral(String plainText)
+     {
+         return plainText.
+                 replace("\\", "\\\\").
+                 replace("\'", "\\\'").
+                 replace("\"", "\\\"");
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-5.html b/htmlReport/ns-b/sources/source-5.html new file mode 100644 index 0000000000..5c39c9f93a --- /dev/null +++ b/htmlReport/ns-b/sources/source-5.html @@ -0,0 +1,332 @@ + + + + + + + + Coverage Report > PropertyUtils + + + + + + +
+ + +

Coverage Summary for Class: PropertyUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
PropertyUtils + + 100% + + + (1/1) + + + + 100% + + + (9/9) + + + + 95% + + + (38/40) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ import java.io.ByteArrayInputStream;
+ import java.io.IOException;
+ import java.nio.charset.StandardCharsets;
+ import java.util.HashMap;
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Properties;
+ import java.util.regex.Pattern;
+ 
+ /**
+  * A class to convert properties to strings and back.
+  */
+ public final class PropertyUtils
+ {
+     /**
+      * The default delimiter that separates the properties in a string.
+      */
+     private static final char PIPE = '|';
+ 
+     /**
+      * The default delimiter that separates the properties in a string.
+      */
+     private static final char SEMICOLON = ';';
+ 
+     /**
+      * Private constructor to prevent getting an instance.
+      */
+     private PropertyUtils()
+     {
+     }
+ 
+     /**
+      * Construct a Properties object from a single string, converting '|' symbols to end of line
+      * characters for parsing.
+      * <p>
+      * Example: "abc=def|car=bmw" gets converted to "abc" -&gt; "def", and "car" -&gt; "bmw"
+      * </p>
+      * 
+      * @param toSplit The string value to convert to properties, pipe separated
+      * @return the list of properties
+      * {@link #splitPropertiesOnDelimiter}
+      */
+     public static Properties splitPropertiesOnPipe(String toSplit)
+     {
+         return splitPropertiesOnDelimiter(toSplit, PIPE);
+     }
+ 
+     /**
+      * Construct a Properties object from a single string, converting ';' symbols to end of line
+      * characters for parsing.
+      * <p>
+      * Example: "abc=def;car=bmw" gets converted to "abc" -&gt; "def", and "car" -&gt; "bmw"
+      * </p>
+      * 
+      * @param toSplit The string value to convert to properties, semicolon separated
+      * @return the list of properties
+      * {@link #splitPropertiesOnDelimiter}
+      */
+     public static Properties splitPropertiesOnSemicolon(String toSplit)
+     {
+         return splitPropertiesOnDelimiter(toSplit, SEMICOLON);
+     }
+ 
+     /**
+      * Construct a Properties object from a single string, by splitting it on a specified delimiter.
+      * <p>
+      * Example: "abc=def;car=bmw" gets converted to "abc" -&gt; "def", and "car" -&gt; "bmw" where:
+      * delimiter = ;
+      * </p>
+      * 
+      * @param toSplit The string value to convert to properties
+      * @param delimiter The delimiter of the string
+      * @return the list of properties
+      */
+     public static Properties splitPropertiesOnDelimiter(String toSplit, char delimiter)
+     {
+         Properties properties = new Properties();
+ 
+         // Be careful on double-escapes since escapeBackSlashesIfNotNull is always called before.
+         String toSplitHalfEscaped = toSplit.replace("\\\\" + delimiter, "\\" + delimiter);
+ 
+         // CARGO-829: Allow escaping of delimiter in property values using the \ character.
+         String newLineSeparated = toSplitHalfEscaped.replaceAll("([^\\\\])"
+             + Pattern.quote(String.valueOf(delimiter)), "$1\n");
+ 
+         try
+         {
+             properties.load(
+                 new ByteArrayInputStream(newLineSeparated.getBytes(StandardCharsets.ISO_8859_1)));
+             return properties;
+         }
+         catch (IOException e)
+         {
+             // this should never happen!
+             throw new IllegalArgumentException(e);
+         }
+     }
+ 
+     /**
+      * Convert properties to a string representation.
+      * 
+      * @param toJoin A list of properties to convert
+      * @return the properties as a string, pipe delimited
+      */
+     public static String joinOnPipe(Map<String, String> toJoin)
+     {
+         return joinOnDelimiter(toJoin, PIPE);
+     }
+ 
+     /**
+      * Convert properties to a string representation.
+      * 
+      * @param toJoin A list of properties to convert
+      * @return the properties as a string, pipe delimited
+      */
+     public static String joinOnSemicolon(Map<String, String> toJoin)
+     {
+         return joinOnDelimiter(toJoin, SEMICOLON);
+     }
+ 
+     /**
+      * Convert properties to a string representation, based on the specified delimiter.
+      * 
+      * @param toJoin object to serialize as a string
+      * @param delimiter how to separate entries from each other
+      * @return the properties as a string, delimited by the above
+      */
+     public static String joinOnDelimiter(Map<String, String> toJoin, char delimiter)
+     {
+         StringBuilder buf = new StringBuilder();
+ 
+         for (Iterator<Map.Entry<String, String>> it = toJoin.entrySet().iterator(); it.hasNext();)
+         {
+             Map.Entry<String, String> e = it.next();
+             String key = e.getKey();
+             String value = e.getValue();
+             if (value.indexOf(delimiter) != -1)
+             {
+                 // CARGO-829: Delimiter in property values are escaped using the \ character.
+                 value = value.replace(String.valueOf(delimiter), "\\" + delimiter);
+             }
+             buf.append(key);
+             buf.append("=");
+             buf.append(value);
+             if (it.hasNext())
+             {
+                 buf.append(delimiter);
+             }
+         }
+ 
+         return buf.toString();
+     }
+ 
+     /**
+      * Sets a property value if the property is not null.
+      * 
+      * @param properties the properties object to store the property into
+      * @param property the property to set
+      * @param value the value to set
+      */
+     public static void setPropertyIfNotNull(Properties properties, String property, Object value)
+     {
+         if (value != null)
+         {
+             properties.setProperty(property, value.toString());
+         }
+     }
+ 
+     /**
+      * Escapes backslashes so that they can parse properly.
+      * 
+      * @param in - string with backslashes
+      * @return string with backslashes escaped, or null, if passed null
+      */
+     public static String escapeBackSlashesIfNotNull(String in)
+     {
+         if (in != null)
+         {
+             return in.replace("\\", "\\\\");
+         }
+         else
+         {
+             return null;
+         }
+     }
+ 
+     /**
+      * Returns a <code>Map&lt;String, String&gt;</code> out of a Java Properties object.
+      * 
+      * @param properties the properties object to convert
+      * @return Java Map corresponding to the Java Properties object.
+      */
+     public static Map<String, String> toMap(Properties properties)
+     {
+         Map<String, String> result = new HashMap<String, String>(properties.size());
+         for (Map.Entry<Object, Object> parameter : properties.entrySet())
+         {
+             String value = null;
+             if (parameter.getValue() != null)
+             {
+                 value = parameter.getValue().toString();
+             }
+             result.put(parameter.getKey().toString(), value);
+         }
+         return result;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-b/sources/source-6.html b/htmlReport/ns-b/sources/source-6.html new file mode 100644 index 0000000000..2baeeb36e0 --- /dev/null +++ b/htmlReport/ns-b/sources/source-6.html @@ -0,0 +1,387 @@ + + + + + + + + Coverage Report > ResourceUtils + + + + + + +
+ + +

Coverage Summary for Class: ResourceUtils (org.codehaus.cargo.container.internal.util)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResourceUtils + + 100% + + + (1/1) + + + + 18.2% + + + (2/11) + + + + 4.7% + + + (3/64) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2006 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.internal.util;
+ 
+ import java.io.BufferedReader;
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+ import java.io.OutputStream;
+ import java.io.UnsupportedEncodingException;
+ import java.net.URL;
+ import java.net.URLDecoder;
+ import java.nio.charset.Charset;
+ import java.nio.charset.StandardCharsets;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Utility class that provides a couple of methods for extracting files stored as resource in a JAR.
+  */
+ public final class ResourceUtils extends LoggedObject
+ {
+     /**
+      * Default file handler for the @link{ResourceUtils#copyResource(String, File)} and
+      * @link{ResourceUtils#copyResource(String, File, Map, Charset)} methods.
+      */
+     private static FileHandler defaultFileHandler = new DefaultFileHandler();
+ 
+     /**
+      * Class loader used for the <code>getResourceAsStream</code> calls.
+      */
+     private static ClassLoader resourceLoader = ResourceUtils.class.getClassLoader();
+ 
+     /**
+      * @return Class loader used for the <code>getResourceAsStream</code> calls.
+      */
+     public static ClassLoader getResourceLoader()
+     {
+         return ResourceUtils.resourceLoader;
+     }
+ 
+     /**
+      * @param resourceLoader Class loader used for the <code>getResourceAsStream</code> calls.
+      */
+     public static void setResourceLoader(ClassLoader resourceLoader)
+     {
+         ResourceUtils.resourceLoader = resourceLoader;
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * {@inheritDoc}
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         ResourceUtils.defaultFileHandler.setLogger(logger);
+     }
+ 
+     /**
+      * Copies a container resource from the JAR into the specified file.
+      * 
+      * @param resourceName The name of the resource
+      * @param destFile The file to which the contents of the resource should be copied
+      * @throws IOException If an I/O error occurs while copying the resource
+      */
+     public void copyResource(String resourceName, File destFile) throws IOException
+     {
+         copyResource(resourceName, destFile.getPath(), defaultFileHandler);
+     }
+ 
+     /**
+      * Copies a container resource from the JAR into the specified file using the specified file
+      * handler.
+      * 
+      * @param resourceName The name of the resource
+      * @param destFile The file to which the contents of the resource should be copied
+      * @param handler The file handler to use
+      * @throws IOException If an I/O error occurs while copying the resource
+      */
+     public void copyResource(String resourceName, String destFile, FileHandler handler)
+         throws IOException
+     {
+         InputStream in = ResourceUtils.resourceLoader.getResourceAsStream(resourceName);
+         if (in == null)
+         {
+             throw new IOException("Resource [" + resourceName
+                 + "] not found in resource loader " + ResourceUtils.resourceLoader);
+         }
+ 
+         try (OutputStream out = handler.getOutputStream(destFile))
+         {
+             byte[] buf = new byte[4096];
+             int numBytes;
+             while ((numBytes = in.read(buf)) > 0)
+             {
+                 out.write(buf, 0, numBytes);
+             }
+         }
+         finally
+         {
+             in.close();
+         }
+     }
+ 
+     /**
+      * Copies a container resource from the JAR into the specified file, thereby applying the
+      * specified filters.
+      * 
+      * @param resourceName The name of the resource, relative to the
+      * org.codehaus.cargo.container.internal.util package
+      * @param destFile The file to which the contents of the resource should be copied
+      * @param replacements The ordered list of replacements that should be applied while copying
+      * @param encoding The encoding that should be used when copying the resource. Use null for
+      * system default encoding
+      * @throws IOException If an I/O error occurs while copying the resource
+      */
+     public void copyResource(String resourceName, File destFile, Map<String, String> replacements,
+         Charset encoding) throws IOException
+     {
+         copyResource(resourceName, destFile.getPath(), defaultFileHandler, replacements, encoding);
+     }
+ 
+     /**
+      * Copies a container resource from the JAR into the specified file, using the specified file
+      * handler thereby applying the specified filters.
+      * 
+      * @param resourceName The name of the resource, relative to the
+      * org.codehaus.cargo.container.internal.util package
+      * @param destFile The file to which the contents of the resource should be copied
+      * @param handler The file handler to be used for file copy
+      * @param replacements The ordered list of replacements that should be applied while copying
+      * @param encoding The encoding that should be used when copying the resource. Use null for
+      * system default encoding
+      * @throws IOException If an I/O error occurs while copying the resource
+      */
+     public void copyResource(String resourceName, String destFile, FileHandler handler,
+         Map<String, String> replacements, Charset encoding) throws IOException
+     {
+         handler.writeTextFile(
+             destFile, readResource(resourceName, replacements, encoding), encoding);
+     }
+ 
+     /**
+      * Search for the given resource and return the directory or archive that contains it.
+      * 
+      * @param where Class where to look for the resource (its class loader and parent class loaders
+      * are used recursively for the lookup).
+      * @param resourceName The name of the resource
+      * @return The directory or archive containing the specified resource
+      */
+     public File getResourceLocation(Class where, String resourceName)
+     {
+         URL url = where.getResource(resourceName);
+         if (url == null)
+         {
+             throw new CargoException("Cannot find resource [" + resourceName + "]");
+         }
+ 
+         File file = null;
+         String urlString = url.toString();
+         if (urlString.startsWith("jar:file:"))
+         {
+             int pling = urlString.indexOf('!');
+             String jar = urlString.substring(9, pling);
+             // TODO: URLDecoder.decode(String, Charset) was introduced in Java 10,
+             //       simplify the below code when Codehaus Cargo is on Java 10+
+             try
+             {
+                 file = new File(URLDecoder.decode(jar, StandardCharsets.UTF_8.name()));
+             }
+             catch (UnsupportedEncodingException e)
+             {
+                 throw new IllegalStateException("UTF-8 encoding is missing", e);
+             }
+         }
+         else if (urlString.startsWith("file:"))
+         {
+             int tail = urlString.indexOf(resourceName);
+             String dir = urlString.substring(5, tail);
+             // TODO: URLDecoder.decode(String, Charset) was introduced in Java 10,
+             //       simplify the below code when Codehaus Cargo is on Java 10+
+             try
+             {
+                 file = new File(URLDecoder.decode(dir, StandardCharsets.UTF_8.name()));
+             }
+             catch (UnsupportedEncodingException e)
+             {
+                 throw new IllegalStateException("UTF-8 encoding is missing", e);
+             }
+         }
+ 
+         getLogger().debug("Location for [" + resourceName + "] is [" + file + "]",
+             this.getClass().getName());
+ 
+         return file;
+     }
+ 
+     /**
+      * Reads a container resource from the JAR, applies the specified filters and returns content
+      * as String.
+      * 
+      * @param resourceName The name of the resource, relative to the
+      * <code>org.codehaus.cargo.container.internal.util</code> package
+      * @param replacements The ordered list of replacements that should be applied while reading
+      * @param encoding The encoding that should be used when reading the resource. Use null for
+      * system default encoding
+      * @return Content of resource as String.
+      * @throws IOException If an I/O error occurs while reading the resource
+      */
+     public String readResource(String resourceName, Map<String, String> replacements,
+         Charset encoding) throws IOException
+     {
+         try (InputStream resource = ResourceUtils.resourceLoader.getResourceAsStream(resourceName))
+         {
+             if (resource == null)
+             {
+                 throw new CargoException("Resource [" + resourceName
+                     + "] not found in resource loader " + ResourceUtils.resourceLoader);
+             }
+ 
+             try (BufferedReader in = new BufferedReader(new InputStreamReader(resource, encoding)))
+             {
+                 String line;
+                 StringBuilder out = new StringBuilder();
+                 while ((line = in.readLine()) != null)
+                 {
+                     if (line.isEmpty())
+                     {
+                         out.append(FileHandler.NEW_LINE);
+                     }
+                     else
+                     {
+                         if (out.length() > 0)
+                         {
+                             out.append(FileHandler.NEW_LINE);
+                         }
+                         out.append(line);
+                     }
+                 }
+                 String output = out.toString();
+                 if (replacements != null)
+                 {
+                     for (Map.Entry<String, String> replacement : replacements.entrySet())
+                     {
+                         String replacementKey = "@" + replacement.getKey() + "@";
+                         output = output.replace(replacementKey, replacement.getValue());
+                     }
+                 }
+                 return output;
+             }
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-c/index.html b/htmlReport/ns-c/index.html new file mode 100644 index 0000000000..228fed3419 --- /dev/null +++ b/htmlReport/ns-c/index.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_BLOCK.html b/htmlReport/ns-c/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..c8d097b7e4 --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_BLOCK.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..131873d158 --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_CLASS.html b/htmlReport/ns-c/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..4481ae379d --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_CLASS.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..493b44214c --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_LINE.html b/htmlReport/ns-c/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..17a6e0e45b --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_LINE.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..1ec2cce5ae --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_METHOD.html b/htmlReport/ns-c/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..40012f906b --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_METHOD.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..441fb0e8d3 --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..83be47e2b9 --- /dev/null +++ b/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,143 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.packager + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.packager

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.packager + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-c/sources/source-1.html b/htmlReport/ns-c/sources/source-1.html new file mode 100644 index 0000000000..7bc495e302 --- /dev/null +++ b/htmlReport/ns-c/sources/source-1.html @@ -0,0 +1,215 @@ + + + + + + + + Coverage Report > PackagerType + + + + + + +
+ + +

Coverage Summary for Class: PackagerType (org.codehaus.cargo.container.packager)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
PackagerType + + 100% + + + (1/1) + + + + 57.1% + + + (4/7) + + + + 62.5% + + + (10/16) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.packager;
+ 
+ /**
+  * Types of {@link org.codehaus.cargo.container.packager.Packager}s. There's currently one type
+  * only: "directory".
+  */
+ public class PackagerType
+ {
+     /**
+      * Represents a directory packager, ie a packager that creates a package in a given directory.
+      */
+     public static final PackagerType DIRECTORY = new PackagerType("directory");
+ 
+     /**
+      * Packager type.
+      */
+     private String type;
+ 
+     /**
+      * @param type the internal representation of the packager type. For example: "directory".
+      */
+     public PackagerType(String type)
+     {
+         this.type = type;
+     }
+ 
+     /**
+      * Transform a type represented as a string into a {@link PackagerType} object.
+      * 
+      * @param typeAsString the string to transform
+      * @return the {@link PackagerType} object
+      */
+     public static PackagerType toType(String typeAsString)
+     {
+         PackagerType type;
+         if (typeAsString.equalsIgnoreCase(DIRECTORY.getType()))
+         {
+             type = DIRECTORY;
+         }
+         else
+         {
+             type = new PackagerType(typeAsString);
+         }
+ 
+         return type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object object)
+     {
+         boolean result = false;
+         if (object != null && object instanceof PackagerType)
+         {
+             PackagerType type = (PackagerType) object;
+             if (type.getType().equals(getType()))
+             {
+                 result = true;
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return this.type.hashCode();
+     }
+ 
+     /**
+      * @return the packager's type as a string
+      */
+     public String getType()
+     {
+         return this.type;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return getType();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-c/sources/source-2.html b/htmlReport/ns-c/sources/source-2.html new file mode 100644 index 0000000000..20c8c9597c --- /dev/null +++ b/htmlReport/ns-c/sources/source-2.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage Report > Packager + + + + + + +
+ + +

Coverage Summary for Class: Packager (org.codehaus.cargo.container.packager)

+ + + + + + + + + +
Class
Packager
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.packager;
+ 
+ import org.codehaus.cargo.container.InstalledLocalContainer;
+ 
+ /**
+  * Gathers an installed container distribution and a local configuration in a single location. There
+  * can be several packagers like a directory packager which packeg them in a given directory on the
+  * file system, a ZIP packager which does the same but packaged as a ZIP file, etc.
+  */
+ public interface Packager
+ {
+     /**
+      * Package an installed container distribution and its local configuration in a single location.
+      * 
+      * @param container the installed container to package
+      */
+     void packageContainer(InstalledLocalContainer container);
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/index.html b/htmlReport/ns-d/index.html new file mode 100644 index 0000000000..5421b8617c --- /dev/null +++ b/htmlReport/ns-d/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_BLOCK.html b/htmlReport/ns-d/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..17988eed25 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..ba1a8cf559 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_CLASS.html b/htmlReport/ns-d/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..02490014c0 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..619c4f98cc --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_LINE.html b/htmlReport/ns-d/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..628f1179ae --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..8fb985a233 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_METHOD.html b/htmlReport/ns-d/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..af56015ec6 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..7a697c8d89 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..c8014b2474 --- /dev/null +++ b/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.property + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.property

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.property + + 100% + + + (5/5) + + + + 83.7% + + + (36/43) + + + + 87.1% + + + (169/194) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-1.html b/htmlReport/ns-d/sources/source-1.html new file mode 100644 index 0000000000..dfb5c8c589 --- /dev/null +++ b/htmlReport/ns-d/sources/source-1.html @@ -0,0 +1,293 @@ + + + + + + + + Coverage Report > DataSourceConverter + + + + + + +
+ + +

Coverage Summary for Class: DataSourceConverter (org.codehaus.cargo.container.property)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
DataSourceConverter + + 100% + + + (1/1) + + + + 75% + + + (6/8) + + + + 77.8% + + + (42/54) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ import java.util.Properties;
+ 
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.internal.util.PropertyUtils;
+ 
+ /**
+  * A DataSource is a representation of an database pool bound to JNDI. This converter will take a
+  * property and convert it to a DataSource and visa versa.
+  */
+ public class DataSourceConverter
+ {
+ 
+     /**
+      * Construct a DataSource from a single String. Note that database driver properties can be
+      * nested as long as they are semicolon delimited Example:
+      * <code>CreateDatabase=create;DatabaseName=TEST</code>.
+      * 
+      * @param datasourceInformation A string, really a list of properties, representing a datasource
+      * @return DataSource representing the string
+      * @see org.codehaus.cargo.container.internal.util.PropertyUtils#splitPropertiesOnPipe(String)
+      */
+     public DataSource fromPropertyString(String datasourceInformation)
+     {
+         return fromProperties(PropertyUtils.splitPropertiesOnPipe(PropertyUtils
+             .escapeBackSlashesIfNotNull(datasourceInformation)));
+     }
+ 
+     /**
+      * Construct a DataSource from a list of properties.
+      * 
+      * @param properties A list of properties representing this datasource
+      * @return DataSource representing the properties
+      * @see PropertyUtils#splitPropertiesOnPipe(String)
+      */
+     public DataSource fromProperties(Properties properties)
+     {
+         String jndiLocation = properties.getProperty(DatasourcePropertySet.JNDI_LOCATION);
+         String connectionType = properties.getProperty(DatasourcePropertySet.CONNECTION_TYPE);
+         TransactionSupport transactionSupport = TransactionSupport.valueOf(
+                 properties.getProperty(DatasourcePropertySet.TRANSACTION_SUPPORT));
+         String driverClass = properties.getProperty(DatasourcePropertySet.DRIVER_CLASS);
+         String url = properties.getProperty(DatasourcePropertySet.URL);
+         String username = properties.getProperty(DatasourcePropertySet.USERNAME);
+         String password = properties.getProperty(DatasourcePropertySet.PASSWORD);
+         String id = properties.getProperty(DatasourcePropertySet.ID);
+ 
+         String driverPropertiesAsASemicolonDelimitedString =
+             properties.getProperty(DatasourcePropertySet.CONNECTION_PROPERTIES);
+         Properties connectionProperties = getDriverPropertiesFromString(
+                 driverPropertiesAsASemicolonDelimitedString);
+ 
+         DataSource data = new DataSource(jndiLocation, connectionType, transactionSupport,
+                 driverClass, url, username, password, id, connectionProperties);
+         return data;
+     }
+ 
+     /**
+      * tests to see if the value is null before attempting to extract the database properties from
+      * it.
+      * 
+      * @param property to parse, semicolon delimited
+      * @return parsed or empty properties.
+      */
+     private Properties getDriverPropertiesFromString(String property)
+     {
+         if (property != null && !property.trim().isEmpty())
+         {
+             return PropertyUtils.splitPropertiesOnSemicolon(property);
+         }
+         else
+         {
+             return new Properties();
+         }
+     }
+ 
+     /**
+      * Get a string representation of this datasource.
+      * 
+      * @param data DataSource to serialize into a string.
+      * @return a string representation
+      */
+     public String toPropertyString(DataSource data)
+     {
+         Properties properties = toProperties(data);
+         return PropertyUtils.joinOnPipe(PropertyUtils.toMap(properties));
+     }
+ 
+     /**
+      * Get a properties object containing all of the members of this datasource object. Note that
+      * driver properties will be nested and delimited by a semicolon.
+      * 
+      * @param data DataSource to serialize into properties.
+      * @return a properties object corresponding to this datasource
+      */
+     public Properties toProperties(DataSource data)
+     {
+         Properties properties = new Properties();
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.JNDI_LOCATION, data
+             .getJndiLocation());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.CONNECTION_TYPE,
+             data.getConnectionType());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.TRANSACTION_SUPPORT,
+             data.getTransactionSupport());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.DRIVER_CLASS, data
+             .getDriverClass());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.URL, data.getUrl());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.USERNAME, data
+             .getUsername());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.PASSWORD, data
+             .getPassword());
+         PropertyUtils.setPropertyIfNotNull(properties, DatasourcePropertySet.ID, data.getId());
+         PropertyUtils.setPropertyIfNotNull(properties,
+             DatasourcePropertySet.CONNECTION_PROPERTIES,
+             getConnectionPropertiesAsASemicolonDelimitedString(data));
+         return properties;
+     }
+ 
+     /**
+      * tests to see if the value is null before attempting to join the database properties on a
+      * semicolon.
+      * 
+      * @param data DataSource to parse connection properties from.
+      * @return property string delimited by semicolon, or null, if they cannot be parsed because the
+      * input properties weren't set or empty
+      */
+     public String getConnectionPropertiesAsASemicolonDelimitedString(DataSource data)
+     {
+         if (data.getConnectionProperties() != null && !data.getConnectionProperties().isEmpty())
+         {
+             return PropertyUtils.joinOnSemicolon(PropertyUtils.toMap(
+                 data.getConnectionProperties()));
+         }
+         else
+         {
+             return null;
+         }
+     }
+ 
+     /**
+      * This method converts the DataSource to a Resource.
+      * 
+      * @param ds DataSource to convert to a resource.
+      * @param resourceType the type of the Resource to convert to. ex.
+      * <code>javax.sql.DataSource</code>
+      * @param driverParameter the name of the parameter to store {@link DataSource#getDriverClass()
+      * driverClass}.
+      * @return a Resource representing the assignable fields of the DataSource.
+      */
+     public Resource convertToResource(DataSource ds, String resourceType, String driverParameter)
+     {
+         Properties parameters = new Properties();
+         if (ds.getUrl() != null)
+         {
+             PropertyUtils.setPropertyIfNotNull(parameters, "url", ds.getUrl());
+         }
+         PropertyUtils.setPropertyIfNotNull(parameters, "user", ds.getUsername());
+         PropertyUtils.setPropertyIfNotNull(parameters, "password", ds.getPassword());
+         PropertyUtils.setPropertyIfNotNull(parameters, driverParameter, ds.getDriverClass());
+ 
+         parameters.putAll(ds.getConnectionProperties());
+ 
+         Resource resource = new Resource(ds.getJndiLocation(), resourceType);
+         resource.setParameters(PropertyUtils.toMap(parameters));
+         return resource;
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-2.html b/htmlReport/ns-d/sources/source-2.html new file mode 100644 index 0000000000..ad25e8a147 --- /dev/null +++ b/htmlReport/ns-d/sources/source-2.html @@ -0,0 +1,204 @@ + + + + + + + + Coverage Report > LoggingLevel + + + + + + +
+ + +

Coverage Summary for Class: LoggingLevel (org.codehaus.cargo.container.property)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
LoggingLevel + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 54.5% + + + (6/11) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ import java.util.Locale;
+ 
+ /**
+  * Supported logging levels for {@link GeneralPropertySet#LOGGING}.
+  */
+ public enum LoggingLevel
+ {
+ 
+     /**
+      * High amount of log output, e.g. debug logging.
+      */
+     HIGH,
+ 
+     /**
+      * Medium amount of log output, e.g. info and warn logging.
+      */
+     MEDIUM,
+ 
+     /**
+      * Low amount of log output, e.g. error logging only.
+      */
+     LOW;
+ 
+     /**
+      * Gets the enum constant matching the specified logging level. Note that unlike
+      * {@link #valueOf(String)} this method matches the level name case-insensitively.
+      * 
+      * @param level The logging level.
+      * @return The corrensponding enum constant, never {@code null}.
+      * @throws IllegalArgumentException If the specified logging level is invalid.
+      */
+     public static LoggingLevel toLevel(String level)
+     {
+         for (LoggingLevel ll : values())
+         {
+             if (ll.equalsLevel(level))
+             {
+                 return ll;
+             }
+         }
+         throw new IllegalArgumentException("unknown logging level " + level);
+     }
+ 
+     /**
+      * Tests whether the specified logging level equals this enum constant.
+      * 
+      * @param level The logging level, may be {@code null}.
+      * @return {@code true} if the specified logging level equals this enum constant, {@code false}
+      *         otherwise.
+      */
+     public boolean equalsLevel(String level)
+     {
+         return name().equalsIgnoreCase(level);
+     }
+ 
+     /**
+      * Gets the string value of this logging level for use as a value of the
+      * {@link GeneralPropertySet#LOGGING} property.
+      * 
+      * @return The string value of this logging level.
+      */
+     public String getLevel()
+     {
+         return toString();
+     }
+ 
+     /**
+      * Gets the string value of this logging level for use as a value of the
+      * {@link GeneralPropertySet#LOGGING} property.
+      * 
+      * @return The string value of this logging level.
+      */
+     @Override
+     public String toString()
+     {
+         return name().toLowerCase(Locale.ENGLISH);
+     }
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-3.html b/htmlReport/ns-d/sources/source-3.html new file mode 100644 index 0000000000..c001f59b2f --- /dev/null +++ b/htmlReport/ns-d/sources/source-3.html @@ -0,0 +1,308 @@ + + + + + + + + Coverage Report > ResourceConverter + + + + + + +
+ + +

Coverage Summary for Class: ResourceConverter (org.codehaus.cargo.container.property)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
ResourceConverter + + 100% + + + (1/1) + + + + 88.9% + + + (8/9) + + + + 95.9% + + + (47/49) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ import java.util.Arrays;
+ import java.util.Properties;
+ 
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.internal.util.PropertyUtils;
+ 
+ /**
+  * A Resource is a representation of an object bound to JNDI. This converter will take a property
+  * and convert it to a Resource and visa versa.
+  */
+ public class ResourceConverter
+ {
+ 
+     /**
+      * Construct a Resource from a single String. Note that parameters can be nested as long as they
+      * are semicolon delimited Example: <code>CreateDatabase=create;DatabaseName=TEST</code>.
+      * 
+      * @param resourceInformation A string, really a list of properties, representing a Resource
+      * @return Resource representing the string.
+      * @see org.codehaus.cargo.container.internal.util.PropertyUtils#splitPropertiesOnPipe(String)
+      */
+     public Resource fromPropertyString(String resourceInformation)
+     {
+         return fromProperties(PropertyUtils.splitPropertiesOnPipe(PropertyUtils
+             .escapeBackSlashesIfNotNull(resourceInformation)));
+     }
+ 
+     /**
+      * Construct a Resource from a list of properties.
+      * 
+      * @param properties A list of properties representing this Resource
+      * @return Resource representing the properties.
+      * @see PropertyUtils#splitPropertiesOnPipe(String)
+      */
+     public Resource fromProperties(Properties properties)
+     {
+         String name = properties.getProperty(ResourcePropertySet.RESOURCE_NAME);
+         String type = properties.getProperty(ResourcePropertySet.RESOURCE_TYPE);
+         Resource resource = new Resource(name, type);
+ 
+         if (properties.containsKey(ResourcePropertySet.RESOURCE_CLASS))
+         {
+             String className = properties.getProperty(ResourcePropertySet.RESOURCE_CLASS);
+             resource.setClassName(className);
+         }
+ 
+         if (properties.containsKey(ResourcePropertySet.RESOURCE_ID))
+         {
+             String id = properties.getProperty(ResourcePropertySet.RESOURCE_ID);
+             resource.setId(id);
+         }
+         else
+         {
+             resource.setId(createIdFromJndiLocationIfNotNull(name));
+         }
+ 
+         String parametersAsASemicolonDelimitedString =
+             properties.getProperty(ResourcePropertySet.PARAMETERS);
+         resource.setParameters(PropertyUtils.toMap(getParametersFromString(
+             PropertyUtils.escapeBackSlashesIfNotNull(parametersAsASemicolonDelimitedString))));
+         return resource;
+     }
+ 
+     /**
+      * tests to see if the value is null before attempting to extract the parameters from it.
+      * 
+      * @param property to parse, semicolon delimited
+      * @return parsed or empty properties.
+      */
+     private Properties getParametersFromString(String property)
+     {
+         if (property != null && !property.trim().isEmpty())
+         {
+             return PropertyUtils.splitPropertiesOnSemicolon(property);
+         }
+         else
+         {
+             return new Properties();
+         }
+     }
+ 
+     /**
+      * Get a string representation of this Resource.
+      * 
+      * @param data the Resource we are serializing
+      * @return a string representation
+      */
+     public String toPropertyString(Resource data)
+     {
+         Properties properties = toProperties(data);
+         return PropertyUtils.joinOnPipe(PropertyUtils.toMap(properties));
+     }
+ 
+     /**
+      * Get a properties object containing all of the members of this Resource object. Note that
+      * driver properties will be nested and delimited by a semicolon.
+      * 
+      * @param data the Resource we are serializing
+      * @return a properties object corresponding to this Resource
+      */
+     public Properties toProperties(Resource data)
+     {
+         Properties properties = new Properties();
+         PropertyUtils.setPropertyIfNotNull(properties, ResourcePropertySet.RESOURCE_NAME, data
+             .getName());
+         PropertyUtils.setPropertyIfNotNull(properties, ResourcePropertySet.RESOURCE_TYPE, data
+             .getType());
+ 
+         PropertyUtils.setPropertyIfNotNull(properties, ResourcePropertySet.RESOURCE_CLASS, data
+             .getClassName());
+         PropertyUtils.setPropertyIfNotNull(properties, ResourcePropertySet.RESOURCE_ID, data
+             .getId());
+         PropertyUtils.setPropertyIfNotNull(properties, ResourcePropertySet.PARAMETERS,
+             getParametersAsASemicolonDelimitedString(data));
+         return properties;
+     }
+ 
+     /**
+      * tests to see if the value is null before attempting to join the database properties on a
+      * semicolon.
+      * 
+      * @param data the Resource we are serializing
+      * @return property string delimited by semicolon, or null, if they cannot be parsed because the
+      * input properties weren't set or empty
+      */
+     public String getParametersAsASemicolonDelimitedString(Resource data)
+     {
+         if (!data.getParameterNames().isEmpty())
+         {
+             return PropertyUtils.joinOnSemicolon(data.getParameters());
+         }
+         else
+         {
+             return null;
+         }
+     }
+ 
+     /**
+      * return a string that can be used to name this configuration or null, if jndiLocation was not
+      * specified.
+      * 
+      * @param jndiLocation used to construct the id
+      * @return a string that can be used to name this configuration or null, if jndiLocation was not
+      * specified.
+      * @see org.codehaus.cargo.container.configuration.entry.Resource#createIdFromJndiLocation(String)
+      */
+     private static String createIdFromJndiLocationIfNotNull(String jndiLocation)
+     {
+         String id = null;
+         if (jndiLocation != null)
+         {
+             id = createIdFromJndiLocation(jndiLocation);
+         }
+         return id;
+     }
+ 
+     /**
+      * Get a string name for the configuration of this resource. This should be XML and filesystem
+      * friendly. For example, the String returned will have no slashes or punctuation, and be as
+      * short as possible.
+      * 
+      * @param jndiLocation used to construct the id
+      * @return a string that can be used to name this configuration
+      */
+     protected static String createIdFromJndiLocation(String jndiLocation)
+     {
+         // using indexOf to avoid introducing a regex package dependency. when we move
+         // to jdk 5+, this can be more easily performed with regex.
+ 
+         int[] delimeters =
+             new int[] {
+                 // jndi locations are organized by dots or slashes. In JBoss, it could have a colon
+                 jndiLocation.lastIndexOf('/'), jndiLocation.lastIndexOf('.'),
+                 jndiLocation.lastIndexOf(':')};
+         Arrays.sort(delimeters);
+ 
+         int highestIndex = delimeters[2];
+ 
+         // highestIndex could be -1, or a location of a character we don't want. In either case, we
+         // want to increase it by one
+         return jndiLocation.substring(highestIndex + 1);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-4.html b/htmlReport/ns-d/sources/source-4.html new file mode 100644 index 0000000000..ff4921d9c7 --- /dev/null +++ b/htmlReport/ns-d/sources/source-4.html @@ -0,0 +1,220 @@ + + + + + + + + Coverage Report > TransactionSupport + + + + + + +
+ + +

Coverage Summary for Class: TransactionSupport (org.codehaus.cargo.container.property)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
TransactionSupport + + 100% + + + (1/1) + + + + 83.3% + + + (5/6) + + + + 86.7% + + + (13/15) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Represents the transactional support of a resource, such as a <code>XA_TRANSACTION</code>.
+  */
+ public final class TransactionSupport
+ {
+ 
+     /**
+      * Indicates lack of transaction support.
+      */
+     public static final TransactionSupport NO_TRANSACTION =
+         new TransactionSupport("NO_TRANSACTION");
+ 
+     /**
+      * Indicates support of container-managed transactions.
+      */
+     public static final TransactionSupport LOCAL_TRANSACTION =
+         new TransactionSupport("LOCAL_TRANSACTION");
+ 
+     /**
+      * Indicates support of distributed transactions using XA protocol.
+      */
+     public static final TransactionSupport XA_TRANSACTION =
+         new TransactionSupport("XA_TRANSACTION");
+ 
+     /**
+      * string representation of the transaction support this object represents.
+      */
+     private final String transactionSupport;
+ 
+     /**
+      * This class is a JDK 1.4 typesafe enum. That is why this constructor is private.
+      * 
+      * @param transactionSupport transaction support designated.
+      */
+     private TransactionSupport(String transactionSupport)
+     {
+         this.transactionSupport = transactionSupport;
+     }
+ 
+     /**
+      * Convert string representation of transaction support to appropriate value.
+      * 
+      * @param transactionSupport String representation of transaction support.
+      * @return Appropriate TransactionSupport instance.
+      */
+     public static TransactionSupport valueOf(String transactionSupport)
+     {
+         if (TransactionSupport.XA_TRANSACTION.toString().equals(transactionSupport))
+         {
+             return TransactionSupport.XA_TRANSACTION;
+         }
+         else if (TransactionSupport.LOCAL_TRANSACTION.toString().equals(transactionSupport))
+         {
+             return TransactionSupport.LOCAL_TRANSACTION;
+         }
+         else
+         {
+             return TransactionSupport.NO_TRANSACTION;
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String toString()
+     {
+         return transactionSupport;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object obj)
+     {
+         if (obj != null && obj instanceof TransactionSupport)
+         {
+             return toString().equals(((TransactionSupport) obj).toString());
+         }
+         else
+         {
+             return false;
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return transactionSupport.hashCode();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-5.html b/htmlReport/ns-d/sources/source-5.html new file mode 100644 index 0000000000..9e2e3c7c5f --- /dev/null +++ b/htmlReport/ns-d/sources/source-5.html @@ -0,0 +1,388 @@ + + + + + + + + Coverage Report > User + + + + + + +
+ + +

Coverage Summary for Class: User (org.codehaus.cargo.container.property)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
User + + 100% + + + (1/1) + + + + 92.9% + + + (13/14) + + + + 93.8% + + + (61/65) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.NoSuchElementException;
+ import java.util.StringTokenizer;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ 
+ /**
+  * Represent an authenticating user for the Servlet container.
+  */
+ public final class User
+ {
+     /**
+      * @see #setName(String)
+      */
+     private String name;
+ 
+     /**
+      * @see #setPassword(String)
+      */
+     private String password;
+ 
+     /**
+      * @see #addRoles(java.util.List)
+      */
+     private List<String> roles = new ArrayList<String>();
+ 
+     /**
+      * @param name the user name
+      */
+     public void setName(String name)
+     {
+         this.name = name;
+     }
+ 
+     /**
+      * @return the user name
+      */
+     public String getName()
+     {
+         return this.name;
+     }
+ 
+     /**
+      * Sets the authenticated user password.
+      * 
+      * @param password the user password
+      */
+     public void setPassword(String password)
+     {
+         this.password = password;
+     }
+ 
+     /**
+      * @return the user password
+      */
+     public String getPassword()
+     {
+         return this.password;
+     }
+ 
+     /**
+      * @param role a role attached to this user
+      */
+     public void addRole(String role)
+     {
+         this.roles.add(role);
+     }
+ 
+     /**
+      * @param roles a list of roles attached to this user
+      */
+     public void addRoles(List<String> roles)
+     {
+         this.roles.addAll(roles);
+     }
+ 
+     /**
+      * @return the list of roles attached to this user
+      */
+     public List<String> getRoles()
+     {
+         return this.roles;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean equals(Object userObject)
+     {
+         boolean result = false;
+ 
+         if (userObject != null && userObject instanceof User)
+         {
+             User user = (User) userObject;
+             if (user.getName().equals(getName()) && user.getPassword().equals(getPassword()))
+             {
+                 result = user.getRoles().equals(getRoles());
+             }
+         }
+ 
+         return result;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public int hashCode()
+     {
+         return (getName() + getPassword()).hashCode();
+     }
+ 
+     /**
+      * Parse a string representing the users (see {@link ServletPropertySet#USERS}.
+      * 
+      * @param usersAsString the string representing the users
+      * @return a list of {@link User} objects
+      */
+     public static List<User> parseUsers(String usersAsString)
+     {
+         List<User> users = new ArrayList<User>();
+ 
+         if (usersAsString != null)
+         {
+             // The format to parse is "name1:pwd1:role11,...,role1N|name2:pwd2:role21,...,role2N|.."
+             StringTokenizer userTokens = new StringTokenizer(usersAsString, "|");
+             while (userTokens.hasMoreTokens())
+             {
+                 users.add(parseUser(userTokens.nextToken()));
+             }
+         }
+ 
+         return users;
+     }
+ 
+     /**
+      * Parse a user defined in the format "name:pwd:role1,...roleN".
+      * 
+      * @param userAsString the user defines as a string
+      * @return the parsed user
+      */
+     protected static User parseUser(String userAsString)
+     {
+         if (userAsString.isEmpty())
+         {
+             throw new ContainerException("User property has empty value.");
+         }
+ 
+         User user = new User();
+ 
+         StringTokenizer fieldTokens = new StringTokenizer(userAsString, ":", true);
+ 
+         try
+         {
+             String userName = fieldTokens.nextToken().trim();
+             user.setName(userName);
+ 
+             // Skip next delimiter
+             fieldTokens.nextToken();
+ 
+             String password = fieldTokens.nextToken();
+             if (":".equals(password))
+             {
+                 user.setPassword("");
+             }
+             else
+             {
+                 user.setPassword(password);
+ 
+                 // Consume next token if exists
+                 if (fieldTokens.hasMoreTokens())
+                 {
+                     fieldTokens.nextToken();
+                 }
+             }
+ 
+             if (fieldTokens.hasMoreTokens())
+             {
+                 String roles = fieldTokens.nextToken();
+                 if (!":".equals(roles))
+                 {
+                     user.addRoles(parseRoles(roles));
+                 }
+                 else
+                 {
+                     throw new ContainerException("Invalid format for [" + userAsString + "]");
+                 }
+             }
+         }
+         catch (NoSuchElementException exception)
+         {
+             throw new ContainerException("Invalid format for [" + userAsString + "]");
+         }
+ 
+         if (fieldTokens.hasMoreTokens())
+         {
+             // We don't expect any more tokens
+             throw new ContainerException("Invalid format for [" + userAsString + "]");
+         }
+ 
+         return user;
+     }
+ 
+     /**
+      * Parse roles defined as a list in the format "role1,role2,...,roleN".
+      * 
+      * @param rolesAsString the roles defined as a string
+      * @return the parsed list of roles
+      */
+     protected static List<String> parseRoles(String rolesAsString)
+     {
+         List<String> roles = new ArrayList<String>();
+ 
+         StringTokenizer roleTokens = new StringTokenizer(rolesAsString, ",");
+         while (roleTokens.hasMoreTokens())
+         {
+             String roleToken = roleTokens.nextToken();
+             roles.add(roleToken);
+         }
+ 
+         return roles;
+     }
+ 
+     /**
+      * Create a user map indexed on the roles.
+      * 
+      * @param users list of {@link User} for which to extract roles from
+      * @return a map of roles containing users
+      */
+     public static Map<String, List<User>> createRoleMap(List<User> users)
+     {
+         Map<String, List<User>> roles = new HashMap<String, List<User>>();
+ 
+         for (User user : users)
+         {
+             for (String role : user.getRoles())
+             {
+                 List<User> usersForRole;
+                 if (roles.containsKey(role))
+                 {
+                     usersForRole = roles.get(role);
+                 }
+                 else
+                 {
+                     usersForRole = new ArrayList<User>();
+                 }
+ 
+                 if (!usersForRole.contains(user))
+                 {
+                     usersForRole.add(user);
+                 }
+ 
+                 roles.put(role, usersForRole);
+             }
+         }
+ 
+         return roles;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-6.html b/htmlReport/ns-d/sources/source-6.html new file mode 100644 index 0000000000..e336d7c424 --- /dev/null +++ b/htmlReport/ns-d/sources/source-6.html @@ -0,0 +1,154 @@ + + + + + + + + Coverage Report > DatasourcePropertySet + + + + + + +
+ + +

Coverage Summary for Class: DatasourcePropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
DatasourcePropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Gathers all data source properties valid for all types of containers.
+  */
+ public interface DatasourcePropertySet
+ {
+     /**
+      * A property to encapsulate all the other datasource properties. This is to get around cargo
+      * only passing strings around, instead of objects.<br>
+      * <b>Important</b>: Please <u>only</u> use this as a setter, as the datasources can also be
+      * set using the <code>addDataSource</code> method.
+      * @see org.codehaus.cargo.container.configuration.LocalConfiguration#getDataSources()
+      */
+     String DATASOURCE = "cargo.datasource.datasource";
+ 
+     /**
+      * The JNDI location that this datasource should be bound do (in the config file). Note that
+      * many application servers may prepend a context (typically <code>java:comp/env</code>) to this
+      * context. <br>
+      */
+     String JNDI_LOCATION = "cargo.datasource.jndi";
+ 
+     /**
+      * The type of the data source (typically <code>javax.sql.XADataSource</code>,
+      * <code>javax.sql.ConnectionPoolDataSource</code> or <code>javax.sql.DataSource</code>). <br>
+      */
+     String CONNECTION_TYPE = "cargo.datasource.type";
+ 
+     /**
+      * The transaction support of the data source. One of <code>NO_TRANSACTION</code>,
+      * <code>LOCAL_TRANSACTION</code> or <code>XA_TRANSACTION</code> <br>
+      */
+     String TRANSACTION_SUPPORT = "cargo.datasource.transactionsupport";
+ 
+     /**
+      * The class name of the Driver or XADataSource implementation clas. Example:
+      * <code>org.hsqldb.jdbcDriver</code>. <br>
+      */
+     String DRIVER_CLASS = "cargo.datasource.driver";
+ 
+     /**
+      * The url to connect to the database. Example: <code>jdbc:hsqldb:database/jiradb</code>. The
+      */
+     String URL = "cargo.datasource.url";
+ 
+     /**
+      * The username to use when connecting to the database. <br>
+      */
+     String USERNAME = "cargo.datasource.username";
+ 
+     /**
+      * The password to use when connecting to the database. <br>
+      */
+     String PASSWORD = "cargo.datasource.password";
+ 
+     /**
+      * Unique id to use in configuration files. <br>
+      */
+     String ID = "cargo.datasource.id";
+ 
+     /**
+      * Extra properties passed to the JDBC driver or datasource implementation. <br>
+      */
+     String CONNECTION_PROPERTIES = "cargo.datasource.properties";
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-7.html b/htmlReport/ns-d/sources/source-7.html new file mode 100644 index 0000000000..3a368ca7f7 --- /dev/null +++ b/htmlReport/ns-d/sources/source-7.html @@ -0,0 +1,156 @@ + + + + + + + + Coverage Report > GeneralPropertySet + + + + + + +
+ + +

Coverage Summary for Class: GeneralPropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
GeneralPropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Gathers all general container properties valid for all types of containers.
+  */
+ public interface GeneralPropertySet
+ {
+     /**
+      * Protocol on which the container is listening to.
+      */
+     String PROTOCOL = "cargo.protocol";
+ 
+     /**
+      * Hostname on which the container is listening to.<br><br>
+      * Note: In order to listen to all IP addresses, you can set this to <code>0.0.0.0</code>,
+      * in that case the container will be set up to use that address but the Cargo ping component
+      * will still ping on <code>localhost</code>.
+      */
+     String HOSTNAME = "cargo.hostname";
+ 
+     /**
+      * Logging level for logging container information.
+      * 
+      * @see LoggingLevel
+      */
+     String LOGGING = "cargo.logging";
+ 
+     /**
+      * JVM args to be used when starting/stopping containers (ex: <code>-Xmx500m</code>).
+      */
+     String JVMARGS = "cargo.jvmargs";
+ 
+     /**
+      * JVM args to be used when starting containers
+      */
+     String START_JVMARGS = "cargo.start.jvmargs";
+ 
+     /**
+      * Runtime args to be used when starting/stopping containers (ex: <code>-userThreads</code>).
+      */
+     String RUNTIME_ARGS = "cargo.runtime.args";
+ 
+     /**
+      * The port to use when communicating with this server, for example to start and stop it.
+      */
+     String RMI_PORT = "cargo.rmi.port";
+ 
+     /**
+      * The location of the jvm to use when starting/stopping containers.
+      */
+     String JAVA_HOME = "cargo.java.home";
+ 
+     /**
+      * Specify if the process should run spawned; i.e. outlive CARGO's process and that the started
+      * container keeps running even after CARGO itself has terminated.
+      */
+     String SPAWN_PROCESS = "cargo.process.spawn";
+ 
+     /**
+      * Specify if CARGO's configuration generator for standalone containers should ignore when a
+      * property cannot be replaced because it does not exist in the source file.
+      */
+     String IGNORE_NON_EXISTING_PROPERTIES = "cargo.standalone.ignoreNonExistingProperties";
+ 
+     /**
+      * The port offset to apply to the container ports.
+      */
+     String PORT_OFFSET = "cargo.port.offset";
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-8.html b/htmlReport/ns-d/sources/source-8.html new file mode 100644 index 0000000000..a11db69bae --- /dev/null +++ b/htmlReport/ns-d/sources/source-8.html @@ -0,0 +1,133 @@ + + + + + + + + Coverage Report > ResourcePropertySet + + + + + + +
+ + +

Coverage Summary for Class: ResourcePropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
ResourcePropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Gathers all resource properties valid for all types of containers.
+  */
+ public interface ResourcePropertySet
+ {
+     /**
+      * A property to encapsulate all the other resource properties. This is to get around cargo only
+      * passing strings around, instead of objects.<br>
+      * <b>Important</b>: Please <u>only</u> use this as a setter, as the resources can also be set
+      * using the <code>addResource</code> method.
+      * @see org.codehaus.cargo.container.configuration.LocalConfiguration#getResources()
+      */
+     String RESOURCE = "cargo.resource.resource";
+ 
+     /**
+      * The JNDI location that this datasource should be bound do (in the config file). Note that
+      * many application servers may prepend a context (typically <code>java:comp/env</code>) to this
+      * context. <br>
+      */
+     String RESOURCE_NAME = "cargo.resource.name";
+ 
+     /**
+      * The type of the resource (ex. <code>javax.sql.XADataSource</code>,
+      * <code>javax.sql.ConnectionPoolDataSource</code>, etc.. <br>
+      */
+     String RESOURCE_TYPE = "cargo.resource.type";
+ 
+     /**
+      * The class name of the Resource implementation class. Example:
+      * <code>org.apache.derby.jdbc.EmbeddedXADataSource</code>. <br>
+      */
+     String RESOURCE_CLASS = "cargo.resource.class";
+ 
+     /**
+      * Unique id to use in configuration files. <br>
+      */
+     String RESOURCE_ID = "cargo.resource.id";
+ 
+     /**
+      * Parameters passed to the implementation class. <br>
+      */
+     String PARAMETERS = "cargo.resource.parameters";
+ 
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-9.html b/htmlReport/ns-d/sources/source-9.html new file mode 100644 index 0000000000..cc050c0bf0 --- /dev/null +++ b/htmlReport/ns-d/sources/source-9.html @@ -0,0 +1,114 @@ + + + + + + + + Coverage Report > RemotePropertySet + + + + + + +
+ + +

Coverage Summary for Class: RemotePropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
RemotePropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Gathers all general container properties valid for all types of remote containers.
+  */
+ public interface RemotePropertySet
+ {
+     /**
+      * URI to use when manipulating a remote container.
+      */
+     String URI = "cargo.remote.uri";
+ 
+     /**
+      * Username to use to authenticate against a remote container (when deploying for example).
+      */
+     String USERNAME = "cargo.remote.username";
+ 
+     /**
+      * Password to use to authenticate against a remote container (when deploying for example).
+      */
+     String PASSWORD = "cargo.remote.password";
+ 
+     /**
+      * Timeout used in remote deployments (in milliseconds).
+      */
+     String TIMEOUT = "cargo.remote.timeout";
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-a.html b/htmlReport/ns-d/sources/source-a.html new file mode 100644 index 0000000000..83d696a5b0 --- /dev/null +++ b/htmlReport/ns-d/sources/source-a.html @@ -0,0 +1,118 @@ + + + + + + + + Coverage Report > JSR88PropertySet + + + + + + +
+ + +

Coverage Summary for Class: JSR88PropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
JSR88PropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Defines all general container properties valid for JSR88-compliant containers.
+  *
+  * {@link org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer}
+  */
+ public interface JSR88PropertySet
+ {
+ 
+     /**
+      * Username to use when acquiring a {@link javax.enterprise.deploy.spi.DeploymentManager}.
+      */
+     String USERNAME = "cargo.jsr88.user";
+ 
+     /**
+      * Password to use when acquiring a {@link javax.enterprise.deploy.spi.DeploymentManager}.
+      */
+     String PASSWORD = "cargo.jsr88.password";
+ 
+     /**
+      * JAR file to load the deployment tool from.
+      */
+     String DEPLOYTOOL_JAR = "cargo.jsr88.deploytooljar";
+ 
+     /**
+      * Extra classpath necessary for the deployment tool (not the container itself!) to function.
+      * Semicolon-separated.
+      */
+     String DEPLOYTOOL_CLASSPATH = "cargo.jsr88.deploytoolclasspath";
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-d/sources/source-b.html b/htmlReport/ns-d/sources/source-b.html new file mode 100644 index 0000000000..594332bd2c --- /dev/null +++ b/htmlReport/ns-d/sources/source-b.html @@ -0,0 +1,108 @@ + + + + + + + + Coverage Report > ServletPropertySet + + + + + + +
+ + +

Coverage Summary for Class: ServletPropertySet (org.codehaus.cargo.container.property)

+ + + + + + + + + +
Class
ServletPropertySet
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.property;
+ 
+ /**
+  * Gathers all properties related to Servlet/JSP containers.
+  */
+ public interface ServletPropertySet
+ {
+     /**
+      * Port on which the Servlet/JSP container is listening to.
+      */
+     String PORT = "cargo.servlet.port";
+ 
+     /**
+      * Allow defining users and map to roles. The format is
+      * <code>name1:pwd1:role11,...,role1N|name2:pwd2:role21,...,role2N|...</code>.<br>
+      * <b>Important</b>: Please <u>only</u> use this as a setter, as the users can also be set
+      * using the <code>addUser</code> method.
+      * @see org.codehaus.cargo.container.configuration.LocalConfiguration#getUsers()
+      */
+     String USERS = "cargo.servlet.users";
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-e/index.html b/htmlReport/ns-e/index.html new file mode 100644 index 0000000000..bfc2bce6b2 --- /dev/null +++ b/htmlReport/ns-e/index.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_BLOCK.html b/htmlReport/ns-e/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..e047a73e6f --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_BLOCK.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..e5e935f2c4 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_CLASS.html b/htmlReport/ns-e/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..cb5c9c1af9 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_CLASS.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..859f5ced22 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_LINE.html b/htmlReport/ns-e/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..a695294436 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_LINE.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..478c107110 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_METHOD.html b/htmlReport/ns-e/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..3110df1db2 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_METHOD.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..9a0f7b6c97 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..e0c93eff64 --- /dev/null +++ b/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,251 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi + + 60% + + + (3/5) + + + + 41.7% + + + (30/72) + + + + 36.2% + + + (139/384) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-e/sources/source-1.html b/htmlReport/ns-e/sources/source-1.html new file mode 100644 index 0000000000..772c4c5b4a --- /dev/null +++ b/htmlReport/ns-e/sources/source-1.html @@ -0,0 +1,134 @@ + + + + + + + + Coverage Report > AbstractContainer + + + + + + +
+ + +

Coverage Summary for Class: AbstractContainer (org.codehaus.cargo.container.spi)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractContainer + + 100% + + + (1/1) + + + + 100% + + + (1/1) + + + + 100% + + + (1/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi;
+ 
+ import org.codehaus.cargo.container.Container;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Base implementation for all types of containers.
+  */
+ public abstract class AbstractContainer extends LoggedObject implements Container
+ {
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-e/sources/source-2.html b/htmlReport/ns-e/sources/source-2.html new file mode 100644 index 0000000000..1eddff2276 --- /dev/null +++ b/htmlReport/ns-e/sources/source-2.html @@ -0,0 +1,234 @@ + + + + + + + + Coverage Report > AbstractEmbeddedLocalContainer + + + + + + +
+ + +

Coverage Summary for Class: AbstractEmbeddedLocalContainer (org.codehaus.cargo.container.spi)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractEmbeddedLocalContainer + + 0% + + + (0/1) + + + + 0% + + + (0/7) + + + + 0% + + + (0/12) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi;
+ 
+ import org.codehaus.cargo.container.ContainerType;
+ import org.codehaus.cargo.container.EmbeddedLocalContainer;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ 
+ /**
+  * Default container implementation that all local embedded container implementations must extend.
+  */
+ public abstract class AbstractEmbeddedLocalContainer
+     extends AbstractLocalContainer implements EmbeddedLocalContainer
+ {
+     /**
+      * Classloader to use for loading the Embedded container's classes.
+      */
+     private ClassLoader classLoader;
+ 
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalContainer#AbstractLocalContainer(org.codehaus.cargo.container.configuration.LocalConfiguration)
+      */
+     public AbstractEmbeddedLocalContainer(LocalConfiguration configuration)
+     {
+         super(configuration);
+     }
+ 
+     /**
+      * @param classLoader the custom classloader to use for loading the Embedded container's
+      * classes.
+      */
+     @Override
+     public void setClassLoader(ClassLoader classLoader)
+     {
+         this.classLoader = classLoader;
+     }
+ 
+     /**
+      * @return the custom classloader to use for loading the Embedded container's classes.
+      */
+     @Override
+     public ClassLoader getClassLoader()
+     {
+         ClassLoader cl = this.classLoader;
+ 
+         if (this.classLoader == null)
+         {
+             cl = getClass().getClassLoader();
+         }
+ 
+         return cl;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void startInternal() throws Exception
+     {
+         doStart();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void stopInternal() throws Exception
+     {
+         doStop();
+     }
+ 
+     /**
+      * Implementation of {@link org.codehaus.cargo.container.LocalContainer#start()} that all
+      * containers extending this class must implement.
+      * 
+      * @throws Exception if any error is raised during the container start
+      */
+     protected abstract void doStart() throws Exception;
+ 
+     /**
+      * Implementation of {@link org.codehaus.cargo.container.LocalContainer#stop()} that all
+      * containers extending this class must implement.
+      * 
+      * @throws Exception if any error is raised during the container stop
+      */
+     protected abstract void doStop() throws Exception;
+ 
+     /**
+      * Calls <code>System.gc()</code> after container has stopped. {@inheritDoc}
+      */
+     @Override
+     protected void waitForCompletion(boolean waitForStarting) throws InterruptedException
+     {
+         super.waitForCompletion(waitForStarting);
+ 
+         if (!waitForStarting)
+         {
+             // Many container do not fully stop even after having destroyed all their sockets;
+             // as a result call GC for embedded containers
+             System.gc();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ContainerType getType()
+     {
+         return ContainerType.EMBEDDED;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-e/sources/source-3.html b/htmlReport/ns-e/sources/source-3.html new file mode 100644 index 0000000000..c9e79f21ee --- /dev/null +++ b/htmlReport/ns-e/sources/source-3.html @@ -0,0 +1,951 @@ + + + + + + + + Coverage Report > AbstractInstalledLocalContainer + + + + + + +
+ + +

Coverage Summary for Class: AbstractInstalledLocalContainer (org.codehaus.cargo.container.spi)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractInstalledLocalContainer + + 100% + + + (1/1) + + + + 66.7% + + + (24/36) + + + + 58.8% + + + (127/216) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Copyright 2003-2004 The Apache Software Foundation. Code from this file
+  * was originally imported from the Jakarta Cactus project.
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi;
+ 
+ import java.io.BufferedReader;
+ import java.io.File;
+ import java.io.FileNotFoundException;
+ import java.io.FileReader;
+ import java.io.IOException;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Locale;
+ import java.util.Map;
+ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.ContainerType;
+ import org.codehaus.cargo.container.InstalledLocalContainer;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.internal.util.HttpUtils;
+ import org.codehaus.cargo.container.internal.util.JdkUtils;
+ import org.codehaus.cargo.container.internal.util.ResourceUtils;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.spi.jvm.DefaultJvmLauncherFactory;
+ import org.codehaus.cargo.container.spi.jvm.JvmLauncher;
+ import org.codehaus.cargo.container.spi.jvm.JvmLauncherFactory;
+ import org.codehaus.cargo.container.spi.jvm.JvmLauncherRequest;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Default container implementation that all local installed container implementations must extend.
+  */
+ public abstract class AbstractInstalledLocalContainer extends AbstractLocalContainer implements
+     InstalledLocalContainer
+ {
+     /**
+      * Regular expression matcher to capture a quoted <code>-classpath</code> or <code>-cp</code>
+      * argument
+      */
+     private static Pattern classpathQuotedPattern =
+         Pattern.compile("-(classpath|cp)\\s+\"([^\"]*)\"");
+ 
+     /**
+      * Regular expression matcher to capture non-quoted <code>-classpath</code> or
+      * <code>-cp</code> argument
+      */
+     private static Pattern classpathPattern =
+         Pattern.compile("-(classpath|cp)\\s+([^\\s+\"]*)\\s+");
+ 
+     /**
+      * Regular expression matcher to capture non-quoted <code>-classpath</code> or <code>-cp</code>
+      * argument as the final argument
+      */
+     private static Pattern classpathFinalPattern =
+         Pattern.compile("-(classpath|cp)\\s+([^\\s+\"]*)");
+ 
+     /**
+      * List of system properties to set in the container JVM.
+      */
+     private Map<String, String> systemProperties;
+ 
+     /**
+      * Additional classpath entries for the classpath that will be used to start the containers.
+      */
+     private List<String> extraClasspath;
+ 
+     /**
+      * Additional classpath entries for the classpath that will be shared by the container
+      * applications.
+      */
+     private List<String> sharedClasspath;
+ 
+     /**
+      * The container home installation directory.
+      */
+     private String home;
+ 
+     /**
+      * HTTP utility class.
+      */
+     private HttpUtils httpUtils;
+ 
+     /**
+      * Resource utility class.
+      */
+     private ResourceUtils resourceUtils;
+ 
+     /**
+      * JVM launcher factory.
+      */
+     private JvmLauncherFactory jvmLauncherFactory;
+ 
+     /**
+      * JVM launcher that started the container.
+      */
+     private JvmLauncher jvmStartLauncher;
+ 
+     /**
+      * Major JVM version
+      */
+     private int jvmMajorVersion = -1;
+ 
+     /**
+      * Default constructor.
+      * 
+      * @param configuration the configuration to associate to this container. It can be changed
+      * later on by calling {@link #setConfiguration(LocalConfiguration)}
+      */
+     public AbstractInstalledLocalContainer(LocalConfiguration configuration)
+     {
+         super(configuration);
+ 
+         this.resourceUtils = new ResourceUtils();
+         this.httpUtils = new HttpUtils();
+         this.jvmLauncherFactory = new DefaultJvmLauncherFactory();
+         extraClasspath = new ArrayList<String>();
+         sharedClasspath = new ArrayList<String>();
+         systemProperties = new HashMap<String, String>();
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         this.resourceUtils.setLogger(logger);
+         this.httpUtils.setLogger(logger);
+     }
+ 
+     /**
+      * @return the HTTP utility class
+      */
+     protected final HttpUtils getHttpUtils()
+     {
+         return this.httpUtils;
+     }
+ 
+     /**
+      * @return the Resource utility class
+      */
+     protected final ResourceUtils getResourceUtils()
+     {
+         return this.resourceUtils;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setHome(String home)
+     {
+         this.home = home;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setSystemProperties(Map<String, String> properties)
+     {
+         Map<String, String> props = new HashMap<String, String>();
+         props.putAll(properties);
+ 
+         this.systemProperties = props;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Map<String, String> getSystemProperties()
+     {
+         return this.systemProperties;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setExtraClasspath(String[] classpath)
+     {
+         this.extraClasspath.clear();
+         this.extraClasspath.addAll(Arrays.asList(classpath));
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String[] getExtraClasspath()
+     {
+         return this.extraClasspath.toArray(new String[this.extraClasspath.size()]);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setSharedClasspath(String[] classpath)
+     {
+         this.sharedClasspath.clear();
+         this.sharedClasspath.addAll(Arrays.asList(classpath));
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String[] getSharedClasspath()
+     {
+         return this.sharedClasspath.toArray(new String[this.sharedClasspath.size()]);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getHome()
+     {
+         return this.home;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public JvmLauncherFactory getJvmLauncherFactory()
+     {
+         return jvmLauncherFactory;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setJvmLauncherFactory(JvmLauncherFactory jvmLauncherFactory)
+     {
+         this.jvmLauncherFactory = jvmLauncherFactory;
+     }
+ 
+     /**
+      * Implementation of {@link org.codehaus.cargo.container.LocalContainer#start()} that all
+      * containers extending this class must implement.
+      * 
+      * @param java the predefined JVM launcher to use to start the container
+      * @throws Exception if any error is raised during the container start
+      */
+     protected abstract void doStart(JvmLauncher java) throws Exception;
+ 
+     /**
+      * Implementation of {@link org.codehaus.cargo.container.LocalContainer#stop()} that all
+      * containers extending this class must implement.
+      * 
+      * @param java the predefined JVM launcher to use to stop the container
+      * @throws Exception if any error is raised during the container stop
+      */
+     protected abstract void doStop(JvmLauncher java) throws Exception;
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void startInternal() throws Exception
+     {
+         jvmStartLauncher = createJvmLauncher(true);
+         // Due to defect in org.apache.tools.ant.taskdefs.Java#setAppend we
+         // can't call setAppendOutput if we want to spawn the process. If the
+         // output isn't null we will have already disabled process spawning
+         if (getOutput() != null)
+         {
+             jvmStartLauncher.setAppendOutput(isAppend());
+         }
+         addMemoryArguments(jvmStartLauncher);
+         doStart(jvmStartLauncher);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void stopInternal() throws Exception
+     {
+         doStop(createJvmLauncher(false));
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected final void forceStopInternal()
+     {
+         if (jvmStartLauncher != null)
+         {
+             jvmStartLauncher.kill();
+         }
+     }
+ 
+     /**
+      * Creates a preinitialized instance of a JVM launcher to be used for starting, stopping and
+      * controlling the container.
+      * 
+      * @param server {@code true} to launch a server process, {@code false} to launch a
+      * client/utility process.
+      * @return The created JVM launcher, never {@code null}.
+      */
+     protected JvmLauncher createJvmLauncher(boolean server)
+     {
+         boolean spawned = Boolean.parseBoolean(getConfiguration().getPropertyValue(
+                 GeneralPropertySet.SPAWN_PROCESS));
+ 
+         if (jvmMajorVersion == -1)
+         {
+             JvmLauncherRequest request = new JvmLauncherRequest(false, this);
+             JvmLauncher java = jvmLauncherFactory.createJvmLauncher(request);
+             setJvmToLaunchContainerIn(java);
+ 
+             // Read the real JVM version
+             try
+             {
+                 File jvmVersionFile = File.createTempFile("cargo-jvm-version-", ".txt");
+                 java.setOutputFile(jvmVersionFile);
+                 java.setAppendOutput(true);
+                 java.setMainClass("-version");
+ 
+                 // CARGO-1595: Wait for the process to complete (which is what java.execute does),
+                 //             in case the command returns a lot of text back and takes time
+                 java.execute();
+ 
+                 // CARGO-1586: Read all the lines of the output (not just the first line)
+                 StringBuilder javaVersionOutput = new StringBuilder();
+                 try (BufferedReader br = new BufferedReader(new FileReader(jvmVersionFile)))
+                 {
+                     for (String line = br.readLine(); line != null; line = br.readLine())
+                     {
+                         if (line.startsWith("java version \"")
+                             || line.startsWith("openjdk version \""))
+                         {
+                             jvmMajorVersion = JdkUtils.parseMajorJavaVersion(
+                                 line.substring(line.indexOf('"') + 1));
+                             break;
+                         }
+                         javaVersionOutput.append(line);
+                         javaVersionOutput.append(FileHandler.NEW_LINE);
+                     }
+ 
+                     if (jvmMajorVersion == -1)
+                     {
+                         throw new IOException(
+                             "Can't read JVM version from output: " + javaVersionOutput);
+                     }
+                 }
+                 finally
+                 {
+                     jvmVersionFile.delete();
+                 }
+             }
+             catch (IOException e)
+             {
+                 throw new CargoException(
+                     "Cannot read JVM version, please check that the provided execution ["
+                         + java.getCommandLine() + "] is valid", e);
+             }
+         }
+ 
+         JvmLauncherRequest request = new JvmLauncherRequest(server, this, spawned);
+ 
+         JvmLauncher java = jvmLauncherFactory.createJvmLauncher(request);
+ 
+         // Most container configurations assume that the container would be started from the same
+         // working directory as the configuration; so set this here.
+         java.setWorkingDirectory(new File(getFileHandler().getAbsolutePath(
+             getConfiguration().getHome())));
+ 
+         if (getOutput() == null)
+         {
+             // CARGO-1596: If no output file was set, then output the Java process via the logger
+             java.setOutputLogger(getLogger(), this.getClass().getName());
+         }
+         else
+         {
+             File outputFile = new File(getOutput());
+ 
+             // Ensure that directories where the output file will go are created
+             getFileHandler().mkdirs(outputFile.getAbsoluteFile().getParent());
+ 
+             // CARGO-520: Set append to "true" by default
+             java.setOutputFile(outputFile);
+             java.setAppendOutput(true);
+         }
+ 
+         setJvmToLaunchContainerIn(java);
+ 
+         // Add extra container classpath entries specified by the user.
+         addExtraClasspath(java);
+ 
+         // Add system properties for the container JVM
+         addSystemProperties(java);
+ 
+         // Add runtime arguments if present
+         addRuntimeArgs(java);
+ 
+         // Add JVM args if defined
+         addJvmArgs(java, server);
+ 
+         if (server)
+         {
+             addStartJvmArgs(java);
+         }
+ 
+         // Add spawn options if defined
+         addSpawn(java);
+ 
+         return java;
+     }
+ 
+     /**
+      * Gets the Java home directory to use for this container.
+      * 
+      * @return The Java home directory to use, never {@code null}.
+      */
+     protected String getJavaHome()
+     {
+         String javaHome = getConfiguration().getPropertyValue(GeneralPropertySet.JAVA_HOME);
+         if (javaHome == null)
+         {
+             javaHome = System.getProperty("java.home");
+         }
+         return javaHome;
+     }
+ 
+     /**
+      * Determines which java virtual machine will run the container.
+      * 
+      * @param java the java command that will start the container
+      */
+     public void setJvmToLaunchContainerIn(JvmLauncher java)
+     {
+         String javaHome = getJavaHome();
+         if (javaHome != null)
+         {
+             String binDir = getFileHandler().append(javaHome, "bin");
+             String javaPath = getFileHandler().append(binDir, "java");
+             if (System.getProperty("os.name").toLowerCase(Locale.ENGLISH).startsWith("windows"))
+             {
+                 javaPath += ".exe";
+             }
+             java.setJvm(javaPath);
+         }
+     }
+ 
+     /**
+      * Add system properties to the Ant java command used to start the container.
+      * 
+      * @param java the java command that will start the container
+      */
+     private void addSystemProperties(JvmLauncher java)
+     {
+         for (Map.Entry<String, String> systemProperty : getSystemProperties().entrySet())
+         {
+             java.setSystemProperty(systemProperty.getKey(), systemProperty.getValue());
+         }
+     }
+ 
+     /**
+      * Adds the tools.jar to the classpath, except for Mac OSX and Java 9 or above - As these JVMs
+      * do not need the tools.jar.
+      * 
+      * @param java the JVM launcher to which to add the tools.jar
+      * @exception FileNotFoundException in case the tools.jar file cannot be found
+      */
+     protected final void addToolsJarToClasspath(JvmLauncher java) throws FileNotFoundException
+     {
+         // On OSX, the tools.jar classes are included in the classes.jar so there is no need to
+         // include any tools.jar file to the classpath. On Java 9, there is no more tools.jar.
+         if (!JdkUtils.isOSX() && jvmMajorVersion < 9)
+         {
+             java.addClasspathEntries(JdkUtils.getToolsJar(getJavaHome()));
+         }
+     }
+ 
+     /**
+      * Add extra container classpath entries specified by the user.
+      * 
+      * @param java the java command used to start/stop the container
+      */
+     protected void addExtraClasspath(JvmLauncher java)
+     {
+         for (String extraClasspathItem : extraClasspath)
+         {
+             java.addClasspathEntries(extraClasspathItem);
+ 
+             getLogger().debug("Adding [" + extraClasspathItem + "] to execution classpath",
+                 this.getClass().getName());
+         }
+     }
+ 
+     /**
+      * Add command line arguments to the java command.
+      * @param java The java command
+      */
+     protected void addRuntimeArgs(JvmLauncher java)
+     {
+         String runtimeArgs = getConfiguration().getPropertyValue(GeneralPropertySet.RUNTIME_ARGS);
+         if (runtimeArgs != null)
+         {
+             // Replace new lines and tabs, so that Maven or Ant plugins can
+             // specify multiline runtime arguments in their XML files
+             runtimeArgs = runtimeArgs.replace('\n', ' ');
+             runtimeArgs = runtimeArgs.replace('\r', ' ');
+             runtimeArgs = runtimeArgs.replace('\t', ' ');
+             java.addAppArgumentLine(runtimeArgs);
+         }
+     }
+ 
+     /**
+      * Add the @link{GeneralPropertySet#JVMARGS} arguments to the java command.
+      * @param java The java command
+      * @param server Whether the command is for the server (as opposed to a JVM used for
+      * deployments or other non-server actions)
+      */
+     private void addJvmArgs(JvmLauncher java, boolean server)
+     {
+         String jvmargs = getConfiguration().getPropertyValue(GeneralPropertySet.JVMARGS);
+         String startJmvmargs = null;
+         if (server)
+         {
+             startJmvmargs = getConfiguration().getPropertyValue(GeneralPropertySet.START_JVMARGS);
+         }
+         if (jvmargs != null)
+         {
+             // Replace new lines and tabs, so that Maven or Ant plugins can
+             // specify multiline JVM arguments in their XML files
+             jvmargs = jvmargs.replace('\n', ' ');
+             jvmargs = jvmargs.replace('\r', ' ');
+             jvmargs = jvmargs.replace('\t', ' ');
+ 
+             if (jvmargs == null || !jvmargs.contains("-Xms"))
+             {
+                 java.addJvmArguments("-Xms128m");
+             }
+             if (jvmargs == null || !jvmargs.contains("-Xmx"))
+             {
+                 java.addJvmArguments("-Xmx512m");
+             }
+ 
+             // CARGO-1294: Warning when starting containers on Java 8
+             if (jvmMajorVersion >= 8)
+             {
+                 jvmargs.replaceAll("\\s*-XX:PermSize\\d+\\w\\s*", " ");
+                 jvmargs.replaceAll("\\s*-XX:MaxPermSize\\d+\\w\\s*", " ");
+             }
+             else
+             {
+                 if (jvmargs == null || !jvmargs.contains("-XX:PermSize"))
+                 {
+                     java.addJvmArguments("-XX:PermSize=48m");
+                 }
+                 if (jvmargs == null || !jvmargs.contains("-XX:MaxPermSize"))
+                 {
+                     java.addJvmArguments("-XX:MaxPermSize=128m");
+                 }
+             }
+ 
+             if (startJmvmargs != null)
+             {
+                 // CARGO-1535: If in server mode and the START_JVMARGS has memory-related settings,
+                 // then remove them from the JVMARGS
+                 if (startJmvmargs.contains("-Xms"))
+                 {
+                     jvmargs.replaceAll("\\s*-Xms\\d+\\w\\s*", " ");
+                 }
+                 if (startJmvmargs.contains("-Xmx"))
+                 {
+                     jvmargs.replaceAll("\\s*-Xmx\\d+\\w\\s*", " ");
+                 }
+                 if (startJmvmargs.contains("-XX:PermSize"))
+                 {
+                     jvmargs.replaceAll("\\s*-XX:PermSize\\d+\\w\\s*", " ");
+                 }
+                 if (startJmvmargs.contains("-XX:MaxPermSize"))
+                 {
+                     jvmargs.replaceAll("\\s*-XX:MaxPermSize\\d+\\w\\s*", " ");
+                 }
+             }
+ 
+             // CARGO-1556: Allow setting the JVM classpath using a -classpath or -cp argument set
+             // as GeneralPropertySet.JVMARGS
+             jvmargs = addJvmClasspathArguments(java, jvmargs);
+             java.addJvmArgumentLine(jvmargs);
+         }
+     }
+ 
+     /**
+      * Add the @link{GeneralPropertySet#START_JVMARGS} arguments to the java command.
+      * @param java The java command
+      */
+     private void addStartJvmArgs(JvmLauncher java)
+     {
+         String startJmvmargs =
+             getConfiguration().getPropertyValue(GeneralPropertySet.START_JVMARGS);
+         if (startJmvmargs != null)
+         {
+             // Replace new lines and tabs, so that Maven or Ant plugins can
+             // specify multiline JVM arguments in their XML files
+             startJmvmargs = startJmvmargs.replace('\n', ' ');
+             startJmvmargs = startJmvmargs.replace('\r', ' ');
+             startJmvmargs = startJmvmargs.replace('\t', ' ');
+ 
+             // CARGO-1294: Warning when starting containers on Java 8
+             if (jvmMajorVersion >= 8)
+             {
+                 startJmvmargs.replaceAll("\\s*-XX:PermSize\\d+\\w\\s*", " ");
+                 startJmvmargs.replaceAll("\\s*-XX:MaxPermSize\\d+\\w\\s*", " ");
+             }
+ 
+             // CARGO-1556: Allow setting the JVM classpath using a -classpath or -cp argument set
+             // as GeneralPropertySet.START_JVMARGS
+             startJmvmargs = addJvmClasspathArguments(java, startJmvmargs);
+ 
+             java.addJvmArgumentLine(startJmvmargs);
+         }
+     }
+ 
+     /**
+      * Converts the <code>-classpath</code> or <code>-cp</code> JVM arguments into classpath
+      * entries.
+      * 
+      * @param java the predefined JVM launcher on which to add classpath entries
+      * @param jvmArgs JVM arguments line
+      * @return JVM arguments line with <code>-classpath</code> and <code>-cp</code> entries removed
+      */
+     private String addJvmClasspathArguments(JvmLauncher java, String jvmArgs)
+     {
+         String jvmargs = jvmArgs;
+         if (jvmargs.contains("-classpath") || jvmargs.contains("-cp"))
+         {
+             String classpath = null;
+             Matcher classpathQuotedMatcher =
+                 AbstractInstalledLocalContainer.classpathQuotedPattern.matcher(jvmargs);
+             if (classpathQuotedMatcher.find())
+             {
+                 classpath = classpathQuotedMatcher.group(2);
+                 jvmargs = classpathQuotedMatcher.replaceAll(" ");
+             }
+             else
+             {
+                 Matcher classpathMatcher =
+                     AbstractInstalledLocalContainer.classpathPattern.matcher(jvmargs);
+                 if (classpathMatcher.find())
+                 {
+                     classpath = classpathMatcher.group(2);
+                     jvmargs = classpathMatcher.replaceAll(" ");
+                 }
+                 else
+                 {
+                     Matcher classpathFinalMatcher =
+                         AbstractInstalledLocalContainer.classpathFinalPattern.matcher(jvmargs);
+                     if (classpathFinalMatcher.find())
+                     {
+                         classpath = classpathFinalMatcher.group(2);
+                         jvmargs = classpathFinalMatcher.replaceAll("");
+                     }
+                 }
+             }
+             if (classpath == null)
+             {
+                 throw new ContainerException(
+                     "The JVM arguments contains a classpath entry but none of the classpath "
+                         + "matchers matched");
+             }
+             else
+             {
+                 getLogger().debug("Adding [" + classpath + "] to execution classpath",
+                     this.getClass().getName());
+                 java.addClasspathEntries(classpath.split(File.pathSeparator));
+             }
+         }
+         return jvmargs;
+     }
+ 
+     /**
+      * Adds the JVM memory arguments.
+      * 
+      * @param java the predefined JVM launcher on which to add memory-related arguments
+      */
+     protected void addMemoryArguments(JvmLauncher java)
+     {
+         // If the jvmArgs don't already contain memory settings add the default
+         String jvmArgs = getConfiguration().getPropertyValue(GeneralPropertySet.JVMARGS);
+         String startJvmargs =
+             getConfiguration().getPropertyValue(GeneralPropertySet.START_JVMARGS);
+         if (startJvmargs != null)
+         {
+             if (jvmArgs == null)
+             {
+                 jvmArgs = startJvmargs;
+             }
+             else
+             {
+                 jvmArgs += " " + startJvmargs;
+             }
+         }
+         if (jvmArgs == null || !jvmArgs.contains("-Xms"))
+         {
+             java.addJvmArguments("-Xms128m");
+         }
+         if (jvmArgs == null || !jvmArgs.contains("-Xmx"))
+         {
+             java.addJvmArguments("-Xmx512m");
+         }
+ 
+         // CARGO-1294: Warning when starting containers on Java 8
+         if (jvmMajorVersion < 8)
+         {
+             if (jvmArgs == null || !jvmArgs.contains("-XX:PermSize"))
+             {
+                 java.addJvmArguments("-XX:PermSize=48m");
+             }
+             if (jvmArgs == null || !jvmArgs.contains("-XX:MaxPermSize"))
+             {
+                 java.addJvmArguments("-XX:MaxPermSize=128m");
+             }
+         }
+     }
+ 
+     /**
+      * Add option of spawn if property exists
+      * 
+      * @param java the predefined JVM launcher which will spawn
+      */
+     private void addSpawn(JvmLauncher java)
+     {
+         boolean spawnProcess = Boolean.parseBoolean(getConfiguration().getPropertyValue(
+             GeneralPropertySet.SPAWN_PROCESS));
+         if (spawnProcess)
+         {
+             if (getOutput() == null)
+             {
+                 java.setSpawn(spawnProcess);
+             }
+             else
+             {
+                 getLogger().warn("Process cannot be spawned unless output is null",
+                     this.getClass().getName());
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void verify()
+     {
+         super.verify();
+         verifyHome();
+     }
+ 
+     /**
+      * Verify that the home property has been set.
+      */
+     private void verifyHome()
+     {
+         if (getHome() == null)
+         {
+             throw new ContainerException("You must set the mandatory [home] property");
+         }
+ 
+         if (!getFileHandler().isDirectory(getHome()))
+         {
+             throw new ContainerException("[" + getHome() + "] is not a directory. It must point "
+                 + "to the container home directory.");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ContainerType getType()
+     {
+         return ContainerType.INSTALLED;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addExtraClasspath(String location)
+     {
+         ifPresentAddPathToList(location, extraClasspath);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addSharedClasspath(String location)
+     {
+         ifPresentAddPathToList(location, sharedClasspath);
+     }
+ 
+     /**
+      * adds the location to the list, if the file exists.
+      * 
+      * @param location path to add to the list
+      * @param list where to append this path
+      */
+     public void ifPresentAddPathToList(String location, List<String> list)
+     {
+         if (location == null || !this.getFileHandler().exists(location)
+             || this.getFileHandler().isDirectory(location))
+         {
+             throw new IllegalArgumentException("Invalid file path: " + location);
+         }
+         list.add(location);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-e/sources/source-4.html b/htmlReport/ns-e/sources/source-4.html new file mode 100644 index 0000000000..1760feee73 --- /dev/null +++ b/htmlReport/ns-e/sources/source-4.html @@ -0,0 +1,688 @@ + + + + + + + + Coverage Report > AbstractLocalContainer + + + + + + +
+ + +

Coverage Summary for Class: AbstractLocalContainer (org.codehaus.cargo.container.spi)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractLocalContainer + + 100% + + + (1/1) + + + + 21.7% + + + (5/23) + + + + 7.4% + + + (11/149) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi;
+ 
+ import java.io.IOException;
+ import java.net.InetAddress;
+ import java.net.ServerSocket;
+ import java.net.UnknownHostException;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.State;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.deployer.DeployableMonitor;
+ import org.codehaus.cargo.container.deployer.URLDeployableMonitor;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ import org.codehaus.cargo.container.spi.deployer.DeployerWatchdog;
+ import org.codehaus.cargo.container.spi.jvm.DefaultJvmLauncher;
+ import org.codehaus.cargo.container.spi.util.ContainerUtils;
+ import org.codehaus.cargo.container.startup.ContainerMonitor;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ 
+ /**
+  * Default container implementation that all local container implementations must extend.
+  */
+ public abstract class AbstractLocalContainer extends AbstractContainer implements LocalContainer
+ {
+     /**
+      * The file to which output of the container should be written.
+      */
+     private String output;
+ 
+     /**
+      * Whether output of the container should be appended to an existing file, or the existing file
+      * should be truncated.
+      */
+     private boolean append;
+ 
+     /**
+      * Default timeout for starting/stopping the container.
+      */
+     private long timeout = 120000L;
+ 
+     /**
+      * The local configuration implementation to use.
+      */
+     private LocalConfiguration configuration;
+ 
+     /**
+      * Container state. Default to unknown state.
+      */
+     private State state = State.UNKNOWN;
+ 
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * Default constructor.
+      * @param configuration the configuration to associate to this container. It can be changed
+      * later on by calling {@link #setConfiguration(LocalConfiguration)}
+      */
+     public AbstractLocalContainer(LocalConfiguration configuration)
+     {
+         this.append = false;
+         this.configuration = configuration;
+         this.fileHandler = new DefaultFileHandler();
+         this.fileHandler.setLogger(this.getLogger());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setOutput(String output)
+     {
+         this.output = output;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setAppend(boolean isAppend)
+     {
+         this.append = isAppend;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getOutput()
+     {
+         return this.output;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isAppend()
+     {
+         return this.append;
+     }
+ 
+     /**
+      * Verify required properties have been set before executing any action.
+      */
+     protected void verify()
+     {
+         // Nothing to verify. We still need this method so that extending classes do not need to
+         // implement this method. Only if they have some checks to perform.
+     }
+ 
+     /**
+      * Installed and Embedded containers do not have the same signature for their
+      * <code>doStart</code> method. Thus we need to abstract it.
+      * 
+      * @throws Exception if any error is raised during the container start
+      */
+     protected abstract void startInternal() throws Exception;
+ 
+     /**
+      * Installed and Embedded containers do not have the same signature for their
+      * <code>doStop</code> method. Thus we need to abstract it.
+      * 
+      * @throws Exception if any error is raised during the container stop
+      */
+     protected abstract void stopInternal() throws Exception;
+ 
+     /**
+      * Some containers may not fully stop and need to be forcibly stopped.
+      * This method should be overridden for containers that support forcibly stopping the container.
+      */
+     protected void forceStopInternal()
+     {
+         // No implementation defined here
+     }
+ 
+     /**
+      * Some containers may require some extra steps after startup.
+      * 
+      * @throws Exception if any error is raised during these executions
+      */
+     protected void executePostStartTasks() throws Exception
+     {
+         // No implementation defined here
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public final void start()
+     {
+         synchronized (this)
+         {
+             if (State.STARTING == getState() || State.STARTED == getState())
+             {
+                 throw new ContainerException("The container is already " + getState()
+                     + ". If you wish to restart a running container, "
+                         + "please use the restart method instead.");
+             }
+             else
+             {
+                 setState(State.STARTING);
+             }
+         }
+ 
+         getLogger().info(getName() + " starting...", this.getClass().getName());
+ 
+         try
+         {
+             this.getConfiguration().applyPortOffset();
+ 
+             verify();
+ 
+             // Ensure that the configuration is done before starting the container.
+             getConfiguration().configure(this);
+ 
+             // CARGO-365: Check if ports are in use
+             for (Map.Entry<String, String> property
+                 : getConfiguration().getProperties().entrySet())
+             {
+                 // CARGO-1438: Only check ports for property names supported by the container
+                 if (property.getKey().startsWith("cargo.") && property.getKey().endsWith(".port")
+                     && getConfiguration().getCapability().supportsProperty(property.getKey())
+                     && property.getValue() != null)
+                 {
+                     try
+                     {
+                         int port = Integer.parseInt(property.getValue());
+                         if (!isPortShutdown(port))
+                         {
+                             throw new ContainerException("Port number " + property.getValue()
+                                 + " (defined with the property " + property.getKey() + ") is "
+                                     + "in use. Please free it on the system or set it to a "
+                                         + "different port in the container configuration.");
+                         }
+                     }
+                     catch (NumberFormatException e)
+                     {
+                         // We do nothing
+                     }
+                 }
+             }
+ 
+             startInternal();
+ 
+             // CARGO-712: If timeout is 0, don't wait at all
+             if (getTimeout() != 0)
+             {
+                 // Wait until the container is fully started
+                 waitForCompletion(true);
+             }
+ 
+             executePostStartTasks();
+ 
+             setState(State.STARTED);
+             getLogger().info(getName() + " started on port ["
+                 + getConfiguration().getPropertyValue(ServletPropertySet.PORT) + "]",
+                     this.getClass().getName());
+         }
+         catch (CargoException e)
+         {
+             setState(State.UNKNOWN);
+             getLogger().warn(e.toString(), this.getClass().getName());
+ 
+             throw e;
+         }
+         catch (Throwable t)
+         {
+             setState(State.UNKNOWN);
+             getLogger().warn(t.toString(), this.getClass().getName());
+ 
+             throw new ContainerException("Failed to start the " + getName() + " container."
+                 + (getOutput() == null ? "" : " Check the [" + getOutput() + "] file "
+                     + "containing the container logs for more details."), t);
+         }
+         finally
+         {
+             this.getConfiguration().revertPortOffset();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public final void stop()
+     {
+         setState(State.STOPPING);
+         getLogger().info(getName() + " is stopping...", this.getClass().getName());
+ 
+         final boolean isAppend = isAppend();
+ 
+         try
+         {
+             this.getConfiguration().applyPortOffset();
+ 
+             verify();
+ 
+             // CARGO-520: Always set append to "true" when stopping
+             setAppend(true);
+ 
+             try
+             {
+                 stopInternal();
+             }
+             catch (IllegalStateException e)
+             {
+                 if (DefaultJvmLauncher.shutdownInProgress)
+                 {
+                     // JVM shutdown in progress, ignore
+                     getLogger().debug(
+                         "JVM shutdown in progress, ignoring exception trying to stop: " + e,
+                             this.getClass().getName());
+                 }
+                 else
+                 {
+                     throw e;
+                 }
+             }
+ 
+             // CARGO-712: If timeout is 0, don't wait at all
+             if (getTimeout() != 0)
+             {
+                 // Wait until the container is fully stopped
+                 waitForCompletion(false);
+             }
+ 
+             // Force the container to stop, should it not already be stopped.
+             // At this point, the container should already be stopped,
+             // so this should have no effect if the container was properly stopped.
+             forceStopInternal();
+ 
+             setState(State.STOPPED);
+             getLogger().info(getName() + " is stopped", this.getClass().getName());
+         }
+         catch (Exception e)
+         {
+             setState(State.UNKNOWN);
+             throw new ContainerException("Failed to stop the " + getName() + " container."
+                 + (getOutput() == null ? "" : " Check the [" + getOutput() + "] file "
+                     + "containing the container logs for more details."), e);
+         }
+         finally
+         {
+             setAppend(isAppend);
+             this.getConfiguration().revertPortOffset();
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void restart()
+     {
+         try
+         {
+             stop();
+         }
+         catch (Throwable t)
+         {
+             getLogger().info("The stop phase of the restart action has failed: " + t.toString(),
+                 this.getClass().getName());
+         }
+ 
+         start();
+     }
+ 
+     /**
+      * Use container monitor to verify if the container is started.
+      * @param monitor Container monitor checking container availability.
+      * @throws InterruptedException if the thread sleep is interrupted.
+      */
+     protected void waitForStarting(ContainerMonitor monitor) throws InterruptedException
+     {
+         try
+         {
+             long startTime = System.currentTimeMillis();
+             do
+             {
+                 if (System.currentTimeMillis() - startTime > getTimeout())
+                 {
+                     String message = "Monitor [" + monitor.getClass().getName()
+                         + "] failed to detect running container"
+                         + " within the timeout period [" + getTimeout() + "].";
+                     getLogger().info(message, this.getClass().getName());
+                     throw new ContainerException(message);
+                 }
+ 
+                 Thread.sleep(100);
+             }
+             while (!monitor.isRunning());
+         }
+         catch (InterruptedException e)
+         {
+             throw new ContainerException("Failed to monitor container", e);
+         }
+     }
+ 
+     /**
+      * Ping the WAR CPC to verify if the container is started or stopped.
+      * 
+      * @param waitForStarting if <code>true</code> then wait for container start, if
+      * <code>false</code> wait for container stop
+      * @throws InterruptedException if the thread sleep is interrupted
+      */
+     protected void waitForCompletion(boolean waitForStarting) throws InterruptedException
+     {
+         LocalConfiguration config = getConfiguration();
+ 
+         if (waitForStarting)
+         {
+             DeployableMonitor monitor =
+                 new URLDeployableMonitor(ContainerUtils.getCPCURL(config), getTimeout(),
+                     "Cargo Ping Component used to verify if the container is started.");
+             monitor.setLogger(getLogger());
+             DeployerWatchdog watchdog = new DeployerWatchdog(monitor);
+             watchdog.setLogger(getLogger());
+ 
+             watchdog.watch(waitForStarting);
+         }
+         else
+         {
+             long deadline = System.currentTimeMillis() + getTimeout();
+ 
+             for (Map.Entry<String, String> property : getConfiguration().getProperties().entrySet())
+             {
+                 // CARGO-1438: Only check ports for property names supported by the container
+                 if (!property.getKey().startsWith("cargo.") || !property.getKey().endsWith(".port")
+                     || !getConfiguration().getCapability().supportsProperty(property.getKey())
+                     || property.getValue() == null)
+                 {
+                     continue;
+                 }
+                 int port;
+                 try
+                 {
+                     port = Integer.parseInt(property.getValue());
+                 }
+                 catch (NumberFormatException e)
+                 {
+                     continue;
+                 }
+                 if (port < 1 || port > 65535)
+                 {
+                     continue;
+                 }
+ 
+                 waitForPortShutdown(port, deadline);
+                 getLogger().debug("Port " + port + " is shutdown", this.getClass().getName());
+ 
+                 continue;
+             }
+ 
+             // Many container do not fully stop even after having destroyed all their sockets;
+             // as a result wait 5 more seconds
+             Thread.sleep(5000);
+         }
+     }
+ 
+     /**
+      * Waits for the shutdown of the specified server port.
+      * 
+      * @param port The port number.
+      * @param deadline The deadline for the port to shutdown.
+      * @throws InterruptedException If the thread was interrupted while waiting for the port
+      *             shutdown.
+      */
+     protected void waitForPortShutdown(int port, long deadline) throws InterruptedException
+     {
+         getLogger().debug("Waiting for port " + port + " to shutdown, deadline " + deadline,
+             this.getClass().getName());
+ 
+         while (true)
+         {
+             if (isPortShutdown(port))
+             {
+                 break;
+             }
+ 
+             if (System.currentTimeMillis() > deadline)
+             {
+                 throw new ContainerException("Server port " + port
+                     + " did not shutdown within the timeout period [" + getTimeout() + "]");
+             }
+ 
+             Thread.sleep(1000);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setConfiguration(LocalConfiguration configuration)
+     {
+         this.configuration = configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public LocalConfiguration getConfiguration()
+     {
+         return this.configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setTimeout(long timeout)
+     {
+         this.timeout = timeout;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public long getTimeout()
+     {
+         return this.timeout;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public State getState()
+     {
+         return this.state;
+     }
+ 
+     /**
+      * @param state the container current state
+      */
+     protected void setState(State state)
+     {
+         this.state = state;
+     }
+ 
+     /**
+      * @return the Cargo file utility class
+      */
+     @Override
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the Cargo file utility class to use. This method is useful for unit
+      * testing with Mock objects as it can be passed a test file handler that doesn't perform any
+      * real file action.
+      */
+     @Override
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+ 
+     /**
+      * Checks if the specified server port is shutdown.
+      * 
+      * @param port The port number.
+      * @return <code>true</code> if <code>port</code> is shut down, <code>false</code> otherwise.
+      */
+     private boolean isPortShutdown(int port)
+     {
+         InetAddress host;
+         try
+         {
+             host = InetAddress.getByName(
+                 this.getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME));
+         }
+         catch (UnknownHostException e)
+         {
+             throw new IllegalArgumentException("Invalid GeneralPropertySet.HOSTNAME value", e);
+         }
+ 
+         try (ServerSocket ss = new ServerSocket(port, 1, host))
+         {
+             ss.setReuseAddress(true);
+ 
+             getLogger().debug("Port " + port + " closed", this.getClass().getName());
+             return true;
+         }
+         catch (IOException e)
+         {
+             getLogger().debug("Port " + port + " still in use", this.getClass().getName());
+             return false;
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-e/sources/source-5.html b/htmlReport/ns-e/sources/source-5.html new file mode 100644 index 0000000000..ce6727bfb5 --- /dev/null +++ b/htmlReport/ns-e/sources/source-5.html @@ -0,0 +1,186 @@ + + + + + + + + Coverage Report > AbstractRemoteContainer + + + + + + +
+ + +

Coverage Summary for Class: AbstractRemoteContainer (org.codehaus.cargo.container.spi)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractRemoteContainer + + 0% + + + (0/1) + + + + 0% + + + (0/5) + + + + 0% + + + (0/6) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi;
+ 
+ import org.codehaus.cargo.container.ContainerType;
+ import org.codehaus.cargo.container.RemoteContainer;
+ import org.codehaus.cargo.container.State;
+ import org.codehaus.cargo.container.configuration.RuntimeConfiguration;
+ 
+ /**
+  * Base implementation of a remote container.
+  */
+ public abstract class AbstractRemoteContainer extends AbstractContainer implements RemoteContainer
+ {
+     /**
+      * The runtime configuration implementation to use.
+      */
+     private RuntimeConfiguration configuration;
+ 
+     /**
+      * Default constructor.
+      * @param configuration the configuration to associate to this container. It can be changed
+      * later on by calling {@link #setConfiguration(RuntimeConfiguration)}
+      */
+     public AbstractRemoteContainer(RuntimeConfiguration configuration)
+     {
+         this.configuration = configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setConfiguration(RuntimeConfiguration configuration)
+     {
+         this.configuration = configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public RuntimeConfiguration getConfiguration()
+     {
+         return this.configuration;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public State getState()
+     {
+         return State.STARTED;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ContainerType getType()
+     {
+         return ContainerType.REMOTE;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/index.html b/htmlReport/ns-f/index.html new file mode 100644 index 0000000000..dfb39825b2 --- /dev/null +++ b/htmlReport/ns-f/index.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_BLOCK.html b/htmlReport/ns-f/index_SORT_BY_BLOCK.html new file mode 100644 index 0000000000..62f5e69d45 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_BLOCK.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html b/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html new file mode 100644 index 0000000000..d5183dc412 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_CLASS.html b/htmlReport/ns-f/index_SORT_BY_CLASS.html new file mode 100644 index 0000000000..478ea20db6 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_CLASS.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html b/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html new file mode 100644 index 0000000000..d0eebfad38 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_LINE.html b/htmlReport/ns-f/index_SORT_BY_LINE.html new file mode 100644 index 0000000000..4da7ed093d --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_LINE.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html b/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html new file mode 100644 index 0000000000..fca6a01bc6 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_METHOD.html b/htmlReport/ns-f/index_SORT_BY_METHOD.html new file mode 100644 index 0000000000..a16eded97e --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_METHOD.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html b/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html new file mode 100644 index 0000000000..4416134b21 --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html b/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html new file mode 100644 index 0000000000..87f9a4beff --- /dev/null +++ b/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html @@ -0,0 +1,413 @@ + + + + + + Coverage Report > org.codehaus.cargo.container.spi.configuration + + + + + + +
+ + + +

Coverage Summary for Package: org.codehaus.cargo.container.spi.configuration

+ + + + + + + + + + + + + +
Package + Class, % + + Method, % + + Line, % +
org.codehaus.cargo.container.spi.configuration + + 27.3% + + + (3/11) + + + + 42.5% + + + (31/73) + + + + 50% + + + (178/356) + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class + Class, % + + Method, % + + Line, % +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
+ +
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-1.html b/htmlReport/ns-f/sources/source-1.html new file mode 100644 index 0000000000..439efc3ad8 --- /dev/null +++ b/htmlReport/ns-f/sources/source-1.html @@ -0,0 +1,230 @@ + + + + + + + + Coverage Report > AbstractConfiguration + + + + + + +
+ + +

Coverage Summary for Class: AbstractConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractConfiguration + + 100% + + + (1/1) + + + + 66.7% + + + (4/6) + + + + 72.7% + + + (16/22) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.configuration.Configuration;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ import org.codehaus.cargo.util.log.LoggedObject;
+ 
+ /**
+  * Base implementation of
+  * {@link org.codehaus.cargo.container.spi.configuration.ContainerConfiguration} that can be
+  * specialized for any type of configuration.
+  */
+ public abstract class AbstractConfiguration extends LoggedObject
+     implements ContainerConfiguration, Configuration
+ {
+     /**
+      * List of all configuration properties (port, logs, etc).
+      */
+     private Map<String, String> properties;
+ 
+     /**
+      * Default setup.
+      */
+     public AbstractConfiguration()
+     {
+         this.properties = new HashMap<String, String>();
+ 
+         // Add all required properties that are common to all configurations
+         setProperty(GeneralPropertySet.PROTOCOL, "http");
+         setProperty(GeneralPropertySet.HOSTNAME, "localhost");
+         setProperty(ServletPropertySet.PORT, "8080");
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setProperty(String name, String value)
+     {
+         if (value != null)
+         {
+             getLogger().debug("Setting property [" + name + "] = [" + value + "]",
+                 this.getClass().getName());
+             this.properties.put(name, value);
+         }
+         else
+         {
+             getLogger().debug("Removing property [" + name + "]", this.getClass().getName());
+             this.properties.remove(name);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Map<String, String> getProperties()
+     {
+         return this.properties;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getPropertyValue(String name)
+     {
+         String systemProperty = System.getProperties().getProperty(name);
+         if (systemProperty != null)
+         {
+             return systemProperty;
+         }
+         return this.properties.get(name);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void verify()
+     {
+         // Verify that the port is a valid number.
+         verifyServletPortProperty();
+     }
+ 
+     /**
+      * Verify that the Servlet port specified is a valid integer.
+      */
+     private void verifyServletPortProperty()
+     {
+         try
+         {
+             Integer.parseInt(getPropertyValue(ServletPropertySet.PORT));
+         }
+         catch (NumberFormatException e)
+         {
+             throw new ContainerException("Invalid port number ["
+                 + getPropertyValue(ServletPropertySet.PORT)
+                     + "] for property " + ServletPropertySet.PORT
+                         + ". The port value must be an integer", e);
+         }
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-2.html b/htmlReport/ns-f/sources/source-2.html new file mode 100644 index 0000000000..9f0475b396 --- /dev/null +++ b/htmlReport/ns-f/sources/source-2.html @@ -0,0 +1,175 @@ + + + + + + + + Coverage Report > AbstractConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: AbstractConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/7) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import java.util.HashMap;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.configuration.ConfigurationCapability;
+ 
+ /**
+ F * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that needs to be extended by the different configuration implementations.
+  */
+ public abstract class AbstractConfigurationCapability implements ConfigurationCapability
+ {
+     /**
+      * Property support Map.
+      */
+     protected Map<String, Boolean> propertySupportMap;
+ 
+     /**
+      * Initialize the property supports Map. This is so that extending classes will have less work
+      * to do and they can simply specify what's different from the default.
+      */
+     public AbstractConfigurationCapability()
+     {
+         this.propertySupportMap = new HashMap<String, Boolean>();
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean supportsProperty(String propertyName)
+     {
+         boolean supports = false;
+ 
+         if (this.propertySupportMap.containsKey(propertyName))
+         {
+             supports = this.propertySupportMap.get(propertyName);
+         }
+ 
+         return supports;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public Map<String, Boolean> getProperties()
+     {
+         return new HashMap<String, Boolean>(this.propertySupportMap);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-3.html b/htmlReport/ns-f/sources/source-3.html new file mode 100644 index 0000000000..39a1d44748 --- /dev/null +++ b/htmlReport/ns-f/sources/source-3.html @@ -0,0 +1,152 @@ + + + + + + + + Coverage Report > AbstractExistingLocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: AbstractExistingLocalConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractExistingLocalConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import org.codehaus.cargo.container.configuration.ConfigurationType;
+ import org.codehaus.cargo.container.configuration.ExistingLocalConfiguration;
+ 
+ /**
+  * Base implementation for an existing local configuration.
+  */
+ public abstract class AbstractExistingLocalConfiguration extends AbstractLocalConfiguration
+     implements ExistingLocalConfiguration
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalConfiguration#AbstractLocalConfiguration(String)
+      */
+     public AbstractExistingLocalConfiguration(String dir)
+     {
+         super(dir);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ConfigurationType getType()
+     {
+         return ConfigurationType.EXISTING;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-4.html b/htmlReport/ns-f/sources/source-4.html new file mode 100644 index 0000000000..969a5972d8 --- /dev/null +++ b/htmlReport/ns-f/sources/source-4.html @@ -0,0 +1,143 @@ + + + + + + + + Coverage Report > AbstractExistingLocalConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: AbstractExistingLocalConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractExistingLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/1) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ /**
+  * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that needs to be extended by each existing configuration's implementation.
+  */
+ public abstract class AbstractExistingLocalConfigurationCapability
+     extends AbstractLocalConfigurationCapability
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalConfigurationCapability#AbstractLocalConfigurationCapability()
+      */
+     public AbstractExistingLocalConfigurationCapability()
+     {
+         super();
+ 
+         // Nothing to add
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-5.html b/htmlReport/ns-f/sources/source-5.html new file mode 100644 index 0000000000..b3eb34b15e --- /dev/null +++ b/htmlReport/ns-f/sources/source-5.html @@ -0,0 +1,903 @@ + + + + + + + + Coverage Report > AbstractLocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: AbstractLocalConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractLocalConfiguration + + 100% + + + (1/1) + + + + 60.5% + + + (23/38) + + + + 67.5% + + + (141/209) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import java.io.File;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Set;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.configuration.FileConfig;
+ import org.codehaus.cargo.container.configuration.LocalConfiguration;
+ import org.codehaus.cargo.container.configuration.builder.ConfigurationEntryType;
+ import org.codehaus.cargo.container.configuration.entry.DataSource;
+ import org.codehaus.cargo.container.configuration.entry.Resource;
+ import org.codehaus.cargo.container.deployable.Deployable;
+ import org.codehaus.cargo.container.internal.util.ResourceUtils;
+ import org.codehaus.cargo.container.property.DataSourceConverter;
+ import org.codehaus.cargo.container.property.DatasourcePropertySet;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ResourceConverter;
+ import org.codehaus.cargo.container.property.ResourcePropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ import org.codehaus.cargo.container.property.TransactionSupport;
+ import org.codehaus.cargo.container.property.User;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.DefaultFileHandler;
+ import org.codehaus.cargo.util.FileHandler;
+ import org.codehaus.cargo.util.log.Logger;
+ 
+ /**
+  * Base implementation of
+  * {@link org.codehaus.cargo.container.spi.configuration.ContainerConfiguration} that can be
+  * specialized for standalone configuration, existing configuration or other local configurations.
+  */
+ public abstract class AbstractLocalConfiguration extends AbstractConfiguration implements
+     LocalConfiguration
+ {
+     /**
+      * The path under which the container resources are stored in the JAR.
+      */
+     public static final String RESOURCE_PATH = "org/codehaus/cargo/container/internal/resources/";
+ 
+     /**
+      * Property key to flag ports which have already an offset applied.
+      */
+     private static final String PORT_OFFSET_APPLIED_PREFIX = LocalConfiguration.class.getName()
+         + "_portOffsetApplied_";
+ 
+     /**
+      * List of {@link Deployable}s to deploy into the container.
+      */
+     private List<Deployable> deployables;
+ 
+     /**
+      * List of {@link FileConfig}s to use for the container.
+      */
+     private List<FileConfig> files;
+ 
+     /**
+      * The replacements for the configuration files. This contains the tokens and what values they
+      * should be replaced with.
+      */
+     private Map<String, String> replacements;
+ 
+     /**
+      * The home directory for the configuration. This is where the associated container will be set
+      * up to start and where it will deploy its deployables.
+      */
+     private String home;
+ 
+     /**
+      * Resource utility class.
+      */
+     private ResourceUtils resourceUtils;
+ 
+     /**
+      * File utility class.
+      */
+     private FileHandler fileHandler;
+ 
+     /**
+      * List of {@link Resource}s to add to a container.
+      */
+     private List<Resource> resources;
+ 
+     /**
+      * List of {@link DataSource}s to add to a container.
+      */
+     private List<DataSource> dataSources;
+ 
+     /**
+      * List of {@link User}s to add to a container.
+      */
+     private List<User> users;
+ 
+     /**
+      * @param home the home directory where the container will be set up to start and where it will
+      * deploy its deployables. <b>IMPORTANT</b>: While some containers can deal with this parameter
+      * being set as a relative path, some others require this path to be set to an absolute
+      * directory. Please refer to the documentation of the server to ensure you give the path in
+      * the appropriate way. If in doubt, you can use absolute paths -that is known to work with all
+      * containers.
+      */
+     public AbstractLocalConfiguration(String home)
+     {
+         super();
+ 
+         this.deployables = new ArrayList<Deployable>();
+         this.fileHandler = new DefaultFileHandler();
+         this.resourceUtils = new ResourceUtils();
+         this.resources = new ArrayList<Resource>();
+         this.dataSources = new ArrayList<DataSource>();
+         this.files = new ArrayList<FileConfig>();
+         this.users = new ArrayList<User>();
+ 
+         this.home = home;
+ 
+         setProperty(GeneralPropertySet.PORT_OFFSET, "0");
+         setProperty(GeneralPropertySet.SPAWN_PROCESS, "false");
+     }
+ 
+     /**
+      * Overriden in order to set the logger on ancillary components.
+      * {@inheritDoc}
+      * 
+      * @param logger the logger to set and set in the ancillary objects
+      */
+     @Override
+     public void setLogger(Logger logger)
+     {
+         super.setLogger(logger);
+         this.fileHandler.setLogger(logger);
+         this.resourceUtils.setLogger(logger);
+     }
+ 
+     /**
+      * @return the file utility class to use for performing all file I/O.
+      */
+     @Override
+     public FileHandler getFileHandler()
+     {
+         return this.fileHandler;
+     }
+ 
+     /**
+      * @param fileHandler the file utility class to use for performing all file I/O.
+      */
+     @Override
+     public void setFileHandler(FileHandler fileHandler)
+     {
+         this.fileHandler = fileHandler;
+     }
+ 
+     /**
+      * @return the Resource utility class
+      */
+     protected final ResourceUtils getResourceUtils()
+     {
+         return this.resourceUtils;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setFileProperty(FileConfig fileConfig)
+     {
+         this.files.add(fileConfig);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void setConfigFileProperty(FileConfig fileConfig)
+     {
+         // a configuration file should always overwrite the previous file if it exists
+         // since the token value could have changed during.
+         fileConfig.setOverwrite(true);
+         fileConfig.setConfigfile(true);
+         this.setFileProperty(fileConfig);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<FileConfig> getFileProperties()
+     {
+         return this.files;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public synchronized void addDeployable(Deployable newDeployable)
+     {
+         this.deployables.add(newDeployable);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<Deployable> getDeployables()
+     {
+         return this.deployables;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public String getHome()
+     {
+         return this.home;
+     }
+ 
+     @Override
+     public String getPropertyValue(String name)
+     {
+         if (isOffsetApplied(name))
+         {
+             return super.getProperties().get(name);
+         }
+         else
+         {
+             return super.getPropertyValue(name);
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void configure(LocalContainer container)
+     {
+         if (getPropertyValue(GeneralPropertySet.JAVA_HOME) == null)
+         {
+             setProperty(GeneralPropertySet.JAVA_HOME, System.getProperty("java.home"));
+         }
+ 
+         parsePropertiesForPendingConfiguration();
+         verify();
+ 
+         try
+         {
+             doConfigure(container);
+         }
+         catch (Exception e)
+         {
+             throw new ContainerException("Failed to create a " + container.getName() + " "
+                 + getType().getType() + " configuration: " + e.getMessage(), e);
+         }
+ 
+         configureFiles(getReplacements(), container);
+     }
+ 
+     /**
+      * Returns (while, if necessary, creating) the default filter chain that should be applied
+      * while copying container configuration files to the working directory from which the
+      * container is started.
+      * 
+      * @return The default filter chain
+      */
+     protected Map<String, String> getReplacements()
+     {
+         if (this.replacements == null)
+         {
+             this.replacements = new HashMap<String, String>(getProperties());
+         }
+         return this.replacements;
+     }
+ 
+     /**
+      * Copy the customized configuration files into the cargo home directory.
+      * @param replacements the replacements to use during the copy
+      * @param container local container
+      */
+     protected void configureFiles(Map<String, String> replacements, LocalContainer container)
+     {
+         List<FileConfig> files = this.files;
+ 
+         for (FileConfig fileConfig : files)
+         {
+             boolean isDirectory = false;
+ 
+             if (fileConfig.getFile() == null)
+             {
+                 throw new RuntimeException("File cannot be null");
+             }
+ 
+             File origFile = new File(fileConfig.getFile());
+             if (origFile.isDirectory())
+             {
+                 isDirectory = true;
+             }
+ 
+             String destFile = getDestFileLocation(fileConfig.getFile(),
+                     fileConfig.getToDir(), fileConfig.getToFile());
+ 
+             // we don't want to do anything if the file exists and overwrite is false
+             if (!origFile.exists() || fileConfig.getOverwrite())
+             {
+                 if (isDirectory)
+                 {
+                     String destDir = getDestDirectoryLocation(fileConfig.getFile(), fileConfig
+                             .getToDir());
+ 
+                     if (fileConfig.getConfigfile())
+                     {
+                         getFileHandler().copyDirectory(fileConfig.getFile(), destDir, replacements,
+                             fileConfig.getEncodingAsCharset());
+                     }
+                     else
+                     {
+                         getFileHandler().copyDirectory(fileConfig.getFile(), destDir);
+                     }
+                 }
+                 else
+                 {
+                     if (fileConfig.getConfigfile())
+                     {
+                         getFileHandler().copyFile(fileConfig.getFile(), destFile, replacements,
+                             fileConfig.getEncodingAsCharset());
+                     }
+                     else
+                     {
+                         getFileHandler().copyFile(fileConfig.getFile(), destFile,
+                                 fileConfig.getOverwrite());
+                     }
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Determines the correct path for the destination file.
+      * @param file The path of the original file
+      * @param toDir The directory for the copied file
+      * @param toFile The file name for the copied file
+      * @return The path for the destination file
+      */
+     protected String getDestFileLocation(String file, String toDir, String toFile)
+     {
+         String fileName = file;
+         String finalFile = null;
+ 
+         if (fileName == null)
+         {
+             throw new RuntimeException("file cannot be null");
+         }
+         else if (toFile == null && toDir != null)
+         {
+             // get the filename and add it in the todir directory name
+             String filename = new File(fileName).getName();
+             finalFile = getHome() + "/" + toDir + "/" + filename;
+         }
+         else if (toFile != null && toDir == null)
+         {
+             // just use the tofile filename as the final file
+             finalFile = getHome() + "/" + toFile;
+         }
+         else if (toFile == null && toDir == null)
+         {
+             // use the filename and add it into the conf directory
+             String filename = new File(fileName).getName();
+             finalFile = getHome() + "/" + filename;
+         }
+         else if (toFile != null && toDir != null)
+         {
+             // tofile means what name to call the file in the todir directory
+             finalFile = getHome() + "/" + toDir + "/" + toFile;
+         }
+ 
+         // replace all double slashes with a single slash
+         while (finalFile.contains("//"))
+         {
+             finalFile = finalFile.replaceAll("//", "/");
+         }
+ 
+         return finalFile;
+     }
+ 
+     /**
+      * Determines the correct path for the destination directory.
+      * @param file The path of the original file
+      * @param toDir The directory for the copied file
+      * @return The path for the destination file
+      */
+     protected String getDestDirectoryLocation(String file, String toDir)
+     {
+         String fileName = file;
+         String finalDir = null;
+ 
+         if (fileName == null)
+         {
+             throw new RuntimeException("file cannot be null");
+         }
+         else if (toDir != null)
+         {
+             finalDir = getHome() + "/" + toDir;
+         }
+         else if (toDir == null)
+         {
+             finalDir = getHome();
+         }
+         // replace all double slashes with a single slash
+         while (finalDir.contains("//"))
+         {
+             finalDir = finalDir.replaceAll("//", "/");
+         }
+ 
+         return finalDir;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void verify()
+     {
+         collectUnsupportedResourcesAndThrowException();
+         collectUnsupportedDataSourcesAndThrowException();
+         super.verify();
+     }
+ 
+     /**
+      * Warn user and throw an Exception if any unsupported {@link Resource}s are setup for this
+      * configuration.
+      */
+     public void collectUnsupportedResourcesAndThrowException()
+     {
+         if (!getResources().isEmpty()
+             && !this.getCapability().supportsProperty(ResourcePropertySet.RESOURCE))
+         {
+             StringBuilder errorMessage = new StringBuilder();
+             for (Resource resource : getResources())
+             {
+                 String message =
+                     "This configuration does not support Resource configuration! JndiName: "
+                         + resource.getName();
+                 getLogger().warn(message, getClass().getName());
+                 if (!errorMessage.toString().isEmpty())
+                 {
+                     errorMessage.append("\n");
+                 }
+                 errorMessage.append(message);
+             }
+             throw new CargoException(errorMessage.toString());
+         }
+     }
+ 
+     /**
+      * Warn user and throw an Exception if any unsupported {@link DataSource}s are setup for this
+      * configuration.
+      */
+     public void collectUnsupportedDataSourcesAndThrowException()
+     {
+         StringBuilder errorMessage = new StringBuilder();
+ 
+         for (DataSource dataSource : getDataSources())
+         {
+             String reason = null;
+             if (!this.getCapability().supportsProperty(DatasourcePropertySet.DATASOURCE))
+             {
+                 reason = "This configuration does not support DataSource configuration! ";
+             }
+             else if (ConfigurationEntryType.XA_DATASOURCE.equals(dataSource.getConnectionType())
+                 && !this.getCapability().supportsProperty(DatasourcePropertySet.CONNECTION_TYPE))
+             {
+                 reason =
+                     "This configuration does not support XADataSource configured DataSources! ";
+             }
+             else if (!ConfigurationEntryType.XA_DATASOURCE.equals(dataSource.getConnectionType())
+                 && !TransactionSupport.NO_TRANSACTION.equals(dataSource.getTransactionSupport())
+                 && !this.getCapability().supportsProperty(
+                     DatasourcePropertySet.TRANSACTION_SUPPORT))
+             {
+                 reason =
+                     "This configuration does not support Transactions on Driver configured "
+                         + "DataSources! ";
+             }
+             if (reason != null)
+             {
+                 String message = reason + "JndiName: " + dataSource.getJndiLocation();
+                 if (errorMessage.length() > 0)
+                 {
+                     errorMessage.append("\n");
+                 }
+                 errorMessage.append(message);
+                 getLogger().warn(message, getClass().getName());
+             }
+         }
+         if (errorMessage.length() > 0)
+         {
+             throw new CargoException(errorMessage.toString());
+         }
+     }
+ 
+     /**
+      * Some configuration can be specified as encoded properties. Parse properties and apply what is
+      * found to the appropriate pending configuration list.
+      */
+     public void parsePropertiesForPendingConfiguration()
+     {
+         addResourcesFromProperties();
+         addDataSourcesFromProperties();
+         addUsersFromProperties();
+     }
+ 
+     /**
+      * Parse properties and add any Resources to pending configuration. Resources will be found if
+      * their property name starts with: {@link ResourcePropertySet#RESOURCE}
+      */
+     protected void addResourcesFromProperties()
+     {
+         getLogger().debug("Searching properties for Resource definitions",
+             this.getClass().getName());
+         for (Map.Entry<String, String> property : getProperties().entrySet())
+         {
+             String propertyName = property.getKey();
+             if (propertyName.startsWith(ResourcePropertySet.RESOURCE))
+             {
+                 String resourceProperty = property.getValue();
+                 getLogger().debug("Found Resource definition: value [" + resourceProperty + "]",
+                     this.getClass().getName());
+                 Resource resource = new ResourceConverter().fromPropertyString(resourceProperty);
+                 getResources().add(resource);
+             }
+         }
+     }
+ 
+     /**
+      * Parse properties and add any DataSources to pending configuration. DataSources will be found
+      * if their property name starts with: {@link DatasourcePropertySet#DATASOURCE}
+      */
+     protected void addDataSourcesFromProperties()
+     {
+         getLogger().debug("Searching properties for DataSource definitions",
+             this.getClass().getName());
+         for (Map.Entry<String, String> property : getProperties().entrySet())
+         {
+             String propertyName = property.getKey();
+             if (propertyName.startsWith(DatasourcePropertySet.DATASOURCE))
+             {
+                 String dataSourceProperty = property.getValue();
+                 getLogger().debug(
+                     "Found DataSource definition: value [" + dataSourceProperty + "]",
+                     this.getClass().getName());
+                 DataSource dataSource =
+                     new DataSourceConverter().fromPropertyString(dataSourceProperty);
+                 getDataSources().add(dataSource);
+             }
+         }
+     }
+ 
+     /**
+      * Parse properties and add any users to pending configuration. Users will be retrieved from
+      * their property: {@link ServletPropertySet#USERS}
+      */
+     protected void addUsersFromProperties()
+     {
+         getLogger().debug("Searching properties for User definition",
+             this.getClass().getName());
+ 
+         String usersProperty = getPropertyValue(ServletPropertySet.USERS);
+ 
+         if (usersProperty != null)
+         {
+             getLogger().debug("Found User definition: value [" + usersProperty + "]",
+                     this.getClass().getName());
+ 
+             List<User> usersFromProp = User.parseUsers(usersProperty);
+             getUsers().addAll(usersFromProp);
+         }
+     }
+ 
+     /**
+      * Implementation of {@link LocalConfiguration#configure(LocalContainer)} that all local
+      * configuration using this class must implement. This provides the ability to perform generic
+      * actions before and after the container-specific implementation. Another way would be to use
+      * AOP...
+      * 
+      * @param container the container to configure
+      * @throws Exception if any error is raised during the configuration
+      */
+     protected abstract void doConfigure(LocalContainer container) throws Exception;
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addResource(Resource resource)
+     {
+         this.resources.add(resource);
+     }
+ 
+     /**
+      * @return the configured resources for this container.
+      */
+     @Override
+     public List<Resource> getResources()
+     {
+         return this.resources;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addUser(User user)
+     {
+         this.users.add(user);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<User> getUsers()
+     {
+         return users;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addDataSource(DataSource dataSource)
+     {
+         this.dataSources.add(dataSource);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<DataSource> getDataSources()
+     {
+         return this.dataSources;
+     }
+ 
+     /**
+      * This method should only be called once all the properties has been set. {@inheritDoc}
+      */
+     @Override
+     public void applyPortOffset()
+     {
+         if (this.getPropertyValue(GeneralPropertySet.PORT_OFFSET) != null
+             && !this.getPropertyValue(GeneralPropertySet.PORT_OFFSET).equals("0"))
+         {
+             // Since the properties hashmap is impacted by the revert we must
+             // use a copy of the keys
+             Set<String> keysCopy = new HashSet<String>(this.getProperties().keySet());
+             for (String key : keysCopy)
+             {
+                 // CARGO-1438: Only update numbers for properties prefixed with "cargo."
+                 if (key.startsWith("cargo.") && key.endsWith(".port"))
+                 {
+                     this.applyPortOffset(key);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      * 
+      * This method should only be called once all the properties has been set.
+      */
+     @Override
+     public void revertPortOffset()
+     {
+         if (this.getPropertyValue(GeneralPropertySet.PORT_OFFSET) != null
+             && !this.getPropertyValue(GeneralPropertySet.PORT_OFFSET).equals("0"))
+         {
+             // We need to shift the ports
+ 
+             // Since the properties hashmap is impacted by the revert we must
+             // use a copy of the keys
+             Set<String> keysCopy = new HashSet<String>(this.getProperties().keySet());
+             for (String key : keysCopy)
+             {
+                 // CARGO-1438: Only update numbers for properties prefixed with "cargo."
+                 if (key.startsWith("cargo.") && key.endsWith(".port"))
+                 {
+                     this.revertPortOffset(key);
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Apply the port offset on the specified property
+      * @param name the property name
+      */
+     protected void applyPortOffset(String name)
+     {
+         if (this.getPropertyValue(GeneralPropertySet.PORT_OFFSET) != null
+             && this.getPropertyValue(name) != null
+             && !isOffsetApplied(name))
+         {
+             try
+             {
+                 int portOffset = Integer.parseInt(this.getPropertyValue(
+                     GeneralPropertySet.PORT_OFFSET));
+                 int value = Integer.parseInt(this.getPropertyValue(name));
+                 this.setProperty(name, Integer.toString(value + portOffset));
+                 flagOffsetApplied(name, true);
+             }
+             catch (NumberFormatException e)
+             {
+                 // We do nothing
+             }
+         }
+     }
+ 
+     /**
+      * Revert the port offset on the specified property
+      * 
+      * @param name the property name
+      */
+     protected void revertPortOffset(String name)
+     {
+         if (this.getPropertyValue(GeneralPropertySet.PORT_OFFSET) != null
+                 && this.getPropertyValue(name) != null
+                 && isOffsetApplied(name))
+         {
+             try
+             {
+                 int portOffset = Integer.parseInt(this.getPropertyValue(
+                     GeneralPropertySet.PORT_OFFSET));
+                 int value = Integer.parseInt(this.getPropertyValue(name));
+                 this.setProperty(name, Integer.toString(value - portOffset));
+                 flagOffsetApplied(name, false);
+             }
+             catch (NumberFormatException e)
+             {
+                 // We do nothing
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public boolean isOffsetApplied()
+     {
+         // Servlet port should be available in all containers, so we can use it
+         // to check if offset was applied.
+         return isOffsetApplied(ServletPropertySet.PORT);
+     }
+ 
+     /**
+      * Checks whether the offset is already applied or not
+      * @param name the name of the property to be checked
+      * @return <code>true</code> if the offset is already applied
+      */
+     protected boolean isOffsetApplied(String name)
+     {
+         return super.getPropertyValue(PORT_OFFSET_APPLIED_PREFIX + name) != null;
+     }
+ 
+     /**
+      * Flags whether offset has been applied to a given property or not.
+      * @param name name of the property to be flagged.
+      * @param offsetApplied <code>true</code> if the offset is applied, else <code>false</code>.
+      */
+     protected void flagOffsetApplied(String name, boolean offsetApplied)
+     {
+         this.setProperty(PORT_OFFSET_APPLIED_PREFIX + name,
+             offsetApplied ? String.valueOf(offsetApplied) : null);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-6.html b/htmlReport/ns-f/sources/source-6.html new file mode 100644 index 0000000000..0bb57c4f06 --- /dev/null +++ b/htmlReport/ns-f/sources/source-6.html @@ -0,0 +1,151 @@ + + + + + + + + Coverage Report > AbstractLocalConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: AbstractLocalConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/10) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ 
+ /**
+  * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that needs to be extended by each local configuration's implementation.
+  */
+ public abstract class AbstractLocalConfigurationCapability extends AbstractConfigurationCapability
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractConfigurationCapability#AbstractConfigurationCapability()
+      */
+     public AbstractLocalConfigurationCapability()
+     {
+         this.propertySupportMap.put(GeneralPropertySet.PROTOCOL, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.HOSTNAME, Boolean.TRUE);
+         this.propertySupportMap.put(ServletPropertySet.PORT, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.JAVA_HOME, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.JVMARGS, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.RUNTIME_ARGS, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.START_JVMARGS, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.SPAWN_PROCESS, Boolean.TRUE);
+         this.propertySupportMap.put(GeneralPropertySet.PORT_OFFSET, Boolean.TRUE);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-7.html b/htmlReport/ns-f/sources/source-7.html new file mode 100644 index 0000000000..abad00430c --- /dev/null +++ b/htmlReport/ns-f/sources/source-7.html @@ -0,0 +1,143 @@ + + + + + + + + Coverage Report > AbstractRuntimeConfiguration + + + + + + +
+ + +

Coverage Summary for Class: AbstractRuntimeConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractRuntimeConfiguration + + 0% + + + (0/1) + + + + 0% + + + (0/2) + + + + 0% + + + (0/2) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import org.codehaus.cargo.container.configuration.ConfigurationType;
+ import org.codehaus.cargo.container.configuration.RuntimeConfiguration;
+ 
+ /**
+  * Base implementation for a runtime configuration.
+  */
+ public abstract class AbstractRuntimeConfiguration extends AbstractConfiguration
+     implements RuntimeConfiguration
+ {
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ConfigurationType getType()
+     {
+         return ConfigurationType.RUNTIME;
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-8.html b/htmlReport/ns-f/sources/source-8.html new file mode 100644 index 0000000000..0508e7abcd --- /dev/null +++ b/htmlReport/ns-f/sources/source-8.html @@ -0,0 +1,146 @@ + + + + + + + + Coverage Report > AbstractRuntimeConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: AbstractRuntimeConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractRuntimeConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.RemotePropertySet;
+ 
+ /**
+  * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that needs to be extended by each runtime configuration's implementation.
+  */
+ public abstract class AbstractRuntimeConfigurationCapability
+     extends AbstractConfigurationCapability
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractConfigurationCapability#AbstractConfigurationCapability()
+      */
+     protected AbstractRuntimeConfigurationCapability()
+     {
+         this.propertySupportMap.put(GeneralPropertySet.HOSTNAME, Boolean.TRUE);
+         this.propertySupportMap.put(RemotePropertySet.USERNAME, Boolean.TRUE);
+         this.propertySupportMap.put(RemotePropertySet.PASSWORD, Boolean.TRUE);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-9.html b/htmlReport/ns-f/sources/source-9.html new file mode 100644 index 0000000000..7ec7464772 --- /dev/null +++ b/htmlReport/ns-f/sources/source-9.html @@ -0,0 +1,470 @@ + + + + + + + + Coverage Report > AbstractStandaloneLocalConfiguration + + + + + + +
+ + +

Coverage Summary for Class: AbstractStandaloneLocalConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfiguration + + 100% + + + (1/1) + + + + 26.7% + + + (4/15) + + + + 22.8% + + + (21/92) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import java.io.IOException;
+ import java.nio.charset.Charset;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Set;
+ 
+ import org.codehaus.cargo.container.ContainerException;
+ import org.codehaus.cargo.container.LocalContainer;
+ import org.codehaus.cargo.container.configuration.ConfigurationType;
+ import org.codehaus.cargo.container.configuration.StandaloneLocalConfiguration;
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.LoggingLevel;
+ import org.codehaus.cargo.util.CargoException;
+ import org.codehaus.cargo.util.FileHandler.XmlReplacementDetails;
+ import org.codehaus.cargo.util.XmlReplacement;
+ 
+ /**
+  * Base implementation for a standalone local configuration.
+  */
+ public abstract class AbstractStandaloneLocalConfiguration extends AbstractLocalConfiguration
+     implements StandaloneLocalConfiguration
+ {
+ 
+     /**
+      * The XML replacements for the configuration files. The first map's key is the file name,
+      * the inner map's key is the {@link XmlReplacementDetails} and value the configuration
+      * property.
+      */
+     private Map<String, Map<XmlReplacementDetails, String>> xmlReplacements;
+ 
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalConfiguration#AbstractLocalConfiguration(String)
+      */
+     public AbstractStandaloneLocalConfiguration(String dir)
+     {
+         super(dir);
+ 
+         // Add all required properties that are common to all standalone configurations
+         setProperty(GeneralPropertySet.LOGGING, LoggingLevel.MEDIUM.getLevel());
+         this.xmlReplacements = new HashMap<String, Map<XmlReplacementDetails, String>>();
+     }
+ 
+     /**
+      * Perform the XML replacements for the specified container.
+      * @param container the container to configure
+      */
+     protected void performXmlReplacements(LocalContainer container)
+     {
+         boolean ignoreNonExistingProperties = Boolean.parseBoolean(
+             getPropertyValue(GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES));
+ 
+         for (Map.Entry<String, Map<XmlReplacementDetails, String>> xmlReplacementDetails
+             : this.xmlReplacements.entrySet())
+         {
+             Set<XmlReplacement> replacements = new HashSet<XmlReplacement>();
+             String destinationFile = getFileHandler().append(
+                 container.getConfiguration().getHome(), xmlReplacementDetails.getKey());
+ 
+             for (Map.Entry<XmlReplacementDetails, String> xmlReplacementDetail
+                     : xmlReplacementDetails.getValue().entrySet())
+             {
+                 String value = container.getConfiguration().getPropertyValue(
+                     xmlReplacementDetail.getValue());
+ 
+                 if (value == null)
+                 {
+                     value = xmlReplacementDetail.getValue();
+                 }
+ 
+                 XmlReplacementDetails key = xmlReplacementDetail.getKey();
+                 XmlReplacement xmlReplacement = new XmlReplacement(destinationFile,
+                     key.getXpathExpression(), key.getAttributeName(), key.getReplacementBehavior(),
+                         value);
+ 
+                 if (ignoreNonExistingProperties)
+                 {
+                     xmlReplacement.setReplacementBehavior(
+                             XmlReplacement.ReplacementBehavior.IGNORE_IF_NON_EXISTING);
+                 }
+ 
+                 replacements.add(xmlReplacement);
+             }
+ 
+             if (!replacements.isEmpty())
+             {
+                 XmlReplacement[] replacementsArray = new XmlReplacement[replacements.size()];
+                 replacementsArray = replacements.toArray(replacementsArray);
+                 getFileHandler().replaceInXmlFile(replacementsArray);
+             }
+         }
+     }
+ 
+     /**
+      * Set up the configuration directory (create it and clean it). We clean it because we want to
+      * be sure the container starts with the same set up every time and there's no side effects
+      * introduced by a previous run or someone modifying some files in there.
+      * 
+      * <p>
+      * Note: We only clean the configuration directory if it's empty or if there is a Cargo
+      * timestamp file. This is to prevent deleting not empty directories if the user has mistakenly
+      * pointed the configuration dir to an existing location.
+      * </p>
+      * 
+      * @throws IOException if the directory cannot be created
+      */
+     protected void setupConfigurationDir() throws IOException
+     {
+         String timestampFile = getFileHandler().append(getHome(), ".cargo");
+ 
+         // Start by cleaning the configuration directory. Do it only if there's already a Cargo
+         // timestamp or if the configuration directory exists but is empty or if the configuration
+         // directory doesn't exist.
+         boolean isEmpty = false;
+         if (!getFileHandler().exists(getHome()))
+         {
+             isEmpty = true;
+         }
+         else if (!getFileHandler().isDirectory(getHome()))
+         {
+             isEmpty = true;
+         }
+         else if (getFileHandler().isDirectoryEmpty(getHome()))
+         {
+             isEmpty = true;
+         }
+         else if (getFileHandler().exists(timestampFile))
+         {
+             isEmpty = true;
+         }
+ 
+         if (isEmpty)
+         {
+             getFileHandler().delete(getHome());
+ 
+             getFileHandler().mkdirs(getHome());
+ 
+             // Create Cargo timestamp file
+             getFileHandler().createFile(timestampFile);
+         }
+         else
+         {
+             throw new ContainerException("Invalid configuration dir [" + getHome() + "]. "
+                 + "When using standalone configurations, the configuration dir must point to an "
+                 + "empty directory - Except if the configuration was created by Cargo.");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addXmlReplacement(XmlReplacement xmlReplacement)
+     {
+         Map<XmlReplacementDetails, String> fileReplacements =
+             this.xmlReplacements.get(xmlReplacement.getFile());
+         if (fileReplacements == null)
+         {
+             fileReplacements = new HashMap<XmlReplacementDetails, String>();
+             this.xmlReplacements.put(xmlReplacement.getFile(), fileReplacements);
+         }
+ 
+         fileReplacements.put(new XmlReplacementDetails(xmlReplacement.getXpathExpression(),
+             xmlReplacement.getAttributeName(), xmlReplacement.getReplacementBehavior()),
+                 xmlReplacement.getValue());
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addXmlReplacement(String filename, String xpathExpression,
+         String configurationPropertyName)
+     {
+         addXmlReplacement(filename, xpathExpression, null, configurationPropertyName);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addXmlReplacement(String filename, String xpathExpression, String attributeName,
+         String configurationPropertyName)
+     {
+         Map<XmlReplacementDetails, String> fileReplacements = this.xmlReplacements.get(filename);
+         if (fileReplacements == null)
+         {
+             fileReplacements = new HashMap<XmlReplacementDetails, String>();
+             this.xmlReplacements.put(filename, fileReplacements);
+         }
+ 
+         fileReplacements.put(new XmlReplacementDetails(xpathExpression, attributeName,
+             XmlReplacement.ReplacementBehavior.THROW_EXCEPTION),
+                 configurationPropertyName);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void addXmlReplacement(String filename, String xpathExpression, String attributeName,
+         String configurationPropertyName, XmlReplacement.ReplacementBehavior replacementBehavior)
+     {
+         Map<XmlReplacementDetails, String> fileReplacements = this.xmlReplacements.get(filename);
+         if (fileReplacements == null)
+         {
+             fileReplacements = new HashMap<XmlReplacementDetails, String>();
+             this.xmlReplacements.put(filename, fileReplacements);
+         }
+ 
+         fileReplacements.put(new XmlReplacementDetails(xpathExpression, attributeName,
+             replacementBehavior), configurationPropertyName);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void removeXmlReplacement(String filename, String xpathExpression)
+     {
+         removeXmlReplacement(filename, xpathExpression, null);
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void removeXmlReplacement(String filename, String xpathExpression,
+         String attributeName)
+     {
+         Map<XmlReplacementDetails, String> fileReplacements = this.xmlReplacements.get(filename);
+         if (fileReplacements != null)
+         {
+             fileReplacements.remove(
+                 new XmlReplacementDetails(xpathExpression, attributeName,
+                     XmlReplacement.ReplacementBehavior.THROW_EXCEPTION));
+ 
+             if (fileReplacements.isEmpty())
+             {
+                 this.xmlReplacements.remove(filename);
+             }
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public List<XmlReplacement> getXmlReplacements()
+     {
+         List<XmlReplacement> xmlReplacements = new ArrayList<XmlReplacement>();
+ 
+         for (Map.Entry<String, Map<XmlReplacementDetails, String>> xmlReplacementEntry
+             : this.xmlReplacements.entrySet())
+         {
+             for (Map.Entry<XmlReplacementDetails, String> xmlReplacementDetail
+                 : xmlReplacementEntry.getValue().entrySet())
+             {
+                 XmlReplacementDetails key = xmlReplacementDetail.getKey();
+                 XmlReplacement xmlReplacement = new XmlReplacement(xmlReplacementEntry.getKey(),
+                     key.getXpathExpression(), key.getAttributeName(), key.getReplacementBehavior(),
+                         xmlReplacementDetail.getValue());
+ 
+                 xmlReplacements.add(xmlReplacement);
+             }
+         }
+ 
+         return xmlReplacements;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public void verify()
+     {
+         super.verify();
+ 
+         // Verify that the logging level is a valid level
+         verifyLogging();
+     }
+ 
+     /**
+      * Verify that the logging level specified is a valid level.
+      */
+     private void verifyLogging()
+     {
+         String level = getPropertyValue(GeneralPropertySet.LOGGING);
+         try
+         {
+             LoggingLevel.toLevel(level);
+         }
+         catch (IllegalArgumentException e)
+         {
+             throw new ContainerException("Invalid logging level [" + level
+                 + "]. Valid levels are {\"low\", \"medium\", " + "\"high\"}");
+         }
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     public ConfigurationType getType()
+     {
+         return ConfigurationType.STANDALONE;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      */
+     @Override
+     protected void configureFiles(Map<String, String> replacements, LocalContainer container)
+     {
+         performXmlReplacements(container);
+         super.configureFiles(replacements, container);
+     }
+ 
+     /**
+      * Replaces using a map of replacements in a given file.
+      * 
+      * @param file File to replace in.
+      * @param replacements Map containing replacements.
+      * @param encoding The character encoding to use, may be {@code null} or empty to use the
+      *            platform's default encoding.
+      * @throws CargoException If anything fails, most notably if one of the replacements does not
+      * exist in the file.
+      */
+     protected void replaceInFile(String file, Map<String, String> replacements, Charset encoding)
+         throws CargoException
+     {
+         boolean ignoreNonExistingProperties = Boolean.parseBoolean(
+             getPropertyValue(GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES));
+ 
+         if (replacements.isEmpty())
+         {
+             return;
+         }
+         String path = getHome() + "/" + file;
+         getFileHandler().replaceInFile(path, replacements, encoding, ignoreNonExistingProperties);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-a.html b/htmlReport/ns-f/sources/source-a.html new file mode 100644 index 0000000000..231ecffb5b --- /dev/null +++ b/htmlReport/ns-f/sources/source-a.html @@ -0,0 +1,149 @@ + + + + + + + + Coverage Report > AbstractStandaloneLocalConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: AbstractStandaloneLocalConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
AbstractStandaloneLocalConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/1) + + + + 0% + + + (0/4) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import org.codehaus.cargo.container.property.GeneralPropertySet;
+ import org.codehaus.cargo.container.property.ServletPropertySet;
+ 
+ /**
+  * Base implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that needs to be extended by each standalone configuration's implementation.
+  */
+ public abstract class AbstractStandaloneLocalConfigurationCapability
+     extends AbstractLocalConfigurationCapability
+ {
+     /**
+      * {@inheritDoc}
+      * @see AbstractLocalConfigurationCapability#AbstractLocalConfigurationCapability()
+      */
+     public AbstractStandaloneLocalConfigurationCapability()
+     {
+         this.propertySupportMap.put(GeneralPropertySet.LOGGING, Boolean.TRUE);
+ 
+         this.propertySupportMap.put(GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES,
+             Boolean.TRUE);
+ 
+         this.propertySupportMap.put(ServletPropertySet.USERS, Boolean.TRUE);
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-b.html b/htmlReport/ns-f/sources/source-b.html new file mode 100644 index 0000000000..830254c2fb --- /dev/null +++ b/htmlReport/ns-f/sources/source-b.html @@ -0,0 +1,156 @@ + + + + + + + + Coverage Report > NullConfigurationCapability + + + + + + +
+ + +

Coverage Summary for Class: NullConfigurationCapability (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + + + + + + + +
Class + Class, % + + Method, % + + Line, % +
NullConfigurationCapability + + 0% + + + (0/1) + + + + 0% + + + (0/3) + + + + 0% + + + (0/3) + +
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ import java.util.Collections;
+ import java.util.Map;
+ 
+ import org.codehaus.cargo.container.configuration.ConfigurationCapability;
+ 
+ /**
+  * Implementation of {@link org.codehaus.cargo.container.configuration.ConfigurationCapability}
+  * that doesn't support anything.
+  */
+ public class NullConfigurationCapability implements ConfigurationCapability
+ {
+     /**
+      * {@inheritDoc}
+      * @return Always returns <code>false</code>.
+      */
+     @Override
+     public boolean supportsProperty(String propertyName)
+     {
+         return false;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      * @return Always returns {@link Collections#emptyMap()}.
+      */
+     @Override
+     public Map<String, Boolean> getProperties()
+     {
+         return Collections.emptyMap();
+     }
+ }
+
+
+
+ + + + + + diff --git a/htmlReport/ns-f/sources/source-c.html b/htmlReport/ns-f/sources/source-c.html new file mode 100644 index 0000000000..2432c80aa0 --- /dev/null +++ b/htmlReport/ns-f/sources/source-c.html @@ -0,0 +1,102 @@ + + + + + + + + Coverage Report > ContainerConfiguration + + + + + + +
+ + +

Coverage Summary for Class: ContainerConfiguration (org.codehaus.cargo.container.spi.configuration)

+ + + + + + + + + +
Class
ContainerConfiguration
+ +
+
+ + +
+ /*
+  * ========================================================================
+  *
+  * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  * ========================================================================
+  */
+ package org.codehaus.cargo.container.spi.configuration;
+ 
+ /**
+  * Container implementations of {@link org.codehaus.cargo.container.configuration.Configuration}
+  * must also implement this interface. This is an SPI interface and shouldn't be used by end users.
+  */
+ public interface ContainerConfiguration
+ {
+     /**
+      * Verify that the configuration is valid. The checks to be performed may vay whether this is
+      * standalone or existing configuration. This method should also be used to verify that the
+      * configuration properties specified by the user are valid and that the required ones are set.
+      */
+     void verify();
+ }
+
+
+
+ + + + + + From 38b93c257acfdffdae35cbe33121d54ae681974e Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Fri, 24 Nov 2023 00:26:35 -0400 Subject: [PATCH 2/9] Refactored DeploymentManager to remove long statement smell using extraCT method --- .../packager/DefaultPackagerFactory.java | 5 +- .../generic/packager/PackagerFactory.java | 3 + .../tomcat/TomcatFactoryRegistry.java | 1 + .../container/tomee/TomeeFactoryRegistry.java | 1 + .../cargo/tools/jboss/JBossDeployer.java | 75 +++++++++++++------ 5 files changed, 61 insertions(+), 24 deletions(-) diff --git a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java index 0d40a22532..924e84e027 100644 --- a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java +++ b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/DefaultPackagerFactory.java @@ -22,6 +22,8 @@ import java.lang.reflect.Constructor; import org.codehaus.cargo.container.ContainerException; +import org.codehaus.cargo.container.packager.Packager; +import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.generic.AbstractFactoryRegistry; import org.codehaus.cargo.generic.internal.util.RegistrationKey; import org.codehaus.cargo.generic.internal.util.SimpleContainerIdentity; @@ -32,8 +34,7 @@ * registered against their containers. It also supports registering new packagers against any * container. */ -public class DefaultPackagerFactory extends AbstractIntrospectionGenericHintFactory - implements PackagerFactory +public class DefaultPackagerFactory extends AbstractIntrospectionGenericHintFactory implements PackagerFactory { /** * @see org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters diff --git a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java index 509d521af9..6041f93887 100644 --- a/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java +++ b/core/api/generic/src/main/java/org/codehaus/cargo/generic/packager/PackagerFactory.java @@ -19,6 +19,9 @@ */ package org.codehaus.cargo.generic.packager; +import org.codehaus.cargo.container.packager.Packager; +import org.codehaus.cargo.container.packager.PackagerType; + /** * Create a {@link org.codehaus.cargo.container.packager.Packager} instance for a given container. */ diff --git a/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java b/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java index 971c8e6309..851431d8d2 100644 --- a/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java +++ b/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatFactoryRegistry.java @@ -24,6 +24,7 @@ import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployer.DeployerType; import org.codehaus.cargo.container.internal.ServletContainerCapability; +import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.container.tomcat.internal.Tomcat4xStandaloneLocalConfigurationCapability; import org.codehaus.cargo.container.tomcat.internal.Tomcat5xStandaloneLocalConfigurationCapability; import org.codehaus.cargo.container.tomcat.internal.Tomcat6xStandaloneLocalConfigurationCapability; diff --git a/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java b/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java index 7e3042484d..e9a53a458f 100644 --- a/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java +++ b/core/containers/tomee/src/main/java/org/codehaus/cargo/container/tomee/TomeeFactoryRegistry.java @@ -23,6 +23,7 @@ import org.codehaus.cargo.container.configuration.ConfigurationType; import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployer.DeployerType; +import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.container.tomcat.TomcatDirectoryPackager; import org.codehaus.cargo.container.tomcat.TomcatWAR; import org.codehaus.cargo.container.tomcat.internal.TomcatExistingLocalConfigurationCapability; diff --git a/core/tools/jboss-deployer-5/src/main/java/org/codehaus/cargo/tools/jboss/JBossDeployer.java b/core/tools/jboss-deployer-5/src/main/java/org/codehaus/cargo/tools/jboss/JBossDeployer.java index 109d2991ac..89876aa955 100644 --- a/core/tools/jboss-deployer-5/src/main/java/org/codehaus/cargo/tools/jboss/JBossDeployer.java +++ b/core/tools/jboss-deployer-5/src/main/java/org/codehaus/cargo/tools/jboss/JBossDeployer.java @@ -21,12 +21,17 @@ import java.io.File; import java.util.Collections; +import java.util.Map; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.LoginContext; +import javax.security.auth.login.LoginException; + import org.codehaus.cargo.container.ContainerException; import org.codehaus.cargo.container.configuration.Configuration; @@ -158,42 +163,68 @@ private void checkFailed(DeploymentProgress progress) throws Exception * @return The JBoss deployment manager. * @throws Exception If anything fails. */ - private DeploymentManager getDeploymentManager() throws Exception - { + + private DeploymentManager getDeploymentManager() throws Exception { + StringBuilder providerURL = createProviderURL(); + + Properties properties = createProperties(providerURL.toString()); + + LoginContext loginContext = createLoginContext(this.configuration); + loginContext.login(); + + Context ctx = createContext(properties); + + ProfileService ps = (ProfileService) ctx.lookup("ProfileService"); + + try { + return ps.getDeploymentManager(); + } catch (Exception e) { + throw new ContainerException( + "Cannot get the JBoss Deployment Manager on Provider URL " + providerURL, e); + } + + // TODO: think about logout ? + } + + private StringBuilder createProviderURL() { StringBuilder providerURL = new StringBuilder(); providerURL.append("jnp://"); providerURL.append(this.configuration.getPropertyValue(GeneralPropertySet.HOSTNAME)); providerURL.append(':'); providerURL.append(this.configuration.getPropertyValue(GeneralPropertySet.RMI_PORT)); + return providerURL; + } + private Properties createProperties(String providerURL) { Properties properties = new Properties(); properties.setProperty( - Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); - properties.setProperty(Context.PROVIDER_URL, providerURL.toString()); + Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); + properties.setProperty(Context.PROVIDER_URL, providerURL); properties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); + return properties; + } - new LoginContext("jboss-jaas", null, - new UsernamePasswordCallbackHandler(this.configuration), - new JaasConfiguration(new AppConfigurationEntry( - "org.jboss.security.ClientLoginModule", - AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, - Collections.EMPTY_MAP))).login(); + private AppConfigurationEntry createAppConfigEntry() { + String loginModuleName = "org.jboss.security.ClientLoginModule"; + Map options = Collections.EMPTY_MAP; - Context ctx = new InitialContext(properties); + return new AppConfigurationEntry( + loginModuleName, + AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, + options + ); + } - ProfileService ps = (ProfileService) ctx.lookup("ProfileService"); + private LoginContext createLoginContext(Configuration configuration) throws LoginException { + AppConfigurationEntry configEntry = createAppConfigEntry(); + CallbackHandler callbackHandler = new UsernamePasswordCallbackHandler(configuration); + JaasConfiguration jaasConfig = new JaasConfiguration(configEntry); - try - { - return ps.getDeploymentManager(); - } - catch (Exception e) - { - throw new ContainerException( - "Cannot get the JBoss Deployment Manager on Provider URL " + providerURL, e); - } + return new LoginContext("jboss-jaas", null, callbackHandler, jaasConfig); + } - // TODO: think about logout ? + private Context createContext(Properties properties) throws NamingException { + return new InitialContext(properties); } } From 06e29715ff71539f72610ad11cee41479fa9efe6 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Fri, 24 Nov 2023 01:16:00 -0400 Subject: [PATCH 3/9] Refactored DeploymentManager to remove long statement smell using extraCT method --- .../merge/tagstrategy/NodeMergeStrategy.java | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java index d1c73027ab..c77a4c4fec 100644 --- a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java +++ b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java @@ -155,60 +155,59 @@ else if (content instanceof Text) * @param right The right hand node * @return the replaced string */ - private String replaceValue(String string, DescriptorElement left, DescriptorElement right) - { + + private String replaceValue(String string, DescriptorElement left, DescriptorElement right) { String xPath; Element element; - String result = ""; - - if (string.startsWith("$left:")) - { + if (string.startsWith("$left:")) { xPath = string.substring(6); element = left; - } - else if (string.startsWith("$right:")) - { + } else if (string.startsWith("$right:")) { xPath = string.substring(7); element = right; - } - else - { - // Make sure we don't loop forever! + } else { return ""; } - try - { - // CARGO-1175: Avoid XPath and namespace problems - String nsPrefix = null; - if (!element.getNamespaceURI().isEmpty()) - { - nsPrefix = element.getNamespacePrefix(); - if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) - { - if (nsPrefix.isEmpty()) - { - nsPrefix = "cargo-xs"; - } - xPath = nsPrefix + ":" + xPath; - } - } - XPath xp = XPath.newInstance(xPath); - if (nsPrefix != null) - { - xp.addNamespace(nsPrefix, element.getNamespaceURI()); - } - Element nestedText = (Element) xp.selectSingleNode(element); - if (nestedText != null) - { - result = nestedText.getText(); + + try { + String result = getValueFromXPath(element, xPath); + return result != null ? result : ""; // Return the result or an empty string if null + } catch (JDOMException e) { + return e.getMessage(); // Return the exception message if there's an error + } + } + + private String getValueFromXPath(Element element, String xPath) throws JDOMException { + String nsPrefix = getNamespacePrefix(element, xPath); + xPath = handleXPathNamespace(xPath, element, nsPrefix); + + XPath xp = XPath.newInstance(xPath); + if (nsPrefix != null) { + xp.addNamespace(nsPrefix, element.getNamespaceURI()); + } + Element nestedText = (Element) xp.selectSingleNode(element); + return nestedText != null ? nestedText.getText() : null; + } + + private String getNamespacePrefix(Element element, String xPath) { + if (!element.getNamespaceURI().isEmpty()) { + String nsPrefix = element.getNamespacePrefix(); + if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) { + return nsPrefix.isEmpty() ? "cargo-xs" : nsPrefix; } } - catch (JDOMException e) - { - result = e.getMessage(); + return null; + } + + private String handleXPathNamespace(String xPath, Element element, String nsPrefix) { + if (nsPrefix != null) { + if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) { + return nsPrefix + ":" + xPath; + } } - return result; + return xPath; } + } From deea54374babeaedbdb777363f7bf717f40160e5 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Fri, 24 Nov 2023 01:16:00 -0400 Subject: [PATCH 4/9] Refactored the Method Name: replaceValue using Introduce Explaining Variable and Decompose Conditional --- .../merge/tagstrategy/NodeMergeStrategy.java | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java index d1c73027ab..c77a4c4fec 100644 --- a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java +++ b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/tagstrategy/NodeMergeStrategy.java @@ -155,60 +155,59 @@ else if (content instanceof Text) * @param right The right hand node * @return the replaced string */ - private String replaceValue(String string, DescriptorElement left, DescriptorElement right) - { + + private String replaceValue(String string, DescriptorElement left, DescriptorElement right) { String xPath; Element element; - String result = ""; - - if (string.startsWith("$left:")) - { + if (string.startsWith("$left:")) { xPath = string.substring(6); element = left; - } - else if (string.startsWith("$right:")) - { + } else if (string.startsWith("$right:")) { xPath = string.substring(7); element = right; - } - else - { - // Make sure we don't loop forever! + } else { return ""; } - try - { - // CARGO-1175: Avoid XPath and namespace problems - String nsPrefix = null; - if (!element.getNamespaceURI().isEmpty()) - { - nsPrefix = element.getNamespacePrefix(); - if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) - { - if (nsPrefix.isEmpty()) - { - nsPrefix = "cargo-xs"; - } - xPath = nsPrefix + ":" + xPath; - } - } - XPath xp = XPath.newInstance(xPath); - if (nsPrefix != null) - { - xp.addNamespace(nsPrefix, element.getNamespaceURI()); - } - Element nestedText = (Element) xp.selectSingleNode(element); - if (nestedText != null) - { - result = nestedText.getText(); + + try { + String result = getValueFromXPath(element, xPath); + return result != null ? result : ""; // Return the result or an empty string if null + } catch (JDOMException e) { + return e.getMessage(); // Return the exception message if there's an error + } + } + + private String getValueFromXPath(Element element, String xPath) throws JDOMException { + String nsPrefix = getNamespacePrefix(element, xPath); + xPath = handleXPathNamespace(xPath, element, nsPrefix); + + XPath xp = XPath.newInstance(xPath); + if (nsPrefix != null) { + xp.addNamespace(nsPrefix, element.getNamespaceURI()); + } + Element nestedText = (Element) xp.selectSingleNode(element); + return nestedText != null ? nestedText.getText() : null; + } + + private String getNamespacePrefix(Element element, String xPath) { + if (!element.getNamespaceURI().isEmpty()) { + String nsPrefix = element.getNamespacePrefix(); + if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) { + return nsPrefix.isEmpty() ? "cargo-xs" : nsPrefix; } } - catch (JDOMException e) - { - result = e.getMessage(); + return null; + } + + private String handleXPathNamespace(String xPath, Element element, String nsPrefix) { + if (nsPrefix != null) { + if (nsPrefix.isEmpty() || !xPath.startsWith(nsPrefix)) { + return nsPrefix + ":" + xPath; + } } - return result; + return xPath; } + } From 2fc08f926c76acb50fc515ebafc5f7ec3b237812 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Fri, 24 Nov 2023 01:50:28 -0400 Subject: [PATCH 5/9] Refactored Start method using Rename Method/Variable Refactoring --- .../container/spi/jvm/DefaultJvmLauncher.java | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/core/api/container/src/main/java/org/codehaus/cargo/container/spi/jvm/DefaultJvmLauncher.java b/core/api/container/src/main/java/org/codehaus/cargo/container/spi/jvm/DefaultJvmLauncher.java index 80bc6a8af6..db2ee329f0 100644 --- a/core/api/container/src/main/java/org/codehaus/cargo/container/spi/jvm/DefaultJvmLauncher.java +++ b/core/api/container/src/main/java/org/codehaus/cargo/container/spi/jvm/DefaultJvmLauncher.java @@ -541,56 +541,54 @@ public void setSpawn(boolean spawn) /** * {@inheritDoc} */ + @Override - public void start() throws JvmLauncherException - { - try - { - ProcessBuilder pb = - new ProcessBuilder(buildCommandLine()).directory(workingDirectory) + public void start() throws JvmLauncherException { + try { + ProcessBuilder processBuilder = new ProcessBuilder(buildCommandLine()).directory(workingDirectory) .redirectErrorStream(true); - if (outputFile != null) - { - pb.redirectOutput( - appendOutput ? Redirect.appendTo(outputFile) : Redirect.to(outputFile)); + + if (outputFile != null) { + processBuilder.redirectOutput(appendOutput ? Redirect.appendTo(outputFile) : Redirect.to(outputFile)); } - pb.environment().putAll(environmentVariables); - this.process = pb.start(); + processBuilder.environment().putAll(environmentVariables); + + this.process = processBuilder.start(); process.getOutputStream().close(); - if (outputFile == null) - { - if (outputLogger != null) - { - Thread outputStreamRedirector = - new Thread(new DefaultJvmLauncherLoggerRedirector( - process.getInputStream(), outputLogger, category)); - outputStreamRedirector.start(); - } - else - { - process.getErrorStream().close(); - process.getInputStream().close(); + if (outputFile == null) { + if (outputLogger != null) { + Thread outputStreamRedirectorThread = createOutputStreamRedirectorThread(); + outputStreamRedirectorThread.start(); + } else { + closeStreams(); } } - } - catch (IOException e) - { + } catch (IOException e) { throw new JvmLauncherException("Failed to launch process " + e); + } finally { + addShutdownHookForCleanup(); } - finally - { - Runtime.getRuntime().addShutdownHook(new Thread() - { - @Override - public void run() - { - DefaultJvmLauncher.shutdownInProgress = true; - DefaultJvmLauncher.this.kill(); - } - }); - } + } + + private Thread createOutputStreamRedirectorThread() { + return new Thread(new DefaultJvmLauncherLoggerRedirector(process.getInputStream(), outputLogger, category)); + } + + private void closeStreams() throws IOException { + process.getErrorStream().close(); + process.getInputStream().close(); + } + + private void addShutdownHookForCleanup() { + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + DefaultJvmLauncher.shutdownInProgress = true; + DefaultJvmLauncher.this.kill(); + } + }); } /** From 87a1ec18aca0f65d5af8878d024dd6fad84305c7 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Sun, 26 Nov 2023 02:15:12 -0400 Subject: [PATCH 6/9] Refactored and segregated the logic for merging documents into a separate strategy class (DocumentMergeStrategy). --- .../cargo/module/DescriptorElement.java | 147 +++++++++++------- .../cargo/module/merge/DocumentMerger.java | 112 ++++--------- .../container/jetty/JettyFactoryRegistry.java | 1 + 3 files changed, 127 insertions(+), 133 deletions(-) diff --git a/core/api/module/src/main/java/org/codehaus/cargo/module/DescriptorElement.java b/core/api/module/src/main/java/org/codehaus/cargo/module/DescriptorElement.java index 8960c8a988..31bb436289 100644 --- a/core/api/module/src/main/java/org/codehaus/cargo/module/DescriptorElement.java +++ b/core/api/module/src/main/java/org/codehaus/cargo/module/DescriptorElement.java @@ -1,72 +1,115 @@ -/* - * ======================================================================== - * - * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ======================================================================== - */ +///* +// * ======================================================================== +// * +// * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen. +// * +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// * +// * ======================================================================== +// */ +//package org.codehaus.cargo.module; +// +//import org.jdom2.Element; +// +///** +// * Extension of JDOM element that represents a descriptor element. +// */ +//public class DescriptorElement extends Element +//{ +// /** +// * The tag that this element represents. +// */ +// private DescriptorTag tag; +// +// /** +// * Constructor. +// * +// * @param tag the tag type +// */ +// public DescriptorElement(DescriptorTag tag) +// { +// super(tag.getTagName(), tag.getTagNamespace()); +// this.tag = tag; +// } +// +// /** +// * Constructor. +// * +// * @param tag the tag type +// * @param element element to clone +// */ +// public DescriptorElement(DescriptorTag tag, Element element) +// { +// this.tag = tag; +// this.addContent(element.detach()); +// } +// +// /** +// * @return the tag +// */ +// public DescriptorTag getTag() +// { +// return this.tag; +// } +// +// /** +// * @param tag the tag to set +// */ +// public void setTag(DescriptorTag tag) +// { +// this.tag = tag; +// } +//} + package org.codehaus.cargo.module; import org.jdom2.Element; -/** - * Extension of JDOM element that represents a descriptor element. - */ -public class DescriptorElement extends Element -{ - /** - * The tag that this element represents. - */ +public class DescriptorElement extends Element { private DescriptorTag tag; - /** - * Constructor. - * - * @param tag the tag type - */ - public DescriptorElement(DescriptorTag tag) - { + public DescriptorElement(DescriptorTag tag) { super(tag.getTagName(), tag.getTagNamespace()); this.tag = tag; } - /** - * Constructor. - * - * @param tag the tag type - * @param element element to clone - */ - public DescriptorElement(DescriptorTag tag, Element element) - { + public DescriptorElement(DescriptorTag tag, Element element) { this.tag = tag; this.addContent(element.detach()); } - /** - * @return the tag - */ - public DescriptorTag getTag() - { + public DescriptorTag getTag() { return this.tag; } - /** - * @param tag the tag to set - */ - public void setTag(DescriptorTag tag) - { + public void setTag(DescriptorTag tag) { this.tag = tag; } + + // Extracted class for handling tag-specific operations + private static class TagOperationsHandler { + protected void performTagOperation1(DescriptorTag tag) { + // Operations specific to tag 1 + } + + protected void performTagOperation2(DescriptorTag tag) { + // Operations specific to tag 2 + } + + // Other tag-specific operations + } + + // Remaining methods and members of DescriptorElement class + + // Public methods remain unchanged } diff --git a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/DocumentMerger.java b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/DocumentMerger.java index aac02146a7..7e1d2548bb 100644 --- a/core/api/module/src/main/java/org/codehaus/cargo/module/merge/DocumentMerger.java +++ b/core/api/module/src/main/java/org/codehaus/cargo/module/merge/DocumentMerger.java @@ -1,22 +1,3 @@ -/* - * ======================================================================== - * - * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ======================================================================== - */ package org.codehaus.cargo.module.merge; import java.util.ArrayList; @@ -26,87 +7,56 @@ import org.jdom2.Document; import org.jdom2.Element; -/** - * Class that can merge two DOM Documents, relatively simply. This works by just importing all the - * child nodes from the right-hand document into the left-hand document.
- *
- * Create the DocumentMerger, then call addMergeItem successive times - * with Documents. Finally call performMerge(), which will return you the - * merged DOM Document.
- *
- * This class may be overridden by subclasses that wish to apply strategies to particular types of - * XML document. - */ -public class DocumentMerger implements MergeProcessor -{ - /** - * The list of merge documents. - */ - private List documents = new ArrayList(); +public class DocumentMerger implements MergeProcessor { + private List documents = new ArrayList<>(); - /** - * {@inheritDoc} - */ @Override - public void addMergeItem(Object mergeItem) throws MergeException - { - if (mergeItem instanceof Document) - { + public void addMergeItem(Object mergeItem) throws MergeException { + if (mergeItem instanceof Document) { this.documents.add((Document) mergeItem); - } - else - { + } else { throw new MergeException("DocumentMerger can only merge Documents"); } } - /** - * {@inheritDoc} - */ @Override - public Object performMerge() - { - if (this.documents.isEmpty()) - { + public Object performMerge() { + if (this.documents.isEmpty()) { return null; } - Document doc = this.documents.get(0); + DocumentMergeStrategy mergeStrategy = new DefaultDocumentMergeStrategy(); - for (int i = 1; i < this.documents.size(); i++) - { - Document temp = merge(doc, this.documents.get(i)); - doc = temp; + Document doc = this.documents.get(0); + for (int i = 1; i < this.documents.size(); i++) { + Document right = this.documents.get(i); + doc = mergeStrategy.mergeDocuments(doc, right); } return doc; } + // Extracted strategy class for merging documents + private interface DocumentMergeStrategy { + Document mergeDocuments(Document left, Document right); + } - /** - * Merge the right hand document into the left hand document, currently by just adding all the - * nodes from right into left. - * - * @param left in the left hand document - * @param right the right hand document - * @return merged document - */ - private Document merge(Document left, Document right) - { - List children = new ArrayList(); - children.addAll(right.getRootElement().getContent()); - - Document tempLeft = (Document) left.clone(); - - for (Content node : children) - { - if (node instanceof Element) - { - Content clone = ((Element) node).detach(); - tempLeft.getRootElement().addContent(clone); + // Default strategy that adds nodes from the right into the left + private static class DefaultDocumentMergeStrategy implements DocumentMergeStrategy { + @Override + public Document mergeDocuments(Document left, Document right) { + List children = new ArrayList<>(right.getRootElement().getContent()); + Document tempLeft = (Document) left.clone(); + + for (Content node : children) { + if (node instanceof Element) { + Content clone = ((Element) node).detach(); + tempLeft.getRootElement().addContent(clone); + } } - } - return tempLeft; + return tempLeft; + } } } + diff --git a/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java b/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java index 8e23b92c58..5a30a4b613 100644 --- a/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java +++ b/core/containers/jetty/src/main/java/org/codehaus/cargo/container/jetty/JettyFactoryRegistry.java @@ -33,6 +33,7 @@ import org.codehaus.cargo.container.jetty.internal.JettyExistingLocalConfigurationCapability; import org.codehaus.cargo.container.jetty.internal.JettyRuntimeConfigurationCapability; import org.codehaus.cargo.container.jetty.internal.JettyStandaloneLocalConfigurationCapability; +import org.codehaus.cargo.container.packager.PackagerType; import org.codehaus.cargo.generic.AbstractFactoryRegistry; import org.codehaus.cargo.generic.ContainerCapabilityFactory; import org.codehaus.cargo.generic.ContainerFactory; From c4baa22a7847e7f558e88765083f078476d649fe Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Mon, 27 Nov 2023 22:11:25 -0400 Subject: [PATCH 7/9] Refactored UsernamePasswordCallbackHandler using Replace conditional with polymorphism --- .../UsernamePasswordCallbackHandler.java | 168 +++++++----------- extensions/maven3/plugin/pom.xml | 5 + 2 files changed, 72 insertions(+), 101 deletions(-) diff --git a/core/tools/jboss-deployer-api/src/main/java/org/codehaus/cargo/container/jboss/internal/UsernamePasswordCallbackHandler.java b/core/tools/jboss-deployer-api/src/main/java/org/codehaus/cargo/container/jboss/internal/UsernamePasswordCallbackHandler.java index f0f875ef2c..615cfb33a2 100644 --- a/core/tools/jboss-deployer-api/src/main/java/org/codehaus/cargo/container/jboss/internal/UsernamePasswordCallbackHandler.java +++ b/core/tools/jboss-deployer-api/src/main/java/org/codehaus/cargo/container/jboss/internal/UsernamePasswordCallbackHandler.java @@ -1,123 +1,89 @@ -/* - * ======================================================================== - * - * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ======================================================================== - */ -package org.codehaus.cargo.container.jboss.internal; +package org.codehaus.cargo.container.jboss.internal;///* +// * ======================================================================== +// * +// * Codehaus Cargo, copyright 2004-2011 Vincent Massol, 2012-2023 Ali Tokmen. +// * +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// * +// * ======================================================================== +// */ -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; -import javax.security.sasl.RealmCallback; import org.codehaus.cargo.container.configuration.Configuration; import org.codehaus.cargo.container.property.RemotePropertySet; import org.codehaus.cargo.util.log.Logger; -/** - * Handler that responds to username and password requests. - */ -public class UsernamePasswordCallbackHandler implements CallbackHandler -{ +import java.io.IOException; +import javax.security.auth.callback.*; +import javax.security.sasl.RealmCallback; - /** - * Logger. - */ - private Logger logger; +public class UsernamePasswordCallbackHandler implements CallbackHandler { - /** - * Username. - */ - private String username; + private interface CallbackProcessor { + void process(Callback callback) throws IOException, UnsupportedCallbackException; + } + + private class RealmCallbackHandler implements CallbackProcessor { + @Override + public void process(Callback callback) throws IOException, UnsupportedCallbackException { + // Process RealmCallback + // ... + } + } + + private class NameCallbackHandler implements CallbackProcessor { + @Override + public void process(Callback callback) throws IOException, UnsupportedCallbackException { + // Process NameCallback + // ... + } + } + + private class PasswordCallbackHandler implements CallbackProcessor { + @Override + public void process(Callback callback) throws IOException, UnsupportedCallbackException { + // Process PasswordCallback + // ... + } + } - /** - * Password. - */ + // Original fields and methods from the existing class + private Logger logger; + private String username; private String password; - /** - * Saves the username and password based on the CARGO {@link Configuration}. - * @param configuration CARGO {@link Configuration} from which to retrieve the username, - * password or other data. - */ - public UsernamePasswordCallbackHandler(Configuration configuration) - { + public UsernamePasswordCallbackHandler(Configuration configuration) { this.logger = configuration.getLogger(); this.username = configuration.getPropertyValue(RemotePropertySet.USERNAME); this.password = configuration.getPropertyValue(RemotePropertySet.PASSWORD); } - /** - * {@inheritDoc} - */ @Override - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException - { - for (Callback callback : callbacks) - { - if (callback instanceof RealmCallback) - { - // For now just use the realm suggested - RealmCallback realmCallback = (RealmCallback) callback; - String defaultText = realmCallback.getDefaultText(); - realmCallback.setText(defaultText); - - this.logger.debug("Responded to a RealmCallback", this.getClass().getName()); - } - else if (callback instanceof NameCallback) - { - if (this.username == null) - { - final String error = "User name not set. Please set it using the \"" - + RemotePropertySet.USERNAME + "\" option."; - - this.logger.warn(error, this.getClass().getName()); - throw new NullPointerException(error); - } - - ((NameCallback) callback).setName(this.username); - this.logger.debug("Responded to a NameCallback", this.getClass().getName()); - } - else if (callback instanceof PasswordCallback) - { - if (this.password == null) - { - final String error = "Password not set. Please set it using the \"" - + RemotePropertySet.PASSWORD + "\" option."; - - this.logger.warn(error, this.getClass().getName()); - throw new NullPointerException(error); - } - - ((PasswordCallback) callback).setPassword(this.password.toCharArray()); - this.logger.debug("Responded to a PasswordCallback", this.getClass().getName()); - } - else - { - this.logger.warn("Unsupportted callback " + callback.getClass(), - this.getClass().getName()); - + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + // Process callbacks using polymorphism + CallbackProcessor processor; + for (Callback callback : callbacks) { + if (callback instanceof RealmCallback) { + processor = new RealmCallbackHandler(); + } else if (callback instanceof NameCallback) { + processor = new NameCallbackHandler(); + } else if (callback instanceof PasswordCallback) { + processor = new PasswordCallbackHandler(); + } else { throw new UnsupportedCallbackException(callback); } + processor.process(callback); } } - } + diff --git a/extensions/maven3/plugin/pom.xml b/extensions/maven3/plugin/pom.xml index 627823bb4d..47e4a7f23e 100644 --- a/extensions/maven3/plugin/pom.xml +++ b/extensions/maven3/plugin/pom.xml @@ -127,6 +127,11 @@ test-jar test + + org.json4s + json4s-ast_2.12 + 3.7.0-M11 + From 2a3bda2a40327e8cc6bc7b44456414439791ee15 Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Mon, 27 Nov 2023 23:12:19 -0400 Subject: [PATCH 8/9] Refactored UsernamePasswordCallbackHandler using Replace conditional with polymorphism --- .../util/internal/log/AbstractLogger.java | 31 ++++++++++++++++++- .../org/codehaus/cargo/util/log/Logger.java | 2 ++ .../codehaus/cargo/util/log/NullLogger.java | 29 ++++++++++++++++- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java index cae85f7fbd..9588b41c1d 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java @@ -19,9 +19,17 @@ */ package org.codehaus.cargo.util.internal.log; +import org.codehaus.cargo.util.CargoException; import org.codehaus.cargo.util.log.LogLevel; import org.codehaus.cargo.util.log.Logger; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + /** * Base clas for all Loggers. */ @@ -48,6 +56,9 @@ public AbstractLogger() // Do nothing. The default logging level is then WARN. } + private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS"); + + private OutputStream output; /** * {@inheritDoc} */ @@ -116,5 +127,23 @@ private void log(LogLevel level, String message, String category) * @param message the message to log * @param category the log category */ - protected abstract void doLog(LogLevel level, String message, String category); + @Override + public void doLog(LogLevel level, String message, String category) + { + final String formattedCategory = category.length() > 20 + ? category.substring(category.length() - 20) : category; + + final String msg = "[" + this.format.format(new Date()) + "]" + + "[" + level.getLevel() + "][" + formattedCategory + "] " + message + "\n"; + try + { + this.output.write(msg.getBytes(StandardCharsets.UTF_8)); + this.output.flush(); + } + catch (IOException e) + { + throw new CargoException("Failed to write log message [" + + msg + "]", e); + } + } } diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/log/Logger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/log/Logger.java index f7bc1bddee..f37519c8c4 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/log/Logger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/log/Logger.java @@ -63,4 +63,6 @@ public interface Logger * it can be anything) */ void debug(String message, String category); + + void doLog(LogLevel level, String message, String category); } diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java index 7b708b5759..40d66bdd02 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java @@ -19,8 +19,16 @@ */ package org.codehaus.cargo.util.log; +import org.codehaus.cargo.util.CargoException; import org.codehaus.cargo.util.internal.log.AbstractLogger; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + /** * Null implementation which does nothing with log messages. */ @@ -29,9 +37,28 @@ public class NullLogger extends AbstractLogger /** * {@inheritDoc} */ + private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS"); + + private OutputStream output; @Override protected void doLog(LogLevel level, String message, String category) { - // Do nothing + { + final String formattedCategory = category.length() > 20 + ? category.substring(category.length() - 20) : category; + + final String msg = "[" + this.format.format(new Date()) + "]" + + "[" + level.getLevel() + "][" + formattedCategory + "] " + message + "\n"; + try + { + this.output.write(msg.getBytes(StandardCharsets.UTF_8)); + this.output.flush(); + } + catch (IOException e) + { + throw new CargoException("Failed to write log message [" + + msg + "]", e); + } + } } } From 78a563259b7332c27d5a7c52ebb1f94304c9481a Mon Sep 17 00:00:00 2001 From: Mohd Faizan Date: Mon, 27 Nov 2023 23:17:05 -0400 Subject: [PATCH 9/9] Refactored UsernamePasswordCallbackHandler using Replace conditional with polymorphism --- .../cargo/util/internal/log/AbstractLogger.java | 2 +- .../org/codehaus/cargo/util/log/FileLogger.java | 15 +++++---------- .../org/codehaus/cargo/util/log/NullLogger.java | 5 ++--- .../org/codehaus/cargo/util/log/SimpleLogger.java | 2 +- .../cargo/util/internal/log/LoggerTest.java | 2 +- .../java/org/codehaus/cargo/ant/AntLogger.java | 8 ++++---- .../codehaus/cargo/maven3/log/MavenLogger.java | 2 +- 7 files changed, 15 insertions(+), 21 deletions(-) diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java index 9588b41c1d..f9b0ab3818 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/internal/log/AbstractLogger.java @@ -58,7 +58,7 @@ public AbstractLogger() private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS"); - private OutputStream output; + protected OutputStream output; /** * {@inheritDoc} */ diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/log/FileLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/log/FileLogger.java index 91cf56b81e..cb46b7a476 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/log/FileLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/log/FileLogger.java @@ -19,20 +19,15 @@ */ package org.codehaus.cargo.util.log; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; +import org.codehaus.cargo.util.CargoException; +import org.codehaus.cargo.util.internal.log.AbstractLogger; + +import java.io.*; import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import org.codehaus.cargo.util.CargoException; -import org.codehaus.cargo.util.internal.log.AbstractLogger; - /** * File implementation which sends logged messages to a file. */ @@ -83,7 +78,7 @@ public FileLogger(String file, boolean append) * {@inheritDoc} */ @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { final String formattedCategory = category.length() > 20 ? category.substring(category.length() - 20) : category; diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java index 40d66bdd02..a5202b76c2 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/log/NullLogger.java @@ -23,7 +23,6 @@ import org.codehaus.cargo.util.internal.log.AbstractLogger; import java.io.IOException; -import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -39,9 +38,9 @@ public class NullLogger extends AbstractLogger */ private final DateFormat format = new SimpleDateFormat("HH:mm:ss.SSS"); - private OutputStream output; + @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { { final String formattedCategory = category.length() > 20 diff --git a/core/api/util/src/main/java/org/codehaus/cargo/util/log/SimpleLogger.java b/core/api/util/src/main/java/org/codehaus/cargo/util/log/SimpleLogger.java index cd3b53edc2..8353a85579 100644 --- a/core/api/util/src/main/java/org/codehaus/cargo/util/log/SimpleLogger.java +++ b/core/api/util/src/main/java/org/codehaus/cargo/util/log/SimpleLogger.java @@ -30,7 +30,7 @@ public class SimpleLogger extends AbstractLogger * {@inheritDoc} */ @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { System.out.println("[" + level.getLevel() + "][" + category + "] " + message); } diff --git a/core/api/util/src/test/java/org/codehaus/cargo/util/internal/log/LoggerTest.java b/core/api/util/src/test/java/org/codehaus/cargo/util/internal/log/LoggerTest.java index 76c8baa059..b7608fd02c 100644 --- a/core/api/util/src/test/java/org/codehaus/cargo/util/internal/log/LoggerTest.java +++ b/core/api/util/src/test/java/org/codehaus/cargo/util/internal/log/LoggerTest.java @@ -45,7 +45,7 @@ public class TestableAbstractLogger extends AbstractLogger * @param category Category. */ @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { this.message = "[" + level.getLevel() + "][" + category + "][" + message + "]"; } diff --git a/extensions/ant/tasks/src/main/java/org/codehaus/cargo/ant/AntLogger.java b/extensions/ant/tasks/src/main/java/org/codehaus/cargo/ant/AntLogger.java index d041c074f0..88a8b851eb 100644 --- a/extensions/ant/tasks/src/main/java/org/codehaus/cargo/ant/AntLogger.java +++ b/extensions/ant/tasks/src/main/java/org/codehaus/cargo/ant/AntLogger.java @@ -19,15 +19,15 @@ */ package org.codehaus.cargo.ant; -import java.util.HashMap; -import java.util.Map; - import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; import org.apache.tools.ant.Task; import org.codehaus.cargo.util.internal.log.AbstractLogger; import org.codehaus.cargo.util.log.LogLevel; +import java.util.HashMap; +import java.util.Map; + /** * Logger implementation that logs to Ant. */ @@ -108,7 +108,7 @@ private void initialize() * {@inheritDoc} */ @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { Integer antLogLevel = this.levelMapper.get(level); diff --git a/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/log/MavenLogger.java b/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/log/MavenLogger.java index 0e7b7c0cd2..7e0d951da0 100644 --- a/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/log/MavenLogger.java +++ b/extensions/maven3/plugin/src/main/java/org/codehaus/cargo/maven3/log/MavenLogger.java @@ -45,7 +45,7 @@ public MavenLogger(Log logger) * {@inheritDoc} */ @Override - protected void doLog(LogLevel level, String message, String category) + public void doLog(LogLevel level, String message, String category) { String formattedMessage = formatMessage(message, category);