(String hostName, String contextPath, String version, boolean silent)
| 386 | |
| 387 | |
| 388 | private ContextVersion findContextVersion(String hostName, String contextPath, String version, boolean silent) { |
| 389 | MappedHost host = exactFind(hosts, hostName); |
| 390 | if (host == null || host.isAlias()) { |
| 391 | if (!silent) { |
| 392 | log.error(sm.getString("mapper.findContext.noHostOrAlias", hostName)); |
| 393 | } |
| 394 | return null; |
| 395 | } |
| 396 | MappedContext context = exactFind(host.contextList.contexts, contextPath); |
| 397 | if (context == null) { |
| 398 | if (!silent) { |
| 399 | log.error(sm.getString("mapper.findContext.noContext", contextPath)); |
| 400 | } |
| 401 | return null; |
| 402 | } |
| 403 | ContextVersion contextVersion = exactFind(context.versions, version); |
| 404 | if (contextVersion == null) { |
| 405 | if (!silent) { |
| 406 | log.error(sm.getString("mapper.findContext.noContextVersion", contextPath, version)); |
| 407 | } |
| 408 | return null; |
| 409 | } |
| 410 | return contextVersion; |
| 411 | } |
| 412 | |
| 413 | |
| 414 | /** |
no test coverage detected