// security constraints
logger.finest(" Security constraints:");
Enumeration scEnum = wbd.getSecurityConstraints();
while (scEnum.hasMoreElements()) {
SecurityConstraintImpl sc =
(SecurityConstraintImpl)scEnum.nextElement();
Set wrcSet = sc.getWebResourceCollectionSet();
Iterator wrcIt = wrcSet.iterator();
while (wrcIt.hasNext()) {
WebResourceCollectionImpl wrc =
(WebResourceCollectionImpl)wrcIt.next();
// show list of methods for this collection
Enumeration methEnum = wrc.getHttpMethods();
StringBuffer sbm = new StringBuffer();
while (methEnum.hasMoreElements()) {
sbm.append(methEnum.nextElement());
sbm.append(" ");
}
logger.finest(" Using method: "+sbm.toString());
// and then list of url patterns
Enumeration urlEnum = wrc.getUrlPatterns();
while (urlEnum.hasMoreElements()) {
logger.finest(" "+
urlEnum.nextElement().toString());
}
} // end res.collection iterator
// show roles which apply to above set of collections
AuthorizationConstraintImpl authCons =
(AuthorizationConstraintImpl)sc.getAuthorizationConstraint();
Enumeration rolesEnum = authCons.getSecurityRoles();
StringBuffer rsb = new StringBuffer();
rsb.append(" Accessible by roles: ");
while (rolesEnum.hasMoreElements()) {
SecurityRole sr = (SecurityRole)rolesEnum.nextElement();
rsb.append(sr.getName());
rsb.append(" ");
}
logger.finest(rsb.toString());
// show transport guarantee
UserDataConstraint udc =sc.getUserDataConstraint();
if (udc != null) {
logger.finest(" Transport guarantee: "+
udc.getTransportGuarantee());
}