All web modules in the application have a non-blank context-root
Result result = getInitializedResult();
if (descriptor.getWebBundleDescriptors().size() > 0) {
boolean oneWarning = false;
for (Iterator itr = descriptor.getWebBundleDescriptors().iterator(); itr.hasNext();) {
WebBundleDescriptor wbd = (WebBundleDescriptor) itr.next();
if (wbd.getContextRoot().equals("")) {
// fail test can't be blank ,
if (!oneWarning) {
oneWarning =true;
}
result.addWarningDetails
(smh.getLocalString
(getClass().getName() + ".warning",
"Warning: [ {0} ] has blank context root defined within application [ {1} ]",
new Object[] {wbd.getName(), descriptor.getName()}));
} else {
result.addGoodDetails
(smh.getLocalString
(getClass().getName() + ".passed",
"[ {0} ] has context root defined as [ {1} ] within application[ {2} ].",
new Object[] {wbd.getName(), wbd.getContextRoot(), descriptor.getName()}));
}
}
if (oneWarning) {
result.setStatus(Result.WARNING);
} else {
result.setStatus(Result.PASSED);
}
} else {
result.notApplicable(smh.getLocalString
(getClass().getName() + ".notApplicable",
"There are no web components in application [ {0} ]",
new Object[] {descriptor.getName()}));
}
return result;