com.alachisoft.ncache.licensing.config.UserInfo Maven / Gradle / Ivy
// Licensed under the Apache License, Version 2.0 (the "License");
package com.alachisoft.ncache.licensing.config;
import com.alachisoft.ncache.ncactivate.utils.RegKeys;
public class UserInfo {
private String privateAddress,
privateCity,
privateCompany,
privateCountry,
privateEmail,
privateExtCode,
privateFirstName,
privateLastName,
privatePhone,
privateZip,
privateState;
public final String getAddress() {
return privateAddress;
}
public final void setAddress(String value) {
privateAddress = value;
}
public final String getCity() {
return privateCity;
}
public final void setCity(String value) {
privateCity = value;
}
public final String getCompany() {
return privateCompany;
}
public final void setCompany(String value) {
privateCompany = value;
}
public final String getCountry() {
return privateCountry;
}
public final void setCountry(String value) {
privateCountry = value;
}
public final String getEmail() {
return privateEmail;
}
public final void setEmail(String value) {
privateEmail = value;
}
public final String getExtensionCode() {
return privateExtCode;
}
public final void setExtensionCode(String value) {
privateExtCode = value;
}
public final String getFirstName() {
return privateFirstName;
}
public final void setFirstName(String value) {
privateFirstName = value;
}
public final String getLastName() {
return privateLastName;
}
public final void setLastName(String value) {
privateLastName = value;
}
public final String getPhone() {
return privatePhone;
}
public final void setPhone(String value) {
privatePhone = value;
}
public final String getState() {
return privateState;
}
public final void setState(String value) {
privateState = value;
}
public final String getZip() {
return privateZip;
}
public final void setZip(String value) {
privateZip = value;
}
public final String ToLinearText() {
String text = String.format("%1$s\t%2$s\t%3$s\t%4$s\t%5$s\t%6$s\t%7$s\t%8$s\t%9$s\t%10$s", getFirstName(), getLastName(), getEmail(), getCompany(), getAddress(), getCity(), getState(), getZip(), getCountry(), getPhone());
return text;
}
public final String ToXml() {
String xml = "";
xml += "";
xml += getFirstName();
xml += " ";
xml += "";
xml += getLastName();
xml += " ";
xml += "";
xml += getEmail();
xml += " ";
xml += "";
xml += getCompany();
xml += " ";
xml += "";
xml += getAddress();
xml += "";
xml += "";
xml += getCity();
xml += " ";
xml += "";
xml += getState();
xml += " ";
xml += "";
xml += getZip();
xml += " ";
xml += "";
xml += getCountry();
xml += " ";
xml += "";
xml += getPhone();
xml += " ";
xml += " ";
return xml;
}
public String getValue(RegKeys RegKey) {
switch (RegKey) {
case Address:
return getAddress();
case FirstName:
return getFirstName();
case LastName:
return getLastName();
case Company:
return getCompany();
case Zip:
return getZip();
case City:
return getCity();
case State:
return getState();
case Country:
return getCountry();
case Phone:
return getPhone();
case Email:
return getEmail();
default:
return "";
}
}
public void setValue(RegKeys regKey, String value) {
switch (regKey) {
case Address:
setAddress(value);
case FirstName:
setFirstName(value);
case LastName:
setLastName(value);
case Company:
setCompany(value);
case Zip:
setZip(value);
case City:
setCity(value);
case State:
setState(value);
case Country:
setCountry(value);
case Phone:
setPhone(value);
}
}
}