iterates over all declared filter in the archive file and
delegates actual test on individual filter class to
runIndividualFilterTest
Result result;
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
Enumeration filterEnum = descriptor.getServletFilterDescriptors().elements();
if (filterEnum.hasMoreElements()) {
boolean oneFailed = false;
// test the filters in this .war
result = loadWarFile(descriptor);
while (filterEnum.hasMoreElements()) {
ServletFilterDescriptor filter = (ServletFilterDescriptor) filterEnum.nextElement();
Class filterClass = loadClass(result, filter.getClassName());
if (!runIndividualFilterTest(result, filterClass))
oneFailed=true;
}
if (oneFailed) {
result.setStatus(Result.FAILED);
} else {
result.setStatus(Result.PASSED);
}
} else {
result = getInitializedResult();
result.setStatus(Result.NOT_APPLICABLE);
result.addNaDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.notApplicable(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.web.FilterClass" + ".notApplicable",
"There are no filter components within the web archive [ {0} ]",
new Object[] {descriptor.getName()}));
}
return result;