class DataValidator {

    String validateAndNormalizeDataValue( final String dataValue, final DataElement dataElement )
        throws WebMessageException
    {
        final String normalizedBoolean = normalizeBoolean( dataValue, dataElement.getValueType() );

        final String valueValid = dataValueIsValid( normalizedBoolean, dataElement );

        if ( valueValid != null )
        {
            throw new WebMessageException( conflict(
                "Invalid value: " + dataValue + ", must match data element type: " + dataElement.getValueType() ) );
        }
        return normalizedBoolean;
    }

    public  DataValidator( final CategoryService categoryService, final OrganisationUnitService organisationUnitService,
        final DataSetService dataSetService, final IdentifiableObjectManager idObjectManager,
        final InputUtils inputUtils, final FileResourceService fileResourceService, final I18nManager i18nManager,
        final CalendarService calendarService, final AggregateAccessManager accessManager );

}