diff --git a/Bench4Q-Agent/pom.xml b/Bench4Q-Agent/pom.xml
index 6fb4475f..9cbf5cb0 100644
--- a/Bench4Q-Agent/pom.xml
+++ b/Bench4Q-Agent/pom.xml
@@ -91,7 +91,11 @@
hadoop-core
1.1.2
-
+
+ jdom
+ jdom
+ b7
+
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/api/PluginController.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/api/PluginController.java
index f903984b..fa870d6a 100644
--- a/Bench4Q-Agent/src/main/java/org/bench4q/agent/api/PluginController.java
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/api/PluginController.java
@@ -78,4 +78,9 @@ public class PluginController {
return model;
}
+ @RequestMapping(value = "/info", method = RequestMethod.GET)
+ @ResponseBody
+ public void info() {
+
+ }
}
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Parameter.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Parameter.java
index 2fdb3a91..c706040c 100644
--- a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Parameter.java
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Parameter.java
@@ -13,4 +13,5 @@ public @interface Parameter {
String value();
SupportTypes type();
+
}
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/PluginManager.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/PluginManager.java
index 544f2663..f11af4c7 100644
--- a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/PluginManager.java
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/PluginManager.java
@@ -11,6 +11,7 @@ import org.apache.log4j.Logger;
import org.bench4q.agent.helper.ClassHelper;
import org.bench4q.agent.helper.ClassLoadRestriction;
import org.bench4q.agent.share.DealWithLog;
+import org.jdom.input.SAXBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -19,11 +20,21 @@ public class PluginManager {
private static final String PLUGIN_PACKAGE_NAME = "org.bench4q.agent.plugin";
private ClassHelper classHelper;
private TypeConverter typeConverter;
+ private SAXBuilder saxBuilder;
private Map> plugins;
private Logger logger = Logger.getLogger(PluginManager.class);
+ private SAXBuilder getSaxBuilder() {
+ return saxBuilder;
+ }
+
+ private void setSaxBuilder(SAXBuilder saxBuilder) {
+ this.saxBuilder = saxBuilder;
+ }
+
@Autowired
public PluginManager(ClassHelper classHelper, TypeConverter typeConverter) {
+ this.setSaxBuilder(new SAXBuilder());
this.setClassHelper(classHelper);
this.setTypeConverter(typeConverter);
this.setPlugins(this.getClassHelper().loadClasses(PLUGIN_PACKAGE_NAME,
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Property.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Property.java
new file mode 100644
index 00000000..71d1c23e
--- /dev/null
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/Property.java
@@ -0,0 +1,7 @@
+package org.bench4q.agent.plugin;
+
+public @interface Property {
+ String key();
+
+ String value();
+}
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/CsvProvider.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/CsvProvider.java
index 6d7d96fe..8c22461d 100644
--- a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/CsvProvider.java
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/CsvProvider.java
@@ -12,6 +12,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bench4q.agent.plugin.BaseParameterization;
+import org.bench4q.agent.plugin.Behavior;
import org.bench4q.agent.plugin.Constructor;
import org.bench4q.agent.plugin.Parameter;
import org.bench4q.agent.plugin.Plugin;
@@ -129,6 +130,7 @@ public class CsvProvider extends BaseParameterization {
}
}
+ @Behavior(value = "reset")
public void reset() {
position = -1;
currentValues = null;
@@ -148,6 +150,7 @@ public class CsvProvider extends BaseParameterization {
}
}
+ @Behavior(value = "next")
public void doNext() {
if (shared) {
position = parent.position;
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/ui.xml b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/ui.xml
new file mode 100644
index 00000000..43ee3453
--- /dev/null
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/csvprovider/ui.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/dtd/ui.dtd b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/dtd/ui.dtd
new file mode 100644
index 00000000..84a876b4
--- /dev/null
+++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/dtd/ui.dtd
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+