org.kapott.hbci.manager.HBCITwoStepMechanism Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbci4j-adorsys Show documentation
Show all versions of hbci4j-adorsys Show documentation
HBCI4j - Home Banking Computer Interface for Java - Clone from https://github.com/hbci4j/hbci4java
package org.kapott.hbci.manager;
import lombok.Data;
import java.lang.reflect.Field;
@Data
public class HBCITwoStepMechanism {
private String id;
private String secfunc;
private int segversion;
private int process;
private String name;
private String inputinfo;
private int nofactivetanmedia = 0;
private String needtanmedia = "";
private String needchallengeklass;
private String needchallengevalue;
private String zkamethod_name;
private String zkamethod_version;
private String medium;
public void setValue(String key, String value) {
switch (key) {
case "segversion":
setSegversion(Integer.parseInt(value));
break;
case "process":
setProcess(Integer.parseInt(value));
break;
case "nofactivetanmedia":
setNofactivetanmedia(Integer.parseInt(value));
break;
default:
try {
Field f = this.getClass().getDeclaredField(key);
f.set(this, value);
} catch (NoSuchFieldException | IllegalAccessException ex) {
//ignore
}
}
}
}