@@ -0,0 +1,2446 @@
+package org.opennms.web.report.database;%0A%0Aimport java.util.Iterator;%0Aimport java.util.List;%0A%0Aimport org.opennms.api.reporting.parameter.ReportParameters;%0Aimport org.opennms.api.reporting.parameter.ReportDateParm;%0Aimport org.opennms.api.reporting.parameter.ReportIntParm;%0Aimport org.opennms.api.reporting.parameter.ReportStringParm;%0Aimport org.springframework.binding.message.MessageBuilder;%0Aimport org.springframework.binding.message.MessageContext;%0Aimport org.springframework.binding.validation.ValidationContext;%0A%0Apublic class ReportParametersValidator %7B%0A    %0A    public void  validateReportParameters(ReportParameters reportCriteria, ValidationContext context) %7B%0A        MessageContext messages = context.getMessageContext();%0A        %0A        %0A        List%3CReportDateParm%3E dateParms = reportCriteria.getDateParms();%0A        %0A        for (Iterator%3CReportDateParm%3E dateParmIter = dateParms.iterator(); dateParmIter.hasNext();) %7B%0A            ReportDateParm dateParm = dateParmIter.next();%0A            if (dateParm.getValue() == null) %7B%0A                messages.addMessage(new MessageBuilder().error().source(%22date parms%22).%0A                                    defaultText(%22cannot have null date field%22 + dateParm.getDisplayName()).build());%0A            %7D%0A        %7D%0A        %0A        List%3CReportStringParm%3E stringParms = reportCriteria.getStringParms();%0A        %0A        for (Iterator%3CReportStringParm%3E stringParmIter = stringParms.iterator(); stringParmIter.hasNext();) %7B%0A            ReportStringParm stringParm = stringParmIter.next();%0A            if (stringParm.getValue() == %22%22 ) %7B%0A                messages.addMessage(new MessageBuilder().error().source(%22string parms%22).%0A                                    defaultText(%22cannot have empty string field%22 + stringParm.getDisplayName()).build());%0A            %7D%0A        %7D%0A        %0A        List%3CReportIntParm%3E intParms = reportCriteria.getIntParms();%0A        %0A        for (Iterator%3CReportIntParm%3E intParmIter = intParms.iterator(); intParmIter.hasNext();) %7B%0A            ReportIntParm intParm = intParmIter.next();%0A            // TODO add a more sensible check here - I think we probably can have zero int parm%0A            if (intParm.getValue() == 0 ) %7B%0A                messages.addMessage(new MessageBuilder().error().source(%22int parms%22).%0A                                    defaultText(%22cannot have zero integer field%22 + intParm.getDisplayName()).build());%0A            %7D%0A        %7D%0A        %0A    %7D%0A%0A%7D%0A

add missing validator