Remove static methods from Validator

This commit is contained in:
Manfred Karrer 2014-09-11 12:14:56 +02:00
parent f2b5d7670f
commit 46863bb4c2
3 changed files with 12 additions and 10 deletions

View File

@ -169,8 +169,7 @@ public class MainModel extends UIModel {
///////////////////////////////////////////////////////////////////////////////////////////
private void onFacadesInitialised() {
// TODO Check this: never called on regtest
// Consider to use version from Mike Hearn
// TODO Consider to use version from Mike Hearn
walletFacade.addDownloadListener(new WalletFacade.DownloadListener() {
@Override
public void progress(double percent) {

View File

@ -163,7 +163,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
@Override
public void useSettingsContext(boolean useSettingsContext) {
if (useSettingsContext) {
// TODO
// TODO not impl. yet
}
}

View File

@ -28,8 +28,6 @@ import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
//TODO convert to non static
/**
* FiatNumberValidator for validating fiat values.
* <p>
@ -41,13 +39,9 @@ public final class FiatValidator extends NumberValidator {
//TODO Find appropriate values - depends on currencies
public static final double MIN_FIAT_VALUE = 0.01; // usually a cent is the smallest currency unit
public static final double MAX_FIAT_VALUE = 1000000;
private static String currencyCode = "Fiat";
private String currencyCode = "Fiat";
public static void setFiatCurrencyCode(String currencyCode) {
FiatValidator.currencyCode = currencyCode;
}
@Inject
public FiatValidator(User user) {
if (user != null) {
@ -85,6 +79,15 @@ public final class FiatValidator extends NumberValidator {
}
///////////////////////////////////////////////////////////////////////////////////////////
// Setter
///////////////////////////////////////////////////////////////////////////////////////////
public void setFiatCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Private methods
///////////////////////////////////////////////////////////////////////////////////////////