assignedToParameter.setMandatory(false);
assignedToParameter.setParameterKey(ASSIGNED_TO);
assignedToParameter.setParameter(URN_ASSIGNED_TO);
// create Search URL & populate search parameters for browsers
OpenSearchUrl openSearchUrlForBrowsers = new OpenSearchUrl();
openSearchUrlForBrowsers.addOpenSearchParameter(ftsParameter);
openSearchUrlForBrowsers.setType(MediaType.TEXT_HTML);
// create Search URL & populate search parameters
OpenSearchUrl openSearchUrl = new OpenSearchUrl();
openSearchUrl.addOpenSearchParameter(severityParameter);
openSearchUrl.addOpenSearchParameter(ftsParameter);
openSearchUrl.addOpenSearchParameter(assignedToParameter);
openSearchUrl.setType(MediaType.TEXT_HTML);
// create open search base uri
StringBuilder openSearchUrlBuilder = new StringBuilder(baseUri);
if (baseUri.endsWith("/") && URL.startsWith("/")) {
openSearchUrlBuilder.append(URL.substring(1));
} else {
openSearchUrlBuilder.append(URL);
}
openSearchUrl.setBaseUri(openSearchUrlBuilder.toString());
openSearchUrlForBrowsers.setBaseUri(openSearchUrlBuilder.toString());
// add URLs to OpenSearch
openSearchDescriptor.addUrl(openSearchUrlForBrowsers);
openSearchDescriptor.addUrl(openSearchUrl);