You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/08/26 10:17:21 UTC

ignite git commit: IGNITE-843 WIP on preview java.

Repository: ignite
Updated Branches:
  refs/heads/ignite-843 b63961ae5 -> ac82d2cac


IGNITE-843 WIP on preview java.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ac82d2ca
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ac82d2ca
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ac82d2ca

Branch: refs/heads/ignite-843
Commit: ac82d2cacb1a6db16edc7e115d1a0545076210ba
Parents: b63961a
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Wed Aug 26 15:17:44 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Aug 26 15:17:44 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  16 +-
 .../main/js/controllers/metadata-controller.js  |   6 +-
 .../main/js/routes/generator/generator-java.js  | 316 +++++++++----------
 .../main/js/routes/generator/generator-xml.js   | 276 ++++++++--------
 4 files changed, 307 insertions(+), 307 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ac82d2ca/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 291ab90..d464265 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -270,14 +270,14 @@ controlCenterModule.controller('cachesController', [
                                 return memo;
                             }, []);
 
-                            $scope.preview.general = $generatorXml.cacheGeneral(val).join('');
-                            $scope.preview.memory = $generatorXml.cacheMemory(val).join('');
-                            $scope.preview.query = $generatorXml.cacheMetadatas(qryMeta, null, $generatorXml.cacheQuery(val)).join('');
-                            $scope.preview.store = $generatorXml.cacheMetadatas(null, storeMeta, $generatorXml.cacheStore(val)).join('');
-                            $scope.preview.concurrency = $generatorXml.cacheConcurrency(val).join('');
-                            $scope.preview.rebalance = $generatorXml.cacheRebalance(val).join('');
-                            $scope.preview.serverNearCache = $generatorXml.cacheServerNearCache(val).join('');
-                            $scope.preview.statistics = $generatorXml.cacheStatistics(val).join('');
+                            $scope.preview.generalXml = $generatorXml.cacheGeneral(val).join('');
+                            $scope.preview.memoryXml = $generatorXml.cacheMemory(val).join('');
+                            $scope.preview.queryXml = $generatorXml.cacheMetadatas(qryMeta, null, $generatorXml.cacheQuery(val)).join('');
+                            $scope.preview.storeXml = $generatorXml.cacheMetadatas(null, storeMeta, $generatorXml.cacheStore(val)).join('');
+                            $scope.preview.concurrencyXml = $generatorXml.cacheConcurrency(val).join('');
+                            $scope.preview.rebalanceXml = $generatorXml.cacheRebalance(val).join('');
+                            $scope.preview.serverNearCacheXml = $generatorXml.cacheServerNearCache(val).join('');
+                            $scope.preview.statisticsXml = $generatorXml.cacheStatistics(val).join('');
                         }
                     }, true);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac82d2ca/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index c42f528..bc9cd14 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -509,9 +509,9 @@ controlCenterModule.controller('metadataController', [
                         if (val) {
                             sessionStorage.metadataBackupItem = angular.toJson(val);
 
-                            $scope.preview.general = $generatorXml.metadataGeneral(val).join('');
-                            $scope.preview.query = $generatorXml.metadataQuery(val).join('');
-                            $scope.preview.store = $generatorXml.metadataStore(val).join('');
+                            $scope.preview.generalXml = $generatorXml.metadataGeneral(val).join('');
+                            $scope.preview.queryXml = $generatorXml.metadataQuery(val).join('');
+                            $scope.preview.storeXml = $generatorXml.metadataStore(val).join('');
                         }
                     }, true);
                 })

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac82d2ca/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index 07e1140..bd22777 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -23,6 +23,8 @@ if (typeof window === 'undefined') {
     $generatorCommon = require('./generator-common');
 }
 
+$generatorJava = {};
+
 /**
  * Convert some name to valid java name.
  *
@@ -30,13 +32,13 @@ if (typeof window === 'undefined') {
  * @param name to convert.
  * @returns {string} Valid java name.
  */
-function _toJavaName(prefix, name) {
+$generatorJava._toJavaName = function (prefix, name) {
     var javaName = name.replace(/[^A-Za-z_0-9]+/, '_');
 
     return prefix + javaName.charAt(0).toLocaleUpperCase() + javaName.slice(1);
-}
+};
 
-function _toJavaCode(val, type) {
+$generatorJava._toJavaCode = function (val, type) {
     if (val == null)
         return 'null';
 
@@ -56,7 +58,7 @@ function _toJavaCode(val, type) {
         return '' + val;
 
     throw "Unknown type: " + typeof(val) + ' (' + val + ')';
-}
+};
 
 /**
  * Add eviction policy.
@@ -66,23 +68,23 @@ function _toJavaCode(val, type) {
  * @param evictionPolicy Data to add.
  * @param propertyName Name in source data.
  */
-function _addEvictionPolicy(res, varName, evictionPolicy, propertyName) {
+$generatorJava._addEvictionPolicy = function (res, varName, evictionPolicy, propertyName) {
     if (evictionPolicy && evictionPolicy.kind) {
         var e = $generatorCommon.EVICTION_POLICIES[evictionPolicy.kind];
 
         var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
 
-        _addBeanWithProperties(res, varName, obj, propertyName, propertyName, e.className, e.fields, true);
+        $generatorJava._addBeanWithProperties(res, varName, obj, propertyName, propertyName, e.className, e.fields, true);
     }
-}
+};
 
-function _addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty) {
+$generatorJava._addCacheTypeMetadataDatabaseFields = function (res, meta, fieldProperty) {
     var dbFields = meta[fieldProperty];
 
     if (dbFields && dbFields.length > 0) {
         res.line();
 
-        _declareVariable(res, _needNewVariable(res, fieldProperty), fieldProperty, 'java.util.Collection', 'java.util.ArrayList', 'org.apache.ignite.cache.CacheTypeFieldMetadata');
+        $generatorJava._declareVariable(res, $generatorJava._needNewVariable(res, fieldProperty), fieldProperty, 'java.util.Collection', 'java.util.ArrayList', 'org.apache.ignite.cache.CacheTypeFieldMetadata');
 
         _.forEach(dbFields, function (field) {
             res.line(fieldProperty + '.add(new CacheTypeFieldMetadata(' +
@@ -93,27 +95,27 @@ function _addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty) {
                 + '));');
         });
 
-        res.line('typeMeta.' + _toJavaName('set', fieldProperty) + '(' + fieldProperty + ');');
+        res.line('typeMeta.' + $generatorJava._toJavaName('set', fieldProperty) + '(' + fieldProperty + ');');
     }
-}
+};
 
-function _addCacheTypeMetadataQueryFields(res, meta, fieldProperty) {
+$generatorJava._addCacheTypeMetadataQueryFields = function (res, meta, fieldProperty) {
     var fields = meta[fieldProperty];
 
     if (fields && fields.length > 0) {
         res.line();
 
-        _declareVariable(res, _needNewVariable(res, fieldProperty), fieldProperty, 'java.util.Map', 'java.util.LinkedHashMap', 'java.lang.String', 'java.lang.Class<?>');
+        $generatorJava._declareVariable(res, $generatorJava._needNewVariable(res, fieldProperty), fieldProperty, 'java.util.Map', 'java.util.LinkedHashMap', 'java.lang.String', 'java.lang.Class<?>');
 
         _.forEach(fields, function (field) {
             res.line(fieldProperty + '.put("' + field.name + '", ' + res.importClass(field.className) + '.class);');
         });
 
-        res.line('typeMeta.' + _toJavaName('set', fieldProperty) + '(' + fieldProperty + ');');
+        res.line('typeMeta.' + $generatorJava._toJavaName('set', fieldProperty) + '(' + fieldProperty + ');');
     }
-}
+};
 
