if(parameter == null){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "SimpleObject", this.getClass().getName()));
}
SearchQuery searchQuery = (SearchQuery)parameter;
// check for mandatory fields
String query = searchQuery.getQuery();
if(query == null){
query = "";
}
MultiParameter multiParameter = new MultiParameter();
multiParameter.addParameter(query);
ArrayList<String> listOfFilters = new ArrayList<String>();
if(!searchQuery.isOnAll()){
if(searchQuery.isOnTickets()) listOfFilters.add(SearchKeys.ON_TICKETS);
if(searchQuery.isOnChangesets()) listOfFilters.add(SearchKeys.ON_CHANGESETS);
if(searchQuery.isOnMilestones()) listOfFilters.add(SearchKeys.ON_MILESTONES);
if(searchQuery.isOnWiki()) listOfFilters.add(SearchKeys.ON_WIKI);
multiParameter.addParameter(Utils.fillVectorFromArrayList(listOfFilters));
}
return multiParameter;