ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [21/25] incubator-ignite git commit: IGNITE-843 Renaming.
Date Fri, 31 Jul 2015 02:46:07 GMT
IGNITE-843 Renaming.


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

Branch: refs/heads/ignite-1121
Commit: 7d009748813be61d9f9b2bb55bf430b8a94d93f7
Parents: 3040d64
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Fri Jul 31 00:16:00 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Fri Jul 31 00:16:00 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/routes/generator/java.js        | 30 +++++++--------
 .../src/main/js/routes/generator/xml.js         | 40 ++++++++++----------
 2 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7d009748/modules/control-center-web/src/main/js/routes/generator/java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/java.js b/modules/control-center-web/src/main/js/routes/generator/java.js
index 3b969ca..6b3868b 100644
--- a/modules/control-center-web/src/main/js/routes/generator/java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/java.js
@@ -17,7 +17,7 @@
 
 var _ = require('lodash');
 
-var generatorUtils = require("./common");
+var generatorCommon = require("./common");
 
 /**
  * Convert some name to valid java name.
@@ -40,13 +40,13 @@ function toJavaName(prefix, name) {
  * @param clientNearConfiguration Near cache configuration for client node.
  */
 exports.generateClusterConfiguration = function (cluster, javaClass, clientNearConfiguration)
{
-    var res = generatorUtils.builder();
+    var res = generatorCommon.builder();
 
     res.datasourceBeans = [];
 
     if (javaClass) {
         res.line('/**');
-        res.line(' * ' + generatorUtils.mainComment());
+        res.line(' * ' + generatorCommon.mainComment());
         res.line(' */');
         res.startBlock('public class ConfigurationFactory {');
         res.line('/**');
@@ -198,7 +198,7 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientNearC
     }
 
     addBeanWithProperties(res, 'cfg', cluster.atomicConfiguration, 'atomicConfiguration',
'atomicCfg',
-        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
+        generatorCommon.atomicConfiguration.className, generatorCommon.atomicConfiguration.fields);
 
     res.needEmptyLine = true;
 
@@ -257,7 +257,7 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientNearC
     var marshaller = cluster.marshaller;
 
     if (marshaller && marshaller.kind) {
-        var marshallerDesc = generatorUtils.marshallers[marshaller.kind];
+        var marshallerDesc = generatorCommon.marshallers[marshaller.kind];
 
         addBeanWithProperties(res, 'cfg', marshaller[marshaller.kind], 'marshaller', 'marshaller',
             marshallerDesc.className, marshallerDesc.fields, true);
@@ -285,7 +285,7 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientNearC
 
     if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi')
{
         addBeanWithProperties(res, 'cfg', cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
'swapSpi',
-            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
+            generatorCommon.swapSpaceSpi.className, generatorCommon.swapSpaceSpi.fields,
true);
 
         res.needEmptyLine = true;
     }
@@ -305,8 +305,8 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientNearC
     res.needEmptyLine = true;
 
     addBeanWithProperties(res, 'cfg', cluster.transactionConfiguration, 'transactionConfiguration',
-        'transactionConfiguration', generatorUtils.transactionConfiguration.className,
-        generatorUtils.transactionConfiguration.fields);
+        'transactionConfiguration', generatorCommon.transactionConfiguration.className,
+        generatorCommon.transactionConfiguration.fields);
 
     res.needEmptyLine = true;
 
@@ -336,7 +336,7 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientNearC
  */
 function addEvictionPolicy(res, varName, evictionPolicy, propertyName) {
     if (evictionPolicy && evictionPolicy.kind) {
-        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
+        var e = generatorCommon.evictionPolicies[evictionPolicy.kind];
 
         var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
 
@@ -547,7 +547,7 @@ function addCacheConfiguration(res, cache, varName) {
 
     if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
         var storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
-        var data = generatorUtils.storeFactories[cache.cacheStoreFactory.kind];
+        var data = generatorCommon.storeFactories[cache.cacheStoreFactory.kind];
 
         var sfVarName = toJavaName('storeFactory', cache.name);
         var dsVarName = 'none';
@@ -560,7 +560,7 @@ function addCacheConfiguration(res, cache, varName) {
             if (!_.contains(res.datasourceBeans, dataSourceBean)) {
                 res.datasourceBeans.push(dataSourceBean);
 
-                var dataSource = generatorUtils.dataSources[storeFactory.dialect];
+                var dataSource = generatorCommon.dataSources[storeFactory.dialect];
 
                 res.line();
 
@@ -715,7 +715,7 @@ function declareVariable(res, varNew, varName, varFullType, varFullActualType,
v
 function addProperty(res, varName, obj, propName, enumType, setterName) {
     var val = obj[propName];
 
-    if (generatorUtils.isDefined(val)) {
+    if (generatorCommon.isDefined(val)) {
         res.emptyLineIfNeeded();
 
         res.line(varName + '.' + getSetterName(setterName ? setterName : propName)
@@ -736,7 +736,7 @@ function addProperty(res, varName, obj, propName, enumType, setterName)
{
 function addClassProperty(res, varName, obj, propName) {
     var val = obj[propName];
 
-    if (generatorUtils.isDefined(val)) {
+    if (generatorCommon.isDefined(val)) {
         res.emptyLineIfNeeded();
 
         res.line(varName + '.' + getSetterName(propName) + '(' + res.importClass(val) + '.class);');
@@ -790,7 +790,7 @@ function addMultiparamProperty(res, varName, obj, propName, type, setterName)
{
 }
 
 function addBeanWithProperties(res, varName, bean, beanPropName, beanVarName, beanClass,
props, createBeanAlthoughNoProps) {
-    if (bean && generatorUtils.hasProperty(bean, props)) {
+    if (bean && generatorCommon.hasProperty(bean, props)) {
         if (!res.emptyLineIfNeeded()) {
             res.line();
         }
@@ -839,7 +839,7 @@ function addBeanWithProperties(res, varName, bean, beanPropName, beanVarName,
be
 
                         case 'className':
                             if (bean[propName]) {
-                                res.line(beanVarName + '.' + getSetterName(propName) + '(new
' + generatorUtils.knownClasses[bean[propName]].className + '());');
+                                res.line(beanVarName + '.' + getSetterName(propName) + '(new
' + generatorCommon.knownClasses[bean[propName]].className + '());');
                             }
 
                             break;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7d009748/modules/control-center-web/src/main/js/routes/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/xml.js b/modules/control-center-web/src/main/js/routes/generator/xml.js
index 3555d2e..9058378 100644
--- a/modules/control-center-web/src/main/js/routes/generator/xml.js
+++ b/modules/control-center-web/src/main/js/routes/generator/xml.js
@@ -17,11 +17,11 @@
 
 var _ = require('lodash');
 
-var generatorUtils = require("./common");
+var generatorCommon = require("./common");
 var dataStructures = require("../../helpers/data-structures.js");
 
 exports.generateClusterConfiguration = function (cluster, clientNearConfiguration) {
-    var res = generatorUtils.builder();
+    var res = generatorCommon.builder();
 
     res.datasources = [];
     res.deep = 1;
@@ -155,7 +155,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
 
     // Generate atomics group.
     addBeanWithProperties(res, cluster.atomicConfiguration, 'atomicConfiguration',
-        generatorUtils.atomicConfiguration.className, generatorUtils.atomicConfiguration.fields);
+        generatorCommon.atomicConfiguration.className, generatorCommon.atomicConfiguration.fields);
     res.needEmptyLine = true;
 
     // Generate communication group.
@@ -209,7 +209,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
     var marshaller = cluster.marshaller;
 
     if (marshaller && marshaller.kind) {
-        var marshallerDesc = generatorUtils.marshallers[marshaller.kind];
+        var marshallerDesc = generatorCommon.marshallers[marshaller.kind];
 
         addBeanWithProperties(res, marshaller[marshaller.kind], 'marshaller', marshallerDesc.className,
marshallerDesc.fields, true);
         res.needEmptyLine = true;
@@ -237,7 +237,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
     // Generate swap group.
     if (cluster.swapSpaceSpi && cluster.swapSpaceSpi.kind == 'FileSwapSpaceSpi')
{
         addBeanWithProperties(res, cluster.swapSpaceSpi.FileSwapSpaceSpi, 'swapSpaceSpi',
-            generatorUtils.swapSpaceSpi.className, generatorUtils.swapSpaceSpi.fields, true);
+            generatorCommon.swapSpaceSpi.className, generatorCommon.swapSpaceSpi.fields,
true);
 
         res.needEmptyLine = true;
     }
@@ -258,7 +258,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
 
     // Generate transactions group.
     addBeanWithProperties(res, cluster.transactionConfiguration, 'transactionConfiguration',
-        generatorUtils.transactionConfiguration.className, generatorUtils.transactionConfiguration.fields);
+        generatorCommon.transactionConfiguration.className, generatorCommon.transactionConfiguration.fields);
     res.needEmptyLine = true;
 
     // Generate caches configs.
@@ -289,7 +289,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
     // 1. Add header.
     var xml = '<?xml version="1.0" encoding="UTF-8"?>\n\n';
 
-    xml += '<!-- ' + generatorUtils.mainComment() + ' -->\n';
+    xml += '<!-- ' + generatorCommon.mainComment() + ' -->\n';
     xml += '<beans xmlns="http://www.springframework.org/schema/beans"\n';
     xml += '       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n';
     xml += '       xmlns:util="http://www.springframework.org/schema/util"\n';
@@ -329,7 +329,7 @@ exports.generateClusterConfiguration = function (cluster, clientNearConfiguratio
 
 function createEvictionPolicy(res, evictionPolicy, propertyName) {
     if (evictionPolicy && evictionPolicy.kind) {
-        var e = generatorUtils.evictionPolicies[evictionPolicy.kind];
+        var e = generatorCommon.evictionPolicies[evictionPolicy.kind];
 
         var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
 
@@ -356,7 +356,7 @@ function addCacheTypeMetadataDatabaseFields(res, meta, fieldProperty)
{
 
             addProperty(res, field, 'javaName');
 
-            addElement(res, 'property', 'name', 'javaType', 'value', generatorUtils.javaBuildInClass(field.javaType));
+            addElement(res, 'property', 'name', 'javaType', 'value', generatorCommon.javaBuildInClass(field.javaType));
 
             res.endBlock('</bean>');
         });
@@ -375,7 +375,7 @@ function addCacheTypeMetadataQueryFields(res, meta, fieldProperty) {
         res.startBlock('<map>');
 
         _.forEach(fields, function (field) {
-            addElement(res, 'entry', 'key', field.name, 'value', generatorUtils.javaBuildInClass(field.className));
+            addElement(res, 'entry', 'key', field.name, 'value', generatorCommon.javaBuildInClass(field.className));
         });
 
         res.endBlock('</map>');
@@ -402,7 +402,7 @@ function addCacheTypeMetadataGroups(res, meta) {
                     res.startBlock('<entry key="' + field.name + '">');
 
                     res.startBlock('<bean class="org.apache.ignite.lang.IgniteBiTuple">');
-                    res.line('<constructor-arg value="' + generatorUtils.javaBuildInClass(field.className)
+ '"/>');
+                    res.line('<constructor-arg value="' + generatorCommon.javaBuildInClass(field.className)
+ '"/>');
                     res.line('<constructor-arg value="' + field.direction + '"/>');
                     res.endBlock('</bean>');
 
@@ -421,7 +421,7 @@ function addCacheTypeMetadataGroups(res, meta) {
 
 function generateCacheTypeMetadataConfiguration(res, meta) {
     if (!res)
-        res = generatorUtils.builder();
+        res = generatorCommon.builder();
 
     res.startBlock('<bean class="org.apache.ignite.cache.CacheTypeMetadata">');
 
@@ -449,7 +449,7 @@ function generateCacheTypeMetadataConfiguration(res, meta) {
 
 function generateCacheConfiguration(res, cacheCfg) {
     if (!res)
-        res = generatorUtils.builder();
+        res = generatorCommon.builder();
 
     res.startBlock('<bean class="org.apache.ignite.configuration.CacheConfiguration">');
 
@@ -510,8 +510,8 @@ function generateCacheConfiguration(res, cacheCfg) {
         for (var i = 0; i < cacheCfg.indexedTypes.length; i++) {
             var pair = cacheCfg.indexedTypes[i];
 
-            res.line('<value>' + generatorUtils.javaBuildInClass(pair.keyClass) + '</value>');
-            res.line('<value>' + generatorUtils.javaBuildInClass(pair.valueClass) +
'</value>');
+            res.line('<value>' + generatorCommon.javaBuildInClass(pair.keyClass) +
'</value>');
+            res.line('<value>' + generatorCommon.javaBuildInClass(pair.valueClass)
+ '</value>');
         }
 
         res.endBlock('</list>');
@@ -536,7 +536,7 @@ function generateCacheConfiguration(res, cacheCfg) {
 
     if (cacheCfg.cacheStoreFactory && cacheCfg.cacheStoreFactory.kind) {
         var storeFactory = cacheCfg.cacheStoreFactory[cacheCfg.cacheStoreFactory.kind];
-        var data = generatorUtils.storeFactories[cacheCfg.cacheStoreFactory.kind];
+        var data = generatorCommon.storeFactories[cacheCfg.cacheStoreFactory.kind];
 
         addBeanWithProperties(res, storeFactory, 'cacheStoreFactory', data.className, data.fields,
true);
 
@@ -546,7 +546,7 @@ function generateCacheConfiguration(res, cacheCfg) {
                 }) < 0) {
                 res.datasources.push({
                     dataSourceBean: storeFactory.dataSourceBean,
-                    className: generatorUtils.dataSources[storeFactory.dialect]
+                    className: generatorCommon.dataSources[storeFactory.dialect]
                 });
             }
         }
@@ -640,14 +640,14 @@ function addElement(res, tag, attr1, val1, attr2, val2) {
 function addProperty(res, obj, propName, setterName) {
     var val = obj[propName];
 
-    if (generatorUtils.isDefined(val))
+    if (generatorCommon.isDefined(val))
         addElement(res, 'property', 'name', setterName ? setterName : propName, 'value',
escapeAttr(val));
 
     return val;
 }
 
 function addBeanWithProperties(res, bean, beanPropName, beanClass, props, createBeanAlthoughNoProps)
{
-    if (bean && generatorUtils.hasProperty(bean, props)) {
+    if (bean && generatorCommon.hasProperty(bean, props)) {
         res.emptyLineIfNeeded();
         res.startBlock('<property name="' + beanPropName + '">');
         res.startBlock('<bean class="' + beanClass + '">');
@@ -663,7 +663,7 @@ function addBeanWithProperties(res, bean, beanPropName, beanClass, props,
create
                     else if (descr.type == 'className') {
                         if (bean[propName]) {
                             res.startBlock('<property name="' + propName + '">');
-                            res.line('<bean class="' + generatorUtils.knownClasses[bean[propName]].className
+ '"/>');
+                            res.line('<bean class="' + generatorCommon.knownClasses[bean[propName]].className
+ '"/>');
                             res.endBlock('</property>');
                         }
                     }


Mime
View raw message