-function _addCacheTypeMetadataGroups(res, meta) {
+$generatorJava._addCacheTypeMetadataGroups = function (res, meta) {
     var groups = meta.groups;
 
     if (groups && groups.length > 0) {
@@ -153,41 +155,41 @@ function _addCacheTypeMetadataGroups(res, meta) {
 
         res.line('typeMeta.setGroups(groups);');
     }
-}
+};
 
-function _addCacheTypeMetadataConfiguration(res, meta) {
-    _declareVariable(res, _needNewVariable(res, 'typeMeta'), 'typeMeta', 'org.apache.ignite.cache.CacheTypeMetadata');
+$generatorJava._addCacheTypeMetadataConfiguration = function (res, meta) {
+    $generatorJava._declareVariable(res, $generatorJava._needNewVariable(res, 'typeMeta'), 'typeMeta', 'org.apache.ignite.cache.CacheTypeMetadata');
 
     var kind = meta.kind;
 
-    var keyType = _addClassProperty(res, 'typeMeta', meta, 'keyType');
-    _addClassProperty(res, 'typeMeta', meta, 'valueType');
+    var keyType = $generatorJava._addClassProperty(res, 'typeMeta', meta, 'keyType');
+    $generatorJava._addClassProperty(res, 'typeMeta', meta, 'valueType');
 
     if (kind != 'query') {
-        _addProperty(res, 'typeMeta', meta, 'databaseSchema');
-        _addProperty(res, 'typeMeta', meta, 'databaseTable');
+        $generatorJava._addProperty(res, 'typeMeta', meta, 'databaseSchema');
+        $generatorJava._addProperty(res, 'typeMeta', meta, 'databaseTable');
 
         if (!$dataStructures.isJavaBuildInClass(keyType))
-            _addCacheTypeMetadataDatabaseFields(res, meta, 'keyFields');
+            $generatorJava._addCacheTypeMetadataDatabaseFields(res, meta, 'keyFields');
 
-        _addCacheTypeMetadataDatabaseFields(res, meta, 'valueFields');
+        $generatorJava._addCacheTypeMetadataDatabaseFields(res, meta, 'valueFields');
     }
 
     if (kind != 'store') {
-        _addCacheTypeMetadataQueryFields(res, meta, 'queryFields');
-        _addCacheTypeMetadataQueryFields(res, meta, 'ascendingFields');
-        _addCacheTypeMetadataQueryFields(res, meta, 'descendingFields');
+        $generatorJava._addCacheTypeMetadataQueryFields(res, meta, 'queryFields');
+        $generatorJava._addCacheTypeMetadataQueryFields(res, meta, 'ascendingFields');
+        $generatorJava._addCacheTypeMetadataQueryFields(res, meta, 'descendingFields');
 
         res.needEmptyLine = true;
-        _addListProperty(res, 'typeMeta', meta, 'textFields');
+        $generatorJava._addListProperty(res, 'typeMeta', meta, 'textFields');
 
-        _addCacheTypeMetadataGroups(res, meta);
+        $generatorJava._addCacheTypeMetadataGroups(res, meta);
     }
 
     res.line();
     res.line('types.add(typeMeta);');
     res.line();
-}
+};
 
 /**
  * Generate java code for cache configuration.
@@ -197,57 +199,57 @@ function _addCacheTypeMetadataConfiguration(res, meta) {
  * @param res Result builder.
  * @returns {*} Append generated java code to builder and return it.
  */
-function _addCacheConfiguration(res, cache, varName) {
+$generatorJava._addCacheConfiguration = function (res, cache, varName) {
     res.emptyLineIfNeeded();
 
     res.importClass('org.apache.ignite.cache.CacheAtomicityMode');
     res.importClass('org.apache.ignite.cache.CacheMode');
 
-    _declareVariable(res, true, varName, 'org.apache.ignite.configuration.CacheConfiguration');
+    $generatorJava._declareVariable(res, true, varName, 'org.apache.ignite.configuration.CacheConfiguration');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'name');
+    $generatorJava._addProperty(res, varName, cache, 'name');
 
-    var cacheMode = _addProperty(res, varName, cache, 'mode', 'CacheMode', 'cacheMode');
+    var cacheMode = $generatorJava._addProperty(res, varName, cache, 'mode', 'CacheMode', 'cacheMode');
 
-    _addProperty(res, varName, cache, 'atomicityMode', 'CacheAtomicityMode');
+    $generatorJava._addProperty(res, varName, cache, 'atomicityMode', 'CacheAtomicityMode');
 
     if (cacheMode == 'PARTITIONED')
-        _addProperty(res, varName, cache, 'backups');
+        $generatorJava._addProperty(res, varName, cache, 'backups');
 
-    _addProperty(res, varName, cache, 'readFromBackup');
-    _addProperty(res, varName, cache, 'startSize');
+    $generatorJava._addProperty(res, varName, cache, 'readFromBackup');
+    $generatorJava._addProperty(res, varName, cache, 'startSize');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'memoryMode', 'CacheMemoryMode');
-    _addProperty(res, varName, cache, 'offHeapMaxMemory');
-    _addProperty(res, varName, cache, 'swapEnabled');
-    _addProperty(res, varName, cache, 'copyOnRead');
+    $generatorJava._addProperty(res, varName, cache, 'memoryMode', 'CacheMemoryMode');
+    $generatorJava._addProperty(res, varName, cache, 'offHeapMaxMemory');
+    $generatorJava._addProperty(res, varName, cache, 'swapEnabled');
+    $generatorJava._addProperty(res, varName, cache, 'copyOnRead');
 
     res.needEmptyLine = true;
 
-    _addEvictionPolicy(res, varName, cache.evictionPolicy, 'evictionPolicy');
+    $generatorJava._addEvictionPolicy(res, varName, cache.evictionPolicy, 'evictionPolicy');
 
     if (cacheMode == 'PARTITIONED' && cache.nearCacheEnabled) {
         res.needEmptyLine = true;
 
         res.importClass('org.apache.ignite.configuration.NearCacheConfiguration');
 
-        _addBeanWithProperties(res, varName, cache.nearConfiguration, 'nearConfiguration', 'nearConfiguration',
+        $generatorJava._addBeanWithProperties(res, varName, cache.nearConfiguration, 'nearConfiguration', 'nearConfiguration',
             'NearCacheConfiguration', {nearStartSize: null}, true);
 
         if (cache.nearConfiguration && cache.nearConfiguration.nearEvictionPolicy && cache.nearConfiguration.nearEvictionPolicy.kind) {
-            _addEvictionPolicy(res, 'nearConfiguration', cache.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
+            $generatorJava._addEvictionPolicy(res, 'nearConfiguration', cache.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
         }
     }
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'sqlEscapeAll');
-    _addProperty(res, varName, cache, 'sqlOnheapRowCacheSize');
-    _addProperty(res, varName, cache, 'longQueryWarningTimeout');
+    $generatorJava._addProperty(res, varName, cache, 'sqlEscapeAll');
+    $generatorJava._addProperty(res, varName, cache, 'sqlOnheapRowCacheSize');
+    $generatorJava._addProperty(res, varName, cache, 'longQueryWarningTimeout');
 
     if (cache.indexedTypes && cache.indexedTypes.length > 0) {
         res.emptyLineIfNeeded();
@@ -260,24 +262,24 @@ function _addCacheConfiguration(res, cache, varName) {
 
             var pair = cache.indexedTypes[i];
 
-            res.append(_toJavaCode(res.importClass(pair.keyClass), 'class')).append(', ').append(_toJavaCode(res.importClass(pair.valueClass), 'class'))
+            res.append($generatorJava._toJavaCode(res.importClass(pair.keyClass), 'class')).append(', ').append($generatorJava._toJavaCode(res.importClass(pair.valueClass), 'class'))
         }
 
         res.line(');');
     }
 
-    _addMultiparamProperty(res, varName, cache, 'sqlFunctionClasses', 'class');
+    $generatorJava._addMultiparamProperty(res, varName, cache, 'sqlFunctionClasses', 'class');
 
     res.needEmptyLine = true;
 
     if (cacheMode != 'LOCAL') {
-        _addProperty(res, varName, cache, 'rebalanceMode', 'CacheRebalanceMode');
-        _addProperty(res, varName, cache, 'rebalanceThreadPoolSize');
-        _addProperty(res, varName, cache, 'rebalanceBatchSize');
-        _addProperty(res, varName, cache, 'rebalanceOrder');
-        _addProperty(res, varName, cache, 'rebalanceDelay');
-        _addProperty(res, varName, cache, 'rebalanceTimeout');
-        _addProperty(res, varName, cache, 'rebalanceThrottle');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceMode', 'CacheRebalanceMode');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceThreadPoolSize');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceBatchSize');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceOrder');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceDelay');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceTimeout');
+        $generatorJava._addProperty(res, varName, cache, 'rebalanceThrottle');
 
         res.needEmptyLine = true;
     }
