class CustomDataSourceResourceConverter extends ResourceConverterImpl<CustomReportDataSource, ClientCustomDataSource> {

    @Override
    protected ClientCustomDataSource resourceSpecificFieldsToClient(ClientCustomDataSource client, CustomReportDataSource serverObject, ToClientConversionOptions options) {
        client.setDataSourceName(serverObject.getDataSourceName());
        client.setServiceClass(serverObject.getServiceClass());
        List<ClientProperty> properties = null;
        final Map propertyMap = serverObject.getPropertyMap();
        if(propertyMap != null && !propertyMap.isEmpty()){
            properties = new ArrayList<ClientProperty>(propertyMap.size());
            final Set<String> set = propertyMap.keySet();
            for(String key : set){
                if (!propertiesToIgnore.contains(key)) {
                    properties.add(new ClientProperty(key, (String)propertyMap.get(key)));
                }
            }
        }
        client.setProperties(properties == null || properties.isEmpty() ? null : properties);
        client.setResources(convertResourcesToClient(serverObject.getResources(), options));
        return client;
    }

}