/** * Return <code>true</code> if the specified context-relative URI (and * associated HTTP method) are protected by this security constraint. * * @param uri Context-relative URI to check * @param method Request method being used */ public boolean included(String uri, String method) { // We cannot match without a valid request method if (method == null) return (false); // Check all of the collections included in this constraint for (int i = 0; i < collections.length; i++) { if (!collections[i].findMethod(method)) continue; String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { if (matchPattern(uri, patterns[j])) return (true); } } // No collection included in this constraint matches this request return (false); }
/** * Check if the constraint applies to a URI and method. * @param uri Context-relative URI to check * @param method Request method being used * @return <code>true</code> if the specified context-relative URI (and * associated HTTP method) are protected by this security constraint. */ public boolean included(String uri, String method) { // We cannot match without a valid request method if (method == null) return false; // Check all of the collections included in this constraint for (int i = 0; i < collections.length; i++) { if (!collections[i].findMethod(method)) continue; String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { if (matchPattern(uri, patterns[j])) return true; } } // No collection included in this constraint matches this request return false; }
/** * Check if the constraint applies to a URI and method. * @param uri Context-relative URI to check * @param method Request method being used * @return <code>true</code> if the specified context-relative URI (and * associated HTTP method) are protected by this security constraint. */ public boolean included(String uri, String method) { // We cannot match without a valid request method if (method == null) return false; // Check all of the collections included in this constraint for (int i = 0; i < collections.length; i++) { if (!collections[i].findMethod(method)) continue; String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { if (matchPattern(uri, patterns[j])) return true; } } // No collection included in this constraint matches this request return false; }
SecurityCollection[] collections = constraint.findCollections(); for (SecurityCollection collection : collections) { String[] patterns = collection.findPatterns(); String[] methods = collection.findMethods(); String[] omittedMethods = collection.findOmittedMethods();
SecurityCollection[] collections = constraint.findCollections(); for (SecurityCollection collection : collections) { String[] patterns = collection.findPatterns(); String[] methods = collection.findMethods(); String[] omittedMethods = collection.findOmittedMethods();
String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { patterns[j] = adjustURLPattern(patterns[j]);
String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { patterns[j] = adjustURLPattern(patterns[j]);
SecurityCollection[] collections = constraint.findCollections(); for (SecurityCollection collection : collections) { String[] patterns = collection.findPatterns(); String[] methods = collection.findMethods(); String[] omittedMethods = collection.findOmittedMethods();
String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns(); int pos = -1; for(int j=0; j < collection.length; j++){ String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns();
String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns(); int pos = -1; for(int j=0; j < collection.length; j++){ String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns();
String patterns[] = collections[i].findPatterns(); for (int j = 0; j < patterns.length; j++) { patterns[j] = adjustURLPattern(patterns[j]);
String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns(); int pos = -1; for(int j=0; j < collection.length; j++){ String [] patterns = collection[j].findPatterns(); String [] patterns = collection[j].findPatterns();
if (collection.findPatterns().length == 0) { securityConstraint.removeCollection(collection);
if (collection.findPatterns().length == 0) { securityConstraint.removeCollection(collection);
appendElement(sb, INDENT6, "description", collection.getDescription()); for (String urlPattern : collection.findPatterns()) { appendElement(sb, INDENT6, "url-pattern", urlPattern);
if (collection.findPatterns().length == 0) { securityConstraint.removeCollection(collection);
appendElement(sb, INDENT6, "description", collection.getDescription()); for (String urlPattern : collection.findPatterns()) { appendElement(sb, INDENT6, "url-pattern", encodeUrl(urlPattern));
appendElement(sb, INDENT6, "description", collection.getDescription()); for (String urlPattern : collection.findPatterns()) { appendElement(sb, INDENT6, "url-pattern", encodeUrl(urlPattern));