@@ -286,13 +288,13 @@ function _addCacheConfiguration(res, cache, varName) {
         var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
         var data = $generatorCommon.STORE_FACTORIES[cache.cacheStoreFactory.kind];
 
-        var sfVarName = _toJavaName('storeFactory', cache.name);
+        var sfVarName = $generatorJava._toJavaName('storeFactory', cache.name);
         var dsVarName = 'none';
 
         if (storeFactory.dialect) {
             var dataSourceBean = storeFactory.dataSourceBean;
 
-            dsVarName = _toJavaName('dataSource', dataSourceBean);
+            dsVarName = $generatorJava._toJavaName('dataSource', dataSourceBean);
 
             if (!_.contains(res.datasourceBeans, dataSourceBean)) {
                 res.datasourceBeans.push(dataSourceBean);
@@ -301,7 +303,7 @@ function _addCacheConfiguration(res, cache, varName) {
 
                 res.line();
 
-                _declareVariable(res, true, dsVarName, dataSource);
+                $generatorJava._declareVariable(res, true, dsVarName, dataSource);
 
                 res.line(dsVarName + '.setURL(_URL_);');
                 res.line(dsVarName + '.setUsername(_User_Name_);');
@@ -309,7 +311,7 @@ function _addCacheConfiguration(res, cache, varName) {
             }
         }
 
-        _addBeanWithProperties(res, varName, storeFactory, 'cacheStoreFactory', sfVarName, data.className,
+        $generatorJava._addBeanWithProperties(res, varName, storeFactory, 'cacheStoreFactory', sfVarName, data.className,
             data.fields, true);
 
         if (dsVarName != 'none')
@@ -318,32 +320,32 @@ function _addCacheConfiguration(res, cache, varName) {
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'loadPreviousValue');
-    _addProperty(res, varName, cache, 'readThrough');
-    _addProperty(res, varName, cache, 'writeThrough');
+    $generatorJava._addProperty(res, varName, cache, 'loadPreviousValue');
+    $generatorJava._addProperty(res, varName, cache, 'readThrough');
+    $generatorJava._addProperty(res, varName, cache, 'writeThrough');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'invalidate');
-    _addProperty(res, varName, cache, 'defaultLockTimeout');
-    _addProperty(res, varName, cache, 'transactionManagerLookupClassName');
+    $generatorJava._addProperty(res, varName, cache, 'invalidate');
+    $generatorJava._addProperty(res, varName, cache, 'defaultLockTimeout');
+    $generatorJava._addProperty(res, varName, cache, 'transactionManagerLookupClassName');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'writeBehindEnabled');
-    _addProperty(res, varName, cache, 'writeBehindBatchSize');
-    _addProperty(res, varName, cache, 'writeBehindFlushSize');
-    _addProperty(res, varName, cache, 'writeBehindFlushFrequency');
-    _addProperty(res, varName, cache, 'writeBehindFlushThreadCount');
+    $generatorJava._addProperty(res, varName, cache, 'writeBehindEnabled');
+    $generatorJava._addProperty(res, varName, cache, 'writeBehindBatchSize');
+    $generatorJava._addProperty(res, varName, cache, 'writeBehindFlushSize');
+    $generatorJava._addProperty(res, varName, cache, 'writeBehindFlushFrequency');
+    $generatorJava._addProperty(res, varName, cache, 'writeBehindFlushThreadCount');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'statisticsEnabled');
-    _addProperty(res, varName, cache, 'managementEnabled');
+    $generatorJava._addProperty(res, varName, cache, 'statisticsEnabled');
+    $generatorJava._addProperty(res, varName, cache, 'managementEnabled');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, varName, cache, 'maxConcurrentAsyncOperations');
+    $generatorJava._addProperty(res, varName, cache, 'maxConcurrentAsyncOperations');
 
     res.needEmptyLine = true;
 
@@ -352,7 +354,7 @@ function _addCacheConfiguration(res, cache, varName) {
         (cache.storeMetadata && cache.storeMetadata.length > 0)) {
         res.emptyLineIfNeeded();
 
-        _declareVariable(res, _needNewVariable(res, 'types'), 'types', 'java.util.Collection', 'java.util.ArrayList', 'org.apache.ignite.cache.CacheTypeMetadata');
+        $generatorJava._declareVariable(res, $generatorJava._needNewVariable(res, 'types'), 'types', 'java.util.Collection', 'java.util.ArrayList', 'org.apache.ignite.cache.CacheTypeMetadata');
         res.line();
 
         var metaNames = [];
@@ -362,7 +364,7 @@ function _addCacheConfiguration(res, cache, varName) {
                 if (!_.contains(metaNames, meta.name)) {
                     metaNames.push(meta.name);
 
-                    _addCacheTypeMetadataConfiguration(res, meta);
+                    $generatorJava._addCacheTypeMetadataConfiguration(res, meta);
                 }
             });
         }
@@ -372,23 +374,23 @@ function _addCacheConfiguration(res, cache, varName) {
                 if (!_.contains(metaNames, meta.name)) {
                     metaNames.push(meta.name);
 
-                    _addCacheTypeMetadataConfiguration(res, meta);
+                    $generatorJava._addCacheTypeMetadataConfiguration(res, meta);
                 }
             });
         }
 
         res.line(varName + '.setTypeMetadata(types);');
     }
-}
+};
 
-function _needNewVariable(res, varName) {
+$generatorJava._needNewVariable = function (res, varName) {
     var needNew = !res[varName];
 
     if (needNew)
         res[varName] = true;
 
     return needNew;
-}
+};
 
 /**
  * Add variable declaration.
@@ -401,7 +403,7 @@ function _needNewVariable(res, varName) {
  * @param varFullGenericType1 Optional full class name of first generic.
  * @param varFullGenericType2 Optional full class name of second generic.
  */
