}
Enumeration<SecurityConstraint> scCollection = sipApplicationModel.getSecurityConstraints();
while (scCollection.hasMoreElements()) {
SecurityConstraint constraint = scCollection.nextElement();
@SuppressWarnings(value = "unchecked")
Collection<ResourceCollection> resourceCollection = constraint.getResourceCollections();
Iterator<ResourceCollection> rcItr = resourceCollection.iterator();
while (rcItr.hasNext()) {
ResourceCollection rc = rcItr.next();
@SuppressWarnings(value = "unchecked")
Collection<String> sn = rc.getServletNames();
@SuppressWarnings(value = "unchecked")
Collection<String> sm = rc.getSipMethods();
Collection<String> roles = constraint.getAuthorizationConstraintRoleNames();
Iterator<String> snItr = sn.iterator();
if(roles == null)continue;
while (snItr.hasNext()) {
String servletName = snItr.next();
Iterator<String> smItr = sm.iterator();
while (smItr.hasNext()) {
String sipMethod = smItr.next();
Key key = new Key(servletName, sipMethod);
Set<String> roleSet = null;
roleSet = new HashSet<String>(8);
if (servletConstraints.containsKey(key)) {
ServletConstraints sc = servletConstraints.get(key);
roleSet = sc.roles;
} else {
boolean proxy = constraint.isProxyAuthenticated();
ServletConstraints sc = new ServletConstraints(proxy,
roleSet);
servletConstraints.put(key, sc);
}