Enumeration enumeration = wmd.getSecurityConstraints();
SecurityConstraint securityConstraint;
SecurityConstraintDecorator decorator;
Enumeration enumeration2;
SecurityCollectionDecorator secCollDecorator;
while (enumeration.hasMoreElements()){
securityConstraint =(SecurityConstraint)enumeration.nextElement();
decorator = new SecurityConstraintDecorator(securityConstraint,
webModule);
enumeration2 = securityConstraint.getWebResourceCollections();
while (enumeration2.hasMoreElements()){
secCollDecorator = new SecurityCollectionDecorator
((WebResourceCollection) enumeration2.nextElement());
decorator.addCollection(secCollDecorator);
}
webModule.addConstraint(decorator);