-function _declareVariable(res, varNew, varName, varFullType, varFullActualType, varFullGenericType1, varFullGenericType2) {
+$generatorJava._declareVariable = function (res, varNew, varName, varFullType, varFullActualType, varFullGenericType1, varFullGenericType2) {
     var varType = res.importClass(varFullType);
 
     if (varFullActualType && varFullGenericType1) {
@@ -415,7 +417,7 @@ function _declareVariable(res, varNew, varName, varFullType, varFullActualType,
     }
     else
         res.line((varNew ? (varType + ' ') : '') + varName + ' = new ' + varType + '();');
-}
+};
 
 /**
  * Add property via setter / property name.
@@ -427,18 +429,18 @@ function _declareVariable(res, varNew, varName, varFullType, varFullActualType,
  * @param enumType Optional info about property datatype.
  * @param setterName Optional special setter name.
  */
-function _addProperty(res, varName, obj, propName, enumType, setterName) {
+$generatorJava._addProperty = function (res, varName, obj, propName, enumType, setterName) {
     var val = obj[propName];
 
     if ($commonUtils.isDefined(val)) {
         res.emptyLineIfNeeded();
 
-        res.line(varName + '.' + _setterName(setterName ? setterName : propName)
-            + '(' + _toJavaCode(val, enumType) + ');');
+        res.line(varName + '.' + $generatorJava._setterName(setterName ? setterName : propName)
+            + '(' + $generatorJava._toJavaCode(val, enumType) + ');');
     }
 
     return val;
-}
+};
 
 /**
  * Add property via setter assuming that it is a 'Class'.
@@ -448,25 +450,25 @@ function _addProperty(res, varName, obj, propName, enumType, setterName) {
  * @param obj Source object with data.
  * @param propName Property name to take from source object.
  */
-function _addClassProperty(res, varName, obj, propName) {
+$generatorJava._addClassProperty = function (res, varName, obj, propName) {
     var val = obj[propName];
 
     if ($commonUtils.isDefined(val)) {
         res.emptyLineIfNeeded();
 
-        res.line(varName + '.' + _setterName(propName) + '(' + res.importClass(val) + '.class);');
+        res.line(varName + '.' + $generatorJava._setterName(propName) + '(' + res.importClass(val) + '.class);');
     }
-}
+};
 
 /**
  * @param propName Property name
  * @returns Property setter with name by java conventions.
  */
-function _setterName(propName) {
-    return _toJavaName('set', propName);
-}
+$generatorJava._setterName = function (propName) {
+    return $generatorJava._toJavaName('set', propName);
+};
 
-function _addListProperty(res, varName, obj, propName, enumType, setterName) {
+$generatorJava._addListProperty = function (res, varName, obj, propName, enumType, setterName) {
     var val = obj[propName];
 
     if (val && val.length > 0) {
@@ -474,37 +476,37 @@ function _addListProperty(res, varName, obj, propName, enumType, setterName) {
 
         res.importClass('java.util.Arrays');
 
-        res.append(varName + '.' + _setterName(setterName ? setterName : propName) + '(Arrays.asList(');
+        res.append(varName + '.' + $generatorJava._setterName(setterName ? setterName : propName) + '(Arrays.asList(');
 
         for (var i = 0; i < val.length; i++) {
             if (i > 0)
                 res.append(', ');
 
-            res.append(_toJavaCode(val[i], enumType));
+            res.append($generatorJava._toJavaCode(val[i], enumType));
         }
 
         res.line('));');
     }
-}
+};
 
-function _addMultiparamProperty(res, varName, obj, propName, type, setterName) {
+$generatorJava._addMultiparamProperty = function (res, varName, obj, propName, type, setterName) {
     var val = obj[propName];
 
     if (val && val.length > 0) {
-        res.append(varName + '.' + _setterName(setterName ? setterName : propName) + '(');
+        res.append(varName + '.' + $generatorJava._setterName(setterName ? setterName : propName) + '(');
 
         for (var i = 0; i < val.length; i++) {
             if (i > 0)
                 res.append(', ');
 
-            res.append(_toJavaCode(val[i], type));
+            res.append($generatorJava._toJavaCode(val[i], type));
         }
 
         res.line(');');
     }
-}
+};
 
-function _addBeanWithProperties(res, varName, bean, beanPropName, beanVarName, beanClass, props, createBeanAlthoughNoProps) {
+$generatorJava._addBeanWithProperties = function (res, varName, bean, beanPropName, beanVarName, beanClass, props, createBeanAlthoughNoProps) {
     if (bean && $commonUtils.hasProperty(bean, props)) {
         if (!res.emptyLineIfNeeded()) {
             res.line();
@@ -519,15 +521,15 @@ function _addBeanWithProperties(res, varName, bean, beanPropName, beanVarName, b
                 if (descr) {
                     switch (descr.type) {
                         case 'list':
-                            _addListProperty(res, beanVarName, bean, propName, descr.elementsType, descr.setterName);
+                            $generatorJava._addListProperty(res, beanVarName, bean, propName, descr.elementsType, descr.setterName);
                             break;
 
                         case 'enum':
-                            _addProperty(res, beanVarName, bean, propName, descr.enumClass, descr.setterName);
+                            $generatorJava._addProperty(res, beanVarName, bean, propName, descr.enumClass, descr.setterName);
                             break;
 
                         case 'float':
-                            _addProperty(res, beanVarName, bean, propName, 'float', descr.setterName);
+                            $generatorJava._addProperty(res, beanVarName, bean, propName, 'float', descr.setterName);
                             break;
 
                         case 'propertiesAsList':
@@ -548,39 +550,37 @@ function _addBeanWithProperties(res, varName, bean, beanPropName, beanVarName, b
 
                                 }
 
-                                res.line(beanVarName + '.' + _setterName(propName) + '(' + descr.propVarName + ');');
+                                res.line(beanVarName + '.' + $generatorJava._setterName(propName) + '(' + descr.propVarName + ');');
                             }
                             break;
 
                         case 'className':
                             if (bean[propName]) {
-                                res.line(beanVarName + '.' + _setterName(propName) + '(new ' + $generatorCommon.KNOWN_CLASSES[bean[propName]].className + '());');
+                                res.line(beanVarName + '.' + $generatorJava._setterName(propName) + '(new ' + $generatorCommon.KNOWN_CLASSES[bean[propName]].className + '());');
                             }
 
                             break;
 
                         default:
-                            _addProperty(res, beanVarName, bean, propName, null, descr.setterName);
+                            $generatorJava._addProperty(res, beanVarName, bean, propName, null, descr.setterName);
                     }
                 }
                 else {
-                    _addProperty(res, beanVarName, bean, propName);
+                    $generatorJava._addProperty(res, beanVarName, bean, propName);
                 }
             }
         }
 
-        res.line(varName + '.' + _setterName(beanPropName) + '(' + beanVarName + ');');
+        res.line(varName + '.' + $generatorJava._setterName(beanPropName) + '(' + beanVarName + ');');
 
         res.needEmptyLine = true;
     }
     else if (createBeanAlthoughNoProps) {
         res.emptyLineIfNeeded();
 
-        res.line(varName + '.' + _setterName(beanPropName) + '(new ' + beanClass + '());');
+        res.line(varName + '.' + $generatorJava._setterName(beanPropName) + '(new ' + beanClass + '());');
     }
-}
-
-$generatorJava = {};
+};
 
 // Generate cluster general group.
 $generatorJava.clusterGeneral = function (cluster, res) {
@@ -590,13 +590,13 @@ $generatorJava.clusterGeneral = function (cluster, res) {
     if (cluster.discovery) {
         var d = cluster.discovery;
 
-        _declareVariable(res, true, 'discovery', 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi');
+        $generatorJava._declareVariable(res, true, 'discovery', 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi');
 
         switch (d.kind) {
             case 'Multicast':
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder');
 
-                _addBeanWithProperties(res, 'discovery', d.Multicast, 'ipFinder', 'ipFinder',
+                $generatorJava._addBeanWithProperties(res, 'discovery', d.Multicast, 'ipFinder', 'ipFinder',
                     'TcpDiscoveryMulticastIpFinder', {
                         multicastGroup: null,
                         multicastPort: null,
@@ -610,7 +610,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
             case 'Vm':
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder');
 
-                _addBeanWithProperties(res, 'discovery', d.Vm, 'ipFinder', 'ipFinder', 'TcpDiscoveryVmIpFinder', {
+                $generatorJava._addBeanWithProperties(res, 'discovery', d.Vm, 'ipFinder', 'ipFinder', 'TcpDiscoveryVmIpFinder', {
                     addresses: {type: 'list'}
                 }, true);
 
@@ -620,7 +620,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder');
 
                 if (d.S3)
-                    _addBeanWithProperties(res, 'discovery', d.S3, 'ipFinder', 'ipFinder', 'TcpDiscoveryS3IpFinder',
+                    $generatorJava._addBeanWithProperties(res, 'discovery', d.S3, 'ipFinder', 'ipFinder', 'TcpDiscoveryS3IpFinder',
                         {bucketName: null}, true);
                 else
                     res.line('discovery.setIpFinder(new TcpDiscoveryS3IpFinder());');
@@ -630,7 +630,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
             case 'Cloud':
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder');
 
-                _addBeanWithProperties(res, 'discovery', d.Cloud, 'ipFinder', 'ipFinder', 'TcpDiscoveryCloudIpFinder', {
+                $generatorJava._addBeanWithProperties(res, 'discovery', d.Cloud, 'ipFinder', 'ipFinder', 'TcpDiscoveryCloudIpFinder', {
                     credential: null,
                     credentialPath: null,
                     identity: null,
@@ -644,7 +644,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
             case 'GoogleStorage':
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder');
 
-                _addBeanWithProperties(res, 'discovery', d.GoogleStorage, 'ipFinder', 'ipFinder',
+                $generatorJava._addBeanWithProperties(res, 'discovery', d.GoogleStorage, 'ipFinder', 'ipFinder',
                     'TcpDiscoveryGoogleStorageIpFinder', {
                         projectName: null,
                         bucketName: null,
@@ -660,7 +660,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
             case 'Jdbc':
                 res.line();
 
-                _declareVariable(res, true, 'ipFinder', 'org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder');
+                $generatorJava._declareVariable(res, true, 'ipFinder', 'org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder');
 
                 res.line('ipFinder.setInitSchema(' + ($commonUtils.isDefined(d.Jdbc.initSchema) && d.Jdbc.initSchema) + ');');
                 res.line('discovery.setIpFinder(ipFinder);');
@@ -671,7 +671,7 @@ $generatorJava.clusterGeneral = function (cluster, res) {
             case 'SharedFs':
                 res.importClass('org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder');
 
-                _addBeanWithProperties(res, 'discovery', d.SharedFs, 'ipFinder', 'ipFinder',
+                $generatorJava._addBeanWithProperties(res, 'discovery', d.SharedFs, 'ipFinder', 'ipFinder',
                     'TcpDiscoverySharedFsIpFinder', {path: null}, true);
 
                 break;
@@ -697,7 +697,7 @@ $generatorJava.clusterAtomics = function (cluster, res) {
 
     var atomicCfg = $generatorCommon.ATOMIC_CONFIGURATION;
 
-    _addBeanWithProperties(res, 'cfg', cluster.atomicConfiguration, 'atomicConfiguration', 'atomicCfg',
+    $generatorJava._addBeanWithProperties(res, 'cfg', cluster.atomicConfiguration, 'atomicConfiguration', 'atomicCfg',
         atomicCfg.className, atomicCfg.fields);
 
     res.needEmptyLine = true;
@@ -744,7 +744,7 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearConfiguration)
         res.startBlock('public IgniteConfiguration createConfiguration() {');
     }
 
-    _declareVariable(res, true, 'cfg', 'org.apache.ignite.configuration.IgniteConfiguration');
+    $generatorJava._declareVariable(res, true, 'cfg', 'org.apache.ignite.configuration.IgniteConfiguration');
     res.line();
 
     if (clientNearConfiguration) {
@@ -764,11 +764,11 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearConfiguration)
         _.forEach(caches, function (cache) {
             res.emptyLineIfNeeded();
 
-            var cacheName = _toJavaName('cache', cache.name);
+            var cacheName = $generatorJava._toJavaName('cache', cache.name);
 
             names.push(cacheName);
 
-            _addCacheConfiguration(res, cache, cacheName);
+            $generatorJava._addCacheConfiguration(res, cache, cacheName);
 
             res.needEmptyLine = true;
         });
@@ -791,16 +791,16 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearConfiguration)
 
     $generatorJava.clusterAtomics(cluster, res);
 
-    _addProperty(res, 'cfg', cluster, 'networkTimeout');
-    _addProperty(res, 'cfg', cluster, 'networkSendRetryDelay');
-    _addProperty(res, 'cfg', cluster, 'networkSendRetryCount');
-    _addProperty(res, 'cfg', cluster, 'segmentCheckFrequency');
-    _addProperty(res, 'cfg', cluster, 'waitForSegmentOnStart');
-    _addProperty(res, 'cfg', cluster, 'discoveryStartupDelay');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkTimeout');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryDelay');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryCount');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'segmentCheckFrequency');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'waitForSegmentOnStart');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'discoveryStartupDelay');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, 'cfg', cluster, 'deploymentMode', 'DeploymentMode');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'deploymentMode', 'DeploymentMode');
 
     res.needEmptyLine = true;
 
@@ -848,58 +848,58 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearConfiguration)
     if (marshaller && marshaller.kind) {
         var marshallerDesc = $generatorCommon.MARSHALLERS[marshaller.kind];
 
-        _addBeanWithProperties(res, 'cfg', marshaller[marshaller.kind], 'marshaller', 'marshaller',
+        $generatorJava._addBeanWithProperties(res, 'cfg', marshaller[marshaller.kind], 'marshaller', 'marshaller',
             marshallerDesc.className, marshallerDesc.fields, true);
 
-        _addBeanWithProperties(res, 'marshaller', marshaller[marshaller.kind], marshallerDesc.className, marshallerDesc.fields, true);
+        $generatorJava._addBeanWithProperties(res, 'marshaller', marshaller[marshaller.kind], marshallerDesc.className, marshallerDesc.fields, true);
     }
 
-    _addProperty(res, 'cfg', cluster, 'marshalLocalJobs');
-    _addProperty(res, 'cfg', cluster, 'marshallerCacheKeepAliveTime');
-    _addProperty(res, 'cfg', cluster, 'marshallerCacheThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'marshalLocalJobs');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'marshallerCacheKeepAliveTime');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'marshallerCacheThreadPoolSize');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, 'cfg', cluster, 'metricsExpireTime');
-    _addProperty(res, 'cfg', cluster, 'metricsHistorySize');
-    _addProperty(res, 'cfg', cluster, 'metricsLogFrequency');
-    _addProperty(res, 'cfg', cluster, 'metricsUpdateFrequency');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'metricsExpireTime');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'metricsHistorySize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'metricsLogFrequency');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'metricsUpdateFrequency');
     res.needEmptyLine = true;
 
-    _addProperty(res, 'cfg', cluster, 'peerClassLoadingEnabled');
-    _addMultiparamProperty(res, 'cfg', cluster, 'peerClassLoadingLocalClassPathExclude');
-    _addProperty(res, 'cfg', cluster, 'peerClassLoadingMissedResourcesCacheSize');
-    _addProperty(res, 'cfg', cluster, 'peerClassLoadingThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'peerClassLoadingEnabled');
+    $generatorJava._addMultiparamProperty(res, 'cfg', cluster, 'peerClassLoadingLocalClassPathExclude');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'peerClassLoadingMissedResourcesCacheSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'peerClassLoadingThreadPoolSize');
     res.needEmptyLine = true;
 
     if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
-        _addBeanWithProperties(res, 'cfg', cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi', 'swapSpi',
+        $generatorJava._addBeanWithProperties(res, 'cfg', cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi', 'swapSpi',
             $generatorCommon.SWAP_SPACE_SPI.className, $generatorCommon.SWAP_SPACE_SPI.fields, true);
 
         res.needEmptyLine = true;
     }
 
-    _addProperty(res, 'cfg', cluster, 'clockSyncSamples');
-    _addProperty(res, 'cfg', cluster, 'clockSyncFrequency');
-    _addProperty(res, 'cfg', cluster, 'timeServerPortBase');
-    _addProperty(res, 'cfg', cluster, 'timeServerPortRange');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'clockSyncSamples');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'clockSyncFrequency');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'timeServerPortBase');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'timeServerPortRange');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, 'cfg', cluster, 'publicThreadPoolSize');
-    _addProperty(res, 'cfg', cluster, 'systemThreadPoolSize');
-    _addProperty(res, 'cfg', cluster, 'managementThreadPoolSize');
-    _addProperty(res, 'cfg', cluster, 'igfsThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'publicThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'systemThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'managementThreadPoolSize');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'igfsThreadPoolSize');
 
     res.needEmptyLine = true;
 
-    _addBeanWithProperties(res, 'cfg', cluster.transactionConfiguration, 'transactionConfiguration',
+    $generatorJava._addBeanWithProperties(res, 'cfg', cluster.transactionConfiguration, 'transactionConfiguration',
         'transactionConfiguration', $generatorCommon.TRANSACTION_CONFIGURATION.className,
         $generatorCommon.TRANSACTION_CONFIGURATION.fields);
 
     res.needEmptyLine = true;
 
-    _addProperty(res, 'cfg', cluster, 'cacheSanityCheckEnabled');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'cacheSanityCheckEnabled');
 
     res.needEmptyLine = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac82d2ca/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
index c970701..0307d28 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
@@ -23,21 +23,23 @@ if (typeof window === 'undefined') {
     $generatorCommon = require('./generator-common');
 }
 
-function _escape(s) {
+$generatorXml = {};
+
+$generatorXml._escape = function (s) {
     if (typeof(s) != 'string')
         return s;
 
     return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
-}
+};
 
-function _escapeAttr(s) {
+$generatorXml._escapeAttr = function (s) {
     if (typeof(s) != 'string')
         return s;
 
     return s.replace(/&/g, '&amp;').replace(/"/g, '&quot;');
-}
+};
 
-function _addElement(res, tag, attr1, val1, attr2, val2) {
+$generatorXml._addElement = function (res, tag, attr1, val1, attr2, val2) {
     var elem = '<' + tag;
 
     if (attr1)
@@ -50,25 +52,25 @@ function _addElement(res, tag, attr1, val1, attr2, val2) {
 
     res.emptyLineIfNeeded();
     res.line(elem);
-}
+};
 
-function _addProperty(res, obj, propName, setterName) {
+$generatorXml._addProperty = function (res, obj, propName, setterName) {
     if ($commonUtils.isDefined(obj)) {
         var val = obj[propName];
 
         if ($commonUtils.isDefined(val))
-            _addElement(res, 'property', 'name', setterName ? setterName : propName, 'value', _escapeAttr(val));
+            $generatorXml._addElement(res, 'property', 'name', setterName ? setterName : propName, 'value', $generatorXml._escapeAttr(val));
     }
-}
+};
 
-function _addClassNameProperty(res, obj, propName) {
+$generatorXml._addClassNameProperty = function (res, obj, propName) {
     var val = obj[propName];
 
     if ($commonUtils.isDefined(val))
-        _addElement(res, 'property', 'name', propName, 'value', $dataStructures.fullClassName(val));
-}
+        $generatorXml._addElement(res, 'property', 'name', propName, 'value', $dataStructures.fullClassName(val));
+};
 
-function _addListProperty(res, obj, propName, listType, rowFactory) {
+$generatorXml._addListProperty = function (res, obj, propName, listType, rowFactory) {
     var val = obj[propName];
 
     if (val && val.length > 0) {
@@ -79,7 +81,7 @@ function _addListProperty(res, obj, propName, listType, rowFactory) {
 
         if (!rowFactory)
             rowFactory = function (val) {
-                return '<value>' + _escape(val) + '</value>'
+                return '<value>' + $generatorXml._escape(val) + '</value>'
             };
 
         res.startBlock('<property name="' + propName + '">');
@@ -93,9 +95,9 @@ function _addListProperty(res, obj, propName, listType, rowFactory) {
 
         res.needEmptyLine = true;
     }
-}
+};
 
-function _addBeanWithProperties(res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps) {
+$generatorXml._addBeanWithProperties = function (res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps) {
     if (bean && $commonUtils.hasProperty(bean, props)) {
         res.emptyLineIfNeeded();
         res.startBlock('<property name="' + beanPropName + '">');
@@ -107,7 +109,7 @@ function _addBeanWithProperties(res, bean, beanPropName, beanClass, props, creat
 
                 if (descr) {
                     if (descr.type == 'list') {
-                        _addListProperty(res, bean, propName, descr.setterName);
+                        $generatorXml._addListProperty(res, bean, propName, descr.setterName);
                     }
                     else if (descr.type == 'className') {
                         if (bean[propName]) {
@@ -128,8 +130,8 @@ function _addBeanWithProperties(res, bean, beanPropName, beanClass, props, creat
 
                                 var eqIndex = nameAndValue.indexOf('=');
                                 if (eqIndex >= 0) {
-                                    res.line('<prop key="' + _escapeAttr(nameAndValue.substring(0, eqIndex)) + '">' +
-                                        _escape(nameAndValue.substr(eqIndex + 1)) + '</prop>');
+                                    res.line('<prop key="' + $generatorXml._escapeAttr(nameAndValue.substring(0, eqIndex)) + '">' +
+                                        $generatorXml._escape(nameAndValue.substr(eqIndex + 1)) + '</prop>');
                                 }
                             }
 
@@ -138,10 +140,10 @@ function _addBeanWithProperties(res, bean, beanPropName, beanClass, props, creat
                         }
                     }
                     else
-                        _addProperty(res, bean, propName, descr.setterName);
+                        $generatorXml._addProperty(res, bean, propName, descr.setterName);
                 }
                 else
-                    _addProperty(res, bean, propName);
+                    $generatorXml._addProperty(res, bean, propName);
             }
         }
 
@@ -154,19 +156,19 @@ function _addBeanWithProperties(res, bean, beanPropName, beanClass, props, creat
         res.line('    <bean class="' + beanClass + '"/>');
         res.line('</property>');
     }
-}
+};
 
-function _createEvictionPolicy(res, evictionPolicy, propertyName) {
+$generatorXml._createEvictionPolicy = function (res, evictionPolicy, propertyName) {
     if (evictionPolicy && evictionPolicy.kind) {
         var e = $generatorCommon.EVICTION_POLICIES[evictionPolicy.kind];
 
         var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
 
-        _addBeanWithProperties(res, obj, propertyName, e.className, e.fields, true);
+        $generatorXml._addBeanWithProperties(res, obj, propertyName, e.className, e.fields, true);
     }
-}
+};
 
-function _addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty) {
+$generatorXml._addCacheTypeMetadataDatabaseFields = function (res, meta, fieldProperty) {
     var fields = meta[fieldProperty];
 
     if (fields && fields.length > 0) {
@@ -179,15 +181,15 @@ function _addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty) {
         _.forEach(fields, function (field) {
             res.startBlock('<bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">');
 
-            _addProperty(res, field, 'databaseName');
+            $generatorXml._addProperty(res, field, 'databaseName');
 
             res.startBlock('<property name="databaseType">');
             res.line('<util:constant static-field="java.sql.Types.' + field.databaseType + '"/>');
             res.endBlock('</property>');
 
-            _addProperty(res, field, 'javaName');
+            $generatorXml._addProperty(res, field, 'javaName');
 
-            _addClassNameProperty(res, field, 'javaType');
+            $generatorXml._addClassNameProperty(res, field, 'javaType');
 
             res.endBlock('</bean>');
         });
@@ -197,9 +199,9 @@ function _addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty) {
 
         res.needEmptyLine = true;
     }
-}
+};
 
-function _addCacheTypeMetadataQueryFields(res, meta, fieldProperty) {
+$generatorXml._addCacheTypeMetadataQueryFields = function (res, meta, fieldProperty) {
     var fields = meta[fieldProperty];
 
     if (fields && fields.length > 0) {
@@ -209,7 +211,7 @@ function _addCacheTypeMetadataQueryFields(res, meta, fieldProperty) {
         res.startBlock('<map>');
 
         _.forEach(fields, function (field) {
-            _addElement(res, 'entry', 'key', field.name, 'value', $dataStructures.fullClassName(field.className));
+            $generatorXml._addElement(res, 'entry', 'key', field.name, 'value', $dataStructures.fullClassName(field.className));
         });
 
         res.endBlock('</map>');
@@ -217,9 +219,9 @@ function _addCacheTypeMetadataQueryFields(res, meta, fieldProperty) {
 
         res.needEmptyLine = true;
     }
-}
+};
 
-function _addCacheTypeMetadataGroups(res, meta) {
+$generatorXml._addCacheTypeMetadataGroups = function (res, meta) {
     var groups = meta.groups;
 
     if (groups && groups.length > 0) {
@@ -256,9 +258,7 @@ function _addCacheTypeMetadataGroups(res, meta) {
 
         res.needEmptyLine = true;
     }
-}
-
-$generatorXml = {};
+};
 
 // Generate discovery.
 $generatorXml.clusterGeneral = function (cluster, res) {
@@ -276,11 +276,11 @@ $generatorXml.clusterGeneral = function (cluster, res) {
             case 'Multicast':
                 res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">');
 
-                _addProperty(res, d.Multicast, 'multicastGroup');
-                _addProperty(res, d.Multicast, 'multicastPort');
-                _addProperty(res, d.Multicast, 'responseWaitTime');
-                _addProperty(res, d.Multicast, 'addressRequestAttempts');
-                _addProperty(res, d.Multicast, 'localAddress');
+                $generatorXml._addProperty(res, d.Multicast, 'multicastGroup');
+                $generatorXml._addProperty(res, d.Multicast, 'multicastPort');
+                $generatorXml._addProperty(res, d.Multicast, 'responseWaitTime');
+                $generatorXml._addProperty(res, d.Multicast, 'addressRequestAttempts');
+                $generatorXml._addProperty(res, d.Multicast, 'localAddress');
 
                 res.endBlock('</bean>');
 
@@ -290,7 +290,7 @@ $generatorXml.clusterGeneral = function (cluster, res) {
                 if (d.Vm.addresses.length > 0) {
                     res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">');
 
-                    _addListProperty(res, d.Vm, 'addresses');
+                    $generatorXml._addListProperty(res, d.Vm, 'addresses');
 
                     res.endBlock('</bean>');
                 }
@@ -304,7 +304,7 @@ $generatorXml.clusterGeneral = function (cluster, res) {
                 res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">');
 
                 if (d.S3 && d.S3.bucketName)
-                    res.line('<property name="bucketName" value="' + _escapeAttr(d.S3.bucketName) + '" />');
+                    res.line('<property name="bucketName" value="' + $generatorXml._escapeAttr(d.S3.bucketName) + '" />');
 
                 res.endBlock('</bean>');
 
@@ -313,12 +313,12 @@ $generatorXml.clusterGeneral = function (cluster, res) {
             case 'Cloud':
                 res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">');
 
-                _addProperty(res, d.Cloud, 'credential');
-                _addProperty(res, d.Cloud, 'credentialPath');
-                _addProperty(res, d.Cloud, 'identity');
-                _addProperty(res, d.Cloud, 'provider');
-                _addListProperty(res, d.Cloud, 'regions');
-                _addListProperty(res, d.Cloud, 'zones');
+                $generatorXml._addProperty(res, d.Cloud, 'credential');
+                $generatorXml._addProperty(res, d.Cloud, 'credentialPath');
+                $generatorXml._addProperty(res, d.Cloud, 'identity');
+                $generatorXml._addProperty(res, d.Cloud, 'provider');
+                $generatorXml._addListProperty(res, d.Cloud, 'regions');
+                $generatorXml._addListProperty(res, d.Cloud, 'zones');
 
                 res.endBlock('</bean>');
 
@@ -327,13 +327,13 @@ $generatorXml.clusterGeneral = function (cluster, res) {
             case 'GoogleStorage':
                 res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder">');
 
-                _addProperty(res, d.GoogleStorage, 'projectName');
-                _addProperty(res, d.GoogleStorage, 'bucketName');
-                _addProperty(res, d.GoogleStorage, 'serviceAccountP12FilePath');
-                _addProperty(res, d.GoogleStorage, 'serviceAccountId');
+                $generatorXml._addProperty(res, d.GoogleStorage, 'projectName');
+                $generatorXml._addProperty(res, d.GoogleStorage, 'bucketName');
+                $generatorXml._addProperty(res, d.GoogleStorage, 'serviceAccountP12FilePath');
+                $generatorXml._addProperty(res, d.GoogleStorage, 'serviceAccountId');
 
                 //if (d.GoogleStorage.addrReqAttempts) todo ????
-                //    res.line('<property name="serviceAccountP12FilePath" value="' + _escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
+                //    res.line('<property name="serviceAccountP12FilePath" value="' + $generatorXml._escapeAttr(d.GoogleStorage.addrReqAttempts) + '"/>');
 
                 res.endBlock('</bean>');
 
@@ -349,7 +349,7 @@ $generatorXml.clusterGeneral = function (cluster, res) {
             case 'SharedFs':
                 if (d.SharedFs.path) {
                     res.startBlock('<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder">');
-                    _addProperty(res, d.SharedFs, 'path');
+                    $generatorXml._addProperty(res, d.SharedFs, 'path');
                     res.endBlock('</bean>');
                 }
                 else {
@@ -379,7 +379,7 @@ $generatorXml.clusterAtomics = function (cluster, res) {
 
     var atomicCfg = $generatorCommon.ATOMIC_CONFIGURATION;
 
-    _addBeanWithProperties(res, cluster.atomicConfiguration, 'atomicConfiguration', atomicCfg.className, atomicCfg.fields);
+    $generatorXml._addBeanWithProperties(res, cluster.atomicConfiguration, 'atomicConfiguration', atomicCfg.className, atomicCfg.fields);
 
     res.needEmptyLine = true;
 
@@ -391,12 +391,12 @@ $generatorXml.clusterCommunication = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'networkTimeout');
-    _addProperty(res, cluster, 'networkSendRetryDelay');
-    _addProperty(res, cluster, 'networkSendRetryCount');
-    _addProperty(res, cluster, 'segmentCheckFrequency');
-    _addProperty(res, cluster, 'waitForSegmentOnStart');
-    _addProperty(res, cluster, 'discoveryStartupDelay');
+    $generatorXml._addProperty(res, cluster, 'networkTimeout');
+    $generatorXml._addProperty(res, cluster, 'networkSendRetryDelay');
+    $generatorXml._addProperty(res, cluster, 'networkSendRetryCount');
+    $generatorXml._addProperty(res, cluster, 'segmentCheckFrequency');
+    $generatorXml._addProperty(res, cluster, 'waitForSegmentOnStart');
+    $generatorXml._addProperty(res, cluster, 'discoveryStartupDelay');
 
     res.needEmptyLine = true;
 
@@ -408,7 +408,7 @@ $generatorXml.clusterDeployment = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'deploymentMode');
+    $generatorXml._addProperty(res, cluster, 'deploymentMode');
 
     res.needEmptyLine = true;
 
@@ -466,14 +466,14 @@ $generatorXml.clusterMarshaller = function (cluster, res) {
     if (marshaller && marshaller.kind) {
         var marshallerDesc = $generatorCommon.MARSHALLERS[marshaller.kind];
 
-        _addBeanWithProperties(res, marshaller[marshaller.kind], 'marshaller', marshallerDesc.className, marshallerDesc.fields, true);
+        $generatorXml._addBeanWithProperties(res, marshaller[marshaller.kind], 'marshaller', marshallerDesc.className, marshallerDesc.fields, true);
 
         res.needEmptyLine = true;
     }
 
-    _addProperty(res, cluster, 'marshalLocalJobs');
-    _addProperty(res, cluster, 'marshallerCacheKeepAliveTime');
-    _addProperty(res, cluster, 'marshallerCacheThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'marshalLocalJobs');
+    $generatorXml._addProperty(res, cluster, 'marshallerCacheKeepAliveTime');
+    $generatorXml._addProperty(res, cluster, 'marshallerCacheThreadPoolSize');
 
     res.needEmptyLine = true;
 
@@ -485,10 +485,10 @@ $generatorXml.clusterMetrics = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'metricsExpireTime');
-    _addProperty(res, cluster, 'metricsHistorySize');
-    _addProperty(res, cluster, 'metricsLogFrequency');
-    _addProperty(res, cluster, 'metricsUpdateFrequency');
+    $generatorXml._addProperty(res, cluster, 'metricsExpireTime');
+    $generatorXml._addProperty(res, cluster, 'metricsHistorySize');
+    $generatorXml._addProperty(res, cluster, 'metricsLogFrequency');
+    $generatorXml._addProperty(res, cluster, 'metricsUpdateFrequency');
 
     res.needEmptyLine = true;
 
@@ -500,10 +500,10 @@ $generatorXml.clusterP2p = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'peerClassLoadingEnabled');
-    _addListProperty(res, cluster, 'peerClassLoadingLocalClassPathExclude');
-    _addProperty(res, cluster, 'peerClassLoadingMissedResourcesCacheSize');
-    _addProperty(res, cluster, 'peerClassLoadingThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'peerClassLoadingEnabled');
+    $generatorXml._addListProperty(res, cluster, 'peerClassLoadingLocalClassPathExclude');
+    $generatorXml._addProperty(res, cluster, 'peerClassLoadingMissedResourcesCacheSize');
+    $generatorXml._addProperty(res, cluster, 'peerClassLoadingThreadPoolSize');
 
     res.needEmptyLine = true;
 
@@ -518,7 +518,7 @@ $generatorXml.clusterSwap = function (cluster, res) {
     var swapSpaceSpi = $generatorCommon.SWAP_SPACE_SPI;
 
     if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi') {
-        _addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
+        $generatorXml._addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
             swapSpaceSpi.className, swapSpaceSpi.fields, true);
 
         res.needEmptyLine = true;
@@ -532,10 +532,10 @@ $generatorXml.clusterTime = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'clockSyncSamples');
-    _addProperty(res, cluster, 'clockSyncFrequency');
-    _addProperty(res, cluster, 'timeServerPortBase');
-    _addProperty(res, cluster, 'timeServerPortRange');
+    $generatorXml._addProperty(res, cluster, 'clockSyncSamples');
+    $generatorXml._addProperty(res, cluster, 'clockSyncFrequency');
+    $generatorXml._addProperty(res, cluster, 'timeServerPortBase');
+    $generatorXml._addProperty(res, cluster, 'timeServerPortRange');
 
     res.needEmptyLine = true;
 
@@ -547,10 +547,10 @@ $generatorXml.clusterPools = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cluster, 'publicThreadPoolSize');
-    _addProperty(res, cluster, 'systemThreadPoolSize');
-    _addProperty(res, cluster, 'managementThreadPoolSize');
-    _addProperty(res, cluster, 'igfsThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'publicThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'systemThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'managementThreadPoolSize');
+    $generatorXml._addProperty(res, cluster, 'igfsThreadPoolSize');
     res.needEmptyLine = true;
 
     return res;
@@ -563,7 +563,7 @@ $generatorXml.clusterTransactions = function (cluster, res) {
 
     var trnCfg = $generatorCommon.TRANSACTION_CONFIGURATION;
 
-    _addBeanWithProperties(res, cluster.transactionConfiguration, 'transactionConfiguration', trnCfg.className, trnCfg.fields);
+    $generatorXml._addBeanWithProperties(res, cluster.transactionConfiguration, 'transactionConfiguration', trnCfg.className, trnCfg.fields);
 
     res.needEmptyLine = true;
 
@@ -575,19 +575,19 @@ $generatorXml.cacheGeneral = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cache, 'name');
+    $generatorXml._addProperty(res, cache, 'name');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, cache, 'cacheMode');
-    _addProperty(res, cache, 'atomicityMode');
+    $generatorXml._addProperty(res, cache, 'cacheMode');
+    $generatorXml._addProperty(res, cache, 'atomicityMode');
 
     if (cache.cacheMode == 'PARTITIONED')
-        _addProperty(res, cache, 'backups');
+        $generatorXml._addProperty(res, cache, 'backups');
 
-    _addProperty(res, cache, 'readFromBackup');
-    _addProperty(res, cache, 'copyOnRead');
-    _addProperty(res, cache, 'invalidate');
+    $generatorXml._addProperty(res, cache, 'readFromBackup');
+    $generatorXml._addProperty(res, cache, 'copyOnRead');
+    $generatorXml._addProperty(res, cache, 'invalidate');
 
     return res;
 };
@@ -597,17 +597,17 @@ $generatorXml.cacheMemory = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cache, 'memoryMode');
-    _addProperty(res, cache, 'offHeapMaxMemory');
+    $generatorXml._addProperty(res, cache, 'memoryMode');
+    $generatorXml._addProperty(res, cache, 'offHeapMaxMemory');
 
     res.needEmptyLine = true;
 
-    _createEvictionPolicy(res, cache.evictionPolicy, 'evictionPolicy');
+    $generatorXml._createEvictionPolicy(res, cache.evictionPolicy, 'evictionPolicy');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, cache, 'swapEnabled');
-    _addProperty(res, cache, 'startSize');
+    $generatorXml._addProperty(res, cache, 'swapEnabled');
+    $generatorXml._addProperty(res, cache, 'startSize');
 
     res.needEmptyLine = true;
 
@@ -619,9 +619,9 @@ $generatorXml.cacheQuery = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cache, 'sqlOnheapRowCacheSize');
+    $generatorXml._addProperty(res, cache, 'sqlOnheapRowCacheSize');
 
-    _addProperty(res, cache, 'longQueryWarningTimeout');
+    $generatorXml._addProperty(res, cache, 'longQueryWarningTimeout');
 
     if (cache.indexedTypes && cache.indexedTypes.length > 0) {
         res.startBlock('<property name="indexedTypes">');
@@ -640,9 +640,9 @@ $generatorXml.cacheQuery = function(cache, res) {
         res.needEmptyLine = true;
     }
 
-    _addListProperty(res, cache, 'sqlFunctionClasses', 'array');
+    $generatorXml._addListProperty(res, cache, 'sqlFunctionClasses', 'array');
 
-    _addProperty(res, cache, 'sqlEscapeAll');
+    $generatorXml._addProperty(res, cache, 'sqlEscapeAll');
 
     res.needEmptyLine = true;
 
@@ -660,7 +660,7 @@ $generatorXml.cacheStore = function(cache, res) {
         if (storeFactory) {
             var storeFactoryDesc = $generatorCommon.STORE_FACTORIES[cache.cacheStoreFactory.kind];
 
-            _addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', storeFactoryDesc.className, storeFactoryDesc.fields, true);
+            $generatorXml._addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', storeFactoryDesc.className, storeFactoryDesc.fields, true);
 
             if (storeFactory.dialect) {
                 if (_.findIndex(res.datasources, function (ds) {
@@ -677,17 +677,17 @@ $generatorXml.cacheStore = function(cache, res) {
         }
     }
 
-    _addProperty(res, cache, 'loadPreviousValue');
-    _addProperty(res, cache, 'readThrough');
-    _addProperty(res, cache, 'writeThrough');
+    $generatorXml._addProperty(res, cache, 'loadPreviousValue');
+    $generatorXml._addProperty(res, cache, 'readThrough');
+    $generatorXml._addProperty(res, cache, 'writeThrough');
 
     res.needEmptyLine = true;
 
-    _addProperty(res, cache, 'writeBehindEnabled');
-    _addProperty(res, cache, 'writeBehindBatchSize');
-    _addProperty(res, cache, 'writeBehindFlushSize');
-    _addProperty(res, cache, 'writeBehindFlushFrequency');
-    _addProperty(res, cache, 'writeBehindFlushThreadCount');
+    $generatorXml._addProperty(res, cache, 'writeBehindEnabled');
+    $generatorXml._addProperty(res, cache, 'writeBehindBatchSize');
+    $generatorXml._addProperty(res, cache, 'writeBehindFlushSize');
+    $generatorXml._addProperty(res, cache, 'writeBehindFlushFrequency');
+    $generatorXml._addProperty(res, cache, 'writeBehindFlushThreadCount');
 
     res.needEmptyLine = true;
 
@@ -699,9 +699,9 @@ $generatorXml.cacheConcurrency = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cache, 'maxConcurrentAsyncOperations');
-    _addProperty(res, cache, 'defaultLockTimeout');
-    _addProperty(res, cache, 'atomicWriteOrderMode');
+    $generatorXml._addProperty(res, cache, 'maxConcurrentAsyncOperations');
+    $generatorXml._addProperty(res, cache, 'defaultLockTimeout');
+    $generatorXml._addProperty(res, cache, 'atomicWriteOrderMode');
 
     res.needEmptyLine = true;
 
@@ -714,13 +714,13 @@ $generatorXml.cacheRebalance = function(cache, res) {
         res = $generatorCommon.builder();
 
     if (cache.cacheMode != 'LOCAL') {
-        _addProperty(res, cache, 'rebalanceMode');
-        _addProperty(res, cache, 'rebalanceThreadPoolSize');
-        _addProperty(res, cache, 'rebalanceBatchSize');
-        _addProperty(res, cache, 'rebalanceOrder');
-        _addProperty(res, cache, 'rebalanceDelay');
-        _addProperty(res, cache, 'rebalanceTimeout');
-        _addProperty(res, cache, 'rebalanceThrottle');
+        $generatorXml._addProperty(res, cache, 'rebalanceMode');
+        $generatorXml._addProperty(res, cache, 'rebalanceThreadPoolSize');
+        $generatorXml._addProperty(res, cache, 'rebalanceBatchSize');
+        $generatorXml._addProperty(res, cache, 'rebalanceOrder');
+        $generatorXml._addProperty(res, cache, 'rebalanceDelay');
+        $generatorXml._addProperty(res, cache, 'rebalanceTimeout');
+        $generatorXml._addProperty(res, cache, 'rebalanceThrottle');
 
         res.needEmptyLine = true;
     }
@@ -740,10 +740,10 @@ $generatorXml.cacheServerNearCache = function(cache, res) {
         res.startBlock('<bean class="org.apache.ignite.configuration.NearCacheConfiguration">');
 
         if (cache.nearConfiguration && cache.nearConfiguration.nearStartSize)
-            _addProperty(res, cache.nearConfiguration, 'nearStartSize');
+            $generatorXml._addProperty(res, cache.nearConfiguration, 'nearStartSize');
 
         if (cache.nearConfiguration && cache.nearConfiguration.nearEvictionPolicy.kind)
-            _createEvictionPolicy(res, cache.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
+            $generatorXml._createEvictionPolicy(res, cache.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
 
         res.endBlock('</bean>');
         res.endBlock('</property>');
@@ -759,8 +759,8 @@ $generatorXml.cacheStatistics = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, cache, 'statisticsEnabled');
-    _addProperty(res, cache, 'managementEnabled');
+    $generatorXml._addProperty(res, cache, 'statisticsEnabled');
+    $generatorXml._addProperty(res, cache, 'managementEnabled');
 
     res.needEmptyLine = true;
 
@@ -772,8 +772,8 @@ $generatorXml.metadataGeneral = function(meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addClassNameProperty(res, meta, 'keyType');
-    _addProperty(res, meta, 'valueType');
+    $generatorXml._addClassNameProperty(res, meta, 'keyType');
+    $generatorXml._addProperty(res, meta, 'valueType');
 
     res.needEmptyLine = true;
 
@@ -785,13 +785,13 @@ $generatorXml.metadataQuery = function(meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addCacheTypeMetadataQueryFields(res, meta, 'queryFields');
-    _addCacheTypeMetadataQueryFields(res, meta, 'ascendingFields');
-    _addCacheTypeMetadataQueryFields(res, meta, 'descendingFields');
+    $generatorXml._addCacheTypeMetadataQueryFields(res, meta, 'queryFields');
+    $generatorXml._addCacheTypeMetadataQueryFields(res, meta, 'ascendingFields');
+    $generatorXml._addCacheTypeMetadataQueryFields(res, meta, 'descendingFields');
 
-    _addListProperty(res, meta, 'textFields');
+    $generatorXml._addListProperty(res, meta, 'textFields');
 
-    _addCacheTypeMetadataGroups(res, meta);
+    $generatorXml._addCacheTypeMetadataGroups(res, meta);
 
     res.needEmptyLine = true;
 
@@ -803,13 +803,13 @@ $generatorXml.metadataStore = function(meta, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    _addProperty(res, meta, 'databaseSchema');
-    _addProperty(res, meta, 'databaseTable');
+    $generatorXml._addProperty(res, meta, 'databaseSchema');
+    $generatorXml._addProperty(res, meta, 'databaseTable');
 
     if (!$dataStructures.isJavaBuildInClass(meta.keyType))
-        _addCacheTypeMetadataDatabaseFields(res, meta, 'keyFields');
+        $generatorXml._addCacheTypeMetadataDatabaseFields(res, meta, 'keyFields');
 
-    _addCacheTypeMetadataDatabaseFields(res, meta, 'valueFields');
+    $generatorXml._addCacheTypeMetadataDatabaseFields(res, meta, 'valueFields');
 
     res.needEmptyLine = true;
 
@@ -941,10 +941,10 @@ $generatorXml.cluster = function (cluster, clientNearCfg) {
         res.startBlock('<bean id="nearCacheBean" class="org.apache.ignite.configuration.NearCacheConfiguration">');
 
         if (clientNearCfg.nearStartSize)
-            _addProperty(res, clientNearCfg, 'nearStartSize');
+            $generatorXml._addProperty(res, clientNearCfg, 'nearStartSize');
 
         if (clientNearCfg.nearEvictionPolicy && clientNearCfg.nearEvictionPolicy.kind)
-            _createEvictionPolicy(res, clientNearCfg.nearEvictionPolicy, 'nearEvictionPolicy');
+            $generatorXml._createEvictionPolicy(res, clientNearCfg.nearEvictionPolicy, 'nearEvictionPolicy');
 
         res.endBlock('</bean>');