/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: URLPatternMatcher.java,v 1.1 2009/11/24 21:42:35 madan_ranganath Exp $
*
* Portions Copyrighted 2014-2015 ForgeRock AS.
*/
/**
*/
public class URLPatternMatcher {
/**
* Constructor
*/
public URLPatternMatcher() {
resourceName = new HttpURLResourceName();
}
/**
* Matches the URL against the provided URL patterns.
*
* @param requestedURL The URL to be matched.
* @param patterns The patterns to match the URL against.
* @param wildcard Flag for wildcard comparison
* @return <code>true</code> if matched, <code>false</code> otherwise.
* @throws MalformedURLException If the URL or one of the patterns is invalid.
*/
throws MalformedURLException {
boolean result = false;
// convert URI to URL if required (but not if pattern is relative)
}
if (DEBUG.messageEnabled()) {
}
if (DEBUG.messageEnabled()) {
+ " result = " + res);
}
result = true;
break;
}
}
return result;
}
/*
* convert pattern's URI to URL format.
*/
try {
} catch (MalformedURLException ex) {
if (DEBUG.warningEnabled()) {
DEBUG.warning("URLPatternMatcher.convertToURL()- pattern:" + pattern + " requestedURL:" + requestedURL
+ " Exception:", ex);
}
}
return pattern;
}
}