diff --git a/lib/finekit-10.0-20190828.jar b/lib/finekit-10.0-20190828.jar
new file mode 100644
index 0000000..9928b19
Binary files /dev/null and b/lib/finekit-10.0-20190828.jar differ
diff --git a/pom.xml b/pom.xml
index 1a0cb21..6e911ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,4 +42,28 @@
+
+
+ fanruan
+ fanruan
+ http://mvn.finedevelop.com/repository/maven-public/
+
+ true
+ always
+ warn
+
+
+
+
+
+ fanruan
+ fanruan
+ http://mvn.finedevelop.com/repository/maven-public/
+
+ true
+ always
+ warn
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java b/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
index a28166d..e5fe036 100755
--- a/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
+++ b/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
@@ -1,12 +1,12 @@
package com.fr.plugin.db.redis;
import com.fr.data.impl.Connection;
-import com.fr.design.beans.BasicBeanPane;
+import com.fanruan.api.design.ui.container.BasicBeanPane;
import com.fr.design.fun.impl.AbstractConnectionProvider;
import com.fr.plugin.db.redis.core.RedisDatabaseConnection;
import com.fr.plugin.db.redis.ui.RedisConnectionPane;
-public class RedisConnectionImpl extends AbstractConnectionProvider {
+public class RedisConnectionImpl extends AbstractConnectionProvider {
@Override
public int currentAPILevel() {
diff --git a/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java b/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java
index 52f73fc..cc3f082 100644
--- a/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java
+++ b/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java
@@ -4,9 +4,9 @@ import com.fr.base.TableData;
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane;
import com.fr.design.fun.ServerTableDataDefineProvider;
import com.fr.design.fun.impl.AbstractTableDataDefineProvider;
-import com.fr.locale.InterProviderFactory;
import com.fr.plugin.db.redis.core.RedisScriptTableData;
import com.fr.plugin.db.redis.ui.RedisScriptTableDataPane;
+import com.fanruan.api.i18n.I18nKit;
/**
* @author richie
@@ -37,7 +37,7 @@ public class RedisScriptTableDataDefine extends AbstractTableDataDefineProvider
@Override
public String nameForTableData() {
- return InterProviderFactory.getProvider().getLocText("Plugin-Redis_Script_Table_Data");
+ return I18nKit.getLocText("Plugin-Redis_Script_Table_Data");
}
@Override
diff --git a/src/main/java/com/fr/plugin/db/redis/core/DataWrapper.java b/src/main/java/com/fr/plugin/db/redis/core/DataWrapper.java
index a71c4e5..27a0e6a 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/DataWrapper.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/DataWrapper.java
@@ -1,10 +1,10 @@
package com.fr.plugin.db.redis.core;
-import com.fr.general.GeneralUtils;
-import com.fr.general.IOUtils;
-import com.fr.log.FineLoggerFactory;
-import com.fr.script.ScriptFactory;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.util.GeneralKit;
+import com.fanruan.api.log.LogKit;
+import com.fanruan.api.util.IOKit;
+import com.fanruan.api.script.ScriptKit;
+import com.fanruan.api.util.StringKit;
import com.fr.workspace.WorkContext;
import javax.script.ScriptEngine;
@@ -46,21 +46,21 @@ public class DataWrapper {
}
public void transform(String script) throws ScriptException {
- if (StringUtils.isBlank(script)) {
+ if (StringKit.isBlank(script)) {
return;
}
String scriptText = null;
if (script.startsWith("file:///")) {
try {
FileInputStream in = new FileInputStream(new File(readAndRenderScriptFile(script)));
- scriptText = IOUtils.inputStream2String(in);
+ scriptText = IOKit.inputStream2String(in);
} catch (Exception e) {
- FineLoggerFactory.getLogger().error(e.getMessage(), e);
+ LogKit.error(e.getMessage(), e);
}
} else {
scriptText = String.format("(function(){%s})()", script);
}
- ScriptEngine scriptEngine = ScriptFactory.newScriptEngine();
+ ScriptEngine scriptEngine = ScriptKit.newScriptEngine();
scriptEngine.put("$content", data);
scriptEngine.put("$column", columnNames);
Object r = scriptEngine.eval(scriptText);
@@ -70,7 +70,7 @@ public class DataWrapper {
Object vector = map.get("column");
List names = new ArrayList();
for (Object name : ((Map)vector).values()) {
- names.add(GeneralUtils.objectToString(name));
+ names.add(GeneralKit.objectToString(name));
}
columnNames = names.toArray(new String[0]);
Object content = map.get("content");
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
index 8a8e095..265c4d0 100755
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
@@ -1,19 +1,19 @@
package com.fr.plugin.db.redis.core;
-import com.fr.config.holder.Conf;
-import com.fr.config.holder.factory.Holders;
-import com.fr.config.holder.impl.ColConf;
+import cpm.fanruan.api.conf.HolderKit;
+import com.fanruan.api.conf.impl.ColConf;
import com.fr.data.impl.AbstractDatabaseConnection;
import com.fr.data.impl.Connection;
-import com.fr.locale.InterProviderFactory;
+import com.fanruan.api.i18n.I18nKit;
import com.fr.plugin.db.redis.core.emb.Redis;
-import com.fr.security.SecurityToolbox;
-import com.fr.stable.ArrayUtils;
-import com.fr.stable.StableUtils;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.security.SecurityKit;
+import com.fanruan.api.util.ArrayKit;
+import com.fanruan.api.util.ReflectKit;
+import com.fanruan.api.util.StringKit;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
import com.fr.third.redis.clients.jedis.Jedis;
+import com.fr.config.holder.Conf;
import java.util.ArrayList;
import java.util.Collection;
@@ -24,9 +24,9 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
private static final int DEFAULT_REDIS_PORT = 6379;
- private Conf host = Holders.simple(StringUtils.EMPTY);
- private Conf port = Holders.simple(DEFAULT_REDIS_PORT);
- private Conf password = Holders.simple(StringUtils.EMPTY);
+ private Conf host = HolderKit.simple(StringKit.EMPTY);
+ private Conf port = HolderKit.simple(DEFAULT_REDIS_PORT);
+ private Conf password = HolderKit.simple(StringKit.EMPTY);
public RedisDatabaseConnection() {
@@ -82,8 +82,8 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
@Override
public String[] summary(String... args) {
- if (ArrayUtils.isEmpty(args)) {
- return ArrayUtils.EMPTY_STRING_ARRAY;
+ if (ArrayKit.isEmpty(args)) {
+ return ArrayKit.EMPTY_STRING_ARRAY;
} else {
Redis redis = createRedisClient();
Set keys = redis.getClient().keys(args[0]);
@@ -96,16 +96,16 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
@Override
public String connectMessage(boolean status) {
if (status) {
- return InterProviderFactory.getProvider().getLocText("Plugin-Redis_Connection_Successfully") + "!";
+ return I18nKit.getLocText("Plugin-Redis_Connection_Successfully") + "!";
} else {
- return InterProviderFactory.getProvider().getLocText("Plugin-Redis_Connection_Failed") + "!";
+ return I18nKit.getLocText("Plugin-Redis_Connection_Failed") + "!";
}
}
@Override
public void addConnection(List list, String connectionName, Class extends Connection>[] acceptTypes) {
for (Class extends com.fr.data.impl.Connection> accept : acceptTypes) {
- if (StableUtils.classInstanceOf(getClass(), accept)) {
+ if (ReflectKit.classInstanceOf(getClass(), accept)) {
list.add(connectionName);
break;
}
@@ -143,11 +143,11 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
if (reader.isChildNode()) {
String tagName = reader.getTagName();
if ("Attr".equals(tagName)) {
- setHost(reader.getAttrAsString("host", StringUtils.EMPTY));
+ setHost(reader.getAttrAsString("host", StringKit.EMPTY));
setPort(reader.getAttrAsInt("port", DEFAULT_REDIS_PORT));
- String pwd = reader.getAttrAsString("password", StringUtils.EMPTY);
- if (StringUtils.isNotEmpty(pwd)) {
- setPassword(SecurityToolbox.encrypt(pwd));
+ String pwd = reader.getAttrAsString("password", StringKit.EMPTY);
+ if (StringKit.isNotEmpty(pwd)) {
+ setPassword(SecurityKit.encrypt(pwd));
}
}
}
@@ -159,8 +159,8 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
writer.startTAG("Attr");
writer.attr("host", getHost());
writer.attr("port", getPort());
- if (StringUtils.isNotEmpty(getPassword())) {
- writer.attr("password", SecurityToolbox.decrypt(getPassword()));
+ if (StringKit.isNotEmpty(getPassword())) {
+ writer.attr("password", SecurityKit.decrypt(getPassword()));
}
writer.end();
}
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisNode.java b/src/main/java/com/fr/plugin/db/redis/core/RedisNode.java
index 52cba15..d8d214b 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisNode.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisNode.java
@@ -1,23 +1,23 @@
package com.fr.plugin.db.redis.core;
+import com.fanruan.api.conf.HolderKit;
+import com.fanruan.api.conf.BaseUniqueKey;
+import com.fanruan.api.util.AssistKit;
+import com.fanruan.api.util.StringKit;
import com.fr.config.holder.Conf;
-import com.fr.config.holder.factory.Holders;
-import com.fr.config.utils.UniqueKey;
-import com.fr.stable.AssistUtils;
-import com.fr.stable.StringUtils;
/**
* @author richie
* @version 10.0
* Created by richie on 2019-03-22
*/
-public class RedisNode extends UniqueKey {
+public class RedisNode extends BaseUniqueKey {
public static final int DEFAULT_REDIS_PORT = 6379;
- private Conf host = Holders.simple(StringUtils.EMPTY);
- private Conf port = Holders.simple(DEFAULT_REDIS_PORT);
- private Conf password = Holders.simple(StringUtils.EMPTY);
+ private Conf host = HolderKit.simple(StringKit.EMPTY);
+ private Conf port = HolderKit.simple(DEFAULT_REDIS_PORT);
+ private Conf password = HolderKit.simple(StringKit.EMPTY);
public RedisNode(String host, int port, String password) {
this.setHost(host);
@@ -52,14 +52,14 @@ public class RedisNode extends UniqueKey {
@Override
public boolean equals(Object obj) {
return obj instanceof RedisNode
- && AssistUtils.equals(((RedisNode) obj).getHost(), getHost())
+ && AssistKit.equals(((RedisNode) obj).getHost(), getHost())
&& ((RedisNode) obj).getPort() == getPort()
- && AssistUtils.equals(((RedisNode) obj).getPassword(), getPassword());
+ && AssistKit.equals(((RedisNode) obj).getPassword(), getPassword());
}
@Override
public int hashCode() {
- return AssistUtils.hashCode(getHost(), getPort(), getPassword());
+ return AssistKit.hashCode(getHost(), getPort(), getPassword());
}
@Override
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java b/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
index f4caebb..5004b06 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
@@ -2,7 +2,7 @@ package com.fr.plugin.db.redis.core;
import com.fr.config.Configuration;
import com.fr.config.holder.ConfigChangeListener;
-import com.fr.log.FineLoggerFactory;
+import com.fanruan.api.log.LogKit;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.core.emb.impl.ProxyRedis;
import com.fr.plugin.db.redis.core.emb.impl.SimpleRedis;
@@ -11,12 +11,10 @@ import com.fr.plugin.db.redis.core.pool.RedisConnectionProxyConfig;
import com.fr.ssh.jsch.JSch;
import com.fr.ssh.jsch.JSchException;
import com.fr.ssh.jsch.Session;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.util.StringKit;
import com.fr.third.redis.clients.jedis.Jedis;
-import com.fr.third.redis.clients.jedis.JedisCluster;
-import com.fr.third.redis.clients.jedis.JedisPool;
-import com.fr.third.redis.clients.jedis.JedisPoolConfig;
-import com.fr.transaction.Configurations;
+import com.fanruan.api.redis.pool.JedisPool;
+import com.fanruan.api.redis.pool.JedisPoolConfig;
import com.fr.transaction.ValidateProxy;
import java.util.Map;
@@ -60,7 +58,7 @@ public class RedisPool {
try {
return createJedisBySSH(host, port, password);
} catch (JSchException e) {
- FineLoggerFactory.getLogger().error(e.getMessage(), e);
+ LogKit.error(e.getMessage(), e);
}
} else {
String feature = host + ":" + port + "@" + password;
@@ -109,7 +107,7 @@ public class RedisPool {
config.setTestWhileIdle(false);
//逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
config.setTimeBetweenEvictionRunsMillis(-1);
- if (StringUtils.isNotBlank(password)) {
+ if (StringKit.isNotBlank(password)) {
return new JedisPool(config, host, port, poolConfig.getTimeout(), password);
} else {
return new JedisPool(config, host, port, poolConfig.getTimeout());
@@ -119,11 +117,11 @@ public class RedisPool {
private Redis createJedisBySSH(String host, int port, String password) throws JSchException {
RedisConnectionProxyConfig proxyConfig = RedisConnectionProxyConfig.getInstance();
JSch jsch = new JSch();
- if (StringUtils.isNotBlank(proxyConfig.getPrivateKeyPath())) {
+ if (StringKit.isNotBlank(proxyConfig.getPrivateKeyPath())) {
jsch.addIdentity(proxyConfig.getPrivateKeyPath());
}
Session session = jsch.getSession(proxyConfig.getUsername(), proxyConfig.getHost(), proxyConfig.getPort());
- if (StringUtils.isNotBlank(proxyConfig.getPassword())) {
+ if (StringKit.isNotBlank(proxyConfig.getPassword())) {
session.setPassword(proxyConfig.getPassword());
}
session.setConfig("StrictHostKeyChecking", "no");
@@ -133,7 +131,7 @@ public class RedisPool {
Jedis jedis = new Jedis(host, newPort);
- if (StringUtils.isNotBlank(password)) {
+ if (StringKit.isNotBlank(password)) {
jedis.auth(password);
}
return new ProxyRedis(session, jedis);
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
index 25befc0..f1529f8 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
@@ -1,28 +1,28 @@
package com.fr.plugin.db.redis.core;
-import com.fr.base.Parameter;
+import com.fr.stable.ParameterProvider;
import com.fr.base.TableData;
-import com.fr.config.holder.Conf;
-import com.fr.config.holder.factory.Holders;
+import com.fanruan.api.conf.HolderKit;
import com.fr.config.holder.factory.XmlHolders;
import com.fr.data.AbstractParameterTableData;
-import com.fr.data.core.DataCoreXmlUtils;
+import com.fanruan.api.xml.XmlKit;
import com.fr.data.impl.Connection;
-import com.fr.data.impl.NameDatabaseConnection;
-import com.fr.file.DatasourceManager;
+import com.fanruan.api.database.nameDatabase.NameDatabaseConnection;
+import com.fanruan.api.data.ConnectionKit;
import com.fr.general.data.DataModel;
-import com.fr.general.xml.GeneralXMLTools;
+import com.fanruan.api.xml.XmlKit;
import com.fr.intelli.record.Focus;
-import com.fr.log.FineLoggerFactory;
+import com.fanruan.api.log.LogKit;
import com.fr.plugin.db.redis.core.order.OrderValue;
import com.fr.plugin.db.redis.core.order.impl.NumberOrderValue;
import com.fr.plugin.db.redis.util.RedisUtils;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.util.StringKit;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
+import com.fr.config.holder.Conf;
/**
* @author richie
@@ -34,9 +34,9 @@ public class RedisScriptTableData extends AbstractParameterTableData {
private static final long serialVersionUID = 1525853354993816818L;
- private Conf database = Holders.obj(null, Connection.class);
+ private Conf database = HolderKit.obj(null, Connection.class);
private Conf dbIndex = XmlHolders.obj(new NumberOrderValue(0), OrderValue.class, OrderValue.XML_TAG);
- private Conf script = Holders.simple(StringUtils.EMPTY);
+ private Conf script = HolderKit.simple(StringKit.EMPTY);
public void setDatabase(Connection c) {
this.database.set(c);
@@ -79,7 +79,7 @@ public class RedisScriptTableData extends AbstractParameterTableData {
Connection connection = database.get();
if (connection instanceof NameDatabaseConnection) {
String name = ((NameDatabaseConnection) connection).getName();
- RedisDatabaseConnection rc = DatasourceManager.getProviderInstance().getConnection(name, RedisDatabaseConnection.class);
+ RedisDatabaseConnection rc = ConnectionKit.getConnection(name, RedisDatabaseConnection.class);
if (rc != null) {
OrderValue orderValue = dbIndex.get();
DataModel model = new RedisScriptTableDataModel(rc,
@@ -101,13 +101,13 @@ public class RedisScriptTableData extends AbstractParameterTableData {
String tmpVal;
if (OrderValue.XML_TAG.equals(tmpName)) {
- OrderValue orderValue = (OrderValue) GeneralXMLTools.readXMLable(reader);
+ OrderValue orderValue = (OrderValue) XmlKit.readXMLable(reader);
if (orderValue != null) {
setOrderValue(orderValue);
}
} else if (com.fr.data.impl.Connection.XML_TAG.equals(tmpName)) {
if (reader.getAttrAsString("class", null) != null) {
- com.fr.data.impl.Connection con = DataCoreXmlUtils.readXMLConnection(reader);
+ com.fr.data.impl.Connection con = XmlKit.readXMLConnection(reader);
this.setDatabase(con);
}
} else if ("Script".equals(tmpName)) {
@@ -122,9 +122,9 @@ public class RedisScriptTableData extends AbstractParameterTableData {
@Override
public void writeXML(XMLPrintWriter writer) {
super.writeXML(writer);
- GeneralXMLTools.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG);
+ XmlKit.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG);
if (this.database.get() != null) {
- DataCoreXmlUtils.writeXMLConnection(writer, this.database.get());
+ XmlKit.writeXMLConnection(writer, this.database.get());
}
writer.startTAG("Script").textNode(getScript()).end();
}
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
index 529b143..6d120ab 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
@@ -1,31 +1,31 @@
package com.fr.plugin.db.redis.core;
-import com.fr.base.Parameter;
+import com.fr.stable.ParameterProvider;
import com.fr.base.TableData;
-import com.fr.base.TemplateUtils;
-import com.fr.config.holder.Conf;
-import com.fr.config.holder.factory.Holders;
+import com.fanruan.api.conf.HolderKit;
import com.fr.config.holder.factory.XmlHolders;
import com.fr.data.AbstractParameterTableData;
-import com.fr.data.core.DataCoreXmlUtils;
+import com.fanruan.api.xml.XmlKit;
import com.fr.data.impl.Connection;
-import com.fr.data.impl.NameDatabaseConnection;
-import com.fr.file.DatasourceManager;
+import com.fanruan.api.database.nameDatabase.NameDatabaseConnection;
+import com.fanruan.api.data.ConnectionKit;
import com.fr.general.data.DataModel;
-import com.fr.general.xml.GeneralXMLTools;
+import com.fanruan.api.xml.XmlKit;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
-import com.fr.log.FineLoggerFactory;
+import com.fanruan.api.log.LogKit;
import com.fr.plugin.db.redis.core.order.OrderValue;
import com.fr.plugin.db.redis.core.order.impl.NumberOrderValue;
import com.fr.plugin.db.redis.util.RedisUtils;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.Calculator;
-import com.fr.stable.ArrayUtils;
+import com.fanruan.api.util.ArrayKit;
+import com.fanruan.api.util.StringKit;
import com.fr.stable.ParameterProvider;
-import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
+import com.fr.config.holder.Conf;
+
import java.util.HashMap;
import java.util.Map;
@@ -35,10 +35,10 @@ import java.util.Map;
public class RedisTableData extends AbstractParameterTableData {
private static final long serialVersionUID = 7017455818551800001L;
- private Conf database = Holders.obj(null, Connection.class);
+ private Conf database = HolderKit.obj(null, Connection.class);
private Conf dbIndex = XmlHolders.obj(new NumberOrderValue(0), OrderValue.class, OrderValue.XML_TAG);
- private Conf query = Holders.simple(StringUtils.EMPTY);
- private Conf script = Holders.simple(StringUtils.EMPTY);
+ private Conf query = HolderKit.simple(StringKit.EMPTY);
+ private Conf script = HolderKit.simple(StringKit.EMPTY);
public void setDatabase(Connection c) {
this.database.set(c);
@@ -89,7 +89,7 @@ public class RedisTableData extends AbstractParameterTableData {
Connection connection = database.get();
if (connection instanceof NameDatabaseConnection) {
String name = ((NameDatabaseConnection) connection).getName();
- RedisDatabaseConnection rc = DatasourceManager.getProviderInstance().getConnection(name, RedisDatabaseConnection.class);
+ RedisDatabaseConnection rc = ConnectionKit.getConnection(name, RedisDatabaseConnection.class);
if (rc != null) {
OrderValue orderValue = dbIndex.get();
DataModel model = new RedisTableDataModel(calculator, ps, rc,
@@ -97,7 +97,7 @@ public class RedisTableData extends AbstractParameterTableData {
RedisUtils.calculateQuery(query.get(), ps),
RedisUtils.calculateQuery(script.get(), ps),
rowCount);
- FineLoggerFactory.getLogger().info("Build data model spend time {} ms.", System.currentTimeMillis() - start);
+ LogKit.info("Build data model spend time {} ms.", System.currentTimeMillis() - start);
return model;
}
}
@@ -114,13 +114,13 @@ public class RedisTableData extends AbstractParameterTableData {
String tmpVal;
if (OrderValue.XML_TAG.equals(tmpName)) {
- OrderValue orderValue = (OrderValue) GeneralXMLTools.readXMLable(reader);
+ OrderValue orderValue = (OrderValue) XmlKit.readXMLable(reader);
if (orderValue != null) {
setOrderValue(orderValue);
}
} else if (com.fr.data.impl.Connection.XML_TAG.equals(tmpName)) {
if (reader.getAttrAsString("class", null) != null) {
- com.fr.data.impl.Connection con = DataCoreXmlUtils.readXMLConnection(reader);
+ com.fr.data.impl.Connection con = XmlKit.readXMLConnection(reader);
this.setDatabase(con);
}
} else if ("Query".equals(tmpName)) {
@@ -140,9 +140,9 @@ public class RedisTableData extends AbstractParameterTableData {
@Override
public void writeXML(XMLPrintWriter writer) {
super.writeXML(writer);
- GeneralXMLTools.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG);
+ XmlKit.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG);
if (this.database.get() != null) {
- DataCoreXmlUtils.writeXMLConnection(writer, this.database.get());
+ XmlKit.writeXMLConnection(writer, this.database.get());
}
writer.startTAG("Query").textNode(getQuery()).end();
writer.startTAG("Script").textNode(getScript()).end();
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java b/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
index f54dd9d..a703cd3 100755
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
@@ -1,15 +1,15 @@
package com.fr.plugin.db.redis.core;
-import com.fr.base.Parameter;
+import com.fr.stable.ParameterProvider;
import com.fr.data.AbstractDataModel;
-import com.fr.log.FineLoggerFactory;
+import com.fanruan.api.log.LogKit;
import com.fr.plugin.PluginLicense;
import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.core.visit.VisitorFactory;
import com.fr.plugin.db.redis.util.RedisUtils;
import com.fr.script.Calculator;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.util.StringKit;
import com.fr.third.redis.clients.jedis.Jedis;
import java.util.List;
@@ -28,16 +28,16 @@ public class RedisTableDataModel extends AbstractDataModel {
}
private synchronized void initRedisData(Calculator calculator, Parameter[] ps, RedisDatabaseConnection mc, int dbIndex, String query, String script, int rowCount) {
- if (StringUtils.isEmpty(query)) {
+ if (StringKit.isEmpty(query)) {
return;
}
Redis redis = mc.createRedisClient();
redis.getClient().select(dbIndex);
- FineLoggerFactory.getLogger().info("Connect to redis and select database:" + dbIndex);
+ LogKit.info("Connect to redis and select database:" + dbIndex);
try {
long start = System.currentTimeMillis();
DataWrapper