private SecurityConstraint getControllingConstraint( String urlPath ) { for (Iterator i = _securityConstraints.iterator(); i.hasNext();) { SecurityConstraint sc = (SecurityConstraint) i.next(); if (sc.controlsPath( urlPath )) return sc; } return NULL_SECURITY_CONSTRAINT; }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }
private SecurityConstraint getControllingConstraint( String urlPath ) { for (Iterator i = _securityConstraints.iterator(); i.hasNext();) { SecurityConstraint sc = (SecurityConstraint) i.next(); if (sc.controlsPath( urlPath )) return sc; } return NULL_SECURITY_CONSTRAINT; }
private SecurityConstraint getControllingConstraint( String urlPath ) { for (Iterator i = _securityConstraints.iterator(); i.hasNext();) { SecurityConstraint sc = (SecurityConstraint) i.next(); if (sc.controlsPath( urlPath )) return sc; } return NULL_SECURITY_CONSTRAINT; }