fix type of boost

Integer -> float
This commit is contained in:
Keiichi Watanabe 2015-11-02 17:37:25 +09:00
parent 41db9a5ce9
commit 10c7b55bc5
4 changed files with 12 additions and 17 deletions

View file

@ -56,10 +56,8 @@ public class CreateForm implements Serializable {
public String handlerScript;
@Required
@Min(value = 0)
@Max(value = 2147483647)
@Digits(integer = 10, fraction = 0)
public Integer boost;
// @FloatType
public float boost;
@Required
@Size(max = 5)
@ -81,7 +79,7 @@ public class CreateForm implements Serializable {
public void initialize() {
crudMode = CrudMode.CREATE;
boost = 1;
boost = 1.0f;
sortOrder = 0;
createdBy = ComponentUtil.getSystemHelper().getUsername();
createdTime = ComponentUtil.getSystemHelper().getCurrentTimeAsLong();

View file

@ -90,10 +90,8 @@ public class CreateForm implements Serializable {
public Integer intervalTime;
@Required
@Min(value = 0)
@Max(value = 2147483647)
@Digits(integer = 10, fraction = 0)
public Integer boost;
// @FloatType
public float boost;
@Required
@Size(max = 5)
@ -115,7 +113,7 @@ public class CreateForm implements Serializable {
public void initialize() {
crudMode = CrudMode.CREATE;
boost = 1;
boost = 1.0f;
numOfThread = Constants.DEFAULT_NUM_OF_THREAD_FOR_FS;
intervalTime = Constants.DEFAULT_INTERVAL_TIME_FOR_FS;
sortOrder = 0;

View file

@ -50,7 +50,8 @@ public class CreateForm implements Serializable {
public String maxSize;
@Required
public String boost;
// @FloatType
public float boost;
@Required
@Size(max = 255)
@ -63,7 +64,7 @@ public class CreateForm implements Serializable {
public void initialize() {
crudMode = CrudMode.CREATE;
maxSize = "10";
boost = "100.0";
boost = 100.0f;
createdBy = ComponentUtil.getSystemHelper().getUsername();
createdTime = ComponentUtil.getSystemHelper().getCurrentTimeAsLong();

View file

@ -96,10 +96,8 @@ public class CreateForm implements Serializable {
public Integer intervalTime;
@Required
@Min(value = 0)
@Max(value = 2147483647)
@Digits(integer = 10, fraction = 0)
public Integer boost;
// @FloatType
public float boost;
@Required
@Size(max = 5)
@ -121,7 +119,7 @@ public class CreateForm implements Serializable {
public void initialize() {
crudMode = CrudMode.CREATE;
boost = 1;
boost = 1.0f;
if (StringUtil.isBlank(userAgent)) {
userAgent = "FessCrawler/" + Constants.FESS_VERSION;
}