|
|
@ -1,4 +1,4 @@ |
|
|
|
package com.fr.conf.demo.simple; |
|
|
|
package com.fr.conf.demo.simple.account; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.config.ConfigContext; |
|
|
|
import com.fr.config.ConfigContext; |
|
|
|
import com.fr.config.DefaultConfiguration; |
|
|
|
import com.fr.config.DefaultConfiguration; |
|
|
@ -12,7 +12,7 @@ import com.fr.intelli.record.Original; |
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
@Visualization(category = "Plugin") |
|
|
|
@Visualization(category = "Plugin-Config_Group") |
|
|
|
@EnableMetrics |
|
|
|
@EnableMetrics |
|
|
|
public class PluginSimpleConfig extends DefaultConfiguration { |
|
|
|
public class PluginSimpleConfig extends DefaultConfiguration { |
|
|
|
|
|
|
|
|
|
|
@ -26,12 +26,22 @@ public class PluginSimpleConfig extends DefaultConfiguration { |
|
|
|
return config; |
|
|
|
return config; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Identifier(value = "text", name = "Plugin-Config_Property_Text", description = "Plugin-Config_Property_Text_Description", group = "Plugin", status = Status.SHOW) |
|
|
|
@Identifier(value = "text", name = "Plugin-Config_Property_Text", description = "Plugin-Config_Property_Text_Description", status = Status.SHOW) |
|
|
|
private Conf<String> text = Holders.simple(StringUtils.EMPTY); |
|
|
|
private Conf<String> text = Holders.simple(StringUtils.EMPTY); |
|
|
|
|
|
|
|
|
|
|
|
@Identifier(value = "count", name = "Plugin-Config_Property_Count", description = "Config_Property_Count_Description", group = "Plugin", status = Status.SHOW) |
|
|
|
@Identifier(value = "count", name = "Plugin-Config_Property_Count", description = "Plugin-Config_Property_Count_Description", status = Status.SHOW) |
|
|
|
private Conf<Integer> count = Holders.simple(100); |
|
|
|
private Conf<Integer> count = Holders.simple(100); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Identifier(value = "price", name = "Plugin-Config_Property_Price", description = "Plugin-Config_Property_Price_Description", status = Status.SHOW) |
|
|
|
|
|
|
|
private Conf<Double> price = Holders.simple(1000.0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Identifier(value = "time", name = "Plugin-Config_Property_Time", description = "Plugin-Config_Property_Time_Description", status = Status.SHOW) |
|
|
|
|
|
|
|
private Conf<Long> time = Holders.simple(99999999L); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Identifier(value = "student", name = "Plugin-Config_Property_Student", description = "Plugin-Config_Property_Student_Description", status = Status.SHOW) |
|
|
|
|
|
|
|
private Conf<Boolean> student = Holders.simple(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getText() { |
|
|
|
public String getText() { |
|
|
|
return text.get(); |
|
|
|
return text.get(); |
|
|
|
} |
|
|
|
} |
|
|
@ -48,11 +58,38 @@ public class PluginSimpleConfig extends DefaultConfiguration { |
|
|
|
this.count.set(count); |
|
|
|
this.count.set(count); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public double getPrice() { |
|
|
|
|
|
|
|
return price.get(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setPrice(double price) { |
|
|
|
|
|
|
|
this.price.set(price); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public long getTime() { |
|
|
|
|
|
|
|
return time.get(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setTime(long time) { |
|
|
|
|
|
|
|
this.time.set(time); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isStudent() { |
|
|
|
|
|
|
|
return student.get(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setStudent(boolean student) { |
|
|
|
|
|
|
|
this.student.set(student); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object clone() throws CloneNotSupportedException { |
|
|
|
public Object clone() throws CloneNotSupportedException { |
|
|
|
PluginSimpleConfig cloned = (PluginSimpleConfig) super.clone(); |
|
|
|
PluginSimpleConfig cloned = (PluginSimpleConfig) super.clone(); |
|
|
|
cloned.text = (Conf<String>) text.clone(); |
|
|
|
cloned.text = (Conf<String>) text.clone(); |
|
|
|
cloned.count = (Conf<Integer>) count.clone(); |
|
|
|
cloned.count = (Conf<Integer>) count.clone(); |
|
|
|
|
|
|
|
cloned.price = (Conf<Double>) price.clone(); |
|
|
|
|
|
|
|
cloned.time = (Conf<Long>) time.clone(); |
|
|
|
|
|
|
|
cloned.student = (Conf<Boolean>) student.clone(); |
|
|
|
return cloned; |
|
|
|
return cloned; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |