}
return result;
}
private boolean evaluateOutbound(String outboundURL) {
QueryString outboundQueryString = new QueryString();
if (outboundURL.contains("?")) {
outboundQueryString.addParameters(outboundURL);
}
String cachedMappingId = outboundQueryString.getParameter(REWRITE_MAPPING_ID_KEY);
if (cachedMappingId != null)
{
return mapping.getId().equals(Decoder.query(cachedMappingId));
}
String outboundPath = outboundURL;
String mappingViewId = mapping.getViewId();
int outboundQueryStringStart = outboundPath.indexOf("?");
if (outboundQueryStringStart != -1)
{
outboundPath = outboundPath.substring(0, outboundQueryStringStart);
}
int mappingViewQueryStringStart = mappingViewId.indexOf("?");
if (mappingViewQueryStringStart != -1)
{
mappingViewId = mappingViewId.substring(0, mappingViewQueryStringStart);
}
if (!mappingViewId.equals(outboundPath))
{
return false;
}
QueryString mappingViewQueryString = new QueryString();
if (mapping.getViewId().contains("?")) {
mappingViewQueryString.addParameters(mapping.getViewId());
}
for (Entry<String, String[]> mappingViewParam : mappingViewQueryString.getParameterMap().entrySet())
{
for (String mappingViewParamValue : mappingViewParam.getValue())
{
boolean found = false;
for (Entry<String, String[]> outboundParam : outboundQueryString.getParameterMap().entrySet())