Rename adapter

This commit is contained in:
Raul Ochoa 2016-03-14 11:50:52 +01:00
parent 1535820d4f
commit 3f41f19ab9
2 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ var Datasource = windshaft.model.Datasource;
var NamedMapsCacheEntry = require('../cache/model/named_maps_entry');
var MapConfigNamedLayersAdapter = require('../models/mapconfig_named_layers_adapter');
var MapConfigAnalysisLayersAdapter = require('../models/mapconfig_analysis_layers_adapter');
var AnalysisMapConfigAdapter = require('../models/analysis_mapconfig_adapter');
var NamedMapMapConfigProvider = require('../models/mapconfig/named_map_provider');
var CreateLayergroupMapConfigProvider = require('../models/mapconfig/create_layergroup_provider');
var MapConfigOverviewsAdapter = require('../models/mapconfig_overviews_adapter');
@ -48,7 +48,7 @@ function MapController(authApi, pgConnection, templateMaps, mapBackend, metadata
this.userLimitsApi = userLimitsApi;
this.layergroupAffectedTables = layergroupAffectedTables;
this.analysisLayersAdapter = new MapConfigAnalysisLayersAdapter();
this.analysisMapConfigAdapter = new AnalysisMapConfigAdapter();
this.namedLayersAdapter = new MapConfigNamedLayersAdapter(templateMaps);
this.overviewsAdapter = new MapConfigOverviewsAdapter(this.overviewsMetadataApi);
}
@ -154,7 +154,7 @@ MapController.prototype.create = function(req, res, prepareConfigFn) {
apiKey: req.params.api_key
}
};
self.analysisLayersAdapter.getLayers(analysisConfiguration, requestMapConfig, this);
self.analysisMapConfigAdapter.getLayers(analysisConfiguration, requestMapConfig, this);
},
function beforeLayergroupCreate(err, requestMapConfig) {
assert.ifError(err);

View File

@ -4,11 +4,11 @@ var camshaft = require('camshaft');
var dot = require('dot');
dot.templateSettings.strip = false;
function MapConfigAnalysisLayersAdapter(templateMaps) {
function AnalysisMapConfigAdapter(templateMaps) {
this.templateMaps = templateMaps;
}
module.exports = MapConfigAnalysisLayersAdapter;
module.exports = AnalysisMapConfigAdapter;
var SKIP_COLUMNS = {
'the_geom': true,
@ -34,7 +34,7 @@ function shouldAdaptLayers(requestMapConfig) {
Array.isArray(requestMapConfig.analyses) && requestMapConfig.analyses.length > 0;
}
MapConfigAnalysisLayersAdapter.prototype.getLayers = function(analysisConfiguration, requestMapConfig, callback) {
AnalysisMapConfigAdapter.prototype.getLayers = function(analysisConfiguration, requestMapConfig, callback) {
if (!shouldAdaptLayers(requestMapConfig)) {
return callback(null, requestMapConfig);